Skip to content

Commit d167287

Browse files
committed
wip
1 parent 325b5cb commit d167287

File tree

4 files changed

+15
-26
lines changed

4 files changed

+15
-26
lines changed

ghcjs/delivery-calculator/flake.nix

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@
4747
${app-release-wasm}/bin/app-release-wasm
4848
out="./dist/latest"
4949
rm -rf "$out"
50-
mkdir -p "$out/static/css"
51-
cp -R ./static/webfonts $out/static/webfonts
50+
cp -R ${../miso-functora/dist}/* $out/
5251
cp ./static/*.png $out/static/
5352
cp ./static/*.woff2 $out/static/
5453
cp ./static/*.webmanifest $out/
@@ -84,13 +83,6 @@
8483
-o $out/index.html \
8584
./static/wasm.html
8685
87-
${pkgs.clean-css-cli}/bin/cleancss \
88-
-O2 \
89-
--source-map \
90-
-o $out/static/css/all.css \
91-
./static/css/fontawesome.min.css \
92-
./static/css/app.css
93-
9486
${pkgs.nodejs}/bin/npm i --prefer-offline
9587
${pkgs.nodejs}/bin/npm run build
9688
'';

ghcjs/delivery-calculator/src/Main.hs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -302,18 +302,24 @@ viewModel :: Model -> View Action
302302
#if defined(__GHCJS__) || defined(ghcjs_HOST_OS) || defined(wasi_HOST_OS)
303303
viewModel st =
304304
prependViews
305-
( ( if not (st ^. #modelState . #stEnableTheme)
305+
(
306+
[ keyed "css-pre-theme" $ link_
307+
[ rel_ "stylesheet",
308+
href_ $ "miso-functora/pre-theme.min.css"
309+
]
310+
] <>
311+
( if not (st ^. #modelState . #stEnableTheme)
306312
then mempty
307313
else
308-
[ link_
314+
[ keyed "css-theme" $ link_
309315
[ rel_ "stylesheet",
310316
href_ $ "themes/" <> themeCssFile (st ^. #modelState . #stTheme)
311317
]
312318
]
313319
) <>
314-
[ link_
320+
[ keyed "css-post-theme" $ link_
315321
[ rel_ "stylesheet",
316-
href_ $ "miso-functora/miso-functora.min.css"
322+
href_ $ "miso-functora/post-theme.min.css"
317323
]
318324
]
319325
)
@@ -325,21 +331,21 @@ viewModel st =
325331
--
326332
prependViews
327333
(
328-
[ link_
334+
[ keyed "css-pre-theme" $ link_
329335
[ rel_ "stylesheet",
330336
href_ $ "miso-functora/pre-theme.css"
331337
]
332338
] <>
333339
( if not (st ^. #modelState . #stEnableTheme)
334340
then mempty
335341
else
336-
[ link_
342+
[ keyed "css-theme" $ link_
337343
[ rel_ "stylesheet",
338344
href_ $ "themes/" <> themeCssFile (st ^. #modelState . #stTheme)
339345
]
340346
]
341347
) <>
342-
[ link_
348+
[ keyed "css-post-theme" $ link_
343349
[ rel_ "stylesheet",
344350
href_ $ "miso-functora/post-theme.css"
345351
]

ghcjs/delivery-calculator/static/wasm.html

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@
66
<script language="javascript" src="miso_functora.js" defer="defer"></script>
77
<script language="javascript" src="wasm.js" defer="defer"></script>
88
<link rel="preconnect" href="https://cdn.jsdelivr.net" />
9-
<link
10-
rel="preload"
11-
href="static/css/all.css"
12-
as="style"
13-
onload="this.onload=null;this.rel='stylesheet'"
14-
/>
15-
<noscript>
16-
<link rel="stylesheet" href="static/css/all.css" />
17-
</noscript>
189
</head>
1910
<body></body>
2011
</html>

ghcjs/miso-functora/src/Functora/Miso/Widgets/FixedOverlay.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fixedOverlay attrs =
1616
("left", "0"),
1717
("width", "100%"),
1818
("height", "100%"),
19-
("z-index", "9999"),
19+
("z-index", "9998"),
2020
("backdrop-filter", "blur(2px)"),
2121
("background-color", "rgba(0, 0, 0, 0.5)")
2222
]

0 commit comments

Comments
 (0)