add link to repo

This commit is contained in:
Tomáš Mládek 2020-10-09 23:00:15 +02:00
parent 95a366fd93
commit 0c65d13d49
2 changed files with 104 additions and 83 deletions

View file

@ -186,6 +186,7 @@ async fn render(
"mtime", "mtime",
&mtime.map_or("???".to_string(), |t| t.format("%c").to_string()), &mtime.map_or("???".to_string(), |t| t.format("%c").to_string()),
); );
context.insert("version", VERSION);
Ok(HttpResponse::Ok().body( Ok(HttpResponse::Ok().body(
state state

View file

@ -1,84 +1,104 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>{{garden_title}} - {{page_title}}</title> <title>{{garden_title}} - {{page_title}}</title>
<link href="https://necolas.github.io/normalize.css/8.0.1/normalize.css" rel="stylesheet"> <link href="https://necolas.github.io/normalize.css/8.0.1/normalize.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400;1,700&family=Montserrat&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400;1,700&family=Montserrat&display=swap"
<style> rel="stylesheet">
body { <style>
font-family: 'Montserrat', sans-serif; body {
} font-family: 'Montserrat', sans-serif;
}
h1, h2, h3, h4, h5 {
font-family: 'Merriweather', serif; h1, h2, h3, h4, h5 {
} font-family: 'Merriweather', serif;
}
body {
display: flex; body {
} display: flex;
}
img {
max-width: 100%; img {
max-height: 100vh; max-width: 100%;
} max-height: 100vh;
}
blockquote {
margin: 0; blockquote {
padding-left: 2em; margin: 0;
border-left: 3px solid lightgray; padding-left: 2em;
} border-left: 3px solid lightgray;
}
main {
flex-grow: 1; main {
} flex-grow: 1;
}
nav, main {
padding: 0 2em; nav, main {
} padding: 0 2em;
}
nav {
min-width: 15%; aside {
width: 15%; display: flex;
min-height: 100vh; flex-direction: column;
border-right: 1px solid gray; justify-content: space-between;
} min-width: 15%;
width: 15%;
nav ul { min-height: 100vh;
list-style: none; border-right: 1px solid gray;
padding-left: 0; }
}
nav ul {
nav li { list-style: none;
margin: .5em 0; padding-left: 0;
} }
nav .file { nav li {
font-style: italic; margin: .5em 0;
} }
main footer { nav .file {
padding: 1em 0; font-style: italic;
text-align: right; }
color: gray;
} footer {
</style> padding: 1em 0;
</head> color: gray;
<body> }
<nav>
<h2>{{garden_title}}</h2> aside footer {
<ul> text-align: center;
{% for file in files %} }
<li class="{% if file is containing(".md") %}page{% else %}file{% endif %}"><a href="/{{file}}">{{file}}</a></li>
{% endfor %} aside footer a {
</ul> color: gray;
</nav> }
<main>
{{content | safe}} main footer {
text-align: right;
<footer> }
Last modified at {{mtime}}
</footer> </style>
</main> </head>
</body> <body>
<aside>
<nav>
<h2>{{garden_title}}</h2>
<ul>
{% for file in files %}
<li class="{% if file is containing(" .md
") %}page{% else %}file{% endif %}"><a href="/{{file}}">{{file}}</a></li>
{% endfor %}
</ul>
</nav>
<footer><a href="https://gitlab.com/tmladek/gardenserver">gardenserver {{version}}</a></footer>
</aside>
<main>
{{content | safe}}
<footer>
Last modified at {{mtime}}
</footer>
</main>
</body>
</html> </html>