diff --git a/book.toml b/book.toml index f2bf36d..b68ec0c 100644 --- a/book.toml +++ b/book.toml @@ -23,7 +23,7 @@ site-url = "/patterns/" git-repository-url = "https://github.com/rust-unofficial/patterns" git-repository-icon = "fa-github" edit-url-template = "https://github.com/rust-unofficial/patterns/edit/main/{path}" -additional-css = ["./language-picker.css"] +additional-css = ["theme/css/language-picker.css"] [output.html.fold] enable = true @@ -33,3 +33,8 @@ level = 1 editable = false # [output.linkcheck] # enable the "mdbook-linkcheck" renderer, disabled due to gh-actions + +[output.html.redirect] +# Redirects in the form of "old-path" = "new-path", where the new path +# is relative to the old path. +"functional/lenses.html" = "optics.html" diff --git a/language-picker.css b/theme/css/language-picker.css similarity index 59% rename from language-picker.css rename to theme/css/language-picker.css index 1f7d537..1553ed6 100644 --- a/language-picker.css +++ b/theme/css/language-picker.css @@ -3,6 +3,11 @@ right: 10px; } +[dir="rtl"] #language-list { + left: 10px; + right: auto; +} + #language-list a { color: inherit; } diff --git a/theme/head.hbs b/theme/head.hbs new file mode 100644 index 0000000..8432ff2 --- /dev/null +++ b/theme/head.hbs @@ -0,0 +1,26 @@ +{{! Move to template code after fixing this issue: +https://github.com/google/mdbook-i18n-helpers/issues/70 }} + \ No newline at end of file diff --git a/theme/index.hbs b/theme/index.hbs index dd83020..30c42d9 100644 --- a/theme/index.hbs +++ b/theme/index.hbs @@ -1,58 +1,63 @@ - - - - - {{ 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}} - - + + + + + + {{ 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}} -