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}}