@geekity/cms 0.21.0 → 0.23.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.
Files changed (302) hide show
  1. package/README.md +42 -4
  2. package/admin/components/admin-bar.njk +27 -6
  3. package/admin/components/alert.njk +28 -0
  4. package/admin/components/badge.njk +58 -0
  5. package/admin/components/button.njk +56 -0
  6. package/admin/components/card.njk +40 -0
  7. package/admin/components/collapse.njk +36 -0
  8. package/admin/components/copy.njk +20 -0
  9. package/admin/components/dropdown.njk +32 -0
  10. package/admin/components/fields.njk +81 -45
  11. package/admin/components/flash.njk +12 -5
  12. package/admin/components/menu.njk +51 -0
  13. package/admin/components/navbar.njk +23 -0
  14. package/admin/components/pagination.njk +47 -0
  15. package/admin/components/public-admin-bar.njk +4 -41
  16. package/admin/components/stat.njk +35 -0
  17. package/admin/components/table.njk +74 -0
  18. package/admin/components/tabs.njk +33 -0
  19. package/admin/components/theme-choice.njk +18 -0
  20. package/admin/layouts/base.njk +9 -16
  21. package/admin/layouts/settings-page.njk +15 -10
  22. package/admin/layouts/shell.njk +23 -31
  23. package/admin/pages/account/forgot.njk +39 -33
  24. package/admin/pages/account/login.njk +22 -16
  25. package/admin/pages/account/reset.njk +34 -25
  26. package/admin/pages/account/setup.njk +21 -15
  27. package/admin/pages/appearance/themes.njk +50 -44
  28. package/admin/pages/comments/all.njk +88 -106
  29. package/admin/pages/dashboard/home.njk +50 -62
  30. package/admin/pages/documents/conflict.njk +29 -24
  31. package/admin/pages/documents/editor.njk +173 -275
  32. package/admin/pages/documents/list.njk +60 -69
  33. package/admin/pages/documents/syndication.njk +98 -60
  34. package/admin/pages/documents/taxonomy.njk +36 -32
  35. package/admin/pages/error.njk +8 -5
  36. package/admin/pages/federation/followers.njk +91 -97
  37. package/admin/pages/federation/settings.njk +10 -11
  38. package/admin/pages/indieauth/consent.njk +60 -44
  39. package/admin/pages/indieauth/refused.njk +6 -3
  40. package/admin/pages/media/library.njk +86 -107
  41. package/admin/pages/messages/all.njk +71 -77
  42. package/admin/pages/navigation/menus.njk +90 -85
  43. package/admin/pages/placeholder.njk +13 -8
  44. package/admin/pages/settings/discussion.njk +30 -29
  45. package/admin/pages/settings/email.njk +26 -28
  46. package/admin/pages/settings/general.njk +10 -4
  47. package/admin/pages/settings/permalinks.njk +8 -9
  48. package/admin/pages/settings/privacy.njk +3 -3
  49. package/admin/pages/settings/reading.njk +3 -3
  50. package/admin/pages/tools/content-index.njk +79 -73
  51. package/admin/pages/tools/personal-data.njk +61 -55
  52. package/admin/pages/users/activity-entry.njk +12 -12
  53. package/admin/pages/users/activity.njk +13 -19
  54. package/admin/pages/users/apps.njk +112 -100
  55. package/admin/pages/users/edit.njk +65 -58
  56. package/admin/pages/users/list.njk +26 -24
  57. package/admin/pages/users/new.njk +11 -7
  58. package/admin/src/admin.css +174 -0
  59. package/admin/static/admin-bar.css +33 -31
  60. package/admin/static/admin-bar.js +22 -0
  61. package/admin/static/admin.css +7388 -1195
  62. package/admin/static/copy.js +1 -1
  63. package/admin/static/editor.js +18 -18
  64. package/dist/admin/accounts.d.ts +20 -0
  65. package/dist/admin/accounts.d.ts.map +1 -1
  66. package/dist/admin/accounts.js +25 -0
  67. package/dist/admin/accounts.js.map +1 -1
  68. package/dist/admin/admin-theme.d.ts +157 -0
  69. package/dist/admin/admin-theme.d.ts.map +1 -0
  70. package/dist/admin/admin-theme.js +52 -0
  71. package/dist/admin/admin-theme.js.map +1 -0
  72. package/dist/admin/assets.d.ts +4 -3
  73. package/dist/admin/assets.d.ts.map +1 -1
  74. package/dist/admin/assets.js +4 -3
  75. package/dist/admin/assets.js.map +1 -1
  76. package/dist/admin/comments.js +2 -2
  77. package/dist/admin/comments.js.map +1 -1
  78. package/dist/admin/documents.d.ts +36 -7
  79. package/dist/admin/documents.d.ts.map +1 -1
  80. package/dist/admin/documents.js +141 -30
  81. package/dist/admin/documents.js.map +1 -1
  82. package/dist/admin/editor-layout.d.ts +1 -1
  83. package/dist/admin/editor-layout.d.ts.map +1 -1
  84. package/dist/admin/editor-layout.js +6 -1
  85. package/dist/admin/editor-layout.js.map +1 -1
  86. package/dist/admin/event-field.d.ts +26 -0
  87. package/dist/admin/event-field.d.ts.map +1 -0
  88. package/dist/admin/event-field.js +74 -0
  89. package/dist/admin/event-field.js.map +1 -0
  90. package/dist/admin/federation.js +3 -3
  91. package/dist/admin/federation.js.map +1 -1
  92. package/dist/admin/headers.js +1 -1
  93. package/dist/admin/headers.js.map +1 -1
  94. package/dist/admin/media.js +2 -2
  95. package/dist/admin/media.js.map +1 -1
  96. package/dist/admin/preview.d.ts.map +1 -1
  97. package/dist/admin/preview.js +16 -1
  98. package/dist/admin/preview.js.map +1 -1
  99. package/dist/admin/routes.d.ts.map +1 -1
  100. package/dist/admin/routes.js +17 -8
  101. package/dist/admin/routes.js.map +1 -1
  102. package/dist/admin/store.d.ts +9 -0
  103. package/dist/admin/store.d.ts.map +1 -1
  104. package/dist/admin/store.js +16 -5
  105. package/dist/admin/store.js.map +1 -1
  106. package/dist/admin/templates.d.ts +6 -3
  107. package/dist/admin/templates.d.ts.map +1 -1
  108. package/dist/admin/templates.js +25 -3
  109. package/dist/admin/templates.js.map +1 -1
  110. package/dist/admin/users.d.ts +4 -0
  111. package/dist/admin/users.d.ts.map +1 -1
  112. package/dist/admin/users.js +37 -1
  113. package/dist/admin/users.js.map +1 -1
  114. package/dist/avatars/avatars.js +1 -1
  115. package/dist/avatars/avatars.js.map +1 -1
  116. package/dist/comments/policy.d.ts +10 -0
  117. package/dist/comments/policy.d.ts.map +1 -1
  118. package/dist/comments/policy.js +12 -0
  119. package/dist/comments/policy.js.map +1 -1
  120. package/dist/comments/records.d.ts +5 -1
  121. package/dist/comments/records.d.ts.map +1 -1
  122. package/dist/comments/records.js +16 -2
  123. package/dist/comments/records.js.map +1 -1
  124. package/dist/content/event.d.ts +40 -0
  125. package/dist/content/event.d.ts.map +1 -0
  126. package/dist/content/event.js +51 -0
  127. package/dist/content/event.js.map +1 -0
  128. package/dist/content/handles.d.ts +22 -0
  129. package/dist/content/handles.d.ts.map +1 -0
  130. package/dist/content/handles.js +68 -0
  131. package/dist/content/handles.js.map +1 -0
  132. package/dist/content/markdown.d.ts +8 -2
  133. package/dist/content/markdown.d.ts.map +1 -1
  134. package/dist/content/markdown.js +55 -5
  135. package/dist/content/markdown.js.map +1 -1
  136. package/dist/content/parser.d.ts +3 -0
  137. package/dist/content/parser.d.ts.map +1 -1
  138. package/dist/content/parser.js +1 -1
  139. package/dist/content/parser.js.map +1 -1
  140. package/dist/content/post-type.d.ts +12 -8
  141. package/dist/content/post-type.d.ts.map +1 -1
  142. package/dist/content/post-type.js +19 -4
  143. package/dist/content/post-type.js.map +1 -1
  144. package/dist/content/rsvp.d.ts +29 -0
  145. package/dist/content/rsvp.d.ts.map +1 -0
  146. package/dist/content/rsvp.js +49 -0
  147. package/dist/content/rsvp.js.map +1 -0
  148. package/dist/content/save.d.ts +2 -1
  149. package/dist/content/save.d.ts.map +1 -1
  150. package/dist/content/save.js +10 -3
  151. package/dist/content/save.js.map +1 -1
  152. package/dist/content/store.d.ts +11 -4
  153. package/dist/content/store.d.ts.map +1 -1
  154. package/dist/content/store.js +15 -4
  155. package/dist/content/store.js.map +1 -1
  156. package/dist/content/sync.d.ts.map +1 -1
  157. package/dist/content/sync.js +7 -6
  158. package/dist/content/sync.js.map +1 -1
  159. package/dist/env.d.ts +3 -0
  160. package/dist/env.d.ts.map +1 -1
  161. package/dist/federation/article.d.ts +9 -3
  162. package/dist/federation/article.d.ts.map +1 -1
  163. package/dist/federation/article.js +90 -34
  164. package/dist/federation/article.js.map +1 -1
  165. package/dist/federation/cited-post.d.ts +13 -0
  166. package/dist/federation/cited-post.d.ts.map +1 -0
  167. package/dist/federation/cited-post.js +75 -0
  168. package/dist/federation/cited-post.js.map +1 -0
  169. package/dist/federation/delivery.d.ts.map +1 -1
  170. package/dist/federation/delivery.js +31 -2
  171. package/dist/federation/delivery.js.map +1 -1
  172. package/dist/federation/handles.d.ts +28 -0
  173. package/dist/federation/handles.d.ts.map +1 -0
  174. package/dist/federation/handles.js +65 -0
  175. package/dist/federation/handles.js.map +1 -0
  176. package/dist/federation/inbox.d.ts +2 -1
  177. package/dist/federation/inbox.d.ts.map +1 -1
  178. package/dist/federation/inbox.js +11 -3
  179. package/dist/federation/inbox.js.map +1 -1
  180. package/dist/federation/mount.d.ts.map +1 -1
  181. package/dist/federation/mount.js +18 -2
  182. package/dist/federation/mount.js.map +1 -1
  183. package/dist/federation/profiles.d.ts.map +1 -1
  184. package/dist/federation/profiles.js +2 -8
  185. package/dist/federation/profiles.js.map +1 -1
  186. package/dist/federation/site-loaders.d.ts +15 -0
  187. package/dist/federation/site-loaders.d.ts.map +1 -0
  188. package/dist/federation/site-loaders.js +19 -0
  189. package/dist/federation/site-loaders.js.map +1 -0
  190. package/dist/index.d.ts.map +1 -1
  191. package/dist/index.js +23 -1
  192. package/dist/index.js.map +1 -1
  193. package/dist/indieauth/client.js +2 -2
  194. package/dist/indieauth/client.js.map +1 -1
  195. package/dist/micropub/create.d.ts +2 -1
  196. package/dist/micropub/create.d.ts.map +1 -1
  197. package/dist/micropub/create.js +57 -8
  198. package/dist/micropub/create.js.map +1 -1
  199. package/dist/micropub/endpoint.d.ts.map +1 -1
  200. package/dist/micropub/endpoint.js +12 -4
  201. package/dist/micropub/endpoint.js.map +1 -1
  202. package/dist/micropub/update.d.ts +3 -0
  203. package/dist/micropub/update.d.ts.map +1 -1
  204. package/dist/micropub/update.js +29 -4
  205. package/dist/micropub/update.js.map +1 -1
  206. package/dist/web/admin-bar.d.ts +4 -4
  207. package/dist/web/admin-bar.d.ts.map +1 -1
  208. package/dist/web/admin-bar.js +11 -34
  209. package/dist/web/admin-bar.js.map +1 -1
  210. package/dist/web/context.d.ts +32 -4
  211. package/dist/web/context.d.ts.map +1 -1
  212. package/dist/web/context.js +28 -1
  213. package/dist/web/context.js.map +1 -1
  214. package/dist/web/conversation.d.ts +26 -1
  215. package/dist/web/conversation.d.ts.map +1 -1
  216. package/dist/web/conversation.js +67 -10
  217. package/dist/web/conversation.js.map +1 -1
  218. package/dist/web/documents.d.ts +12 -0
  219. package/dist/web/documents.d.ts.map +1 -1
  220. package/dist/web/documents.js +20 -0
  221. package/dist/web/documents.js.map +1 -1
  222. package/dist/web/feed-item.d.ts.map +1 -1
  223. package/dist/web/feed-item.js +8 -3
  224. package/dist/web/feed-item.js.map +1 -1
  225. package/dist/web/render.d.ts +3 -0
  226. package/dist/web/render.d.ts.map +1 -1
  227. package/dist/web/render.js +39 -6
  228. package/dist/web/render.js.map +1 -1
  229. package/dist/web/routes.d.ts.map +1 -1
  230. package/dist/web/routes.js +16 -3
  231. package/dist/web/routes.js.map +1 -1
  232. package/dist/web/templates.d.ts +4 -1
  233. package/dist/web/templates.d.ts.map +1 -1
  234. package/dist/web/templates.js +11 -0
  235. package/dist/web/templates.js.map +1 -1
  236. package/dist/webmention/cited-picture.d.ts +11 -4
  237. package/dist/webmention/cited-picture.d.ts.map +1 -1
  238. package/dist/webmention/cited-picture.js +22 -13
  239. package/dist/webmention/cited-picture.js.map +1 -1
  240. package/dist/webmention/cited-start.d.ts +10 -0
  241. package/dist/webmention/cited-start.d.ts.map +1 -0
  242. package/dist/webmention/cited-start.js +21 -0
  243. package/dist/webmention/cited-start.js.map +1 -0
  244. package/dist/webmention/fetch-public.d.ts +2 -2
  245. package/dist/webmention/fetch-public.d.ts.map +1 -1
  246. package/dist/webmention/fetch-public.js +1 -1
  247. package/dist/webmention/fetch-public.js.map +1 -1
  248. package/dist/webmention/html.d.ts +2 -0
  249. package/dist/webmention/html.d.ts.map +1 -1
  250. package/dist/webmention/html.js +6 -0
  251. package/dist/webmention/html.js.map +1 -1
  252. package/dist/webmention/index.d.ts +2 -1
  253. package/dist/webmention/index.d.ts.map +1 -1
  254. package/dist/webmention/index.js +1 -0
  255. package/dist/webmention/index.js.map +1 -1
  256. package/dist/webmention/microformats.d.ts +25 -2
  257. package/dist/webmention/microformats.d.ts.map +1 -1
  258. package/dist/webmention/microformats.js +38 -4
  259. package/dist/webmention/microformats.js.map +1 -1
  260. package/dist/webmention/pingback.d.ts +42 -0
  261. package/dist/webmention/pingback.d.ts.map +1 -0
  262. package/dist/webmention/pingback.js +229 -0
  263. package/dist/webmention/pingback.js.map +1 -0
  264. package/dist/webmention/receive.d.ts +20 -2
  265. package/dist/webmention/receive.d.ts.map +1 -1
  266. package/dist/webmention/receive.js +25 -16
  267. package/dist/webmention/receive.js.map +1 -1
  268. package/dist/webmention/reply-context.d.ts +65 -18
  269. package/dist/webmention/reply-context.d.ts.map +1 -1
  270. package/dist/webmention/reply-context.js +403 -99
  271. package/dist/webmention/reply-context.js.map +1 -1
  272. package/dist/webmention/reply-contexts.d.ts +3 -1
  273. package/dist/webmention/reply-contexts.d.ts.map +1 -1
  274. package/dist/webmention/reply-contexts.js +53 -17
  275. package/dist/webmention/reply-contexts.js.map +1 -1
  276. package/dist/webmention/routes.d.ts.map +1 -1
  277. package/dist/webmention/routes.js +2 -0
  278. package/dist/webmention/routes.js.map +1 -1
  279. package/dist/webmention/service.d.ts +11 -0
  280. package/dist/webmention/service.d.ts.map +1 -1
  281. package/dist/webmention/service.js +27 -6
  282. package/dist/webmention/service.js.map +1 -1
  283. package/dist/webmention/syndication.d.ts +6 -0
  284. package/dist/webmention/syndication.d.ts.map +1 -1
  285. package/dist/webmention/syndication.js +12 -0
  286. package/dist/webmention/syndication.js.map +1 -1
  287. package/package.json +10 -6
  288. package/themes/default/README.md +130 -38
  289. package/themes/default/layouts/410.njk +10 -0
  290. package/themes/default/layouts/base.njk +3 -0
  291. package/themes/default/layouts/page.njk +7 -0
  292. package/themes/default/layouts/post.njk +7 -4
  293. package/themes/default/layouts/search.njk +1 -1
  294. package/themes/default/partials/cited-page.njk +7 -0
  295. package/themes/default/partials/conversation.njk +25 -5
  296. package/themes/default/partials/event.njk +27 -0
  297. package/themes/default/partials/jsonld.njk +28 -0
  298. package/themes/default/partials/post-list.njk +5 -2
  299. package/themes/default/partials/reply-context.njk +24 -4
  300. package/themes/default/partials/rsvp.njk +7 -0
  301. package/themes/default/src/style.css +20 -0
  302. package/themes/default/static/style.css +35 -0
@@ -5,86 +5,92 @@
5
5
  that disagrees with the files is not something the site complains about, so
6
6
  the only way to notice is to be shown what it holds. #}
7
7
  {% extends "layouts/shell.njk" %}
8
+ {% from "components/button.njk" import button, buttonLink %}
9
+ {% from "components/card.njk" import card, cardActions %}
10
+ {% from "components/table.njk" import table %}
8
11
 
9
12
  {% block title %}{{ heading }}{% endblock %}
10
13
 
11
14
  {% block content %}
12
- <h1>{{ heading }}</h1>
15
+ <h1 class="mb-6 text-2xl font-bold">{{ heading }}</h1>
13
16
 
14
- <p>
15
- Everything in <code>data/geekity.db</code> is a reading of the files under
16
- <code>{{ contentDir }}</code>, so it can always be read again. Rebuild it after
17
- editing content outside the admin &mdash; over ssh, or with a
18
- <code>git pull</code> while the site was down &mdash; or when what is listed here
19
- disagrees with what is on disk.
20
- </p>
17
+ <div class="flex max-w-2xl flex-col gap-6">
18
+ <p class="max-w-prose">
19
+ Everything in <code>data/geekity.db</code> is a reading of the files under
20
+ <code>{{ contentDir }}</code>, so it can always be read again. Rebuild it after
21
+ editing content outside the admin &mdash; over ssh, or with a
22
+ <code>git pull</code> while the site was down &mdash; or when what is listed here
23
+ disagrees with what is on disk.
24
+ </p>
21
25
 
22
- <table class="admin-list">
23
- <caption class="admin-visually-hidden">What the index holds</caption>
24
- <thead>
25
- <tr>
26
- <th scope="col">What the index holds</th>
27
- <th scope="col">Count</th>
28
- </tr>
29
- </thead>
30
- <tbody>
31
- <tr>
32
- <th scope="row">Documents</th>
33
- <td>{{ indexed.documents }}</td>
34
- </tr>
35
- <tr>
36
- <th scope="row">Followers</th>
37
- <td>{{ indexed.followers }}</td>
38
- </tr>
39
- <tr>
40
- <th scope="row">Inbox activities</th>
41
- <td>{{ indexed.activities }}</td>
42
- </tr>
43
- <tr>
44
- <th scope="row">Comments</th>
45
- <td>{{ indexed.comments }}</td>
46
- </tr>
47
- </tbody>
48
- </table>
26
+ {% call card(title='What the index holds') %}
27
+ {% call table('What the index holds', inCard=true) %}
28
+ <thead>
29
+ <tr>
30
+ <th scope="col">Kind</th>
31
+ <th scope="col">Count</th>
32
+ </tr>
33
+ </thead>
34
+ <tbody>
35
+ <tr>
36
+ <th scope="row">Documents</th>
37
+ <td>{{ indexed.documents }}</td>
38
+ </tr>
39
+ <tr>
40
+ <th scope="row">Followers</th>
41
+ <td>{{ indexed.followers }}</td>
42
+ </tr>
43
+ <tr>
44
+ <th scope="row">Inbox activities</th>
45
+ <td>{{ indexed.activities }}</td>
46
+ </tr>
47
+ <tr>
48
+ <th scope="row">Comments</th>
49
+ <td>{{ indexed.comments }}</td>
50
+ </tr>
51
+ </tbody>
52
+ {% endcall %}
49
53
 
50
- {% if confirm %}
51
- {# Offered rather than done, the way a merge is on the taxonomy screens.
52
- The window in the middle is the whole reason: for as long as the scan
53
- runs the site answers 404 for documents whose files are perfectly fine,
54
- and that is not a thing to discover afterwards. #}
55
- <form class="admin-settings" method="post" action="{{ rebuildUrl }}">
56
- <input type="hidden" name="csrf_token" value="{{ csrfToken }}" />
57
- <input type="hidden" name="{{ fields.confirm }}" value="1" />
54
+ {% if not confirm %}
55
+ <form method="post" action="{{ rebuildUrl }}">
56
+ <input type="hidden" name="csrf_token" value="{{ csrfToken }}" />
57
+ {% call cardActions() %}
58
+ {{ button('Rebuild the index', type='submit', color='primary') }}
59
+ {% endcall %}
60
+ </form>
61
+ {% endif %}
62
+ {% endcall %}
58
63
 
59
- <h2>Rebuild the index now?</h2>
64
+ {% if confirm %}
65
+ {# Offered rather than done, the way a merge is on the taxonomy screens.
66
+ The window in the middle is the whole reason: for as long as the scan
67
+ runs the site answers 404 for documents whose files are perfectly fine,
68
+ and that is not a thing to discover afterwards. #}
69
+ {% call card(title='Rebuild the index now?', style='border') %}
70
+ <p>
71
+ The index is emptied and every file read again. Until the scan finishes, this
72
+ site answers <strong>404</strong> for its posts and pages &mdash; under a second
73
+ on a small site, longer on a large one &mdash; and it is serving the whole time.
74
+ Nothing is deleted and nothing is sent: you stay signed in, the delivery log and
75
+ the relays are kept, and no follower, feed or linked page is told about a post
76
+ the scan re-indexes.
77
+ </p>
78
+ <form method="post" action="{{ rebuildUrl }}">
79
+ <input type="hidden" name="csrf_token" value="{{ csrfToken }}" />
80
+ <input type="hidden" name="{{ fields.confirm }}" value="1" />
81
+ {% call cardActions() %}
82
+ {{ buttonLink('Cancel', toolsUrl, style='ghost') }}
83
+ {{ button('Rebuild it', type='submit', color='warning') }}
84
+ {% endcall %}
85
+ </form>
86
+ {% endcall %}
87
+ {% endif %}
60
88
 
61
- <p>
62
- The index is emptied and every file read again. Until the scan finishes, this
63
- site answers <strong>404</strong> for its posts and pages &mdash; under a second
64
- on a small site, longer on a large one &mdash; and it is serving the whole time.
65
- Nothing is deleted and nothing is sent: you stay signed in, the delivery log and
66
- the relays are kept, and no follower, feed or linked page is told about a post
67
- the scan re-indexes.
68
- </p>
69
-
70
- <p class="admin-settings-buttons">
71
- <button type="submit">Rebuild it</button>
72
- <a href="{{ toolsUrl }}">Cancel</a>
73
- </p>
74
- </form>
75
- {% else %}
76
- <form class="admin-settings" method="post" action="{{ rebuildUrl }}">
77
- <input type="hidden" name="csrf_token" value="{{ csrfToken }}" />
78
- <p class="admin-settings-buttons">
79
- <button type="submit">Rebuild the index</button>
80
- </p>
81
- </form>
82
- {% endif %}
83
-
84
- <p class="admin-hint">
85
- This runs on the site as it is: nothing is deleted, no connection is swapped and
86
- nobody is signed out. <code>geekity rebuild</code> at the command line is the other
87
- door, and it is for the one case this screen cannot be: a database this version
88
- refuses to open, where there is no site running to press a button in.
89
- </p>
89
+ <p class="max-w-prose text-sm">
90
+ This runs on the site as it is: nothing is deleted, no connection is swapped and
91
+ nobody is signed out. <code>geekity rebuild</code> at the command line is the other
92
+ door, and it is for the one case this screen cannot be: a database this version
93
+ refuses to open, where there is no site running to press a button in.
94
+ </p>
95
+ </div>
90
96
  {% endblock %}
@@ -2,71 +2,77 @@
2
2
  (TASK-135). Looking is a step of its own because erasing cannot be undone. #}
3
3
  {% extends "layouts/shell.njk" %}
4
4
  {% import "components/fields.njk" as field %}
5
+ {% from "components/button.njk" import button, buttonLink %}
6
+ {% from "components/card.njk" import card, cardActions %}
5
7
 
6
8
  {% block title %}{{ heading }}{% endblock %}
7
9
 
8
10
  {% block content %}
9
- <h1>{{ heading }}</h1>
11
+ <h1 class="mb-6 text-2xl font-bold">{{ heading }}</h1>
10
12
 
11
- <p>
12
- When somebody asks for what this site holds about them to be erased, type
13
- the email address they commented or wrote in under. Their comments stay in
14
- their threads, with their words and their moderation status, signed
15
- <strong>{{ erasedName }}</strong> and with their email, website and address
16
- hash removed. Their contact messages are deleted, and the address comes off
17
- the list of people who asked not to be emailed about replies.
18
- </p>
13
+ <div class="flex max-w-2xl flex-col gap-6">
14
+ <p class="max-w-prose">
15
+ When somebody asks for what this site holds about them to be erased, type
16
+ the email address they commented or wrote in under. Their comments stay in
17
+ their threads, with their words and their moderation status, signed
18
+ <strong>{{ erasedName }}</strong> and with their email, website and address
19
+ hash removed. Their contact messages are deleted, and the address comes off
20
+ the list of people who asked not to be emailed about replies.
21
+ </p>
19
22
 
20
- {% if found %}
21
- <form class="admin-settings" method="post" action="{{ actionUrl }}">
22
- <input type="hidden" name="csrf_token" value="{{ csrfToken }}" />
23
- <input type="hidden" name="{{ fields.email }}" value="{{ email }}" />
24
- <input type="hidden" name="{{ fields.confirm }}" value="1" />
23
+ {% if found %}
24
+ {% call card(title='What this site holds for ' + email) %}
25
+ <form method="post" action="{{ actionUrl }}">
26
+ <input type="hidden" name="csrf_token" value="{{ csrfToken }}" />
27
+ <input type="hidden" name="{{ fields.email }}" value="{{ email }}" />
28
+ <input type="hidden" name="{{ fields.confirm }}" value="1" />
25
29
 
26
- <h2>What this site holds for {{ email }}</h2>
30
+ <ul class="list-disc ps-5">
31
+ <li>{{ found.comments }}</li>
32
+ <li>{{ found.messages }}</li>
33
+ <li>
34
+ {% if found.optedOut %}On{% else %}Not on{% endif %} the list of addresses not
35
+ to email about replies
36
+ </li>
37
+ </ul>
27
38
 
28
- <ul>
29
- <li>{{ found.comments }}</li>
30
- <li>{{ found.messages }}</li>
31
- <li>
32
- {% if found.optedOut %}On{% else %}Not on{% endif %} the list of addresses not
33
- to email about replies
34
- </li>
35
- </ul>
36
-
37
- {% if found.anything %}
38
- <p>
39
- Erasing cannot be undone. A copy of a comment file in git history or in a
40
- backup keeps what it held; this changes the site as it is now.
41
- </p>
42
- <p class="admin-settings-buttons">
43
- <button type="submit">Erase it</button>
44
- <a href="{{ actionUrl }}">Cancel</a>
45
- </p>
46
- {% else %}
47
- <p>There is nothing to erase for that address.</p>
48
- <p class="admin-settings-buttons"><a href="{{ actionUrl }}">Look for another</a></p>
39
+ {% if found.anything %}
40
+ <p class="mt-4">
41
+ Erasing cannot be undone. A copy of a comment file in git history or in a
42
+ backup keeps what it held; this changes the site as it is now.
43
+ </p>
44
+ {% call cardActions() %}
45
+ {{ buttonLink('Cancel', actionUrl, style='ghost') }}
46
+ {{ button('Erase it', type='submit', color='error') }}
47
+ {% endcall %}
48
+ {% else %}
49
+ <p class="mt-4">There is nothing to erase for that address.</p>
50
+ {% call cardActions() %}
51
+ {{ buttonLink('Look for another', actionUrl) }}
52
+ {% endcall %}
53
+ {% endif %}
54
+ </form>
55
+ {% endcall %}
56
+ {% else %}
57
+ {% if problem %}
58
+ {% call field.summary('Nothing was looked up.') %}
59
+ {{ field.problem('personal-data-email', problem) }}
60
+ {% endcall %}
49
61
  {% endif %}
50
- </form>
51
- {% else %}
52
- {% if problem %}
53
- {% call field.summary('Nothing was looked up.') %}
54
- {{ field.problem('personal-data-email', problem) }}
62
+ {% call card(title='Look up an address') %}
63
+ <form method="post" action="{{ actionUrl }}">
64
+ <input type="hidden" name="csrf_token" value="{{ csrfToken }}" />
65
+ {{ field.text('personal-data-email', fields.email, 'Email address', email,
66
+ type='email', error=problem) }}
67
+ <div class="mt-2">{{ button('Look for it', type='submit', color='primary') }}</div>
68
+ </form>
55
69
  {% endcall %}
56
70
  {% endif %}
57
- <form class="admin-settings" method="post" action="{{ actionUrl }}">
58
- <input type="hidden" name="csrf_token" value="{{ csrfToken }}" />
59
- {{ field.text('personal-data-email', fields.email, 'Email address', email,
60
- type='email', error=problem) }}
61
- <p class="admin-settings-buttons">
62
- <button type="submit">Look for it</button>
63
- </p>
64
- </form>
65
- {% endif %}
66
71
 
67
- <p class="admin-hint">
68
- Comments are found by the email they carry, so a comment whose email the
69
- retention sweep has already removed, a webmention and a fediverse reply are
70
- not found here. Delete those one by one from the Comments screen.
71
- </p>
72
+ <p class="max-w-prose text-sm">
73
+ Comments are found by the email they carry, so a comment whose email the
74
+ retention sweep has already removed, a webmention and a fediverse reply are
75
+ not found here. Delete those one by one from the Comments screen.
76
+ </p>
77
+ </div>
72
78
  {% endblock %}
@@ -1,15 +1,16 @@
1
1
  {# /admin/users/activity/:id: one request an app made, in full (TASK-221). #}
2
2
  {% extends "layouts/shell.njk" %}
3
+ {% from "components/badge.njk" import status %}
4
+ {% from "components/table.njk" import table %}
3
5
 
4
6
  {% block title %}{{ entry.endpoint }} {{ entry.action }}{% endblock %}
5
7
 
6
8
  {% block content %}
7
- <h1>{{ entry.endpoint }} {{ entry.action }}</h1>
9
+ <h1 class="mb-2 text-2xl font-bold">{{ entry.endpoint }} {{ entry.action }}</h1>
8
10
 
9
- <p><a href="{{ listUrl }}">All app activity</a></p>
11
+ <p class="mb-6"><a class="link" href="{{ listUrl }}">All app activity</a></p>
10
12
 
11
- <table class="admin-list">
12
- <caption class="admin-visually-hidden">The request</caption>
13
+ {% call table('The request') %}
13
14
  <tbody>
14
15
  <tr><th scope="row">When</th><td><time datetime="{{ entry.when.iso }}">{{ entry.when.text }}</time></td></tr>
15
16
  <tr><th scope="row">App</th><td>{{ entry.app or "Unknown" }}</td></tr>
@@ -20,7 +21,7 @@
20
21
  <tr>
21
22
  <th scope="row">Result</th>
22
23
  <td>
23
- {% if entry.failed %}<span class="admin-status admin-status-failed">Refused</span>{% endif %}
24
+ {% if entry.failed %}{{ status('failed', 'Refused') }}{% endif %}
24
25
  {{ entry.status }}
25
26
  </td>
26
27
  </tr>
@@ -31,12 +32,11 @@
31
32
  <tr><th scope="row">Why</th><td>{{ entry.errorDescription }}</td></tr>
32
33
  {% endif %}
33
34
  </tbody>
34
- </table>
35
+ {% endcall %}
35
36
 
36
- <h2>What it sent</h2>
37
+ <h2 class="mt-10 mb-3 text-lg font-semibold">What it sent</h2>
37
38
  {% if carried | length %}
38
- <table class="admin-list">
39
- <caption class="admin-visually-hidden">The fields the request carried</caption>
39
+ {% call table('The fields the request carried') %}
40
40
  <thead>
41
41
  <tr>
42
42
  <th scope="col">Field</th>
@@ -47,12 +47,12 @@
47
47
  {% for field in carried %}
48
48
  <tr>
49
49
  <td>{{ field.name }}</td>
50
- <td>{% if field.note %}<span class="admin-status">{{ field.value }}</span>{% else %}{{ field.value }}{% endif %}</td>
50
+ <td>{% if field.note %}<em>{{ field.value }}</em>{% else %}{{ field.value }}{% endif %}</td>
51
51
  </tr>
52
52
  {% endfor %}
53
53
  </tbody>
54
- </table>
54
+ {% endcall %}
55
55
  {% else %}
56
- <p class="admin-empty">No fields were read from this request.</p>
56
+ <p>No fields were read from this request.</p>
57
57
  {% endif %}
58
58
  {% endblock %}
@@ -2,34 +2,28 @@
2
2
  endpoints, newest first (TASK-221). A failure is marked in words as well
3
3
  as colour, and each row links to the request in full. #}
4
4
  {% extends "layouts/shell.njk" %}
5
+ {% from "components/badge.njk" import status %}
6
+ {% from "components/table.njk" import table %}
7
+ {% from "components/tabs.njk" import tabs as tabsNav %}
5
8
 
6
9
  {% block title %}App activity{% endblock %}
7
10
 
8
11
  {% block content %}
9
- <h1>App activity</h1>
12
+ <h1 class="mb-6 text-2xl font-bold">App activity</h1>
10
13
 
11
- <p class="admin-hint">
14
+ <p class="mb-4 max-w-prose text-sm">
12
15
  The last requests apps made to sign in with your site and to post to it:
13
16
  the authorization and token endpoints, Micropub and its media endpoint.
14
17
  When an app will not connect or post, its request is here with the reason
15
18
  it was refused. No token, code, password or cookie is kept.
16
19
  </p>
17
20
 
18
- <nav class="admin-filters" aria-label="Which requests">
19
- <ul>
20
- {% for tab in tabs %}
21
- <li>
22
- <a href="{{ tab.url }}"{% if tab.current %} aria-current="page"{% endif %}>
23
- {{ tab.label }} ({{ tab.count }})
24
- </a>
25
- </li>
26
- {% endfor %}
27
- </ul>
28
- </nav>
21
+ <div class="mb-4 max-w-full overflow-x-auto contain-inline-size">
22
+ {{ tabsNav(tabs, 'Which requests') }}
23
+ </div>
29
24
 
30
25
  {% if rows | length %}
31
- <table class="admin-list">
32
- <caption class="admin-visually-hidden">Recent app requests, newest first</caption>
26
+ {% call table('Recent app requests, newest first') %}
33
27
  <thead>
34
28
  <tr>
35
29
  <th scope="col">When</th>
@@ -43,14 +37,14 @@
43
37
  <tbody>
44
38
  {% for row in rows %}
45
39
  <tr>
46
- <td><a href="{{ row.url }}"><time datetime="{{ row.when.iso }}">{{ row.when.text }}</time></a></td>
40
+ <td class="whitespace-nowrap"><a class="link link-hover" href="{{ row.url }}"><time datetime="{{ row.when.iso }}">{{ row.when.text }}</time></a></td>
47
41
  <td>{{ row.endpoint }}</td>
48
42
  <td>{{ row.action }}</td>
49
43
  <td>{{ row.app or "Unknown" }}</td>
50
44
  <td>{{ row.user or "Unknown" }}</td>
51
45
  <td>
52
46
  {% if row.failed %}
53
- <span class="admin-status admin-status-failed">Refused</span>
47
+ {{ status('failed', 'Refused') }}
54
48
  {{ row.status }}{% if row.error %} {{ row.error }}{% endif %}
55
49
  {% else %}
56
50
  {{ row.status }}
@@ -59,8 +53,8 @@
59
53
  </tr>
60
54
  {% endfor %}
61
55
  </tbody>
62
- </table>
56
+ {% endcall %}
63
57
  {% else %}
64
- <p class="admin-empty">Nothing here.</p>
58
+ <p>Nothing here.</p>
65
59
  {% endif %}
66
60
  {% endblock %}