Skip to content

Commit 4886c92

Browse files
Finish moving resources around
1 parent 195d97a commit 4886c92

29 files changed

+26
-26
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/theme/mod.rs renamed to src/front-end/mod.rs

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,31 @@ use std::path::{Path, PathBuf};
1313

1414
use crate::errors::*;
1515
use log::warn;
16-
pub static INDEX: &[u8] = include_bytes!("../front-end/templates/index.hbs");
17-
pub static HEAD: &[u8] = include_bytes!("../front-end/templates/head.hbs");
18-
pub static REDIRECT: &[u8] = include_bytes!("../front-end/templates/redirect.hbs");
19-
pub static HEADER: &[u8] = include_bytes!("../front-end/templates/header.hbs");
20-
pub static TOC_JS: &[u8] = include_bytes!("../front-end/templates/toc.js.hbs");
21-
pub static TOC_HTML: &[u8] = include_bytes!("../front-end/templates/toc.html.hbs");
22-
pub static CHROME_CSS: &[u8] = include_bytes!("../front-end/css/chrome.css");
23-
pub static GENERAL_CSS: &[u8] = include_bytes!("../front-end/css/general.css");
24-
pub static PRINT_CSS: &[u8] = include_bytes!("../front-end/css/print.css");
25-
pub static VARIABLES_CSS: &[u8] = include_bytes!("../front-end/css/variables.css");
26-
pub static FAVICON_PNG: &[u8] = include_bytes!("favicon.png");
27-
pub static FAVICON_SVG: &[u8] = include_bytes!("favicon.svg");
28-
pub static JS: &[u8] = include_bytes!("../front-end/js/book.js");
29-
pub static HIGHLIGHT_JS: &[u8] = include_bytes!("../front-end/js/highlight.js");
30-
pub static TOMORROW_NIGHT_CSS: &[u8] = include_bytes!("../front-end/css/tomorrow-night.css");
31-
pub static HIGHLIGHT_CSS: &[u8] = include_bytes!("../front-end/css/highlight.css");
32-
pub static AYU_HIGHLIGHT_CSS: &[u8] = include_bytes!("../front-end/css/ayu-highlight.css");
33-
pub static CLIPBOARD_JS: &[u8] = include_bytes!("../front-end/js/clipboard.min.js");
34-
pub static FONT_AWESOME: &[u8] = include_bytes!("../front-end/css/font-awesome.min.css");
35-
pub static FONT_AWESOME_EOT: &[u8] = include_bytes!("../front-end/fonts/fontawesome-webfont.eot");
36-
pub static FONT_AWESOME_SVG: &[u8] = include_bytes!("../front-end/fonts/fontawesome-webfont.svg");
37-
pub static FONT_AWESOME_TTF: &[u8] = include_bytes!("../front-end/fonts/fontawesome-webfont.ttf");
38-
pub static FONT_AWESOME_WOFF: &[u8] = include_bytes!("../front-end/fonts/fontawesome-webfont.woff");
39-
pub static FONT_AWESOME_WOFF2: &[u8] =
40-
include_bytes!("../front-end/fonts/fontawesome-webfont.woff2");
41-
pub static FONT_AWESOME_OTF: &[u8] = include_bytes!("../front-end/fonts/FontAwesome.otf");
16+
pub static INDEX: &[u8] = include_bytes!("templates/index.hbs");
17+
pub static HEAD: &[u8] = include_bytes!("templates/head.hbs");
18+
pub static REDIRECT: &[u8] = include_bytes!("templates/redirect.hbs");
19+
pub static HEADER: &[u8] = include_bytes!("templates/header.hbs");
20+
pub static TOC_JS: &[u8] = include_bytes!("templates/toc.js.hbs");
21+
pub static TOC_HTML: &[u8] = include_bytes!("templates/toc.html.hbs");
22+
pub static CHROME_CSS: &[u8] = include_bytes!("css/chrome.css");
23+
pub static GENERAL_CSS: &[u8] = include_bytes!("css/general.css");
24+
pub static PRINT_CSS: &[u8] = include_bytes!("css/print.css");
25+
pub static VARIABLES_CSS: &[u8] = include_bytes!("css/variables.css");
26+
pub static FAVICON_PNG: &[u8] = include_bytes!("images/favicon.png");
27+
pub static FAVICON_SVG: &[u8] = include_bytes!("images/favicon.svg");
28+
pub static JS: &[u8] = include_bytes!("js/book.js");
29+
pub static HIGHLIGHT_JS: &[u8] = include_bytes!("js/highlight.js");
30+
pub static TOMORROW_NIGHT_CSS: &[u8] = include_bytes!("css/tomorrow-night.css");
31+
pub static HIGHLIGHT_CSS: &[u8] = include_bytes!("css/highlight.css");
32+
pub static AYU_HIGHLIGHT_CSS: &[u8] = include_bytes!("css/ayu-highlight.css");
33+
pub static CLIPBOARD_JS: &[u8] = include_bytes!("js/clipboard.min.js");
34+
pub static FONT_AWESOME: &[u8] = include_bytes!("css/font-awesome.min.css");
35+
pub static FONT_AWESOME_EOT: &[u8] = include_bytes!("fonts/fontawesome-webfont.eot");
36+
pub static FONT_AWESOME_SVG: &[u8] = include_bytes!("fonts/fontawesome-webfont.svg");
37+
pub static FONT_AWESOME_TTF: &[u8] = include_bytes!("fonts/fontawesome-webfont.ttf");
38+
pub static FONT_AWESOME_WOFF: &[u8] = include_bytes!("fonts/fontawesome-webfont.woff");
39+
pub static FONT_AWESOME_WOFF2: &[u8] = include_bytes!("fonts/fontawesome-webfont.woff2");
40+
pub static FONT_AWESOME_OTF: &[u8] = include_bytes!("fonts/FontAwesome.otf");
4241

4342
/// The `Theme` struct should be used instead of the static variables because
4443
/// the `new()` method will look if the user has a theme directory in their
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ pub mod book;
8787
pub mod config;
8888
pub mod preprocess;
8989
pub mod renderer;
90+
#[path = "front-end/mod.rs"]
9091
pub mod theme;
9192
pub mod utils;
9293

0 commit comments

Comments
 (0)