]> git.ardis.lu - simulate-etherscan-function-display/commitdiff
Only show output header if textarea is populated
authorArdis Lu <ardisglu@gmail.com>
Tue, 11 Jul 2023 02:52:34 +0000 (19:52 -0700)
committerArdis Lu <ardisglu@gmail.com>
Tue, 11 Jul 2023 02:52:34 +0000 (19:52 -0700)
index.html

index 1dc5cb62704edbc6226ffe1bd3a760c74c950f62..15757b5c713143687da7e7e225981759fa77a674 100644 (file)
       background: rgb(8 29 53);
       clip-path: polygon(0 0, 100% 0, 50% 90%);
     }
+
+    #output-header {
+      display: none;
+    }
+
+    textarea:not(:invalid) + #output-header {
+      display: unset;
+    }
   </style>
 </head>
 
 
   <main>
     <label for="functions">Solidity functions</label>
-    <textarea name="functions" id="functions" placeholder="function totalSupply() external view returns (uint256)" autocomplete="off"></textarea>
+    <textarea name="functions" id="functions" placeholder="function totalSupply() external view returns (uint256)" autocomplete="off" required></textarea>
 
-    <h2>Simulated Etherscan function pills</h2>
+    <h2 id="output-header">Simulated Etherscan function pills</h2>
     <div class="pill-container"></div>
   </main>
 
This page took 0.036914 seconds and 4 git commands to generate.