From 438c16607dad451e4df5620ca1f428d92935bfc3 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Wed, 25 Jan 2023 21:31:22 +0100 Subject: [PATCH] Add theme generated with `mdbook init --theme` (#189) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will allow us to customize the appearance more easily: we can move the GA logic into the theme (to reduce load times and to simplify the JS injection logic). We can also add new elements, which is what I will do next. The mdbook theme can be added incrementally: if we don’t add a file to our theme folder, we will get the corresponding file from mdbook. --- theme/index.hbs | 313 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 313 insertions(+) create mode 100644 theme/index.hbs diff --git a/theme/index.hbs b/theme/index.hbs new file mode 100644 index 00000000..147eb9af --- /dev/null +++ b/theme/index.hbs @@ -0,0 +1,313 @@ + + + + + + {{ title }} + {{#if is_print }} + + {{/if}} + {{#if base_url}} + + {{/if}} + + + + {{> head}} + + + + + + {{#if favicon_svg}} + + {{/if}} + {{#if favicon_png}} + + {{/if}} + + + + {{#if print_enable}} + + {{/if}} + + + + {{#if copy_fonts}} + + {{/if}} + + + + + + + + {{#each additional_css}} + + {{/each}} + + {{#if mathjax_support}} + + + {{/if}} + + + + + + + + + + + + + + + + +
+ +
+ {{> header}} + + + + {{#if search_enabled}} + + {{/if}} + + + + +
+
+ {{{ content }}} +
+ + +
+
+ + + +
+ + {{#if live_reload_endpoint}} + + + {{/if}} + + {{#if google_analytics}} + + + {{/if}} + + {{#if playground_line_numbers}} + + {{/if}} + + {{#if playground_copyable}} + + {{/if}} + + {{#if playground_js}} + + + + + + {{/if}} + + {{#if search_js}} + + + + {{/if}} + + + + + + + {{#each additional_js}} + + {{/each}} + + {{#if is_print}} + {{#if mathjax_support}} + + {{else}} + + {{/if}} + {{/if}} + + +