@lvl99dotcom/edaha-theme-default 0.0.0-stage → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +13 -2
- package/package.json +30 -3
- package/static/base.css +328 -0
- package/templates/article/list.njk +69 -0
- package/templates/article/single.njk +64 -0
- package/templates/layouts/html.njk +72 -0
- package/templates/layouts/rssfeed.njk +28 -0
- package/templates/page/home.njk +16 -0
- package/templates/page/single.njk +18 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [2026] [Matt Scheurich]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @lvl99dotcom/edaha-theme-default
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[edaha.md](https://github.com/lvl99/edaha.md#readme)'s default theme: neutral Nunjucks templates and a stylesheet. `@lvl99dotcom/edaha.md` installs and uses it, so you don't need to add it yourself.
|
|
4
|
+
|
|
5
|
+
A theme is a folder with:
|
|
6
|
+
|
|
7
|
+
- `templates/`: the Nunjucks templates (`layouts/`, `article/` and `page/`).
|
|
8
|
+
- `static/`: files copied as they are into the built site (`base.css`).
|
|
9
|
+
|
|
10
|
+
A site's own `templates/` and `static/` folders override the theme's files one by one: copy a file to the same path in your site and edit it. See [Templating](https://edaha.md/docs/05-templating/).
|
|
11
|
+
|
|
12
|
+
To make your own theme, copy this package's `templates/` and `static/` folders into a new folder, give it an `edahatheme.yml` (its name, description, version and authors), and name the folder in your config file's `theme` setting. See [Using another theme](https://edaha.md/docs/05-templating/#using-another-theme).
|
|
13
|
+
|
|
14
|
+
Licensed under the [Apache License 2.0](LICENSE).
|
package/package.json
CHANGED
|
@@ -1,6 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvl99dotcom/edaha-theme-default",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "edaha.md's default theme: neutral Nunjucks templates and a stylesheet.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"edaha.md",
|
|
7
|
+
"edaha-theme",
|
|
8
|
+
"theme",
|
|
9
|
+
"nunjucks"
|
|
10
|
+
],
|
|
11
|
+
"author": "Matt Scheurich <matt@lvl99.com>",
|
|
12
|
+
"license": "Apache-2.0",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/lvl99/edaha.md.git",
|
|
16
|
+
"directory": "packages/edaha-theme-default"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://github.com/lvl99/edaha.md#readme",
|
|
19
|
+
"bugs": "https://github.com/lvl99/edaha.md/issues",
|
|
20
|
+
"type": "module",
|
|
21
|
+
"exports": {
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"templates",
|
|
26
|
+
"static",
|
|
27
|
+
"README.md",
|
|
28
|
+
"LICENSE"
|
|
29
|
+
],
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public"
|
|
32
|
+
}
|
|
6
33
|
}
|
package/static/base.css
ADDED
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
/* edaha.md's default theme: system fonts, readable widths, light and dark colours. Replace it with your own static/site.css */
|
|
2
|
+
:root {
|
|
3
|
+
color-scheme: light dark;
|
|
4
|
+
--colour-text: #1d1d1f;
|
|
5
|
+
--colour-muted: #5a5a60;
|
|
6
|
+
--colour-background: #ffffff;
|
|
7
|
+
--colour-surface: #f4f4f6;
|
|
8
|
+
--colour-border: #d8d8de;
|
|
9
|
+
--colour-link: #bc4501;
|
|
10
|
+
--colour-link-hover: #db5a10;
|
|
11
|
+
--colour-focus: #db5a10;
|
|
12
|
+
--font-size-base: 16px;
|
|
13
|
+
--font-size-title: 48px;
|
|
14
|
+
--font-size-h1: 32px;
|
|
15
|
+
--font-size-h2: 28px;
|
|
16
|
+
--font-size-h3: 24px;
|
|
17
|
+
--font-size-h4: 20px;
|
|
18
|
+
--font-size-h5: 18px;
|
|
19
|
+
--font-size-h6: 16px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Dark colours: the device's choice unless the theme switcher chose light, or the theme switcher's choice */
|
|
23
|
+
@media (prefers-color-scheme: dark) {
|
|
24
|
+
:root:not([data-theme="light"]) {
|
|
25
|
+
--colour-text: #ececf0;
|
|
26
|
+
--colour-muted: #a6a6ae;
|
|
27
|
+
--colour-background: #141416;
|
|
28
|
+
--colour-surface: #1f1f23;
|
|
29
|
+
--colour-border: #38383f;
|
|
30
|
+
--colour-link: #dc6d2c;
|
|
31
|
+
--colour-link-hover: #fda26d;
|
|
32
|
+
--colour-focus: #fda26d;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:root[data-theme="dark"] {
|
|
37
|
+
color-scheme: dark;
|
|
38
|
+
--colour-text: #ececf0;
|
|
39
|
+
--colour-muted: #a6a6ae;
|
|
40
|
+
--colour-background: #141416;
|
|
41
|
+
--colour-surface: #1f1f23;
|
|
42
|
+
--colour-border: #38383f;
|
|
43
|
+
--colour-link: #dc6d2c;
|
|
44
|
+
--colour-link-hover: #fda26d;
|
|
45
|
+
--colour-focus: #fda26d;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:root[data-theme="light"] {
|
|
49
|
+
color-scheme: light;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
*,
|
|
53
|
+
*::before,
|
|
54
|
+
*::after {
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
body {
|
|
59
|
+
margin: 0;
|
|
60
|
+
background: var(--colour-background);
|
|
61
|
+
color: var(--colour-text);
|
|
62
|
+
font-family: Arial, sans-serif;
|
|
63
|
+
font-size: 1.0625rem;
|
|
64
|
+
line-height: 1.6;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
a {
|
|
68
|
+
color: var(--colour-link);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
a:hover {
|
|
72
|
+
color: var(--colour-link-hover);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
a:focus-visible,
|
|
76
|
+
button:focus-visible,
|
|
77
|
+
.button:focus-visible {
|
|
78
|
+
outline: 3px solid var(--colour-focus);
|
|
79
|
+
outline-offset: 2px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
h1 {
|
|
83
|
+
font-size: var(--font-size-h1);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
h2 {
|
|
87
|
+
font-size: var(--font-size-h2);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
h3 {
|
|
91
|
+
font-size: var(--font-size-h3);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
h4 {
|
|
95
|
+
font-size: var(--font-size-h4);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
h5 {
|
|
99
|
+
font-size: var(--font-size-h5);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
h6 {
|
|
103
|
+
font-size: var(--font-size-h6);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
img {
|
|
107
|
+
max-width: 100%;
|
|
108
|
+
height: auto;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
pre {
|
|
112
|
+
overflow-x: auto;
|
|
113
|
+
padding: 1rem;
|
|
114
|
+
background: var(--colour-surface);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
code {
|
|
118
|
+
background: var(--colour-surface);
|
|
119
|
+
color: var(--colour-muted);
|
|
120
|
+
font-size: 0.9em;
|
|
121
|
+
padding: 0.2em;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* Hidden on screen but read by screen readers, e.g. extra context for "Read more" links */
|
|
125
|
+
.visually-hidden {
|
|
126
|
+
position: absolute;
|
|
127
|
+
width: 1px;
|
|
128
|
+
height: 1px;
|
|
129
|
+
margin: -1px;
|
|
130
|
+
padding: 0;
|
|
131
|
+
border: 0;
|
|
132
|
+
overflow: hidden;
|
|
133
|
+
clip: rect(0 0 0 0);
|
|
134
|
+
clip-path: inset(50%);
|
|
135
|
+
white-space: nowrap;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Raw content is shown as it is written: in the page's own font, keeping its spaces and line breaks */
|
|
139
|
+
.raw {
|
|
140
|
+
font: inherit;
|
|
141
|
+
white-space: pre-wrap;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
pre.raw {
|
|
145
|
+
padding: 0;
|
|
146
|
+
background: none;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
table {
|
|
150
|
+
border-collapse: collapse;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
th,
|
|
154
|
+
td {
|
|
155
|
+
padding: 0.25rem 0.5rem;
|
|
156
|
+
border: 1px solid var(--colour-border);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
aside {
|
|
160
|
+
color: var(--colour-muted);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/* Switches between the light and dark theme (see theme-switcher.js) */
|
|
164
|
+
.theme-switcher {
|
|
165
|
+
padding: 0.25rem;
|
|
166
|
+
border: 0;
|
|
167
|
+
background: none;
|
|
168
|
+
color: inherit;
|
|
169
|
+
font: inherit;
|
|
170
|
+
cursor: pointer;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.button {
|
|
174
|
+
display: inline-block;
|
|
175
|
+
padding: 0.5rem 1rem;
|
|
176
|
+
border: 1px solid var(--colour-border);
|
|
177
|
+
border-radius: 0.375rem;
|
|
178
|
+
background: var(--colour-surface);
|
|
179
|
+
color: var(--colour-text);
|
|
180
|
+
text-decoration: none;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.button:hover {
|
|
184
|
+
border-color: var(--colour-link);
|
|
185
|
+
color: var(--colour-text);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.site-header,
|
|
189
|
+
.site-content,
|
|
190
|
+
.site-footer {
|
|
191
|
+
max-width: 64rem;
|
|
192
|
+
margin-inline: auto;
|
|
193
|
+
padding-inline: 1rem;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.site-header {
|
|
197
|
+
padding-block: 1rem;
|
|
198
|
+
border-bottom: 1px solid var(--colour-border);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.site-title {
|
|
202
|
+
margin: 0;
|
|
203
|
+
font-size: 1.5rem;
|
|
204
|
+
font-weight: 700;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.site-title a {
|
|
208
|
+
color: inherit;
|
|
209
|
+
text-decoration: none;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.site-content {
|
|
213
|
+
display: grid;
|
|
214
|
+
gap: 2rem;
|
|
215
|
+
padding-block: 1.5rem;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@media (min-width: 48rem) {
|
|
219
|
+
.site-content:has(> aside) {
|
|
220
|
+
grid-template-columns: 1fr 16rem;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.site-main {
|
|
225
|
+
min-width: 0;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.site-content > aside dt {
|
|
229
|
+
font-weight: 700;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.site-content > aside dd {
|
|
233
|
+
margin: 0 0 0.75rem;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.site-breadcrumb ul {
|
|
237
|
+
display: flex;
|
|
238
|
+
flex-wrap: wrap;
|
|
239
|
+
margin: 0;
|
|
240
|
+
padding: 0;
|
|
241
|
+
list-style: none;
|
|
242
|
+
color: var(--colour-muted);
|
|
243
|
+
font-size: 0.9375rem;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.site-breadcrumb li + li::before {
|
|
247
|
+
content: "/";
|
|
248
|
+
margin-inline: 0.5rem;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.site-breadcrumb,
|
|
252
|
+
.site-breadcrumb a:link,
|
|
253
|
+
.site-breadcrumb a:visited {
|
|
254
|
+
color: var(--colour-muted);
|
|
255
|
+
text-decoration: none;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.site-breadcrumb a:hover,
|
|
259
|
+
.site-breadcrumb a:active,
|
|
260
|
+
.site-breadcrumb a[aria-current] {
|
|
261
|
+
color: var(--colour-link-hover);
|
|
262
|
+
text-decoration: none;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.article-meta,
|
|
266
|
+
.article-updated {
|
|
267
|
+
color: var(--colour-muted);
|
|
268
|
+
font-size: 0.9375rem;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.list-articles {
|
|
272
|
+
margin: 0;
|
|
273
|
+
padding: 0;
|
|
274
|
+
list-style: none;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.list-article {
|
|
278
|
+
display: flex;
|
|
279
|
+
gap: 1rem;
|
|
280
|
+
padding-block: 1.5rem;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.list-article + .list-article {
|
|
284
|
+
border-top: 1px solid var(--colour-border);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.list-article .article-title {
|
|
288
|
+
margin: 0;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.article-thumbnail img {
|
|
292
|
+
width: 8rem;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
nav[aria-label="Pages"] ul {
|
|
296
|
+
display: flex;
|
|
297
|
+
gap: 0.5rem;
|
|
298
|
+
padding: 0;
|
|
299
|
+
list-style: none;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.site-footer {
|
|
303
|
+
padding-block: 1.5rem;
|
|
304
|
+
border-top: 1px solid var(--colour-border);
|
|
305
|
+
color: var(--colour-muted);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.site-footer nav {
|
|
309
|
+
display: flex;
|
|
310
|
+
flex-wrap: wrap;
|
|
311
|
+
gap: 1rem;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.colophon {
|
|
315
|
+
font-size: 0.875rem;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.colophon a:link,
|
|
319
|
+
.colophon a:visited {
|
|
320
|
+
color: var(--colour-muted);
|
|
321
|
+
text-decoration: none;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.colophon a:hover,
|
|
325
|
+
.colophon a:active {
|
|
326
|
+
color: var(--colour-link-hover);
|
|
327
|
+
text-decoration: none;
|
|
328
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{% extends "layouts/html.njk" %}
|
|
2
|
+
|
|
3
|
+
{% block headTitle %}{{ list.name }} | {% if list.pagination.page.index > 1 %}Page {{ list.pagination.page.index }} | {% endif %}{{ site.name }}{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block breadcrumbItems %}
|
|
6
|
+
{% set typeSettings = site.types[list.type] %}
|
|
7
|
+
{% if list.kind != "type" %}
|
|
8
|
+
<li><a href="{{ typeSettings.url }}">{{ typeSettings.labelPlural }}</a></li>
|
|
9
|
+
{% endif %}
|
|
10
|
+
<li><a href="{{ list.url }}" aria-current="page">{{ list.name }}</a></li>
|
|
11
|
+
{% endblock %}
|
|
12
|
+
|
|
13
|
+
{% block main %}
|
|
14
|
+
<h1>{{ list.name }}</h1>
|
|
15
|
+
{% if list.kind == "tag" %}
|
|
16
|
+
<p>{{ site.types[list.type].labelPlural }} tagged "{{ list.name }}".</p>
|
|
17
|
+
{% elif list.kind == "author" %}
|
|
18
|
+
<p>{{ site.types[list.type].labelPlural }} by {{ list.name }}.</p>
|
|
19
|
+
{% endif %}
|
|
20
|
+
|
|
21
|
+
{% if list.articles.length %}
|
|
22
|
+
<ul class="list-articles">
|
|
23
|
+
{% for article in list.articles %}
|
|
24
|
+
<li class="list-article">
|
|
25
|
+
{% if article.thumbnail %}
|
|
26
|
+
<div class="article-thumbnail">
|
|
27
|
+
<a href="{{ article.url }}"><img src="{{ article.thumbnail }}" alt="" /></a>
|
|
28
|
+
</div>
|
|
29
|
+
{% endif %}
|
|
30
|
+
<div class="article-info">
|
|
31
|
+
<h2 class="article-title"><a href="{{ article.url }}">{{ article.title }}</a></h2>
|
|
32
|
+
<p class="article-meta">
|
|
33
|
+
<time datetime="{{ article.date }}">{{ article.date | date }}</time>
|
|
34
|
+
{% if article.author %}by {{ article.author.name }}{% endif %}
|
|
35
|
+
</p>
|
|
36
|
+
<div class="article-excerpt">
|
|
37
|
+
{{ article.excerptHtml | safe }}
|
|
38
|
+
<p><a class="button article-readmore" href="{{ article.url }}">Read more<span class="visually-hidden"> of {{ article.title }}</span></a></p>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</li>
|
|
42
|
+
{% endfor %}
|
|
43
|
+
</ul>
|
|
44
|
+
{% else %}
|
|
45
|
+
<p>No articles yet.</p>
|
|
46
|
+
{% endif %}
|
|
47
|
+
|
|
48
|
+
{% if list.pagination.pages.length > 1 %}
|
|
49
|
+
<nav aria-label="Pages">
|
|
50
|
+
<ul>
|
|
51
|
+
{% if list.pagination.prevPage %}
|
|
52
|
+
<li><a href="{{ list.pagination.prevPage.url }}" rel="prev">Previous</a></li>
|
|
53
|
+
{% endif %}
|
|
54
|
+
{% for page in list.pagination.pages %}
|
|
55
|
+
<li>
|
|
56
|
+
<a href="{{ page.url }}" title="View page {{ page.index }} of {{ list.pagination.pages.length }}"{% if page.isCurrent %} aria-current="page"{% endif %}>{{ page.index }}</a>
|
|
57
|
+
</li>
|
|
58
|
+
{% endfor %}
|
|
59
|
+
{% if list.pagination.nextPage %}
|
|
60
|
+
<li><a href="{{ list.pagination.nextPage.url }}" rel="next">Next</a></li>
|
|
61
|
+
{% endif %}
|
|
62
|
+
</ul>
|
|
63
|
+
</nav>
|
|
64
|
+
{% endif %}
|
|
65
|
+
|
|
66
|
+
{% if list.hasFeed %}
|
|
67
|
+
<p><a href="{{ list.feedUrl }}">RSS feed</a></p>
|
|
68
|
+
{% endif %}
|
|
69
|
+
{% endblock %}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{% extends "layouts/html.njk" %}
|
|
2
|
+
|
|
3
|
+
{% block headTitle %}{{ article.title }} | {{ site.name }}{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block headDescription %}{{ article.excerptText }}{% endblock %}
|
|
6
|
+
|
|
7
|
+
{% block breadcrumbItems %}
|
|
8
|
+
{% set typeSettings = site.types[article.type] %}
|
|
9
|
+
{% if typeSettings.generate.list %}
|
|
10
|
+
<li><a href="{{ typeSettings.url }}">{{ typeSettings.labelPlural }}</a></li>
|
|
11
|
+
{% endif %}
|
|
12
|
+
<li><a href="{{ article.url }}" aria-current="page">{{ article.title }}</a></li>
|
|
13
|
+
{% endblock %}
|
|
14
|
+
|
|
15
|
+
{% block main %}
|
|
16
|
+
<article>
|
|
17
|
+
<h1 class="article-title">{{ article.title }}</h1>
|
|
18
|
+
|
|
19
|
+
<div class="article-body">
|
|
20
|
+
{% block body %}
|
|
21
|
+
{{ article.bodyHtml | safe }}
|
|
22
|
+
{% endblock %}
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
{% block attachments %}
|
|
26
|
+
{% if article.attachments.length %}
|
|
27
|
+
<h2>Attachments</h2>
|
|
28
|
+
<ul class="article-attachments">
|
|
29
|
+
{% for attachment in article.attachments %}
|
|
30
|
+
<li>
|
|
31
|
+
<a href="{{ attachment.url }}">
|
|
32
|
+
{% if attachment.thumbnail %}<img src="{{ attachment.thumbnail }}" alt="" />{% endif %}
|
|
33
|
+
{{ attachment.name }}
|
|
34
|
+
</a>
|
|
35
|
+
({{ attachment.mimeType }}{% if attachment.sizeRelative %}, {{ attachment.sizeRelative }}{% endif %})
|
|
36
|
+
</li>
|
|
37
|
+
{% endfor %}
|
|
38
|
+
</ul>
|
|
39
|
+
{% endif %}
|
|
40
|
+
{% endblock %}
|
|
41
|
+
</article>
|
|
42
|
+
{% endblock %}
|
|
43
|
+
|
|
44
|
+
{% block aside %}
|
|
45
|
+
<aside>
|
|
46
|
+
<dl>
|
|
47
|
+
{% if article.author %}
|
|
48
|
+
<dt>Author</dt>
|
|
49
|
+
<dd>
|
|
50
|
+
{{ article.author.name }}
|
|
51
|
+
{% if article.author.url %}(<a href="{{ article.author.url }}" rel="author">website</a>){% endif %}
|
|
52
|
+
</dd>
|
|
53
|
+
{% endif %}
|
|
54
|
+
<dt>Date</dt>
|
|
55
|
+
<dd><time datetime="{{ article.date }}">{{ article.date | date }}</time></dd>
|
|
56
|
+
{% if article.tags.length %}
|
|
57
|
+
<dt>Tagged</dt>
|
|
58
|
+
<dd>
|
|
59
|
+
{% for tag in article.tags %}{% if site.types[article.type].generate.tag %}<a href="{{ tag.url }}">{{ tag.name }}</a>{% else %}{{ tag.name }}{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}
|
|
60
|
+
</dd>
|
|
61
|
+
{% endif %}
|
|
62
|
+
</dl>
|
|
63
|
+
</aside>
|
|
64
|
+
{% endblock %}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>{% block headTitle %}{{ site.name }}{% endblock %}</title>
|
|
7
|
+
<meta name="description" content="{% block headDescription %}{{ site.description }}{% endblock %}" />
|
|
8
|
+
|
|
9
|
+
{% if list and list.hasFeed %}
|
|
10
|
+
<link rel="alternate" type="application/rss+xml" title="{{ list.name }} | {{ site.name }}" href="{{ list.feedUrl }}" />
|
|
11
|
+
{% endif %}
|
|
12
|
+
|
|
13
|
+
{% block headImports %}
|
|
14
|
+
<link rel="stylesheet" href="{{ site.baseUrl }}/base.css" />
|
|
15
|
+
{% endblock %}
|
|
16
|
+
{% embedHead %}
|
|
17
|
+
</head>
|
|
18
|
+
<body class="{% if type %}{{ type }} {% endif %}{% block bodyClass %}{% endblock %}">
|
|
19
|
+
{% block header %}
|
|
20
|
+
<header class="site-header">
|
|
21
|
+
<h1 class="site-title">
|
|
22
|
+
<a href="{{ site.url }}">{{ site.name }}<span class="leaf-device"></span></a>
|
|
23
|
+
</h1>
|
|
24
|
+
</header>
|
|
25
|
+
{% block headerNav %}{% endblock %}
|
|
26
|
+
{% endblock %}
|
|
27
|
+
|
|
28
|
+
{% block content %}
|
|
29
|
+
<div class="site-content">
|
|
30
|
+
<main class="site-main">
|
|
31
|
+
{% block breadcrumb %}
|
|
32
|
+
<nav class="site-breadcrumb" aria-label="Breadcrumb">
|
|
33
|
+
<ul>
|
|
34
|
+
<li><a href="{{ site.path }}">{{ site.name }}</a></li>
|
|
35
|
+
{% block breadcrumbItems %}{% endblock %}
|
|
36
|
+
</ul>
|
|
37
|
+
</nav>
|
|
38
|
+
{% endblock %}
|
|
39
|
+
|
|
40
|
+
{% block main %}{% endblock %}
|
|
41
|
+
</main>
|
|
42
|
+
|
|
43
|
+
{% block aside %}{% endblock %}
|
|
44
|
+
</div>
|
|
45
|
+
{% endblock %}
|
|
46
|
+
|
|
47
|
+
{% block footer %}
|
|
48
|
+
<footer class="site-footer">
|
|
49
|
+
{% block footerNav %}
|
|
50
|
+
<nav aria-label="Sections">
|
|
51
|
+
{% for name, type in site.types %}
|
|
52
|
+
{% if type.generate.list %}
|
|
53
|
+
<a href="{{ type.url }}">{{ type.labelPlural }}</a>
|
|
54
|
+
{% endif %}
|
|
55
|
+
{% endfor %}
|
|
56
|
+
</nav>
|
|
57
|
+
{% endblock %}
|
|
58
|
+
|
|
59
|
+
{% block colophon %}
|
|
60
|
+
<p class="colophon">
|
|
61
|
+
<a href="{{ site.url }}">{{ site.name }}</a>
|
|
62
|
+
·
|
|
63
|
+
Built with <a href="https://edaha.md" target="_blank" rel="noopener noreferrer">edaha.md</a>
|
|
64
|
+
</p>
|
|
65
|
+
{% endblock %}
|
|
66
|
+
</footer>
|
|
67
|
+
{% endblock %}
|
|
68
|
+
|
|
69
|
+
{% block bodyImports %}{% endblock %}
|
|
70
|
+
{% embedFoot %}
|
|
71
|
+
</body>
|
|
72
|
+
</html>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
|
3
|
+
<channel>
|
|
4
|
+
<title>{{ list.name }} | {{ site.name }}</title>
|
|
5
|
+
<link>{{ list.url | absoluteUrl(site.url) }}</link>
|
|
6
|
+
<description>{{ site.description }}</description>
|
|
7
|
+
<language>en</language>
|
|
8
|
+
<atom:link href="{{ list.feedUrl | absoluteUrl(site.url) }}" rel="self" type="application/rss+xml" />
|
|
9
|
+
{% if list.articles.length %}
|
|
10
|
+
<lastBuildDate>{{ list.articles[0].date | rfc822 }}</lastBuildDate>
|
|
11
|
+
{% endif %}
|
|
12
|
+
{% for article in list.articles %}
|
|
13
|
+
<item>
|
|
14
|
+
<title>{{ article.title }}</title>
|
|
15
|
+
<link>{{ article.url | absoluteUrl(site.url) }}</link>
|
|
16
|
+
<guid isPermaLink="true">{{ article.url | absoluteUrl(site.url) }}</guid>
|
|
17
|
+
<pubDate>{{ article.date | rfc822 }}</pubDate>
|
|
18
|
+
{% if article.author and article.author.email %}
|
|
19
|
+
<author>{{ article.author.email }} ({{ article.author.name }})</author>
|
|
20
|
+
{% endif %}
|
|
21
|
+
{% for tag in article.tags %}
|
|
22
|
+
<category>{{ tag.name }}</category>
|
|
23
|
+
{% endfor %}
|
|
24
|
+
<description>{{ article.excerptHtml | absoluteUrls(site.url) }}</description>
|
|
25
|
+
</item>
|
|
26
|
+
{% endfor %}
|
|
27
|
+
</channel>
|
|
28
|
+
</rss>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{# The website's front page: its title and body, without the header or breadcrumbs #}
|
|
2
|
+
{% extends "layouts/html.njk" %}
|
|
3
|
+
|
|
4
|
+
{% block headTitle %}{{ site.name }} | {{ article.title }}{% endblock %}
|
|
5
|
+
|
|
6
|
+
{% block headDescription %}{{ site.description }}{% endblock %}
|
|
7
|
+
|
|
8
|
+
{% block bodyClass %}home{% endblock %}
|
|
9
|
+
|
|
10
|
+
{% block breadcrumb %}{% endblock %}
|
|
11
|
+
|
|
12
|
+
{% block main %}
|
|
13
|
+
<div class="home-body">
|
|
14
|
+
{{ article.bodyHtml | safe }}
|
|
15
|
+
</div>
|
|
16
|
+
{% endblock %}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{% extends "layouts/html.njk" %}
|
|
2
|
+
|
|
3
|
+
{% block headTitle %}{{ article.title }} | {{ site.name }}{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block headDescription %}{{ article.excerptText }}{% endblock %}
|
|
6
|
+
|
|
7
|
+
{% block breadcrumbItems %}
|
|
8
|
+
<li><a href="{{ article.url }}" aria-current="page">{{ article.title }}</a></li>
|
|
9
|
+
{% endblock %}
|
|
10
|
+
|
|
11
|
+
{% block main %}
|
|
12
|
+
<article>
|
|
13
|
+
<h1 class="article-title">{{ article.title }}</h1>
|
|
14
|
+
<p class="article-updated">Last updated: <time datetime="{{ article.date }}">{{ article.date | date }}</time></p>
|
|
15
|
+
|
|
16
|
+
{{ article.bodyHtml | safe }}
|
|
17
|
+
</article>
|
|
18
|
+
{% endblock %}
|