mirror of
https://codeberg.org/demostf/frontend.git
synced 2026-06-04 02:34:13 +02:00
css caching
This commit is contained in:
parent
d595089c7c
commit
6485612898
5 changed files with 36 additions and 5 deletions
|
|
@ -10,12 +10,17 @@ pub trait Page {
|
|||
}
|
||||
|
||||
pub fn render<T: Page>(page: T) -> Markup {
|
||||
let style_url = concat!(
|
||||
"/style.",
|
||||
include_str!(concat!(env!("OUT_DIR"), "/style.md5")),
|
||||
".css",
|
||||
);
|
||||
html! {
|
||||
(DOCTYPE)
|
||||
html {
|
||||
head {
|
||||
title { (page.title()) }
|
||||
link rel="stylesheet" type="text/css" href="/style.css";
|
||||
link rel="stylesheet" type="text/css" href=(style_url);
|
||||
}
|
||||
body {
|
||||
header {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue