@nera-static/theme-stack 0.0.0-stage → 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 (44) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +373 -2
  3. package/assets/css/theme.css +1640 -0
  4. package/assets/fonts/stack/OFL-bricolage-grotesque.txt +93 -0
  5. package/assets/fonts/stack/OFL-inter.txt +93 -0
  6. package/assets/fonts/stack/OFL-jetbrains-mono.txt +93 -0
  7. package/assets/fonts/stack/bricolage-grotesque-latin-ext-wght-normal.woff2 +0 -0
  8. package/assets/fonts/stack/bricolage-grotesque-latin-wght-normal.woff2 +0 -0
  9. package/assets/fonts/stack/inter-latin-ext-wght-italic.woff2 +0 -0
  10. package/assets/fonts/stack/inter-latin-ext-wght-normal.woff2 +0 -0
  11. package/assets/fonts/stack/inter-latin-wght-italic.woff2 +0 -0
  12. package/assets/fonts/stack/inter-latin-wght-normal.woff2 +0 -0
  13. package/assets/fonts/stack/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
  14. package/assets/fonts/stack/jetbrains-mono-latin-wght-normal.woff2 +0 -0
  15. package/config/theme.yaml +37 -0
  16. package/package.json +80 -5
  17. package/views/layouts/layout.pug +19 -0
  18. package/views/pages/archive.pug +20 -0
  19. package/views/pages/default.pug +8 -0
  20. package/views/pages/home.pug +40 -0
  21. package/views/pages/post.pug +59 -0
  22. package/views/pages/tag.pug +8 -0
  23. package/views/partials/card-media.pug +5 -0
  24. package/views/partials/feed-link.pug +4 -0
  25. package/views/partials/footer-extra.pug +4 -0
  26. package/views/partials/footer.pug +10 -0
  27. package/views/partials/head-extra.pug +4 -0
  28. package/views/partials/head.pug +14 -0
  29. package/views/partials/header.pug +8 -0
  30. package/views/partials/helpers.pug +215 -0
  31. package/views/partials/home-about.pug +14 -0
  32. package/views/partials/home-series.pug +14 -0
  33. package/views/partials/lang-switch.pug +13 -0
  34. package/views/partials/nav-main.pug +5 -0
  35. package/views/partials/page-header.pug +6 -0
  36. package/views/partials/post-card.pug +21 -0
  37. package/views/partials/post-media.pug +4 -0
  38. package/views/partials/post-pagination.pug +4 -0
  39. package/views/partials/post-tags.pug +3 -0
  40. package/views/partials/scripts-extra.pug +2 -0
  41. package/views/partials/scripts.pug +3 -0
  42. package/views/partials/tag-cloud.pug +4 -0
  43. package/views/partials/tag-overview.pug +8 -0
  44. package/views/partials/tokens.pug +7 -0
@@ -0,0 +1,93 @@
1
+ Copyright 2022 The Bricolage Grotesque Project Authors (https://github.com/ateliertriay/bricolage)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) Inter-Italic[opsz,wght].ttf: Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono) JetBrainsMono-Italic[wght].ttf: Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,37 @@
1
+ # nera-theme-stack/config/theme.yaml — defaults
2
+ label: Stack
3
+ tokens:
4
+ color:
5
+ bg: '#f4f5f7'
6
+ surface: '#ffffff'
7
+ text: '#101319'
8
+ muted: '#555d6b'
9
+ accent: '#d02408'
10
+ accent_text: '#ffffff'
11
+ border: '#d9dde4'
12
+ focus: '#1d4fe0'
13
+ night: '#12151c'
14
+ night_text: '#e7eaf0'
15
+ night_muted: '#98a2b3'
16
+ highlight: '#d8f24a'
17
+ font:
18
+ body: "'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif"
19
+ heading: "'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif"
20
+ mono: "'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace"
21
+ size:
22
+ base: '1.0625rem'
23
+ measure: '46rem'
24
+ width: '73rem'
25
+ radius: '0'
26
+ space: '1.5rem'
27
+ extra_css: []
28
+ footer_links: []
29
+ blog:
30
+ post_layouts: ['pages/post.pug']
31
+ home_posts: 7
32
+ featured_series: ''
33
+ highlight_tag: ''
34
+ author:
35
+ name: ''
36
+ bio: ''
37
+ href: ''
package/package.json CHANGED
@@ -1,6 +1,81 @@
1
1
  {
2
- "name": "@nera-static/theme-stack",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@nera-static/theme-stack",
3
+ "version": "1.0.0",
4
+ "description": "Nera blog theme for developers: code-first posts, series and type-only covers — presentation only.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "Michael Becker",
8
+ "keywords": [
9
+ "nera",
10
+ "nera-theme"
11
+ ],
12
+ "files": [
13
+ "views",
14
+ "assets",
15
+ "config"
16
+ ],
17
+ "exports": {
18
+ "./package.json": "./package.json"
19
+ },
20
+ "engines": {
21
+ "node": ">=22.12.0"
22
+ },
23
+ "nera": {
24
+ "generator": ">=4.15.0"
25
+ },
26
+ "scripts": {
27
+ "lint": "eslint .",
28
+ "test": "vitest"
29
+ },
30
+ "peerDependencies": {
31
+ "@nera-static/plugin-code-blocks": "^1.2.1",
32
+ "@nera-static/plugin-images": "^1.0.3",
33
+ "@nera-static/plugin-navigation": "^3.1.0",
34
+ "@nera-static/plugin-page-pagination": "^2.4.0",
35
+ "@nera-static/plugin-social-media-links": "^2.3.0",
36
+ "@nera-static/plugin-tags": "^3.4.1"
37
+ },
38
+ "peerDependenciesMeta": {
39
+ "@nera-static/plugin-code-blocks": {
40
+ "optional": true
41
+ },
42
+ "@nera-static/plugin-images": {
43
+ "optional": true
44
+ },
45
+ "@nera-static/plugin-navigation": {
46
+ "optional": true
47
+ },
48
+ "@nera-static/plugin-page-pagination": {
49
+ "optional": true
50
+ },
51
+ "@nera-static/plugin-social-media-links": {
52
+ "optional": true
53
+ },
54
+ "@nera-static/plugin-tags": {
55
+ "optional": true
56
+ }
57
+ },
58
+ "devDependencies": {
59
+ "@nera-static/nera": "^1.28.0",
60
+ "@nera-static/plugin-code-blocks": "^1.2.1",
61
+ "@nera-static/plugin-feed": "^1.0.3",
62
+ "@nera-static/plugin-images": "^1.0.3",
63
+ "@nera-static/plugin-navigation": "^3.1.0",
64
+ "@nera-static/plugin-page-pagination": "^2.4.0",
65
+ "@nera-static/plugin-social-media-links": "^2.3.0",
66
+ "@nera-static/plugin-tags": "^3.4.1",
67
+ "eslint": "^10.12.0",
68
+ "vitest": "^5.0.3"
69
+ },
70
+ "publishConfig": {
71
+ "access": "public"
72
+ },
73
+ "repository": {
74
+ "type": "git",
75
+ "url": "git+https://github.com/seebaermichi/nera-theme-stack.git"
76
+ },
77
+ "bugs": {
78
+ "url": "https://github.com/seebaermichi/nera-theme-stack/issues"
79
+ },
80
+ "homepage": "https://github.com/seebaermichi/nera-theme-stack#readme"
81
+ }
@@ -0,0 +1,19 @@
1
+ //- The shell every page type extends (ROADMAP-themes §S2.2, §S2.3). Blocks:
2
+ //- head, header, main, footer, scripts.
3
+ include ../partials/helpers.pug
4
+ doctype html
5
+ html(lang=meta.lang || app.lang || 'en')
6
+ head
7
+ include ../partials/head.pug
8
+ block head
9
+ body
10
+ a.skip-link(href='#main')= t('Skip to content')
11
+ block header
12
+ include ../partials/header.pug
13
+ main#main.site-main
14
+ block main
15
+ != content
16
+ block footer
17
+ include ../partials/footer.pug
18
+ block scripts
19
+ include ../partials/scripts.pug
@@ -0,0 +1,20 @@
1
+ //- All posts (§S4.1, Revision R4): header, body, one section per year
2
+ //- (newest first) with the year's count, the tag-cloud seam as a band.
3
+ extends ../layouts/layout.pug
4
+
5
+ block main
6
+ include ../partials/page-header.pug
7
+ if String(content || '').trim()
8
+ .page__body
9
+ != content
10
+ each group in themeStack.postsByYear(pageLang({ meta }))
11
+ section.post-archive__year
12
+ h2
13
+ | #{group.year}
14
+ span.post-archive__count #{group.posts.length} #{t('posts')}
15
+ ul.post-archive__list
16
+ each item in group.posts
17
+ li.post-archive__item
18
+ time(datetime=isoDate(item.meta.createdAt))= themeStack.dayMonth(item.meta.createdAt, pageLang(item))
19
+ a(href=item.meta.href)= item.meta.title
20
+ include ../partials/tag-cloud.pug
@@ -0,0 +1,8 @@
1
+ //- About, legal pages, any standard page (§S4.1, Revision R4): header and
2
+ //- body, nothing beside them.
3
+ extends ../layouts/layout.pug
4
+
5
+ block main
6
+ include ../partials/page-header.pug
7
+ .page__body
8
+ != content
@@ -0,0 +1,40 @@
1
+ //- The front page (ROADMAP-themes Revision R4, Stack): the hero (title,
2
+ //- lead, a button to `archive_href`, the page body on the right — the
3
+ //- starter's `bash` fence, rendered by plugin-code-blocks as the terminal
4
+ //- card), the tag-cloud seam as a band, the newest post as a wide card, the
5
+ //- next posts as cards, the featured series and the about block.
6
+ extends ../layouts/layout.pug
7
+
8
+ block main
9
+ section.home-hero
10
+ .home-hero__inner
11
+ div
12
+ h1.home-hero__title= meta.title || app.name
13
+ if meta.lead
14
+ p.home-hero__lead= meta.lead
15
+ if meta.archive_href
16
+ .home-hero__actions
17
+ a.button.button--primary(href=meta.archive_href)= t('All posts')
18
+ if String(content || '').trim()
19
+ .home-hero__aside.nera-code-scope
20
+ != content
21
+ include ../partials/tag-cloud.pug
22
+ if themeStack.homePosts(pageLang({ meta })).length
23
+ section.post-list
24
+ h2.post-list__title= t('Latest post')
25
+ ol.post-list__items
26
+ each item, position in themeStack.homePosts(pageLang({ meta })).slice(0, 1)
27
+ - const featured = true
28
+ include ../partials/post-card.pug
29
+ if themeStack.homePosts(pageLang({ meta })).length > 1
30
+ section.post-list
31
+ h2.post-list__title= t('Recent posts')
32
+ if meta.archive_href
33
+ a.post-list__more(href=meta.archive_href)= t('All posts')
34
+ ol.post-list__items
35
+ each item, index in themeStack.homePosts(pageLang({ meta })).slice(1)
36
+ - const position = index + 1
37
+ - const featured = false
38
+ include ../partials/post-card.pug
39
+ include ../partials/home-series.pug
40
+ include ../partials/home-about.pug
@@ -0,0 +1,59 @@
1
+ //- One post (§S4.1, Revision R4): the header (series line, title, lead,
2
+ //- author line with published and updated), the post-media seam when the
3
+ //- post has an `image`, its `facts`, the body, then the post-tags seam, the
4
+ //- parts of its series and the post-pagination seam.
5
+ extends ../layouts/layout.pug
6
+
7
+ block main
8
+ article.post
9
+ header.post__header
10
+ if meta.series && themeStack.seriesParts(meta.series, pageLang({ meta })).length
11
+ p.post__series
12
+ | #{t('Series')}: #{meta.series}
13
+ if meta.series_part !== undefined && meta.series_part !== null && meta.series_part !== ''
14
+ | #{' · '}#{t('Part')} #{meta.series_part}
15
+ h1.post__title= meta.title || app.name
16
+ if meta.lead
17
+ p.post__lead= meta.lead
18
+ p.post__meta
19
+ if meta.author || themeStack.author(pageLang({ meta })).name
20
+ span.post-author
21
+ span.post-author__mark(aria-hidden='true')= themeStack.initials(meta.author || themeStack.author(pageLang({ meta })).name)
22
+ span.post__author.post-author__name= meta.author || themeStack.author(pageLang({ meta })).name
23
+ if isoDate(meta.createdAt)
24
+ span
25
+ | #{t('Published')}#{' '}
26
+ time.post__date(datetime=isoDate(meta.createdAt))= formatDate(meta.createdAt, pageLang({ meta }))
27
+ if isoDate(meta.updated)
28
+ span
29
+ | #{t('Updated')}#{' '}
30
+ time.post__updated(datetime=isoDate(meta.updated))= formatDate(meta.updated, pageLang({ meta }))
31
+ if meta.image
32
+ .post__media
33
+ include ../partials/post-media.pug
34
+ if themeStack.facts({ meta }).length
35
+ dl.post-facts
36
+ each fact in themeStack.facts({ meta })
37
+ .post-facts__item
38
+ dt.post-facts__label= fact.label
39
+ dd.post-facts__value= fact.value
40
+ .post__body.nera-code-scope
41
+ != content
42
+ footer.post__footer
43
+ .post__tags
44
+ include ../partials/post-tags.pug
45
+ if meta.series && themeStack.seriesParts(meta.series, pageLang({ meta })).length
46
+ nav.post-series(aria-label=t('Series'))
47
+ h2.post-series__title= meta.series
48
+ ol.post-series__list
49
+ each part, index in themeStack.seriesParts(meta.series, pageLang({ meta }))
50
+ if part.meta.href === meta.href
51
+ li.post-series__item.post-series__item--current
52
+ span= String(index + 1).padStart(2, '0')
53
+ a(href=part.meta.href aria-current='page')= part.meta.title
54
+ else
55
+ li.post-series__item
56
+ span= String(index + 1).padStart(2, '0')
57
+ a(href=part.meta.href)= part.meta.title
58
+ .post__pagination
59
+ include ../partials/post-pagination.pug
@@ -0,0 +1,8 @@
1
+ //- The tag pages @nera-static/plugin-tags generates (§S4.1); set
2
+ //- `tag_overview_layout: 'pages/tag.pug'` in config/tags.yaml. The
3
+ //- tag-overview seam owns the <h1>.
4
+ extends ../layouts/layout.pug
5
+
6
+ block main
7
+ section.tag-page
8
+ include ../partials/tag-overview.pug
@@ -0,0 +1,5 @@
1
+ //- Seam (§S4.2): div.post-card__media of a post card. In scope: item (the
2
+ //- post). Empty in the theme. A site with @nera-static/plugin-images
3
+ //- overrides it with:
4
+ //- include /vendor/plugin-images/picture
5
+ //- +picture(item.meta.images && item.meta.images.image, { alt: item.meta.image_alt, class: 'post-card__image' })
@@ -0,0 +1,4 @@
1
+ //- Seam (§S4.2): the end of <head>, before head-extra.pug. In scope: app,
2
+ //- meta. Empty in the theme. A site with @nera-static/plugin-feed (and an
3
+ //- `origin` in config/app.yaml) overrides it with:
4
+ //- include /vendor/plugin-feed/feed-link
@@ -0,0 +1,4 @@
1
+ //- Seam (§S2.4): in the footer, before the legal links. In scope: app, meta.
2
+ //- Empty in the theme. A site with @nera-static/plugin-social-media-links
3
+ //- overrides it with (never fontawesome-cdn-link.pug, a CDN request):
4
+ //- include /vendor/plugin-social-media-links/social-media-links
@@ -0,0 +1,10 @@
1
+ //- The site footer (§S2.2): one quiet line — the footer-extra seam, the
2
+ //- legal links of `footer_links`, and the copyright line.
3
+ footer.site-footer
4
+ .site-footer__inner
5
+ include footer-extra.pug
6
+ if themeStack.footerLinks(pageLang({ meta })).length
7
+ nav.site-footer__legal(aria-label=t('Legal'))
8
+ each link in themeStack.footerLinks(pageLang({ meta }))
9
+ a(href=link.href)= t(link.label)
10
+ p.site-footer__copy © #{new Date().getFullYear()} #{app.name}
@@ -0,0 +1,4 @@
1
+ //- Seam (§S2.4): the end of <head>. In scope: app, meta. Empty in the theme.
2
+ //- A site overrides this file in theme/views/partials/head-extra.pug, for
3
+ //- example with canonical and alternate links:
4
+ //- include /vendor/plugin-canonical-links/index
@@ -0,0 +1,14 @@
1
+ //- The <head> content (§S2.2). Ends with the feed-link and head-extra seams.
2
+ meta(charset='utf-8')
3
+ meta(name='viewport' content='width=device-width, initial-scale=1')
4
+ title= [...new Set([meta.title, app.name].filter(Boolean))].join(' – ')
5
+ if meta.description
6
+ meta(name='description' content=meta.description)
7
+ if meta.robots || app.robots
8
+ meta(name='robots' content=meta.robots || app.robots)
9
+ link(rel='stylesheet' href='/css/theme.css')
10
+ include tokens.pug
11
+ each href in themeStack.extraCss()
12
+ link(rel='stylesheet' href=href)
13
+ include feed-link.pug
14
+ include head-extra.pug
@@ -0,0 +1,8 @@
1
+ //- The site header (§S2.2): brand, main navigation (seam nav-main.pug) and
2
+ //- the language switch.
3
+ header.site-header
4
+ .site-header__inner
5
+ a.site-header__brand(href=homeHref(pageLang({ meta })))= app.name
6
+ nav.site-header__nav(aria-label=t('Main navigation'))
7
+ include nav-main.pug
8
+ include lang-switch.pug