@geekity/cms 0.4.0 → 0.5.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/README.md +234 -108
- package/admin/pages/documents/editor.njk +0 -13
- package/admin/pages/{settings/federation.njk → federation/settings.njk} +7 -5
- package/admin/pages/navigation/menus.njk +129 -0
- package/admin/pages/settings/reading.njk +2 -10
- package/admin/pages/tools/content-index.njk +89 -0
- package/admin/pages/users/list.njk +5 -2
- package/admin/static/admin.css +60 -0
- package/dist/access-log.d.ts +44 -0
- package/dist/access-log.d.ts.map +1 -0
- package/dist/access-log.js +71 -0
- package/dist/access-log.js.map +1 -0
- package/dist/admin/documents.d.ts +3 -13
- package/dist/admin/documents.d.ts.map +1 -1
- package/dist/admin/documents.js +2 -34
- package/dist/admin/documents.js.map +1 -1
- package/dist/admin/federation.d.ts +10 -0
- package/dist/admin/federation.d.ts.map +1 -1
- package/dist/admin/federation.js +10 -0
- package/dist/admin/federation.js.map +1 -1
- package/dist/admin/index.d.ts +3 -3
- package/dist/admin/index.d.ts.map +1 -1
- package/dist/admin/index.js +2 -2
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/menu.d.ts.map +1 -1
- package/dist/admin/menu.js +19 -2
- package/dist/admin/menu.js.map +1 -1
- package/dist/admin/navigation.d.ts +155 -0
- package/dist/admin/navigation.d.ts.map +1 -0
- package/dist/admin/navigation.js +292 -0
- package/dist/admin/navigation.js.map +1 -0
- package/dist/admin/routes.d.ts.map +1 -1
- package/dist/admin/routes.js +9 -0
- package/dist/admin/routes.js.map +1 -1
- package/dist/admin/session.d.ts +17 -3
- package/dist/admin/session.d.ts.map +1 -1
- package/dist/admin/session.js +19 -5
- package/dist/admin/session.js.map +1 -1
- package/dist/admin/settings-federation.d.ts +10 -1
- package/dist/admin/settings-federation.d.ts.map +1 -1
- package/dist/admin/settings-federation.js +26 -6
- package/dist/admin/settings-federation.js.map +1 -1
- package/dist/admin/settings-page.d.ts +26 -9
- package/dist/admin/settings-page.d.ts.map +1 -1
- package/dist/admin/settings-page.js +18 -12
- package/dist/admin/settings-page.js.map +1 -1
- package/dist/admin/settings-pages.d.ts +14 -3
- package/dist/admin/settings-pages.d.ts.map +1 -1
- package/dist/admin/settings-pages.js +15 -5
- package/dist/admin/settings-pages.js.map +1 -1
- package/dist/admin/settings-reading.d.ts +5 -4
- package/dist/admin/settings-reading.d.ts.map +1 -1
- package/dist/admin/settings-reading.js +6 -5
- package/dist/admin/settings-reading.js.map +1 -1
- package/dist/admin/settings.d.ts +29 -15
- package/dist/admin/settings.d.ts.map +1 -1
- package/dist/admin/settings.js +28 -78
- package/dist/admin/settings.js.map +1 -1
- package/dist/admin/templates.d.ts +3 -1
- package/dist/admin/templates.d.ts.map +1 -1
- package/dist/admin/templates.js +3 -1
- package/dist/admin/templates.js.map +1 -1
- package/dist/admin/tools.d.ts +111 -0
- package/dist/admin/tools.d.ts.map +1 -0
- package/dist/admin/tools.js +182 -0
- package/dist/admin/tools.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +6 -1
- package/dist/cli.js.map +1 -1
- package/dist/comments/form.d.ts +48 -0
- package/dist/comments/form.d.ts.map +1 -1
- package/dist/comments/form.js +15 -0
- package/dist/comments/form.js.map +1 -1
- package/dist/comments/index.d.ts +4 -3
- package/dist/comments/index.d.ts.map +1 -1
- package/dist/comments/index.js +2 -1
- package/dist/comments/index.js.map +1 -1
- package/dist/comments/routes.d.ts +3 -1
- package/dist/comments/routes.d.ts.map +1 -1
- package/dist/comments/routes.js +46 -11
- package/dist/comments/routes.js.map +1 -1
- package/dist/comments/submission.d.ts +37 -3
- package/dist/comments/submission.d.ts.map +1 -1
- package/dist/comments/submission.js +59 -20
- package/dist/comments/submission.js.map +1 -1
- package/dist/comments/viewer.d.ts +21 -0
- package/dist/comments/viewer.d.ts.map +1 -0
- package/dist/comments/viewer.js +45 -0
- package/dist/comments/viewer.js.map +1 -0
- package/dist/config.d.ts +35 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +3 -0
- package/dist/config.js.map +1 -1
- package/dist/content/store.d.ts +18 -0
- package/dist/content/store.d.ts.map +1 -1
- package/dist/content/store.js +18 -0
- package/dist/content/store.js.map +1 -1
- package/dist/env.d.ts +12 -1
- package/dist/env.d.ts.map +1 -1
- package/dist/federation/mount.d.ts +4 -0
- package/dist/federation/mount.d.ts.map +1 -1
- package/dist/federation/mount.js +44 -12
- package/dist/federation/mount.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -4
- package/dist/index.js.map +1 -1
- package/dist/web/index.d.ts +3 -3
- package/dist/web/index.d.ts.map +1 -1
- package/dist/web/index.js +1 -1
- package/dist/web/index.js.map +1 -1
- package/dist/web/navigation.d.ts +158 -36
- package/dist/web/navigation.d.ts.map +1 -1
- package/dist/web/navigation.js +250 -60
- package/dist/web/navigation.js.map +1 -1
- package/dist/web/negotiate.d.ts +22 -0
- package/dist/web/negotiate.d.ts.map +1 -1
- package/dist/web/negotiate.js +25 -10
- package/dist/web/negotiate.js.map +1 -1
- package/dist/web/render.d.ts +16 -10
- package/dist/web/render.d.ts.map +1 -1
- package/dist/web/render.js +21 -14
- package/dist/web/render.js.map +1 -1
- package/dist/web/routes.d.ts.map +1 -1
- package/dist/web/routes.js +11 -2
- package/dist/web/routes.js.map +1 -1
- package/dist/web/themes.d.ts +21 -0
- package/dist/web/themes.d.ts.map +1 -1
- package/dist/web/themes.js +37 -0
- package/dist/web/themes.js.map +1 -1
- package/package.json +1 -1
- package/templates/site/content/_data/site.json +7 -0
- package/templates/site/content/pages/about.md +7 -0
- package/themes/default/README.md +200 -80
- package/themes/default/layouts/author.njk +3 -4
- package/themes/default/layouts/base.njk +38 -49
- package/themes/default/layouts/front-page.njk +1 -2
- package/themes/default/partials/bio.njk +15 -21
- package/themes/default/partials/comment-form.njk +31 -3
- package/themes/default/partials/menu.njk +32 -0
- package/themes/default/partials/search-form.njk +5 -0
- package/themes/default/static/style.css +31 -8
- package/themes/default/theme.json +5 -1
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
every label, field and button through them — so the contact form wears the
|
|
14
14
|
same class rather than repeating the rules.
|
|
15
15
|
|
|
16
|
+
It draws two forms. For a stranger: the name, email and website boxes, the
|
|
17
|
+
honeypot and the loaded-at stamp. For somebody signed in to this site's
|
|
18
|
+
admin — `commentForm.signedInAs` — none of those, because the site already
|
|
19
|
+
knows all three and a session is better evidence than a honeypot, and a
|
|
20
|
+
hidden CSRF token instead, because this form posts under somebody's name.
|
|
21
|
+
A theme that replaces this partial has to draw both.
|
|
22
|
+
|
|
16
23
|
It works with JavaScript switched off, and there is no script on it.
|
|
17
24
|
#}
|
|
18
25
|
<section class="comment-respond" id="respond">
|
|
@@ -28,7 +35,6 @@
|
|
|
28
35
|
|
|
29
36
|
<form method="post" action="{{ commentForm.action }}">
|
|
30
37
|
<input type="hidden" name="{{ commentForm.fields.post }}" value="{{ commentForm.post }}" />
|
|
31
|
-
<input type="hidden" name="{{ commentForm.fields.loaded }}" value="{{ commentForm.loaded }}" />
|
|
32
38
|
{#
|
|
33
39
|
What this comment answers. `commentReplyTo` is the `?reply_to=` on the
|
|
34
40
|
URL, which a Reply link put there and the CMS has already checked names
|
|
@@ -45,6 +51,26 @@
|
|
|
45
51
|
</p>
|
|
46
52
|
{% endif %}
|
|
47
53
|
|
|
54
|
+
{% if commentForm.signedInAs %}
|
|
55
|
+
{#
|
|
56
|
+
Signed in to this site. The comment is attributed from the account, so
|
|
57
|
+
there is nothing to type and nothing to get wrong; the token is what
|
|
58
|
+
stops a page on another site posting under this name without them
|
|
59
|
+
knowing.
|
|
60
|
+
#}
|
|
61
|
+
<input type="hidden" name="{{ commentForm.fields.csrf }}" value="{{ commentForm.csrfToken }}" />
|
|
62
|
+
|
|
63
|
+
<p class="comment-signed-in">
|
|
64
|
+
Commenting as <a href="{{ commentForm.signedInAs.url }}">{{ commentForm.signedInAs.name }}</a>.
|
|
65
|
+
</p>
|
|
66
|
+
{% else %}
|
|
67
|
+
{#
|
|
68
|
+
When this form was drawn, which is what the minimum submit time is
|
|
69
|
+
measured against. A signed-in form carries none: a session says more
|
|
70
|
+
about whether this is a person than a stopwatch does.
|
|
71
|
+
#}
|
|
72
|
+
<input type="hidden" name="{{ commentForm.fields.loaded }}" value="{{ commentForm.loaded }}" />
|
|
73
|
+
|
|
48
74
|
{#
|
|
49
75
|
The honeypot. Hidden from sight and from assistive technology, out of the
|
|
50
76
|
tab order, and told not to autofill: a person never sees it and never
|
|
@@ -78,6 +104,7 @@
|
|
|
78
104
|
<span class="comment-field-error">{{ commentForm.problems.url }}</span>
|
|
79
105
|
{% endif %}
|
|
80
106
|
</p>
|
|
107
|
+
{% endif %}
|
|
81
108
|
|
|
82
109
|
<p class="comment-field">
|
|
83
110
|
<label for="comment-body">Comment</label>
|
|
@@ -92,8 +119,9 @@
|
|
|
92
119
|
"Tell me about replies". Only on a site that can actually send mail —
|
|
93
120
|
`notifiable` is false otherwise — because a box that promised a message
|
|
94
121
|
nothing would ever send would be a lie on a form. The address is the one
|
|
95
|
-
typed above
|
|
96
|
-
a one-click unsubscribe
|
|
122
|
+
typed above — or the account's, for somebody signed in — is never shown
|
|
123
|
+
anywhere, and every message it sends carries a one-click unsubscribe
|
|
124
|
+
link.
|
|
97
125
|
#}
|
|
98
126
|
{% if commentForm.notifiable %}
|
|
99
127
|
<p class="comment-check">
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{#
|
|
2
|
+
One menu, drawn.
|
|
3
|
+
|
|
4
|
+
The CMS puts every menu the site stores on the context as `menus`, keyed by
|
|
5
|
+
the name it is stored under, each item already knowing whether it is the page
|
|
6
|
+
being looked at (TASK-107). This theme declares two of those names in its
|
|
7
|
+
`theme.json` — `primary` and `footer` — and draws each through this macro, so
|
|
8
|
+
the markup of a menu is written once:
|
|
9
|
+
|
|
10
|
+
{% import "partials/menu.njk" as nav %}
|
|
11
|
+
{{ nav.list(menus.footer, "Footer") }}
|
|
12
|
+
|
|
13
|
+
Nothing is printed for a menu with nothing in it: an area a site has not
|
|
14
|
+
filled in is an area with no nav element, not an empty list.
|
|
15
|
+
|
|
16
|
+
`label` is the `aria-label`, which is what tells a reader on a screen reader
|
|
17
|
+
which of a page's menus this one is. Two navs with no labels are two navs
|
|
18
|
+
called "navigation".
|
|
19
|
+
|
|
20
|
+
An item marked `me` carries `rel="me"`, which is how Mastodon and the rest of
|
|
21
|
+
the IndieWeb verify that the site and the profile it links belong to the same
|
|
22
|
+
person: the profile links back, and the pair is the proof.
|
|
23
|
+
#}
|
|
24
|
+
{% macro list(items, label) %}{% if items.length %}
|
|
25
|
+
<nav class="site-nav" aria-label="{{ label }}">
|
|
26
|
+
<ul class="hlist">
|
|
27
|
+
{% for item in items %}
|
|
28
|
+
<li><a href="{{ item.url | url }}"{% if item.me %} rel="me"{% endif %}{% if item.current %} class="is-current" aria-current="page"{% endif %}>{{ item.label }}</a></li>
|
|
29
|
+
{% endfor %}
|
|
30
|
+
</ul>
|
|
31
|
+
</nav>
|
|
32
|
+
{% endif %}{% endmacro %}
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
The site's search box (TASK-22): a plain GET form, so a search is a URL a
|
|
3
3
|
reader can bookmark or share and the box needs no JavaScript.
|
|
4
4
|
|
|
5
|
+
`layouts/search.njk` is the only thing that includes it (TASK-105): the box
|
|
6
|
+
was in the footer of every page as well, and search is a menu item now —
|
|
7
|
+
a `Search | /search/` line like any other — so the page about searching is
|
|
8
|
+
where the box is.
|
|
9
|
+
|
|
5
10
|
Expects nothing. `query`, when the page has one, goes back in the box, so the
|
|
6
11
|
results page shows what was searched for. The label is read out rather than
|
|
7
12
|
shown, because the button beside the box already says what it is for, and it
|
|
@@ -616,6 +616,29 @@ pre code {
|
|
|
616
616
|
text-decoration: none;
|
|
617
617
|
}
|
|
618
618
|
|
|
619
|
+
/* The site menu, which the header carries on every page (TASK-105). At the
|
|
620
|
+
root the header is the site title with the tagline under it, and the menu
|
|
621
|
+
is a line of its own under that. */
|
|
622
|
+
.global-header .site-nav {
|
|
623
|
+
margin-top: var(--spacing-2);
|
|
624
|
+
font-size: var(--fontSize-0);
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
/* Everywhere else the header is the small link home, and the menu sits beside
|
|
628
|
+
it on the same line — the two wrap onto a second line together rather than
|
|
629
|
+
the menu dropping under the link on a narrow screen. */
|
|
630
|
+
.global-wrapper:not([data-is-root-path='true']) .global-header {
|
|
631
|
+
display: flex;
|
|
632
|
+
flex-wrap: wrap;
|
|
633
|
+
align-items: baseline;
|
|
634
|
+
column-gap: var(--spacing-5);
|
|
635
|
+
row-gap: var(--spacing-1);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.global-wrapper:not([data-is-root-path='true']) .global-header .site-nav {
|
|
639
|
+
margin-top: var(--spacing-0);
|
|
640
|
+
}
|
|
641
|
+
|
|
619
642
|
/* An entry: a post or a page (TASK-83). The source design's own rules — the
|
|
620
643
|
title tight against the words under it, a subtitle in the heading font —
|
|
621
644
|
plus the small line the `e-content` ends on, which carries the permalink,
|
|
@@ -667,10 +690,9 @@ pre code {
|
|
|
667
690
|
font-style: italic;
|
|
668
691
|
}
|
|
669
692
|
|
|
670
|
-
/* The
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
.bio .site-nav,
|
|
693
|
+
/* The links the person calls their own, under the credit: a horizontal list,
|
|
694
|
+
small, in the heading font. The site menu used to share this rule; it is in
|
|
695
|
+
the header now (TASK-105) and the bio carries nobody but the person. */
|
|
674
696
|
.bio-links {
|
|
675
697
|
margin-top: var(--spacing-2);
|
|
676
698
|
font-size: var(--fontSize-0);
|
|
@@ -803,9 +825,9 @@ pre code {
|
|
|
803
825
|
font-size: var(--fontSize-0);
|
|
804
826
|
}
|
|
805
827
|
|
|
806
|
-
/* The search box (TASK-22): a field and a button on one line,
|
|
807
|
-
|
|
808
|
-
|
|
828
|
+
/* The search box (TASK-22): a field and a button on one line, at the top of
|
|
829
|
+
the search page and nowhere else (TASK-105). The field is drawn the way the
|
|
830
|
+
comment form's are, so the site has one look for a place to type. */
|
|
809
831
|
|
|
810
832
|
.search-form {
|
|
811
833
|
display: flex;
|
|
@@ -1185,7 +1207,8 @@ pre code {
|
|
|
1185
1207
|
border-inline-start-color: var(--color-error);
|
|
1186
1208
|
}
|
|
1187
1209
|
|
|
1188
|
-
.comment-replying-to
|
|
1210
|
+
.comment-replying-to,
|
|
1211
|
+
.comment-signed-in {
|
|
1189
1212
|
margin: 0 0 var(--spacing-4);
|
|
1190
1213
|
font-family: var(--font-heading);
|
|
1191
1214
|
font-size: var(--fontSize-0);
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "Default",
|
|
3
3
|
"kind": "site",
|
|
4
|
-
"description": "The theme that ships with Geekity: plain Nunjucks and plain CSS, and the layer every other theme is laid over."
|
|
4
|
+
"description": "The theme that ships with Geekity: plain Nunjucks and plain CSS, and the layer every other theme is laid over.",
|
|
5
|
+
"areas": [
|
|
6
|
+
{ "name": "primary", "label": "Site menu" },
|
|
7
|
+
{ "name": "footer", "label": "Footer links" }
|
|
8
|
+
]
|
|
5
9
|
}
|