Last active
February 11, 2022 15:33
-
-
Save tscritch/2344442cab8e6adb7d231fd89b0d4c4f to your computer and use it in GitHub Desktop.
A template to create a ui based tool
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
| #! /bin/bash | |
| filename="$HOME/Documents/tools/$1.html" | |
| cp $HOME/Documents/tools/tool-template.html $filename | |
| sed -i '' "s/{NAME}/$1/" "$filename" |
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
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>{NAME}</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <style> | |
| * { | |
| font-family: "FiraCode Nerd Font"; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-slate-100"> | |
| <button | |
| id="button" | |
| class="block bg-sky-500 text-white px-4 py-2 m-2 rounded-lg" | |
| > | |
| DO THING | |
| </button> | |
| <div id="output" class="mt-4"></div> | |
| <script> | |
| const button = document.getElementById("button"); | |
| const output = document.getElementById("output"); | |
| convert.addEventListener("click", () => { | |
| output.innerText = "Surprise! 🔨"; | |
| }); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment