Last active
February 20, 2026 22:39
-
-
Save Explosion-Scratch/4e39cdbde3054ef580da053dbb1dfe82 to your computer and use it in GitHub Desktop.
test-pen
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
| { | |
| "name": "test-pen", | |
| "version": "1.0.0", | |
| "editors": [ | |
| { | |
| "type": "html", | |
| "filename": "index.html", | |
| "settings": { | |
| "doctype": "html5", | |
| "lang": "en", | |
| "tabSize": 2, | |
| "lineWrapping": true, | |
| "lineNumbers": true, | |
| "emmet": true | |
| } | |
| }, | |
| { | |
| "type": "less", | |
| "filename": "style.less", | |
| "settings": { | |
| "normalize": true, | |
| "autoprefixer": false | |
| } | |
| }, | |
| { | |
| "type": "jsx", | |
| "filename": "script.jsx", | |
| "settings": { | |
| "compiler": "preact" | |
| } | |
| } | |
| ], | |
| "globalResources": { | |
| "scripts": [], | |
| "styles": [] | |
| }, | |
| "gistId": "4e39cdbde3054ef580da053dbb1dfe82" | |
| } |
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
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <div id="app"></div> | |
| </body> | |
| </html> |
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
| import { h, render, Fragment } from 'preact'; | |
| import { useState } from 'preact/hooks'; | |
| function App() { | |
| const [count, setCount] = useState(0); | |
| return ( | |
| <div className="container"> | |
| <h1>k</h1> | |
| <p>A lightweight React alternative.</p> | |
| <div className="counter-display">{count}</div> | |
| <button className="accent-btn" onClick={() => setCount(count + 1)}> | |
| Increment | |
| </button> | |
| </div> | |
| ); | |
| } | |
| render(<App />, document.getElementById('app')); | |
| console.log('test trigger') |
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
| @accent: #3ab69d; | |
| body { | |
| margin: 0; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| min-height: 100vh; | |
| background-color: lighten(@accent, 50%); | |
| font-family: 'DM Sans', sans-serif; | |
| color: darken(@accent, 20%); | |
| } | |
| .container { | |
| padding: 3rem; | |
| background: white; | |
| border-radius: 24px; | |
| box-shadow: 0 4px 30px rgba(0,0,0,0.02); | |
| border: 1px solid lighten(@accent, 40%); | |
| text-align: center; | |
| } | |
| h1 { | |
| margin-top: 0; | |
| color: @accent; | |
| font-weight: 700; | |
| font-size: 1.75rem; | |
| } | |
| .counter-display { | |
| font-size: 3rem; | |
| font-weight: 700; | |
| margin: 1.5rem 0; | |
| color: @accent; | |
| } | |
| .accent-btn { | |
| background-color: @accent; | |
| color: white; | |
| border: none; | |
| padding: 0.8rem 2rem; | |
| border-radius: 100px; | |
| cursor: pointer; | |
| font-size: 1rem; | |
| font-weight: 600; | |
| transition: all 0.2s ease; | |
| &:hover { | |
| background-color: darken(@accent, 10%); | |
| box-shadow: 0 4px 15px fade(@accent, 40%); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment