git ssb

0+

Grey the earthling / gkn.me.uk



Commit 8f0d5638eb17d9158641caeb15269b3483887cde

Use fewer <header>, <main> and <footer>

Make the top and bottom navigation use classes instead.

Remove the <main> between them,
that wraps the <article> on article pages.
Greg K Nicholson committed on 2/4/2018, 5:47:34 PM
Parent: deab7af0d2b4d48b3f0c15dd8b0f7391ac4be08c

Files changed

themes/ran/static/style/ran.csschanged
themes/ran/templates/article.htmlchanged
themes/ran/templates/base.htmlchanged
themes/ran/static/style/ran.cssView
@@ -78,22 +78,22 @@
7878 grid-column: 3/4;
7979 }
8080
8181
82-/* Page header and footer, article footer */
82 +/* Top and bottom navigation, article footer */
8383
84-body > header {
84 +.topnav {
8585 margin-top: 10vh;
8686 margin-bottom: 1rem;
8787 }
8888
89-article > footer {
89 +footer {
9090 border-top: 1px solid;
9191 margin-top: -1px;
9292 margin-bottom: 1rem;
9393 }
9494
95-body > footer {
95 +.bottomnav {
9696 border-top: 1px solid;
9797 margin-top: -1px;
9898 margin-bottom: 10vh;
9999 }
@@ -120,26 +120,26 @@
120120 .logo path {
121121 fill: var(--secondary-color);
122122 }
123123
124- body > footer .logo {
124 + .bottomnav .logo {
125125 margin-top: 2rem;
126126 }
127- body > footer .logo circle {
127 + .bottomnav .logo circle {
128128 fill: var(--background-color);
129129 stroke: var(--dim-color);
130130 stroke-width: 12px;
131131 }
132132
133- body > footer .logo path {
133 + .bottomnav .logo path {
134134 fill: var(--dim-color);
135135 }
136136
137- body > footer a .logo circle {
137 + .bottomnav a .logo circle {
138138 stroke: var(--link-color);
139139 }
140140
141- body > footer a .logo path {
141 + .bottomnav a .logo path {
142142 fill: var(--link-color);
143143 }
144144
145145
@@ -227,10 +227,9 @@
227227
228228
229229 /* Page heading */
230230
231-article > header,
232-body > main > header {
231 +header {
233232 margin-bottom: 1rem;
234233 }
235234
236235 .pagetitle {
@@ -299,9 +298,9 @@
299298 details[open] > section > * {
300299 opacity: 1;
301300 }
302301
303-article > header .image {
302 +header .image {
304303 /* The height is overridden by inline styles for some articles. */
305304 height: 4rem;
306305 background-position: center;
307306 background-size: cover;
themes/ran/templates/article.htmlView
@@ -46,9 +46,9 @@
4646 {# <!--XXX skip links --> #}
4747 {%- endblock -%}
4848 {%- block maincontentintro -%}
4949 {%- if article.image -%}
50- <footer class="image" style="
50 + <div class="image" style="
5151 background-image: url('{{- article.image.filename -}}');
5252 {%- if article.image.position -%}
5353 background-position: {{
5454 article.image.position
@@ -61,9 +61,9 @@
6161 {%- else -%}
6262 height: 4rem;
6363 {%- endif -%}
6464 ">
65- </footer>
65 + </div>
6666 {%- endif -%}
6767 {%- endblock -%}
6868 {%- block maincontent -%}
6969 {{- article.content | trim -}}
themes/ran/templates/base.htmlView
@@ -32,9 +32,9 @@
3232 title="{{- SITENAME -}}">
3333 {%- endblock -%}
3434 </head>
3535 <body>
36- <header>
36 + <section class="topnav">
3737 {%- block topnav -%}
3838 <nav>
3939 {%- block logo -%}
4040 <a class="logo" href="/">
@@ -43,52 +43,50 @@
4343 </a>
4444 {%- endblock -%}
4545 </nav>
4646 {%- endblock -%}
47- </header>
48- <main>
49- {%- block main -%}
50- <header>
51- {%- block pagetitle -%}
52- <details>
53- <summary>
54- <h1 class="pagetitle">
55- {{- self.title() -}}
56- </h1>
57- </summary>
58- <section>
59- {%- block pagedetails -%}
60- <address>
61- <span>by </span>
62- <a href="/{{- AUTHOR_URL -}}"
63- rel="author">
64- {{- AUTHOR -}}
65- </a>
66- </address>
67- {%- endblock -%}
68- </section>
69- </details>
70- {%- block maincontentintro -%}
71- {%- endblock -%}
47 + </section>
48 + {%- block main -%}
49 + <header>
50 + {%- block pagetitle -%}
51 + <details>
52 + <summary>
53 + <h1 class="pagetitle">
54 + {{- self.title() -}}
55 + </h1>
56 + </summary>
57 + <section>
58 + {%- block pagedetails -%}
59 + <address>
60 + <span>by </span>
61 + <a href="/{{- AUTHOR_URL -}}"
62 + rel="author">
63 + {{- AUTHOR -}}
64 + </a>
65 + </address>
66 + {%- endblock -%}
67 + </section>
68 + </details>
69 + {%- block maincontentintro -%}
7270 {%- endblock -%}
73- </header>
74- <main>
75- {%- block maincontent -%}
76- <ol class="biglinks">
77- {%- for article in dates -%}
78- {{- entry_link(article) -}}
79- {%- endfor -%}
80- </ol>
81- {%- endblock -%}
82- </main>
83- {%- endblock -%}
84- </main>
85- <footer>
71 + {%- endblock -%}
72 + </header>
73 + <main>
74 + {%- block maincontent -%}
75 + <ol class="biglinks">
76 + {%- for article in dates -%}
77 + {{- entry_link(article) -}}
78 + {%- endfor -%}
79 + </ol>
80 + {%- endblock -%}
81 + </main>
82 + {%- endblock -%}
83 + <section class="bottomnav">
8684 {%- block bottomnav -%}
8785 <nav>
8886 {{- self.logo() -}}
8987 </nav>
9088 {%- endblock -%}
91- </footer>
89 + </section>
9290 </body>
9391 </html>
9492

Built with git-ssb-web