]> git.ipfire.org Git - ipfire.org.git/commitdiff
error-pages: Only load the parts of Bulma we need
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 9 Jan 2024 16:46:06 +0000 (16:46 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 9 Jan 2024 16:46:06 +0000 (16:46 +0000)
This reduces the size of the embedded CSS from around 400k to 100k. Not
great, but better than before.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/error-pages/_includes/main.sass
src/error-pages/_layouts/error.html

index cafcabf3d03f418c442b2cf5eaebd718b4de4a14..42e101579d50c0afe8bf4aae6f964cff43193ab0 100644 (file)
@@ -1,2 +1,31 @@
-// Import the main CSS styles
-@import "../sass/main.sass"
+@charset "utf-8"
+
+$baseurl: "https://www.michael.dev.ipfire.org"
+
+// Import variables
+@import "../sass/_variables.sass"
+
+// Import only the Bulma stuff that we actually need
+@import "../third-party/bulma/sass/utilities/_all.sass"
+
+// The basic stuff
+@import "../third-party/bulma/sass/base/minireset.sass"
+@import "../third-party/bulma/sass/base/generic.sass"
+
+// Elements
+@import "../third-party/bulma/sass/elements/container.sass"
+@import "../third-party/bulma/sass/elements/content.sass"
+@import "../third-party/bulma/sass/elements/title.sass"
+
+// Helpers
+@import "../third-party/bulma/sass/helpers/color.sass"
+@import "../third-party/bulma/sass/helpers/typography.sass"
+
+// Components
+@import "../third-party/bulma/sass/components/navbar.sass"
+
+// Layout
+@import "../third-party/bulma/sass/layout/hero.sass"
+
+// Import fonts
+@import "../sass/_fonts"
index c5e0f40277965ddfd09cd4c6ef23ca1d01d3ffb3..6b62622b52cf3f4d5287b65460ac8e72b92a63f4 100644 (file)
@@ -40,7 +40,9 @@
                                </div>
                        </div>
 
-                       {{ content }}
+                       <div class="content">
+                               {{ content }}
+                       </div>
                </div>
        </body>
 </html>