Skip to content

Commit 48f1657

Browse files
committed
Use Dan Klammer's Bytesize Icons for materials and the GitHub link
The icons are injected straight into the HTML. Project-wise, they're packaged in a Jinja2 macro and vendored. I packaged the the macro-generating script as a separate project: https://github.com/encukou/bytesize-to-jinja
1 parent 1e3b74f commit 48f1657

7 files changed

Lines changed: 476 additions & 10 deletions

File tree

naucse/static/css/body.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ p kbd {
1919
font-style: normal;
2020
}
2121

22+
svg.icon {
23+
width: 1em;
24+
height: 1em;
25+
transform: translate(0px, 0.1em);
26+
overflow: visible;
27+
stroke-width: 2.5px;
28+
stroke: currentColor;
29+
fill: none;
30+
stroke-linecap: butt;
31+
stroke-linejoin: miter;
32+
}
33+
2234
/*** Credits ***/
2335

2436
.lesson-attribution {

naucse/templates/_base.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{% from "_bytesize_icons.html" import bytesize_icon %}
12
<!doctype html>
23
<html lang="cs">
34
<head>
@@ -48,9 +49,12 @@
4849
<div class="footer container">
4950
<hr>
5051
<div class="lesson-attribution">
51-
<p>Uprav tuto stránku na <a href="{{ edit_path|edit_link }}"><svg id="i-github" viewBox="0 0 64 64" width="16" height="16">
52-
<path stroke-width="0" fill="currentColor" d="M32 0 C14 0 0 14 0 32 0 53 19 62 22 62 24 62 24 61 24 60 L24 55 C17 57 14 53 13 50 13 50 13 49 11 47 10 46 6 44 10 44 13 44 15 48 15 48 18 52 22 51 24 50 24 48 26 46 26 46 18 45 12 42 12 31 12 27 13 24 15 22 15 22 13 18 15 13 15 13 20 13 24 17 27 15 37 15 40 17 44 13 49 13 49 13 51 20 49 22 49 22 51 24 52 27 52 31 52 42 45 45 38 46 39 47 40 49 40 52 L40 60 C40 61 40 62 42 62 45 62 64 53 64 32 64 14 50 0 32 0 Z" />
53-
</svg> GitHubu</a>.</p>
52+
<p>
53+
Uprav tuto stránku na
54+
<a href="{{ edit_path|edit_link }}">
55+
{{ bytesize_icon('github') }}
56+
GitHubu</a>.
57+
</p>
5458

5559
{% if page is defined and (page.attributions or page.license) %}
5660
{% for a in page.attributions %}

0 commit comments

Comments
 (0)