Commit dfa263b68c7644035d15afa896a0b04e59f2a3f5
Add classes to nearby <li>
Position <li> on the grid in the wide layout. Fixes the layout for the first entry.Greg K Nicholson committed on 2/16/2018, 7:14:14 PM
Parent: eb7713aa95a037673eca630953d54d05cdb76221
Files changed
themes/ran/static/style/ran.css | changed |
themes/ran/templates/article.html | changed |
themes/ran/templates/period_archives.html | changed |
themes/ran/templates/tag.html | changed |
themes/ran/static/style/ran.css | |||
---|---|---|---|
@@ -158,15 +158,31 @@ | |||
158 | 158 … | display: block; | |
159 | 159 … | margin-top: 1rem; | |
160 | 160 … | } | |
161 | 161 … | ||
162 | - nav.nearby li, | ||
163 | - nav.nearby ul { | ||
162 … | + nav.nearby ul, | ||
163 … | + nav.nearby li { | ||
164 | 164 … | display: inline; | |
165 | 165 … | margin: 0; | |
166 | 166 … | padding: 0; | |
167 | 167 … | } | |
168 | 168 … | ||
169 … | + nav.nearby li { | ||
170 … | + grid-row: 1/2; | ||
171 … | + } | ||
172 … | + | ||
173 … | + nav.nearby li.up { | ||
174 … | + grid-column: 2/3; | ||
175 … | + } | ||
176 … | + | ||
177 … | + nav.nearby li.next { | ||
178 … | + grid-column: 3/4; | ||
179 … | + } | ||
180 … | + | ||
181 … | + nav.nearby li.prev { | ||
182 … | + grid-column: 1/2; | ||
183 … | + } | ||
184 … | + | ||
169 | 185 … | nav.nearby a { | |
170 | 186 … | display: block; | |
171 | 187 … | margin-top: 1rem; | |
172 | 188 … | margin-right: 1rem; |
themes/ran/templates/article.html | ||
---|---|---|
@@ -155,23 +155,23 @@ | ||
155 | 155 … | {%- endif -%} |
156 | 156 … | <nav class="nearby"> |
157 | 157 … | <ul> |
158 | 158 … | {%- if article.prev_article -%} |
159 | - <li> | |
159 … | + <li class="prev"> | |
160 | 160 … | <a href="/{{- article.prev_article.url -}}" rel="prev"> |
161 | 161 … | <span> ← </span> |
162 | 162 … | {{- article.prev_article.title | trim -}} |
163 | 163 … | </a> |
164 | 164 … | </li> |
165 | 165 … | {%- endif -%} |
166 | - <li> | |
166 … | + <li class="up"> | |
167 | 167 … | <a href="/{{- article.date | strftime('%Y/%m/%d') -}}" rel="up"> |
168 | 168 … | <span> ↑ </span> |
169 | 169 … | {{- article.date | strftime(DATE_FORMAT_DAY) -}} |
170 | 170 … | </a> |
171 | 171 … | </li> |
172 | 172 … | {%- if article.next_article -%} |
173 | - <li> | |
173 … | + <li class="next"> | |
174 | 174 … | <a href="/{{- article.next_article.url -}}" rel="next"> |
175 | 175 … | <span> → </span> |
176 | 176 … | {{- article.next_article.title | trim -}} |
177 | 177 … | </a> |
themes/ran/templates/period_archives.html | ||
---|---|---|
@@ -62,9 +62,9 @@ | ||
62 | 62 … | selectattr("date", "lessthan", |
63 | 63 … | dates[ dates | length - 1].date) -%} |
64 | 64 … | {%- if loop.index == 1 -%} |
65 | 65 … | {%- if period | length == 1 -%} |
66 | - <li> | |
66 … | + <li class="prev"> | |
67 | 67 … | <a href="/{{- article.date | strftime('%Y') -}}" |
68 | 68 … | rel="prev"> |
69 | 69 … | <span> ← </span> |
70 | 70 … | <time datetime="{{- article.date | |
@@ -74,9 +74,9 @@ | ||
74 | 74 … | </time> |
75 | 75 … | </a> |
76 | 76 … | </li> |
77 | 77 … | {%- elif period | length == 2 -%} |
78 | - <li> | |
78 … | + <li class="prev"> | |
79 | 79 … | <a href="/{{- article.date | strftime('%Y/%m') -}}" |
80 | 80 … | rel="prev"> |
81 | 81 … | <span> ← </span> |
82 | 82 … | <time datetime="{{- article.date | |
@@ -86,9 +86,9 @@ | ||
86 | 86 … | </time> |
87 | 87 … | </a> |
88 | 88 … | </li> |
89 | 89 … | {%- else -%} |
90 | - <li> | |
90 … | + <li class="prev"> | |
91 | 91 … | <a href="/{{- article.date | |
92 | 92 … | strftime('%Y/%m/%d') -}}" |
93 | 93 … | rel="prev"> |
94 | 94 … | <span> ← </span> |
@@ -102,25 +102,25 @@ | ||
102 | 102 … | {%- endif -%} |
103 | 103 … | {%- endif -%} |
104 | 104 … | {%- endfor -%} |
105 | 105 … | {%- if period | length == 1 -%} |
106 | - <li> | |
106 … | + <li class="up"> | |
107 | 107 … | <a href="/entries" rel="up"> |
108 | 108 … | <span> ↑ </span> |
109 | 109 … | {{- ARCHIVES_TITLE -}} |
110 | 110 … | </a> |
111 | 111 … | </li> |
112 | 112 … | {%- elif period | length == 2 -%} |
113 | - <li> | |
113 … | + <li class="up"> | |
114 | 114 … | <a href="/{{- dates[0].date | strftime('%Y') -}}" rel="up"> |
115 | 115 … | <span> ↑ </span> |
116 | 116 … | <time datetime="{{- dates[0].date | strftime('%Y') -}}"> |
117 | 117 … | {{- dates[0].date | strftime(DATE_FORMAT_YEAR) -}} |
118 | 118 … | </time> |
119 | 119 … | </a> |
120 | 120 … | </li> |
121 | 121 … | {%- else -%} |
122 | - <li> | |
122 … | + <li class="up"> | |
123 | 123 … | <a href="/{{- dates[0].date | strftime('%Y/%m') -}}" |
124 | 124 … | rel="up"> |
125 | 125 … | <span> ↑ </span> |
126 | 126 … | <time datetime="{{- dates[0].date | |
@@ -134,9 +134,9 @@ | ||
134 | 134 … | selectattr("date", "greaterthan", dates[0].date) | |
135 | 135 … | reverse -%} |
136 | 136 … | {%- if loop.index == 1 -%} |
137 | 137 … | {%- if period | length == 1 -%} |
138 | - <li> | |
138 … | + <li class="next"> | |
139 | 139 … | <a href="/{{- article.date | strftime('%Y') -}}" |
140 | 140 … | rel="next"> |
141 | 141 … | <span> → </span> |
142 | 142 … | <time datetime="{{- article.date | |
@@ -146,9 +146,9 @@ | ||
146 | 146 … | </time> |
147 | 147 … | </a> |
148 | 148 … | </li> |
149 | 149 … | {%- elif period | length == 2 -%} |
150 | - <li> | |
150 … | + <li class="next"> | |
151 | 151 … | <a href="/{{- article.date | strftime('%Y/%m') -}}" |
152 | 152 … | rel="next"> |
153 | 153 … | <span> → </span> |
154 | 154 … | <time datetime="{{- article.date | |
@@ -158,9 +158,9 @@ | ||
158 | 158 … | </time> |
159 | 159 … | </a> |
160 | 160 … | </li> |
161 | 161 … | {%- else -%} |
162 | - <li> | |
162 … | + <li class="next"> | |
163 | 163 … | <a href="/{{- article.date | |
164 | 164 … | strftime('%Y/%m/%d') -}}" |
165 | 165 … | rel="next"> |
166 | 166 … | <span> → </span> |
themes/ran/templates/tag.html | ||
---|---|---|
@@ -13,17 +13,17 @@ | ||
13 | 13 … | {%- for othertag, otherarticles in tags | sort | reverse if |
14 | 14 … | othertag.slug < tag.slug and |
15 | 15 … | otherarticles | list | length > 1 -%} |
16 | 16 … | {%- if loop.index == 1 -%} |
17 | - <li> | |
17 … | + <li class="prev"> | |
18 | 18 … | <a href="/entries/{{- othertag.slug -}}" rel="prev"> |
19 | 19 … | <span> ← </span> |
20 | 20 … | {{- othertag -}} |
21 | 21 … | </a> |
22 | 22 … | </li> |
23 | 23 … | {%- endif -%} |
24 | 24 … | {%- endfor -%} |
25 | - <li> | |
25 … | + <li class="up"> | |
26 | 26 … | <a href="/entries" rel="up"> |
27 | 27 … | <span> ↑ </span> |
28 | 28 … | {{- ARCHIVES_TITLE -}} |
29 | 29 … | </a> |
@@ -31,9 +31,9 @@ | ||
31 | 31 … | {%- for othertag, otherarticles in tags | sort if |
32 | 32 … | othertag.slug > tag.slug and |
33 | 33 … | otherarticles | list | length > 1 -%} |
34 | 34 … | {%- if loop.index == 1 %} |
35 | - <li> | |
35 … | + <li class="next"> | |
36 | 36 … | <a href="/entries/{{- othertag.slug -}}" rel="next"> |
37 | 37 … | <span> → </span> |
38 | 38 … | {{- othertag -}} |
39 | 39 … | </a> |
Built with git-ssb-web