* Revert "Merge pull request #889 from s3bk/master" This reverts commitb30b58b565
, reversing changes made toc6220fba83
. * format tests :P
This commit is contained in:
parent
cb4a3e0711
commit
df12cc55c8
|
@ -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)?;
|
||||
|
||||
|
|
|
@ -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#"<code{before}class="block {classes}"{after}>"#,
|
||||
r#"<code{before}class="{classes}"{after}>"#,
|
||||
before = before,
|
||||
classes = classes,
|
||||
after = after
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -17,18 +17,18 @@
|
|||
<link rel="stylesheet" href="{{ path_to_root }}css/variables.css">
|
||||
<link rel="stylesheet" href="{{ path_to_root }}css/general.css">
|
||||
<link rel="stylesheet" href="{{ path_to_root }}css/chrome.css">
|
||||
<link rel="stylesheet" href="{{ path_to_root }}css/book.css">
|
||||
<link rel="stylesheet" href="{{ path_to_root }}css/print.css" media="print">
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="stylesheet" href="{{ path_to_root }}FontAwesome/css/font-awesome.css">
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
|
||||
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro|Source+Serif+Pro" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
|
||||
|
||||
<!-- Highlight.js Stylesheets -->
|
||||
<link rel="stylesheet" href="{{ path_to_root }}highlight.css">
|
||||
<link rel="stylesheet" href="{{ path_to_root }}tomorrow-night.css">
|
||||
<link rel="stylesheet" href="{{ path_to_root }}ayu-highlight.css">
|
||||
|
||||
<!-- Custom theme stylesheets -->
|
||||
{{#each additional_css}}
|
||||
<link rel="stylesheet" href="{{ ../path_to_root }}{{ this }}">
|
||||
|
@ -109,7 +109,6 @@
|
|||
<li role="none"><button role="menuitem" class="theme" id="coal">{{ theme_option "Coal" }}</button></li>
|
||||
<li role="none"><button role="menuitem" class="theme" id="navy">{{ theme_option "Navy" }}</button></li>
|
||||
<li role="none"><button role="menuitem" class="theme" id="ayu">{{ theme_option "Ayu" }}</button></li>
|
||||
<li role="none"><button role="menuitem" class="theme" id="book">{{ theme_option "Book" }}</button></li>
|
||||
</ul>
|
||||
{{#if search_enabled}}
|
||||
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
|
||||
|
|
|
@ -15,7 +15,6 @@ pub static INDEX: &'static [u8] = include_bytes!("index.hbs");
|
|||
pub static HEADER: &'static [u8] = include_bytes!("header.hbs");
|
||||
pub static CHROME_CSS: &'static [u8] = include_bytes!("css/chrome.css");
|
||||
pub static GENERAL_CSS: &'static [u8] = include_bytes!("css/general.css");
|
||||
pub static BOOK_CSS: &'static [u8] = include_bytes!("css/book.css");
|
||||
pub static PRINT_CSS: &'static [u8] = include_bytes!("css/print.css");
|
||||
pub static VARIABLES_CSS: &'static [u8] = include_bytes!("css/variables.css");
|
||||
pub static FAVICON: &'static [u8] = include_bytes!("favicon.png");
|
||||
|
@ -50,7 +49,6 @@ pub struct Theme {
|
|||
pub header: Vec<u8>,
|
||||
pub chrome_css: Vec<u8>,
|
||||
pub general_css: Vec<u8>,
|
||||
pub book_css: Vec<u8>,
|
||||
pub print_css: Vec<u8>,
|
||||
pub variables_css: Vec<u8>,
|
||||
pub favicon: Vec<u8>,
|
||||
|
@ -82,7 +80,6 @@ impl Theme {
|
|||
(theme_dir.join("book.js"), &mut theme.js),
|
||||
(theme_dir.join("css/chrome.css"), &mut theme.chrome_css),
|
||||
(theme_dir.join("css/general.css"), &mut theme.general_css),
|
||||
(theme_dir.join("css/book.css"), &mut theme.book_css),
|
||||
(theme_dir.join("css/print.css"), &mut theme.print_css),
|
||||
(
|
||||
theme_dir.join("css/variables.css"),
|
||||
|
@ -124,7 +121,6 @@ impl Default for Theme {
|
|||
header: HEADER.to_owned(),
|
||||
chrome_css: CHROME_CSS.to_owned(),
|
||||
general_css: GENERAL_CSS.to_owned(),
|
||||
book_css: BOOK_CSS.to_owned(),
|
||||
print_css: PRINT_CSS.to_owned(),
|
||||
variables_css: VARIABLES_CSS.to_owned(),
|
||||
favicon: FAVICON.to_owned(),
|
||||
|
@ -180,7 +176,6 @@ mod tests {
|
|||
"favicon.png",
|
||||
"css/chrome.css",
|
||||
"css/general.css",
|
||||
"css/book.css",
|
||||
"css/print.css",
|
||||
"css/variables.css",
|
||||
"book.js",
|
||||
|
@ -213,7 +208,6 @@ mod tests {
|
|||
highlight_css: Vec::new(),
|
||||
tomorrow_night_css: Vec::new(),
|
||||
ayu_highlight_css: Vec::new(),
|
||||
book_css: Vec::new(),
|
||||
highlight_js: Vec::new(),
|
||||
clipboard_js: Vec::new(),
|
||||
};
|
||||
|
|
|
@ -419,7 +419,6 @@ fn theme_dir_overrides_work_correctly() {
|
|||
dummy_book::assert_contains_strings(built_index, &["This is a modified index.hbs!"]);
|
||||
}
|
||||
|
||||
|
||||
#[test]
|
||||
fn no_index_for_print_html() {
|
||||
let temp = DummyBook::new().build().unwrap();
|
||||
|
|
Loading…
Reference in New Issue