Created
August 1, 2025 22:38
-
-
Save clayperez/dba61c5a3a279ce2691157f3dbabe0d7 to your computer and use it in GitHub Desktop.
Simple Parameters Display
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style> | |
| .fs-container { | |
| max-width: 800px; | |
| margin: 0 auto; | |
| background: white; | |
| border-radius: 12px; | |
| box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); | |
| overflow: hidden; | |
| } | |
| .fs-header { | |
| background: #E42745; | |
| color: white; | |
| padding: 30px; | |
| text-align: center; | |
| } | |
| .fs-header h1 { | |
| font-size: 2.5rem; | |
| margin-bottom: 10px; | |
| font-weight: 300; | |
| } | |
| .fs-header p { | |
| opacity: 0.9; | |
| font-size: 1.1rem; | |
| } | |
| .fs-content { | |
| padding: 40px; | |
| } | |
| .fs-empty-state { | |
| text-align: center; | |
| padding: 60px 20px; | |
| color: #666; | |
| } | |
| .fs-empty-state i { | |
| font-size: 4rem; | |
| margin-bottom: 20px; | |
| opacity: 0.3; | |
| } | |
| .fs-params-grid { | |
| display: grid; | |
| gap: 20px; | |
| grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | |
| } | |
| .fs-param-card { | |
| background: #f8f9fa; | |
| border-radius: 8px; | |
| padding: 20px; | |
| border-left: 4px solid #E42745; | |
| transition: transform 0.2s ease, box-shadow 0.2s ease; | |
| } | |
| .fs-param-card:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); | |
| } | |
| .fs-param-label { | |
| font-weight: 600; | |
| color: #333; | |
| font-size: 0.9rem; | |
| text-transform: uppercase; | |
| letter-spacing: 0.5px; | |
| margin-bottom: 8px; | |
| display: block; | |
| } | |
| .fs-param-value { | |
| font-size: 1.1rem; | |
| color: #555; | |
| word-break: break-word; | |
| line-height: 1.4; | |
| } | |
| @media (max-width: 768px) { | |
| .fs-header h1 { | |
| font-size: 2rem; | |
| } | |
| .fs-content { | |
| padding: 20px; | |
| } | |
| .fs-params-grid { | |
| grid-template-columns: 1fr; | |
| } | |
| } | |
| </style> | |
| <div class="fs-container"> | |
| <div class="fs-content"> | |
| <div id="transaction"> | |
| <div v-if="Object.keys(transactions).length === 0" class="fs-empty-state"> | |
| <div style="font-size: 4rem; margin-bottom: 20px; opacity: 0.3;">📋</div> | |
| <h3>No Data to Show</h3> | |
| </div> | |
| <div v-else> | |
| <div class="fs-params-grid"> | |
| <div v-for="(value, key) in transactions" :key="key" class="fs-param-card"> | |
| <span class="fs-param-label">{{ strip(key) }}</span> | |
| <div class="fs-param-value">{{ value || 'No value' }}</div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/3.3.4/vue.global.min.js"></script> | |
| <script> | |
| const { createApp, ref, computed, onMounted } = Vue; | |
| createApp({ | |
| setup() { | |
| const transactions = ref({}); | |
| const strip = (value) => { | |
| return value.replace(/_/g, " "); | |
| }; | |
| const getParams = () => { | |
| let params = {}; | |
| let parser = document.createElement('a'); | |
| parser.href = window.location.href; | |
| let query = parser.search.substring(1); | |
| let vars = query.split('&'); | |
| for (let i = 0; i < vars.length; i++) { | |
| let pair = vars[i].split('='); | |
| params[pair[0]] = decodeURIComponent(pair[1]).replace(/\+/g, " "); | |
| } | |
| return params || {}; | |
| }; | |
| onMounted(() => { | |
| transactions.value = getParams(); | |
| }); | |
| return { | |
| transactions, | |
| strip | |
| }; | |
| } | |
| }).mount('#transaction'); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment