Skip to content

Commit 5df11ed

Browse files
author
Terence Eden
committed
Tidy reference
1 parent 3ebb0a3 commit 5df11ed

File tree

1 file changed

+44
-59
lines changed

1 file changed

+44
-59
lines changed

src/sti/templates/reference.html

Lines changed: 44 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,55 @@
11
{% extends "base.html" %}
22

33
<style>
4-
{% block style %}{{ super() }}
5-
/* reference */
6-
@property --rotate {
7-
syntax: '<angle>';
8-
initial-value: 0deg;
9-
inherits: false;
10-
}
11-
@keyframes rotate-gradient {
12-
from { --rotate: 0deg; }
13-
to { --rotate: 360deg; }
14-
}
15-
body#reference section div {
16-
display: grid;
17-
grid-template-columns: 200px 100px 100px 1fr 1fr;
18-
gap:1ex;
19-
align-items: center;
20-
border-bottom:3px ridge skyblue;
21-
padding: 1ex;
22-
margin-bottom:1em;
23-
min-height:100px;
24-
}
25-
body#reference section div:last-of-type {
26-
border:none;
27-
}
4+
{% block style %}{{ super() }}
285

29-
img.svg-icon, img.svg-circle, img.reference {
30-
max-height: 100px;
31-
padding:2px;
32-
}
33-
img.svg-circle {
34-
border-radius: 50%;
35-
}
36-
body#reference section img[class|="svg"]:hover {
37-
animation: rotate-gradient linear 3s infinite;
38-
background-image: linear-gradient(var(--rotate), #fff 50%, #000 50%);
39-
}
40-
body#reference section a.url {
41-
text-align:right;
42-
}
43-
{% endblock %}
6+
body#reference section div {
7+
display: grid;
8+
grid-template-columns: 15em 10em 1fr 1fr;
9+
gap: 1em;
10+
align-items: center;
11+
border-bottom: 3px ridge skyblue;
12+
padding: 1em;
13+
margin-bottom: 1em;
14+
min-height: 10em;
15+
}
16+
body#reference section div:last-of-type {
17+
border: none;
18+
}
19+
20+
img.svg-icon, img.reference {
21+
max-height: 10em;
22+
padding: 2px;
23+
}
24+
25+
26+
body#reference section a.url {
27+
text-align: left;
28+
}
29+
{% endblock %}
4430
</style>
4531

4632

4733
{% block content %}
48-
<h2>Reference Images</h2>
49-
<p>
50-
A visual guide to check if the Super Tiny Icons match the shape and colour of organisation's official SVG logo.<br>
51-
Where possible this links to the organisation's brand guidelines page.
52-
</p>
34+
<h2>Reference Images</h2>
35+
<p>A visual guide to check if the Super Tiny Icons match the shape and colour of organisation's official SVG logo.<br>
36+
Where possible this links to the organisation's brand guidelines page.</p>
5337

54-
<section>
55-
{% for _, icon in icons | dictsort -%}
56-
<div>
57-
<strong>{{ icon.label }}</strong>
58-
<img alt="" class="svg-icon" src="images/svg/{{ icon.name }}.svg">
59-
<img alt="" class="svg-circle" src="images/svg/{{ icon.name }}.svg">
60-
{% if refs[ icon.name ] %}
61-
{% with ref = refs[ icon.name ] %}
62-
<img alt="" class="reference" src="images/reference/{{ ref.filename }}">
63-
{% if ref.url %}<a class="url" href="{{ ref.url }}">{{ ref.url }}</a>{% endif %}
64-
{% endwith %}
65-
{% endif %}
66-
</div>
67-
{% endfor %}
68-
</section>
38+
<section>
39+
{% for _, icon in icons | dictsort -%}
40+
<div>
41+
<strong>{{ icon.label }}</strong>
42+
<img alt="" class="svg-icon" src="images/svg/{{ icon.name }}.svg">
43+
{% if refs[ icon.name ] %}
44+
{% with ref = refs[ icon.name ] %}
45+
<img alt="" class="reference" src="images/reference/{{ ref.filename }}">
46+
{% if ref.url %}
47+
<a class="url" href="{{ ref.url }}">{{ ref.url }}</a>
48+
{% endif %}
49+
{% endwith %}
50+
{% endif %}
51+
</div>
52+
{% endfor %}
53+
</section>
6954

7055
{% endblock %}

0 commit comments

Comments
 (0)