themes/ran/templates/period_archives.htmlView |
---|
56 | 56 … | {%- endif -%} |
57 | 57 … | {%- endblock -%} |
58 | 58 … | {%- block maincontent -%} |
59 | 59 … | <nav class="nearby"> |
60 | | - {%- if period | length == 1 -%} |
61 | | - <a href="/entries" rel="up"> |
62 | | - <span> ↑ </span> |
63 | | - {{- ARCHIVES_TITLE -}} |
64 | | - </a> |
65 | | - {%- elif period | length == 2 -%} |
66 | | - <a href="/{{- dates[0].date | strftime('%Y') -}}" rel="up"> |
67 | | - <span> ↑ </span> |
68 | | - <time datetime="{{- dates[0].date | strftime('%Y') -}}"> |
69 | | - {{- dates[0].date | strftime(DATE_FORMAT_YEAR) -}} |
70 | | - </time> |
71 | | - </a> |
72 | | - {%- else -%} |
73 | | - <a href="/{{- dates[0].date | strftime('%Y/%m') -}}" rel="up"> |
74 | | - <span> ↑ </span> |
75 | | - <time datetime="{{- dates[0].date | strftime('%Y-%m') -}}"> |
76 | | - {{- dates[0].date | strftime(DATE_FORMAT_MONTH) -}} |
77 | | - </time> |
78 | | - </a> |
79 | | - {%- endif -%} |
80 | | - {%- for article in articles | |
81 | | - selectattr("date", "greaterthan", dates[0].date) | |
82 | | - reverse -%} |
83 | | - {%- if loop.index == 1 -%} |
84 | | - {%- if period | length == 1 -%} |
85 | | - <a href="/{{- article.date | strftime('%Y') -}}" rel="next"> |
86 | | - <span> → </span> |
87 | | - <time datetime="{{- article.date | strftime('%Y') -}}"> |
88 | | - {{- article.date | strftime(DATE_FORMAT_YEAR) -}} |
| 60 … | + <ul> |
| 61 … | + {%- if period | length == 1 -%} |
| 62 … | + <li> |
| 63 … | + <a href="/entries" rel="up"> |
| 64 … | + <span> ↑ </span> |
| 65 … | + {{- ARCHIVES_TITLE -}} |
| 66 … | + </a> |
| 67 … | + </li> |
| 68 … | + {%- elif period | length == 2 -%} |
| 69 … | + <li> |
| 70 … | + <a href="/{{- dates[0].date | strftime('%Y') -}}" rel="up"> |
| 71 … | + <span> ↑ </span> |
| 72 … | + <time datetime="{{- dates[0].date | strftime('%Y') -}}"> |
| 73 … | + {{- dates[0].date | strftime(DATE_FORMAT_YEAR) -}} |
89 | 74 … | </time> |
90 | 75 … | </a> |
91 | | - {%- elif period | length == 2 -%} |
92 | | - <a href="/{{- article.date | strftime('%Y/%m') -}}" |
93 | | - rel="next"> |
94 | | - <span> → </span> |
95 | | - <time datetime="{{- article.date | |
| 76 … | + </li> |
| 77 … | + {%- else -%} |
| 78 … | + <li> |
| 79 … | + <a href="/{{- dates[0].date | strftime('%Y/%m') -}}" |
| 80 … | + rel="up"> |
| 81 … | + <span> ↑ </span> |
| 82 … | + <time datetime="{{- dates[0].date | |
96 | 83 … | strftime('%Y-%m') -}}"> |
97 | | - {{- article.date | strftime(DATE_FORMAT_MONTH) -}} |
| 84 … | + {{- dates[0].date | strftime(DATE_FORMAT_MONTH) -}} |
98 | 85 … | </time> |
99 | 86 … | </a> |
100 | | - {%- else -%} |
101 | | - <a href="/{{- article.date | strftime('%Y/%m/%d') -}}" |
102 | | - rel="next"> |
103 | | - <span> → </span> |
104 | | - <time datetime="{{- article.date | |
105 | | - strftime('%Y-%m-%d') -}}"> |
106 | | - {{- article.date | strftime(DATE_FORMAT_DAY) -}} |
107 | | - </time> |
108 | | - </a> |
109 | | - {%- endif -%} |
| 87 … | + </li> |
110 | 88 … | {%- endif -%} |
111 | | - {%- endfor -%} |
112 | | - {%- for article in articles | |
113 | | - selectattr("date", "lessthan", dates[ dates | length - 1].date) -%} |
114 | | - {%- if loop.index == 1 -%} |
115 | | - {%- if period | length == 1 -%} |
116 | | - <a href="/{{- article.date | strftime('%Y') -}}" rel="prev"> |
117 | | - <span> ← </span> |
118 | | - <time datetime="{{- article.date | strftime('%Y') -}}"> |
119 | | - {{- article.date | strftime(DATE_FORMAT_YEAR) -}} |
120 | | - </time> |
121 | | - </a> |
122 | | - {%- elif period | length == 2 -%} |
123 | | - <a href="/{{- article.date | strftime('%Y/%m') -}}" |
124 | | - rel="prev"> |
125 | | - <span> ← </span> |
126 | | - <time datetime="{{- article.date | |
127 | | - strftime('%Y-%m') -}}"> |
128 | | - {{- article.date | strftime(DATE_FORMAT_MONTH) -}} |
129 | | - </time> |
130 | | - </a> |
131 | | - {%- else -%} |
132 | | - <a href="/{{- article.date | strftime('%Y/%m/%d') -}}" |
133 | | - rel="prev"> |
134 | | - <span> ← </span> |
135 | | - <time datetime="{{- article.date | |
136 | | - strftime('%Y-%m-%d') -}}"> |
137 | | - {{- article.date | strftime(DATE_FORMAT_DAY) -}} |
138 | | - </time> |
139 | | - </a> |
| 89 … | + {%- for article in articles | |
| 90 … | + selectattr("date", "greaterthan", dates[0].date) | |
| 91 … | + reverse -%} |
| 92 … | + {%- if loop.index == 1 -%} |
| 93 … | + {%- if period | length == 1 -%} |
| 94 … | + <li> |
| 95 … | + <a href="/{{- article.date | strftime('%Y') -}}" |
| 96 … | + rel="next"> |
| 97 … | + <span> → </span> |
| 98 … | + <time datetime="{{- article.date | |
| 99 … | + strftime('%Y') -}}"> |
| 100 … | + {{- article.date | |
| 101 … | + strftime(DATE_FORMAT_YEAR) -}} |
| 102 … | + </time> |
| 103 … | + </a> |
| 104 … | + </li> |
| 105 … | + {%- elif period | length == 2 -%} |
| 106 … | + <li> |
| 107 … | + <a href="/{{- article.date | strftime('%Y/%m') -}}" |
| 108 … | + rel="next"> |
| 109 … | + <span> → </span> |
| 110 … | + <time datetime="{{- article.date | |
| 111 … | + strftime('%Y-%m') -}}"> |
| 112 … | + {{- article.date | |
| 113 … | + strftime(DATE_FORMAT_MONTH) -}} |
| 114 … | + </time> |
| 115 … | + </a> |
| 116 … | + </li> |
| 117 … | + {%- else -%} |
| 118 … | + <li> |
| 119 … | + <a href="/{{- article.date | |
| 120 … | + strftime('%Y/%m/%d') -}}" |
| 121 … | + rel="next"> |
| 122 … | + <span> → </span> |
| 123 … | + <time datetime="{{- article.date | |
| 124 … | + strftime('%Y-%m-%d') -}}"> |
| 125 … | + {{- article.date | |
| 126 … | + strftime(DATE_FORMAT_DAY) -}} |
| 127 … | + </time> |
| 128 … | + </a> |
| 129 … | + </li> |
| 130 … | + {%- endif -%} |
140 | 131 … | {%- endif -%} |
141 | | - {%- endif -%} |
142 | | - {%- endfor -%} |
| 132 … | + {%- endfor -%} |
| 133 … | + {%- for article in articles | |
| 134 … | + selectattr("date", "lessthan", |
| 135 … | + dates[ dates | length - 1].date) -%} |
| 136 … | + {%- if loop.index == 1 -%} |
| 137 … | + {%- if period | length == 1 -%} |
| 138 … | + <li> |
| 139 … | + <a href="/{{- article.date | strftime('%Y') -}}" |
| 140 … | + rel="prev"> |
| 141 … | + <span> ← </span> |
| 142 … | + <time datetime="{{- article.date | |
| 143 … | + strftime('%Y') -}}"> |
| 144 … | + {{- article.date | |
| 145 … | + strftime(DATE_FORMAT_YEAR) -}} |
| 146 … | + </time> |
| 147 … | + </a> |
|
| 148 … | + </li> |
| 149 … | + {%- elif period | length == 2 -%} |
| 150 … | + <li> |
| 151 … | + <a href="/{{- article.date | strftime('%Y/%m') -}}" |
| 152 … | + rel="prev"> |
| 153 … | + <span> ← </span> |
| 154 … | + <time datetime="{{- article.date | |
| 155 … | + strftime('%Y-%m') -}}"> |
| 156 … | + {{- article.date | |
| 157 … | + strftime(DATE_FORMAT_MONTH) -}} |
| 158 … | + </time> |
| 159 … | + </a> |
| 160 … | + </li> |
| 161 … | + {%- else -%} |
| 162 … | + <li> |
| 163 … | + <a href="/{{- article.date | |
| 164 … | + strftime('%Y/%m/%d') -}}" |
| 165 … | + rel="prev"> |
| 166 … | + <span> ← </span> |
| 167 … | + <time datetime="{{- article.date | |
| 168 … | + strftime('%Y-%m-%d') -}}"> |
| 169 … | + {{- article.date | |
| 170 … | + strftime(DATE_FORMAT_DAY) -}} |
| 171 … | + </time> |
| 172 … | + </a> |
| 173 … | + </li> |
| 174 … | + {%- endif -%} |
| 175 … | + {%- endif -%} |
| 176 … | + {%- endfor -%} |
| 177 … | + </ul> |
143 | 178 … | </nav> |
144 | 179 … | {{- super() -}} |
145 | 180 … | {%- endblock -%} |
146 | 181 … | |