@lullabot/eleventy-decision-records 1.0.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 (66) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +65 -0
  3. package/package.json +94 -0
  4. package/src/YYYYMMDD-decision-template.md +41 -0
  5. package/src/about.md +36 -0
  6. package/src/assets/fonts/OFL.txt +93 -0
  7. package/src/assets/fonts/gabarito-v9-latin-500.woff2 +0 -0
  8. package/src/assets/fonts/gabarito-v9-latin-700.woff2 +0 -0
  9. package/src/assets/fonts/gabarito-v9-latin-regular.woff2 +0 -0
  10. package/src/assets/icons/facebook.svg +1 -0
  11. package/src/assets/icons/github.svg +1 -0
  12. package/src/assets/icons/linkedin.svg +1 -0
  13. package/src/assets/icons/mastodon.svg +1 -0
  14. package/src/assets/icons/x.svg +1 -0
  15. package/src/assets/icons/youtube.svg +1 -0
  16. package/src/assets/images/horizontal.jpg +0 -0
  17. package/src/assets/images/vertical.jpg +0 -0
  18. package/src/assets/js/scrollable.js +49 -0
  19. package/src/assets/js/search.js +189 -0
  20. package/src/assets/js/time-since.js +31 -0
  21. package/src/assets/styles/content.css +149 -0
  22. package/src/assets/styles/fonts.css +33 -0
  23. package/src/assets/styles/footer.css +65 -0
  24. package/src/assets/styles/layout.css +483 -0
  25. package/src/assets/styles/pages.css +348 -0
  26. package/src/assets/styles/recent-decisions.css +104 -0
  27. package/src/assets/styles/reset.css +107 -0
  28. package/src/assets/styles/search-dialog.css +196 -0
  29. package/src/assets/styles/tags.css +16 -0
  30. package/src/assets/styles/tokens.css +181 -0
  31. package/src/assets/styles/typography.css +182 -0
  32. package/src/assets/styles/view-transitions.css +67 -0
  33. package/src/config.js +38 -0
  34. package/src/defaultConfig.json +99 -0
  35. package/src/index.js +227 -0
  36. package/src/index.md +28 -0
  37. package/src/lib/collections/adrs.js +10 -0
  38. package/src/lib/collections/contributors.js +15 -0
  39. package/src/lib/collections/index.js +14 -0
  40. package/src/lib/collections/topics.js +18 -0
  41. package/src/lib/data/index.js +19 -0
  42. package/src/lib/filters/collections.js +63 -0
  43. package/src/lib/filters/dates.js +68 -0
  44. package/src/lib/filters/index.js +26 -0
  45. package/src/lib/filters/strings.js +23 -0
  46. package/src/lib/plugins/bundle.js +23 -0
  47. package/src/lib/plugins/index.js +16 -0
  48. package/src/lib/plugins/markdown.js +10 -0
  49. package/src/lib/plugins/rss.js +24 -0
  50. package/src/lib/plugins/syntax-highlight.js +8 -0
  51. package/src/lib/plugins/toc.js +11 -0
  52. package/src/lib/shortcodes/icons.js +91 -0
  53. package/src/lib/shortcodes/index.js +11 -0
  54. package/src/lib/shortcodes/search.js +32 -0
  55. package/src/templates/assets/favicon.njk +7 -0
  56. package/src/templates/assets/search_index.njk +13 -0
  57. package/src/templates/layouts/adr.njk +59 -0
  58. package/src/templates/layouts/page.njk +136 -0
  59. package/src/templates/pages/contributor.njk +51 -0
  60. package/src/templates/pages/contributors.njk +46 -0
  61. package/src/templates/pages/decisions.njk +41 -0
  62. package/src/templates/pages/practice-areas.njk +48 -0
  63. package/src/templates/pages/topics.njk +50 -0
  64. package/src/templates/partials/footer.njk +12 -0
  65. package/src/templates/partials/recent-decisions.njk +33 -0
  66. package/src/templates/partials/site-nav.njk +61 -0
@@ -0,0 +1,348 @@
1
+ /* ==========================================================================
2
+ Page Styles
3
+ Shared styles for content pages (homepage, ADR listing, contributors, about)
4
+ ========================================================================== */
5
+
6
+ /* Page description — intro text below page title */
7
+ .page-description {
8
+ font-size: var(--font-size-lg);
9
+ line-height: var(--line-height-md);
10
+ color: var(--color-text-secondary);
11
+ margin-bottom: var(--space-10);
12
+ }
13
+
14
+ /* ==========================================================================
15
+ Homepage — Practice Areas
16
+ ========================================================================== */
17
+
18
+ /* Section heading — uppercase label above practice areas / topics */
19
+ .section-heading {
20
+ font-size: var(--font-size-base);
21
+ font-weight: var(--font-weight-bold);
22
+ line-height: var(--line-height-sm);
23
+ color: var(--color-text-muted);
24
+ text-transform: uppercase;
25
+ letter-spacing: var(--letter-spacing-wide);
26
+ padding-top: var(--space-12);
27
+ padding-bottom: var(--space-6);
28
+ }
29
+
30
+ @scope (.practice-areas) {
31
+ :scope {
32
+ display: grid;
33
+ grid-template-columns: repeat(2, 1fr);
34
+ border-bottom: 1px solid var(--color-border-default);
35
+ border-right: 1px solid var(--color-border-default);
36
+ }
37
+
38
+ .practice-area {
39
+ display: flex;
40
+ align-items: center;
41
+ gap: var(--space-2);
42
+ padding: var(--space-6);
43
+ border-top: 1px solid var(--color-border-default);
44
+ border-left: 1px solid var(--color-border-default);
45
+ text-decoration: none;
46
+ color: var(--color-text-primary);
47
+ position: relative;
48
+ overflow: hidden;
49
+ }
50
+
51
+ .practice-area::after {
52
+ content: '';
53
+ position: absolute;
54
+ bottom: 0;
55
+ left: -1px;
56
+ right: 0;
57
+ height: var(--border-width-thick);
58
+ background-color: var(--color-brand-primary);
59
+ opacity: 0;
60
+ transition: opacity 0.15s ease;
61
+ }
62
+
63
+ .practice-area:hover::after,
64
+ .practice-area:focus-visible::after {
65
+ opacity: 1;
66
+ }
67
+
68
+ .icon {
69
+ width: 24px;
70
+ height: 24px;
71
+ flex-shrink: 0;
72
+ color: var(--color-brand-primary);
73
+ }
74
+
75
+ .name {
76
+ flex: 1;
77
+ font-size: var(--font-size-xl);
78
+ font-weight: var(--font-weight-bold);
79
+ line-height: var(--line-height-base);
80
+ }
81
+
82
+ .count {
83
+ display: flex;
84
+ align-items: center;
85
+ justify-content: center;
86
+ width: 24px;
87
+ height: 24px;
88
+ flex-shrink: 0;
89
+ background-color: var(--color-bg-secondary);
90
+ font-size: var(--font-size-xs);
91
+ font-weight: var(--font-weight-medium);
92
+ line-height: var(--line-height-xs);
93
+ letter-spacing: var(--letter-spacing-sm);
94
+ color: var(--color-text-muted);
95
+ }
96
+
97
+ @media screen and (max-width: 30rem) {
98
+ :scope {
99
+ grid-template-columns: 1fr;
100
+ }
101
+ }
102
+ }
103
+
104
+ /* ==========================================================================
105
+ ADR Detail Page — Metadata
106
+ ========================================================================== */
107
+
108
+ @scope (.adr-detail-meta) {
109
+ :scope {
110
+ display: grid;
111
+ grid-template-columns: auto 1fr;
112
+ gap: var(--space-2) var(--space-6);
113
+ margin-bottom: var(--space-10);
114
+ padding-bottom: var(--space-6);
115
+ border-bottom: 1px solid var(--color-border-default);
116
+ font-size: var(--font-size-base);
117
+ line-height: var(--line-height-base);
118
+ }
119
+
120
+ dt {
121
+ font-weight: var(--font-weight-medium);
122
+ color: var(--color-text-muted);
123
+ }
124
+
125
+ dd {
126
+ color: var(--color-text-secondary);
127
+ }
128
+
129
+ .adr-detail-topics {
130
+ display: flex;
131
+ flex-wrap: wrap;
132
+ gap: var(--space-2);
133
+ }
134
+
135
+ a {
136
+ text-decoration: none;
137
+ }
138
+
139
+ a:hover {
140
+ text-decoration: underline;
141
+ }
142
+ }
143
+
144
+ /* ==========================================================================
145
+ ADR Detail Page — Table of Contents
146
+ ========================================================================== */
147
+
148
+ @scope (.adr-body) {
149
+ @media screen and (min-width: 64rem) {
150
+ :scope.has-toc {
151
+ display: grid;
152
+ grid-template-columns: 15rem 1fr;
153
+ gap: var(--space-8);
154
+ align-items: start;
155
+ }
156
+
157
+ .toc-wrapper {
158
+ height: 100%;
159
+ }
160
+
161
+ .toc {
162
+ position: sticky;
163
+ top: var(--space-4);
164
+ margin-bottom: 0;
165
+ }
166
+ }
167
+ }
168
+
169
+ @scope (.toc) {
170
+ :scope {
171
+ width: 15rem;
172
+ max-width: 100%;
173
+ margin-inline: auto;
174
+ margin-bottom: var(--space-10);
175
+ padding: var(--space-4);
176
+ background-color: var(--color-bg-secondary);
177
+ font-size: var(--font-size-md);
178
+ font-weight: var(--font-weight-regular);
179
+ line-height: var(--line-height-base);
180
+ }
181
+
182
+ h2 {
183
+ font: inherit;
184
+ margin-block: 0 var(--space-4);
185
+ }
186
+
187
+ ol {
188
+ border-left: 1px solid var(--color-border-default);
189
+ padding-left: var(--space-2);
190
+ }
191
+
192
+ ol ol {
193
+ border-left: none;
194
+ padding-left: var(--space-4);
195
+ }
196
+
197
+ li {
198
+ padding-block: var(--space-1);
199
+ }
200
+
201
+ a {
202
+ color: var(--color-link);
203
+ }
204
+ }
205
+
206
+ /* ==========================================================================
207
+ ADR Listing Page
208
+ ========================================================================== */
209
+
210
+ .adr-filters {
211
+ margin-bottom: var(--space-6);
212
+ }
213
+
214
+ .adr-count {
215
+ font-size: var(--font-size-base);
216
+ font-weight: var(--font-weight-medium);
217
+ color: var(--color-text-muted);
218
+ text-transform: uppercase;
219
+ letter-spacing: var(--letter-spacing-wide);
220
+ }
221
+
222
+ @scope (.adr-list) {
223
+ :scope {
224
+ display: flex;
225
+ flex-direction: column;
226
+ }
227
+
228
+ .adr-item {
229
+ display: flex;
230
+ flex-direction: column;
231
+ gap: var(--space-3);
232
+ padding-block: var(--space-6);
233
+ }
234
+
235
+ .adr-item + .adr-item {
236
+ border-top: 1px solid var(--color-border-default);
237
+ }
238
+
239
+ .adr-header {
240
+ display: flex;
241
+ align-items: center;
242
+ gap: var(--space-4);
243
+ }
244
+
245
+ .adr-status {
246
+ display: inline-flex;
247
+ align-items: center;
248
+ gap: var(--space-1);
249
+ font-size: var(--font-size-sm);
250
+ font-weight: var(--font-weight-medium);
251
+ text-transform: uppercase;
252
+ letter-spacing: var(--letter-spacing-wide);
253
+ }
254
+
255
+ .adr-status svg {
256
+ width: 16px;
257
+ height: 16px;
258
+ }
259
+
260
+ .adr-status--accepted {
261
+ color: var(--sky-999);
262
+ }
263
+
264
+ .adr-status--deprecated {
265
+ color: var(--color-text-muted);
266
+ }
267
+
268
+ time {
269
+ font-size: var(--font-size-base);
270
+ line-height: var(--line-height-sm);
271
+ color: var(--color-text-tertiary);
272
+ }
273
+
274
+ .adr-title {
275
+ font-size: var(--font-size-xl);
276
+ font-weight: var(--font-weight-bold);
277
+ line-height: var(--line-height-base);
278
+ color: var(--color-text-primary);
279
+ text-decoration: none;
280
+ }
281
+
282
+ .adr-title:hover {
283
+ color: var(--color-brand-primary);
284
+ }
285
+
286
+ .adr-context {
287
+ font-size: var(--font-size-base);
288
+ line-height: var(--line-height-base);
289
+ color: var(--color-text-secondary);
290
+ }
291
+
292
+ .adr-meta {
293
+ display: flex;
294
+ flex-wrap: wrap;
295
+ gap: var(--space-2);
296
+ }
297
+ }
298
+
299
+ /* ==========================================================================
300
+ Contributors Table
301
+ ========================================================================== */
302
+
303
+ @scope (.contributor-table) {
304
+ :scope {
305
+ width: 100%;
306
+ border-collapse: collapse;
307
+ }
308
+
309
+ th {
310
+ text-align: left;
311
+ font-size: var(--font-size-base);
312
+ font-weight: var(--font-weight-medium);
313
+ color: var(--color-text-muted);
314
+ text-transform: uppercase;
315
+ letter-spacing: var(--letter-spacing-wide);
316
+ padding: var(--space-3) var(--space-4);
317
+ border-bottom: 2px solid var(--color-border-default);
318
+ }
319
+
320
+ td {
321
+ padding: var(--space-4);
322
+ border-bottom: 1px solid var(--color-border-default);
323
+ vertical-align: middle;
324
+ }
325
+
326
+ tr:last-child td {
327
+ border-bottom: none;
328
+ }
329
+
330
+ td:first-child {
331
+ font-weight: var(--font-weight-bold);
332
+ }
333
+
334
+ td:nth-child(2) {
335
+ text-align: center;
336
+ color: var(--color-text-secondary);
337
+ }
338
+
339
+ th:nth-child(2) {
340
+ text-align: center;
341
+ }
342
+
343
+ .tags {
344
+ display: flex;
345
+ flex-wrap: wrap;
346
+ gap: var(--space-2);
347
+ }
348
+ }
@@ -0,0 +1,104 @@
1
+ /* ==========================================================================
2
+ Recent Decisions Sidebar
3
+ ========================================================================== */
4
+
5
+ @scope (.recent-decisions) {
6
+ .heading {
7
+ display: flex;
8
+ align-items: center;
9
+ gap: var(--space-2);
10
+ justify-content: space-between;
11
+ }
12
+
13
+ h2 {
14
+ font-weight: var(--font-weight-bold);
15
+ font-size: var(--font-size-base);
16
+ line-height: var(--line-height-sm);
17
+ letter-spacing: var(--letter-spacing-wide);
18
+ text-transform: uppercase;
19
+ color: var(--color-text-muted);
20
+ }
21
+
22
+ .icon {
23
+ width: 24px;
24
+ height: 24px;
25
+ color: var(--color-text-muted);
26
+ }
27
+
28
+ /* Decision list */
29
+ ol {
30
+ display: flex;
31
+ flex-direction: column;
32
+ }
33
+
34
+ li {
35
+ display: flex;
36
+ flex-direction: column;
37
+ gap: var(--space-4);
38
+ padding: var(--space-6) var(--space-4);
39
+ margin-inline: calc(-1 * var(--space-4));
40
+ transition: background-color 0.15s ease;
41
+ }
42
+
43
+ li + li {
44
+ border-top: 1px solid var(--color-border-default);
45
+ }
46
+
47
+ li:has(a:focus-visible) {
48
+ outline: 2px solid var(--color-text-primary);
49
+ outline-offset: -2px;
50
+ }
51
+
52
+ li:has(a:focus-visible) a {
53
+ outline: none;
54
+ }
55
+
56
+ /* Meta row — date + icon */
57
+ .meta {
58
+ display: flex;
59
+ align-items: center;
60
+ justify-content: space-between;
61
+ gap: var(--space-2);
62
+ }
63
+
64
+ .practice-area-icon {
65
+ width: 16px;
66
+ height: 16px;
67
+ color: var(--color-brand-primary);
68
+ }
69
+
70
+ .practice-area-icon svg {
71
+ width: 16px;
72
+ height: 16px;
73
+ display: block;
74
+ }
75
+
76
+ /* Date */
77
+ time {
78
+ font-weight: var(--font-weight-regular);
79
+ font-size: var(--font-size-base);
80
+ line-height: var(--line-height-sm);
81
+ letter-spacing: var(--letter-spacing-sm);
82
+ color: var(--color-text-tertiary);
83
+ }
84
+
85
+ /* Decision title link */
86
+ a {
87
+ font-weight: var(--font-weight-bold);
88
+ font-size: var(--font-size-lg);
89
+ line-height: var(--line-height-base);
90
+ color: var(--color-text-primary);
91
+ text-decoration: none;
92
+ }
93
+
94
+ a:hover {
95
+ color: var(--color-brand-primary-dark);
96
+ }
97
+
98
+ /* Tags */
99
+ .tags {
100
+ display: flex;
101
+ flex-wrap: wrap;
102
+ gap: var(--space-2);
103
+ }
104
+ }
@@ -0,0 +1,107 @@
1
+ @charset "utf-8";
2
+ /***
3
+ The new CSS reset - version 1.8.5 (last updated 14.6.2023)
4
+ GitHub page: https://github.com/elad2412/the-new-css-reset
5
+ ***/
6
+ *:where(
7
+ :not(html, iframe, canvas, img, svg, video, audio):not(svg *, symbol *)
8
+ ) {
9
+ all: unset;
10
+ display: revert;
11
+ }
12
+
13
+ /* Preferred box-sizing value */
14
+ *,
15
+ *::before,
16
+ *::after {
17
+ box-sizing: border-box;
18
+ }
19
+
20
+ /* Reapply the pointer cursor for anchor tags */
21
+ a,
22
+ button {
23
+ cursor: revert;
24
+ }
25
+
26
+ /* Reapply focus outlines removed by `all: unset` */
27
+ :focus-visible {
28
+ outline: 2px solid var(--color-link);
29
+ outline-offset: -2px;
30
+ }
31
+
32
+ /* Remove list styles (bullets/numbers) */
33
+ ol,
34
+ ul,
35
+ menu {
36
+ list-style: none;
37
+ }
38
+
39
+ /* For images to not be able to exceed their container */
40
+ img {
41
+ max-inline-size: 100%;
42
+ max-block-size: 100%;
43
+ }
44
+
45
+ /* removes spacing between cells in tables */
46
+ table {
47
+ border-collapse: collapse;
48
+ }
49
+
50
+ /* Safari - solving issue when using user-select:none on the <body> text input doesn't working */
51
+ input,
52
+ textarea {
53
+ -webkit-user-select: auto;
54
+ }
55
+
56
+ /* revert the 'white-space' property for textarea elements on Safari */
57
+ textarea {
58
+ white-space: revert;
59
+ }
60
+
61
+ /* minimum style to allow to style meter element */
62
+ meter {
63
+ -webkit-appearance: revert;
64
+ appearance: revert;
65
+ }
66
+
67
+ /* preformatted text - use only for this feature */
68
+ :where(pre) {
69
+ all: revert;
70
+ }
71
+
72
+ /* reset default text opacity of input placeholder */
73
+ ::placeholder {
74
+ color: unset;
75
+ }
76
+
77
+ /* remove default dot (•) sign */
78
+ ::marker {
79
+ content: initial;
80
+ }
81
+
82
+ /* fix the feature of 'hidden' attribute.
83
+ display:revert; revert to element instead of attribute */
84
+ :where([hidden]) {
85
+ display: none;
86
+ }
87
+
88
+ /* revert for bug in Chromium browsers
89
+ - fix for the content editable attribute will work properly.
90
+ - webkit-user-select: auto; added for Safari in case of using user-select:none on wrapper element */
91
+ :where([contenteditable]:not([contenteditable='false'])) {
92
+ -moz-user-modify: read-write;
93
+ -webkit-user-modify: read-write;
94
+ overflow-wrap: break-word;
95
+ -webkit-line-break: after-white-space;
96
+ -webkit-user-select: auto;
97
+ }
98
+
99
+ /* apply back the draggable feature - exist only in Chromium and Safari */
100
+ :where([draggable='true']) {
101
+ -webkit-user-drag: element;
102
+ }
103
+
104
+ /* Revert Modal native behavior */
105
+ :where(dialog:modal) {
106
+ all: revert;
107
+ }