feat: locale and fixed some debouncing stuff

This commit is contained in:
Strix 2023-12-24 03:05:20 +01:00
parent 75bf105e98
commit de41ed3306
No known key found for this signature in database
GPG key ID: 5F35B3B8537287A7
5 changed files with 89 additions and 22 deletions

View file

@ -1,22 +1,27 @@
<html x0-mods="copy,http" x0-module-root="./modules/">
<html
x0-mods="locale,copy,http"
x0-module-root="./modules/"
x0-init="false"
x1-locale-file="./test.json"
x1-locale-watch
>
<body>
<button onclick="window.x0.update()">Update x0</button>
<input type="text" name="text" id="text">
<h1 x-locale-key="main.greeting"></h1>
<div>
<h2>Copy</h2>
<h2 x-locale-key="copy-section.header"></h2>
<div id="ex">
<span>Original content</span>
<span x-locale-key="copy-section.content-span"></span>
</div>
<div x-inner-text x-copy-query="#ex"></div>
<div x-copy-query="#ex"></div>
</div>
<div>
<h2>Get</h2>
<h2 x-locale-key="http-section.header"></h2>
<pre x-inner-text x-get="./test.html" x-get-refresh=5000></>
</div>
<div>
<button onclick="window.x0.update()">Update x0</button>
</div>
</body>
<script src="./x0.js"></script>