better htmx, better css
This commit is contained in:
parent
6260715057
commit
f7f6254016
4 changed files with 55 additions and 32 deletions
|
@ -16,7 +16,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav hx-boost="true" hx-target="body">
|
||||
<nav hx-boost="true" hx-target="body" hx-swap="outerHTML show:window:top">
|
||||
<a href="/">home</a>
|
||||
<span aria-hidden="true">-</span>
|
||||
<a href="/links">links</a>
|
||||
|
@ -26,7 +26,7 @@
|
|||
<a href="https://git.arimelody.me/ari/bliss.town" target="_blank">source</a>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
<main class="center-content">
|
||||
<div class="title-icon">
|
||||
<img src="/img/icon-light.svg" class="icon-light" width=64 height=64 />
|
||||
<img src="/img/icon-dark.svg" class="icon-dark" width=64 height=64 />
|
||||
|
@ -38,6 +38,20 @@
|
|||
<br>
|
||||
check back later for updates!
|
||||
</p>
|
||||
<button id="friendly-button">friendly button</button>
|
||||
<script>
|
||||
const button = document.getElementById("friendly-button");
|
||||
let clicks = 0;
|
||||
let saved_clicks = window.localStorage.getItem("friendly-button-clicks");
|
||||
if (saved_clicks) {
|
||||
clicks = saved_clicks;
|
||||
button.innerText = `clicked ${clicks} times!`;
|
||||
}
|
||||
button.addEventListener("click", () => {
|
||||
button.innerText = `clicked ${++clicks} times!`;
|
||||
window.localStorage.setItem("friendly-button-clicks", clicks);
|
||||
});
|
||||
</script>
|
||||
</main>
|
||||
<footer>
|
||||
<p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue