Skip to content

Commit 6e25e2c

Browse files
committed
Pause for upstream
1 parent 8024ced commit 6e25e2c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+107
-7405
lines changed

build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ fn main() {
2020
println!("cargo:rerun-if-changed=templates/style/_vars.scss");
2121
println!("cargo:rerun-if-changed=templates/style/_utils.scss");
2222
println!("cargo:rerun-if-changed=templates/style/_navbar.scss");
23-
println!("cargo:rerun-if-changed=templates/style/_icons.scss");
2423
println!("cargo:rerun-if-changed=templates/menu.js");
2524
println!("cargo:rerun-if-changed=templates/index.js");
2625
// TODO: are these right?

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub(crate) static GLOBAL_ALERT: Option<GlobalAlert> = Some(GlobalAlert {
3131
url: "https://blog.rust-lang.org/2019/09/18/upcoming-docsrs-changes.html",
3232
text: "Upcoming docs.rs breaking changes!",
3333
css_class: "error",
34-
fa_icon: "icon-warning",
34+
fa_icon: "exclamation-triangle",
3535
});
3636
*/
3737

src/web/mod.rs

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ use iron::{
9595
use page::TemplateData;
9696
use postgres::Client;
9797
use router::NoRoute;
98-
use router::Router;
9998
use semver::{Version, VersionReq};
10099
use serde::Serialize;
101100
use staticfile::Static;
@@ -584,64 +583,6 @@ fn ico_handler(req: &mut Request) -> IronResult<Response> {
584583
}
585584
}
586585

587-
macro_rules! get_font {
588-
(($path:expr) => { $($font:literal = $content_type:expr),* $(,)? }) => {{
589-
let (data, content_type): (&'static [u8], &'static str) = match $path {
590-
$(
591-
Some(font) if font == $font => (
592-
include_bytes!(concat!("../../static/fonts/", $font)),
593-
$content_type,
594-
),
595-
)*
596-
597-
_ => {
598-
return Err(IronError::new(
599-
error::Nope::ResourceNotFound,
600-
status::NotFound,
601-
));
602-
}
603-
};
604-
605-
(data, content_type)
606-
}};
607-
}
608-
609-
fn font_handler(req: &mut Request) -> IronResult<Response> {
610-
let router = extension!(req, Router);
611-
let (font, content_type) = get_font!((router.find("font")) => {
612-
"fa-regular-400.woff" = "application/font-woff",
613-
"fa-regular-400.woff2" = "application/font-woff2",
614-
"fa-regular-400.ttf" = "application/x-font-truetype",
615-
"fa-regular-400.eot" = "application/x-font-opentype",
616-
"fa-regular-400.svg" = "image/svg+xml",
617-
618-
"fa-solid-900.woff" = "application/font-woff",
619-
"fa-solid-900.woff2" = "application/font-woff2",
620-
"fa-solid-900.ttf" = "application/x-font-truetype",
621-
"fa-solid-900.eot" = "application/x-font-opentype",
622-
"fa-solid-900.svg" = "image/svg+xml",
623-
624-
"fa-brands-400.woff" = "application/font-woff",
625-
"fa-brands-400.woff2" = "application/font-woff2",
626-
"fa-brands-400.ttf" = "application/x-font-truetype",
627-
"fa-brands-400.eot" = "application/x-font-opentype",
628-
"fa-brands-400.svg" = "image/svg+xml",
629-
});
630-
631-
let mut response = Response::with((status::Ok, font));
632-
let cache = vec![
633-
CacheDirective::Public,
634-
CacheDirective::MaxAge(STATIC_FILE_CACHE_DURATION as u32),
635-
];
636-
637-
response
638-
.headers
639-
.set(ContentType(content_type.parse().unwrap()));
640-
response.headers.set(CacheControl(cache));
641-
642-
Ok(response)
643-
}
644-
645586
/// MetaData used in header
646587
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
647588
pub(crate) struct MetaData {

src/web/page/templates.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use postgres::Client;
88
use serde_json::Value;
99
use std::{
1010
collections::HashMap,
11+
fmt,
1112
path::PathBuf,
1213
sync::{mpsc::channel, Arc},
1314
thread,

src/web/routes.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ pub(super) fn build_routes() -> Routes {
1818
routes.static_resource("/robots.txt", super::sitemap::robots_txt_handler);
1919
routes.static_resource("/sitemap.xml", super::sitemap::sitemap_handler);
2020
routes.static_resource("/opensearch.xml", super::opensearch_xml_handler);
21-
routes.static_resource("/-/static/fonts/:font", super::font_handler);
2221

2322
routes.internal_page("/", super::releases::home_page);
2423

static/fonts/fa-brands-400.eot

-131 KB
Binary file not shown.

static/fonts/fa-brands-400.svg

Lines changed: 0 additions & 461 deletions
This file was deleted.

static/fonts/fa-brands-400.ttf

-131 KB
Binary file not shown.

static/fonts/fa-brands-400.woff

-88.5 KB
Binary file not shown.

static/fonts/fa-brands-400.woff2

-75.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)