aboutsummaryrefslogtreecommitdiff
path: root/test/example/index.html
diff options
context:
space:
mode:
authorHayleigh Thompson <me@hayleigh.dev>2022-05-20 23:19:16 +0100
committerHayleigh Thompson <me@hayleigh.dev>2022-05-20 23:19:16 +0100
commit46e8b7a469f90bcda8cc26046babda4aa8657cc4 (patch)
tree00571b700984d78c24c1b6869e354fb6031f72bc /test/example/index.html
parent525e80d12eaee4f1a1ac26a128166ffef177c613 (diff)
downloadlustre-46e8b7a469f90bcda8cc26046babda4aa8657cc4.tar.gz
lustre-46e8b7a469f90bcda8cc26046babda4aa8657cc4.zip
:sparkles: Add twind to the examples for nicer styling.
Diffstat (limited to 'test/example/index.html')
-rw-r--r--test/example/index.html20
1 files changed, 17 insertions, 3 deletions
diff --git a/test/example/index.html b/test/example/index.html
index baaf9ed..f7432b9 100644
--- a/test/example/index.html
+++ b/test/example/index.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html lang="en">
+<html lang="en" hidden>
<head>
<meta charset="UTF-8">
@@ -13,11 +13,25 @@
import { main } from 'example/main.mjs'
document.addEventListener('DOMContentLoaded', main)
+
+ // This is so dumb. Parcel refuses to work with https imports, and when
+ // we try to use a script tag it "helpfully" strips the `type="module"`
+ // attribute meaning the shim doesn't work anyway.
+ //
+ // Here we're manually creating the script and setting its source using
+ // a string to stop parcle meddling with it. It works but,, eesh.
+ document.querySelector('head').appendChild((() => {
+ const script = document.createElement('script')
+ script.type = 'module'
+ script.innerHTML = `import 'https://cdn.skypack.dev/twind/shim'`
+
+ return script
+ })())
</script>
</head>
-<body>
- <div data-lustre-container></div>
+<body class="bg-gray-100 mx-8 md:mx-32 lg:mx-64">
+ <div data-lustre-container class="prose lg:prose-xl p-8"></div>
</body>
</html> \ No newline at end of file