From df12cc55c89cedf21aeb1686959e3578694bb50d Mon Sep 17 00:00:00 2001 From: Allen Date: Thu, 9 May 2019 11:18:28 -0700 Subject: [PATCH] Revert "Merge pull request #889 from s3bk/master" (#917) * Revert "Merge pull request #889 from s3bk/master" This reverts commit b30b58b56500a407de3de1413d25e5406036d60a, reversing changes made to c6220fba830d0fc055df33f37b99874c969b4694. * format tests :P --- src/book/init.rs | 3 - src/renderer/html_handlebars/hbs_renderer.rs | 3 +- src/theme/book.js | 8 --- src/theme/css/book.css | 65 -------------------- src/theme/index.hbs | 5 +- src/theme/mod.rs | 6 -- tests/rendered_output.rs | 1 - 7 files changed, 3 insertions(+), 88 deletions(-) delete mode 100644 src/theme/css/book.css diff --git a/src/book/init.rs b/src/book/init.rs index e24efafd..a70006bb 100644 --- a/src/book/init.rs +++ b/src/book/init.rs @@ -134,9 +134,6 @@ impl BookBuilder { let mut general_css = File::create(cssdir.join("general.css"))?; general_css.write_all(theme::GENERAL_CSS)?; - let mut book_css = File::create(cssdir.join("book.css"))?; - book_css.write_all(theme::BOOK_CSS)?; - let mut chrome_css = File::create(cssdir.join("chrome.css"))?; chrome_css.write_all(theme::CHROME_CSS)?; diff --git a/src/renderer/html_handlebars/hbs_renderer.rs b/src/renderer/html_handlebars/hbs_renderer.rs index ab0d6b6f..82ced929 100644 --- a/src/renderer/html_handlebars/hbs_renderer.rs +++ b/src/renderer/html_handlebars/hbs_renderer.rs @@ -123,7 +123,6 @@ impl HtmlHandlebars { write_file(destination, "book.js", &theme.js)?; write_file(destination, "css/general.css", &theme.general_css)?; - write_file(destination, "css/book.css", &theme.book_css)?; write_file(destination, "css/chrome.css", &theme.chrome_css)?; write_file(destination, "css/print.css", &theme.print_css)?; write_file(destination, "css/variables.css", &theme.variables_css)?; @@ -558,7 +557,7 @@ fn fix_code_blocks(html: &str) -> String { let after = &caps[3]; format!( - r#""#, + r#""#, before = before, classes = classes, after = after diff --git a/src/theme/book.js b/src/theme/book.js index e6de2ca7..1aff593f 100644 --- a/src/theme/book.js +++ b/src/theme/book.js @@ -330,19 +330,11 @@ function playpen_text(playpen) { stylesheets.ayuHighlight.disabled = false; stylesheets.tomorrowNight.disabled = true; stylesheets.highlight.disabled = true; - - ace_theme = "ace/theme/tomorrow_night"; - } else if (theme == 'book') { - stylesheets.ayuHighlight.disabled = true; - stylesheets.tomorrowNight.disabled = true; - stylesheets.highlight.disabled = true; - ace_theme = "ace/theme/tomorrow_night"; } else { stylesheets.ayuHighlight.disabled = true; stylesheets.tomorrowNight.disabled = true; stylesheets.highlight.disabled = false; - ace_theme = "ace/theme/dawn"; } diff --git a/src/theme/css/book.css b/src/theme/css/book.css deleted file mode 100644 index e129bf81..00000000 --- a/src/theme/css/book.css +++ /dev/null @@ -1,65 +0,0 @@ -body { - font-family: "Source Serif Pro", serif; -} -p { - text-align: justify; - line-height: 1.25em; -} -code { - font-family: "Source Code Pro", monospace; - padding: 0 !important; -} -code:not(.block) { - padding: 0 0 1pt 0 !important; -} -code:not(.block)::before { - content: '‘'; -} -code:not(.block)::after { - content: '’'; -} -pre { - margin-left: 2em; -} -pre pre { - margin-left: 0; -} -pre.playpen > div.buttons { - float: right; - height: 0; -} -em { - font-style: italic; -} -h3::before { - content: "¶"; - width: 1em; - display: inline-block; - margin-left: -1em; -} -h4::before { - content: "§"; - width: 1em; - display: inline-block; - margin-left: -1em; -} -.left-buttons { - position: absolute; -} -.right-buttons { - position: absolute; - right: 0; -} - -#menu-bar-sticky-container { - background-color: rgba(255, 255, 255, 0.8) !important; -} - -@media print { - .menu-bar, .buttons { - display: none; - } - body { - font-size: 11pt; - } -} diff --git a/src/theme/index.hbs b/src/theme/index.hbs index 5e0d7013..4e29807c 100644 --- a/src/theme/index.hbs +++ b/src/theme/index.hbs @@ -17,18 +17,18 @@ - - + + {{#each additional_css}} @@ -109,7 +109,6 @@
  • -
  • {{#if search_enabled}}