Merge file and image asset directories
Before Width: | Height: | Size: 600 KiB After Width: | Height: | Size: 600 KiB |
Before Width: | Height: | Size: 753 KiB After Width: | Height: | Size: 753 KiB |
Before Width: | Height: | Size: 790 KiB After Width: | Height: | Size: 790 KiB |
Before Width: | Height: | Size: 235 KiB After Width: | Height: | Size: 235 KiB |
Before Width: | Height: | Size: 655 KiB After Width: | Height: | Size: 655 KiB |
@ -168,7 +168,7 @@ impl<'a> Handler<'a> {
|
||||
}
|
||||
|
||||
fn handle_image(&self, link: &str) -> String {
|
||||
if let Some(file) = IMAGES.get_file(link) {
|
||||
if let Some(file) = FILES.get_file(link) {
|
||||
self.resolver.image(&link, file.contents()).into()
|
||||
} else if let Some(url) = self.resolver.link(link) {
|
||||
url
|
||||
|
@ -23,7 +23,6 @@ use unscanny::Scanner;
|
||||
|
||||
static SRC: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR/src");
|
||||
static FILES: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR/../assets/files");
|
||||
static IMAGES: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR/../assets/images");
|
||||
static DETAILS: Lazy<yaml::Mapping> = Lazy::new(|| yaml("reference/details.yml"));
|
||||
static GROUPS: Lazy<Vec<GroupData>> = Lazy::new(|| yaml("reference/groups.yml"));
|
||||
|
||||
|