@d-zero/scaffold 5.0.0-beta.3 → 5.0.0-beta.5

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 (31) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/__assets/_libs/component/c-content-main.css +21 -11
  3. package/__assets/_libs/component/c-nav-breadcrumb.pug +17 -39
  4. package/__assets/_libs/component/c-pagination.css +2 -0
  5. package/__assets/_libs/component/c-title-page.pug +1 -1
  6. package/__assets/_libs/data/breadcrumbs.js +77 -0
  7. package/__assets/_libs/data/titlelist.js +16 -0
  8. package/__assets/_libs/layouts/home.pug +17 -0
  9. package/__assets/_libs/layouts/sub.pug +25 -0
  10. package/__assets/_libs/mixin/meta.pug +25 -21
  11. package/__assets/_libs/style/general/all.css +1 -0
  12. package/__assets/htdocs/__tmpl/000_home.json +4 -0
  13. package/__assets/htdocs/__tmpl/000_home.pug +2 -20
  14. package/__assets/htdocs/__tmpl/100_sub.json +4 -0
  15. package/__assets/htdocs/__tmpl/100_sub.pug +1 -23
  16. package/__assets/htdocs/__tmpl/200_blog_index.json +5 -0
  17. package/__assets/htdocs/__tmpl/200_blog_index.pug +14 -40
  18. package/__assets/htdocs/__tmpl/210_blog_index.json +5 -0
  19. package/__assets/htdocs/__tmpl/210_blog_index.pug +14 -40
  20. package/__assets/htdocs/__tmpl/300_form_input.json +4 -0
  21. package/__assets/htdocs/__tmpl/300_form_input.pug +529 -568
  22. package/__assets/htdocs/__tmpl/301_form_confirm.json +4 -0
  23. package/__assets/htdocs/__tmpl/301_form_confirm.pug +188 -212
  24. package/__assets/htdocs/__tmpl/302_form_complete.json +4 -0
  25. package/__assets/htdocs/__tmpl/302_form_complete.pug +3 -27
  26. package/__assets/htdocs/sample/index.html +15 -0
  27. package/__assets/htdocs/sub-folder.test/index.pug +1 -3
  28. package/burgereditor.config.js +2 -1
  29. package/eleventy.config.mjs +7 -1
  30. package/markuplint.config.js +4 -0
  31. package/package.json +24 -17
package/CHANGELOG.md CHANGED
@@ -3,6 +3,38 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [5.0.0-beta.5](https://github.com/d-zero-dev/frontend-env/compare/v5.0.0-beta.4...v5.0.0-beta.5) (2025-09-17)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **scaffold:** add dotenv ([f9e09fb](https://github.com/d-zero-dev/frontend-env/commit/f9e09fbc1e32f99dd0529b5fba40cc8c205471cb))
11
+ - **scaffold:** remove unnecessary async keyword from breadcrumbs function ([2e1e11f](https://github.com/d-zero-dev/frontend-env/commit/2e1e11f29face454705de7b359ab1bc598c549cf))
12
+ - **scaffold:** use rel="icon" for favicon ([af6c9e8](https://github.com/d-zero-dev/frontend-env/commit/af6c9e83c2bd2b454bf54745de0b8275063450d5))
13
+
14
+ ### Features
15
+
16
+ - **scaffold:** add dynamic breadcrumb generation ([4816002](https://github.com/d-zero-dev/frontend-env/commit/4816002823cb0698cac60858db26bffe081ab8e0))
17
+ - **scaffold:** add dynamic title generation using breadcrumbs ([39fd107](https://github.com/d-zero-dev/frontend-env/commit/39fd1076cd7d722bb97942751bc6f65826f93c1a))
18
+ - **scaffold:** update c-title-page component ([77d8bbe](https://github.com/d-zero-dev/frontend-env/commit/77d8bbe534392b1ae2bd82ea0e0da02287f32ff0))
19
+ - **scaffold:** update layout and template files ([6f95978](https://github.com/d-zero-dev/frontend-env/commit/6f9597865bf66e9d8f336a4e5e9db0462953116b))
20
+ - **scaffold:** update meta mixin, sample page and package config ([f97f141](https://github.com/d-zero-dev/frontend-env/commit/f97f1416ddd2053cdfab38823fe66adfdf3ef5f9))
21
+ - **scaffold:** update template data with Japanese titles ([7c60679](https://github.com/d-zero-dev/frontend-env/commit/7c606797db4a94b527de69b3ec79980fed275f61))
22
+
23
+ # [5.0.0-beta.4](https://github.com/d-zero-dev/frontend-env/compare/v5.0.0-beta.3...v5.0.0-beta.4) (2025-08-14)
24
+
25
+ ### Bug Fixes
26
+
27
+ - **scaffold:** update burger-editor config and sample file format ([e45030d](https://github.com/d-zero-dev/frontend-env/commit/e45030d19b8adbc63ad4aef4d8abb42dcf84aff1))
28
+ - **scaffold:** update CSS to use logical properties and fix formatting ([d2339db](https://github.com/d-zero-dev/frontend-env/commit/d2339db25cd4f227a1476af4b533b69d39c0ccb3))
29
+
30
+ ### Features
31
+
32
+ - **scaffold:** add 11ty layout files ([fafeb55](https://github.com/d-zero-dev/frontend-env/commit/fafeb557c47d372a3037c94d5d093873ad47b84a))
33
+ - **scaffold:** add sample page for static file production ([f2cacbd](https://github.com/d-zero-dev/frontend-env/commit/f2cacbdf90c237aa7dc80e7bae2a8b80c8732088))
34
+ - **scaffold:** enable prettier by default in eleventy config ([ba539bd](https://github.com/d-zero-dev/frontend-env/commit/ba539bd0228fc86a0e126bd48cd04df41da91f3d))
35
+ - **scaffold:** integrate lint check into build process ([9c99c22](https://github.com/d-zero-dev/frontend-env/commit/9c99c22eeb986ed07a774e82467c82e1403da1fe))
36
+ - **scaffold:** update burger-editor dependencies to 4.0.0-alpha.14 ([3bec3a5](https://github.com/d-zero-dev/frontend-env/commit/3bec3a594af622aff826cd3c9ef29704ad95306b))
37
+
6
38
  # [5.0.0-beta.3](https://github.com/d-zero-dev/frontend-env/compare/v5.0.0-beta.2...v5.0.0-beta.3) (2025-07-11)
7
39
 
8
40
  **Note:** Version bump only for package @d-zero/scaffold
@@ -170,7 +170,8 @@
170
170
  }
171
171
 
172
172
  .cc-form {
173
- margin: 0 auto;
173
+ margin-block: 0;
174
+ margin-inline: auto;
174
175
  }
175
176
 
176
177
  .cc-form-field-list {
@@ -180,7 +181,8 @@
180
181
 
181
182
  .cc-form-fieldset {
182
183
  display: block;
183
- padding: 1rem 2rem;
184
+ padding-block: 1rem;
185
+ padding-inline: 2rem;
184
186
 
185
187
  fieldset {
186
188
  padding: 0;
@@ -208,7 +210,8 @@
208
210
  .required,
209
211
  .optional {
210
212
  display: block;
211
- margin: 0 0 0 0.5rem;
213
+ margin-block: 0;
214
+ margin-inline: 0 0.5rem;
212
215
  font-size: calc(12 / 18 * 1rem);
213
216
  line-height: 1;
214
217
  border-radius: 0.2rem;
@@ -216,7 +219,8 @@
216
219
  }
217
220
 
218
221
  .cc-form-fieldset-attention {
219
- margin: 0.5rem 0;
222
+ margin-block: 0.5rem;
223
+ margin-inline: 0;
220
224
  font-size: calc(12 / 18 * 1rem);
221
225
  font-weight: normal;
222
226
  }
@@ -226,8 +230,10 @@
226
230
  }
227
231
 
228
232
  .mail-field {
229
- padding: 0 0 1rem;
230
- margin: 0 0 0 1rem;
233
+ padding-block: 0 1rem;
234
+ padding-inline: 0;
235
+ margin-block: 0;
236
+ margin-inline: 0 1rem;
231
237
 
232
238
  &:last-child {
233
239
  border-block-end: 1px solid var(--border-color);
@@ -241,7 +247,7 @@
241
247
  'description description description' auto
242
248
  'error-message error-message error-message' auto
243
249
  / auto 1fr auto;
244
- grid-gap: 0;
250
+ gap: 0;
245
251
 
246
252
  > * {
247
253
  place-self: center flex-start;
@@ -249,7 +255,8 @@
249
255
 
250
256
  .mail-before-attachment {
251
257
  grid-area: before-attachment;
252
- margin: 0 1rem 0 0;
258
+ margin-block: 0;
259
+ margin-inline: 0 1rem;
253
260
 
254
261
  &:empty {
255
262
  margin: 0;
@@ -262,7 +269,8 @@
262
269
 
263
270
  .mail-after-attachment {
264
271
  grid-area: after-attachment;
265
- margin: 0 0 0 1rem;
272
+ margin-block: 0;
273
+ margin-inline: 1rem 0;
266
274
 
267
275
  &:empty {
268
276
  margin: 0;
@@ -326,7 +334,8 @@
326
334
  }
327
335
 
328
336
  select {
329
- padding: 0.5rem calc(0.5rem + 24px + 2px) 0.5rem 0.5rem;
337
+ padding-block: 0.5rem;
338
+ padding-inline: 0.5rem calc(0.5rem + 24px + 2px);
330
339
  appearance: none;
331
340
  background-image: url('/img/bg-arrow.svg');
332
341
  background-repeat: no-repeat;
@@ -362,7 +371,8 @@
362
371
  input {
363
372
  display: block;
364
373
  padding: 0;
365
- margin: 0 0.5rem 0 0;
374
+ margin-block: 0;
375
+ margin-inline: 0 0.5rem;
366
376
  line-height: 1;
367
377
  }
368
378
 
@@ -1,42 +1,20 @@
1
1
  .c-nav-breadcrumb
2
2
  ol(itemscope itemtype="https://schema.org/BreadcrumbList")
3
- li.c-nav-breadcrumb__item(
4
- itemscope
5
- itemprop="itemListElement"
6
- itemtype="https://schema.org/ListItem"
7
- data-breadcrumb="home")
8
- a(
9
- href="/"
3
+ - const HOME_TITLE = "Home";
4
+ - const linkList = breadcrumbs(page, collections);
5
+ each link, index in linkList
6
+ li.c-nav-breadcrumb__item(
10
7
  itemscope
11
- itemprop="item"
12
- itemtype="https://schema.org/WebPage"
13
- itemid="/")
14
- span(itemprop="name") Home
15
- meta(itemprop="position" content="1")
16
- span.c-nav-breadcrumb__separetor
17
- li.c-nav-breadcrumb__item(
18
- itemscope
19
- itemprop="itemListElement"
20
- itemtype="https://schema.org/ListItem")
21
- a(
22
- href="/first/"
23
- itemscope
24
- itemprop="item"
25
- itemtype="https://schema.org/WebPage"
26
- itemid="/first/")
27
- span(itemprop="name") Parent
28
- meta(itemprop="position" content="2")
29
- span.c-nav-breadcrumb__separetor
30
- li.c-nav-breadcrumb__item(
31
- itemscope
32
- itemprop="itemListElement"
33
- itemtype="https://schema.org/ListItem"
34
- data-breadcrumb="current")
35
- a(
36
- href="/first/about"
37
- itemscope
38
- itemprop="item"
39
- itemtype="https://schema.org/WebPage"
40
- itemid="/first/about")
41
- span(itemprop="name") Current
42
- meta(itemprop="position" content="3")
8
+ itemprop="itemListElement"
9
+ itemtype="https://schema.org/ListItem"
10
+ data-breadcrumb=link.href === "/" ? "home" : undefined)
11
+ a(
12
+ href=link.href
13
+ itemscope
14
+ itemprop="item"
15
+ itemtype="https://schema.org/WebPage"
16
+ itemid=link.href)
17
+ span(itemprop="name")= link.href === "/" ? HOME_TITLE || link.title : link.title
18
+ meta(itemprop="position" content=index + 1)
19
+ if index < linkList.length - 1
20
+ span.c-nav-breadcrumb__separetor
@@ -87,6 +87,7 @@
87
87
  }
88
88
 
89
89
  /* 🐲 baserCMSの仕様上 マルチクラスでしかカレントを定義できない */
90
+
90
91
  /* stylelint-disable selector-class-pattern */
91
92
  .c-pagination__number--current {
92
93
  border-block-end: 2px solid var(--border-color);
@@ -95,4 +96,5 @@
95
96
  padding-block-end: 0;
96
97
  }
97
98
  }
99
+
98
100
  /* stylelint-enable selector-class-pattern */
@@ -1,2 +1,2 @@
1
1
  .c-title-page
2
- h1 ページタイトル
2
+ h1= title
@@ -0,0 +1,77 @@
1
+ import path from 'node:path';
2
+
3
+ import { JSDOM } from 'jsdom';
4
+
5
+ /**
6
+ *
7
+ */
8
+ export default function () {
9
+ return (page, collections) => {
10
+ const breadcrumbs = collections.all
11
+ .filter((item) => isAncestor(page, item.filePathStem))
12
+ .map((item) => ({
13
+ title: getTitle(item),
14
+ href: item.page.url,
15
+ depth: item.page.url.split('/').length,
16
+ }))
17
+ .sort((a, b) => a.depth - b.depth);
18
+ return breadcrumbs;
19
+ };
20
+ }
21
+
22
+ /**
23
+ *
24
+ * @param page
25
+ * @param filePathStem
26
+ */
27
+ function isAncestor(page, filePathStem) {
28
+ const dirname = path.dirname(filePathStem);
29
+ const name = path.basename(filePathStem);
30
+ const included = page.filePathStem.startsWith(dirname);
31
+ const isIndex = name === 'index';
32
+ const isSelf = page.filePathStem === filePathStem;
33
+ return (included && isIndex) || isSelf;
34
+ }
35
+
36
+ const titleCache = new Map();
37
+
38
+ /**
39
+ *
40
+ * @param item
41
+ */
42
+ function getTitle(item) {
43
+ const filePathStem = item.filePathStem;
44
+ if (titleCache.has(filePathStem)) {
45
+ return titleCache.get(filePathStem);
46
+ }
47
+ const title =
48
+ item.data.title?.trim() ||
49
+ getTitleFromDOM(getContent(item)) ||
50
+ item.page.fileSlug?.trim();
51
+ titleCache.set(filePathStem, title);
52
+ return title;
53
+ }
54
+
55
+ /**
56
+ *
57
+ * @param item
58
+ */
59
+ function getTitleFromDOM(item) {
60
+ const content = getContent(item);
61
+ const dom = new JSDOM(content);
62
+ const title = dom.window.document.title.trim();
63
+ return title;
64
+ }
65
+
66
+ /**
67
+ *
68
+ * @param item
69
+ */
70
+ function getContent(item) {
71
+ try {
72
+ // UsingCircularTemplateContentReferenceError may potentially occur
73
+ return item.templateContent;
74
+ } catch {
75
+ return null;
76
+ }
77
+ }
@@ -0,0 +1,16 @@
1
+ import breadcrumbs from './breadcrumbs.js';
2
+
3
+ /**
4
+ *
5
+ */
6
+ export default async function () {
7
+ return (page, collections, pkg, separator = ' | ') => {
8
+ const breadcrumbLinkList = breadcrumbs()(page, collections);
9
+ const titleList = breadcrumbLinkList
10
+ .filter((item) => item.href !== '/')
11
+ .toReversed()
12
+ .map((item) => item.title);
13
+ titleList.push(pkg.production?.siteName || '__サイト名__');
14
+ return titleList.join(separator);
15
+ };
16
+ }
@@ -0,0 +1,17 @@
1
+ doctype html
2
+ html(lang=lang || "ja")
3
+ head
4
+ include /mixin/meta.pug
5
+ body.c-page-home
6
+ .c-page-home__base
7
+ .c-page-home__header
8
+ - const isHome = true;
9
+ include /component/c-header.pug
10
+ .c-page-home__nav-global
11
+ include /component/c-nav-global.pug
12
+ .c-page-home__main
13
+ main !{ content }
14
+ .c-page-home__nav-sitemap
15
+ include /component/c-nav-sitemap.pug
16
+ .c-page-home__footer
17
+ include /component/c-footer.pug
@@ -0,0 +1,25 @@
1
+ doctype html
2
+ html(lang=lang || "ja")
3
+ head
4
+ include /mixin/meta.pug
5
+ body.c-page-sub
6
+ .c-page-sub__base
7
+ .c-page-sub__header
8
+ include /component/c-header.pug
9
+ .c-page-sub__nav-global
10
+ include /component/c-nav-global.pug
11
+ .c-page-sub__main
12
+ main
13
+ article.c-page-sub__content
14
+ .c-page-sub__title-page
15
+ include /component/c-title-page.pug
16
+ .c-page-sub__nav-breadcrumb
17
+ include /component/c-nav-breadcrumb.pug
18
+ .c-page-sub__content-body !{ content }
19
+ if hasPagination
20
+ .c-page-sub__pagination
21
+ include /component/c-pagination.pug
22
+ .c-page-sub__nav-sitemap
23
+ include /component/c-nav-sitemap.pug
24
+ .c-page-sub__footer
25
+ include /component/c-footer.pug
@@ -1,21 +1,25 @@
1
- mixin meta(title)
2
- meta(charset="UTF-8")
3
- meta(name="viewport" content="width=device-width")
4
- title= title
5
- meta(name="format-detection" content="telephone=no")
6
- meta(name="description" content="__ディスクリプション__")
7
- meta(property="og:type" content="website")
8
- meta(property="og:title" content="__サイトタイトル__")
9
- meta(property="og:site_name" content="__サイトタイトル__")
10
- meta(property="og:description" content="__ディスクリプション__")
11
- meta(property="og:url" content="__SNSからリンクさせるURL__")
12
- meta(property="og:image" content="__OGP用画像__")
13
- meta(name="twitter:card" content="summary_large_image")
14
- meta(name="twitter:url" content="__SNSからリンクさせるURL__")
15
- meta(name="twitter:title" content="__サイトタイトル__")
16
- meta(name="twitter:description" content="__ディスクリプション__")
17
- meta(name="twitter:image" content="__OGP用画像__")
18
- link(rel="shortcut icon" href="/favicon.png")
19
- link(rel="apple-touch-icon" href="/img/apple-touch-icon.png")
20
- link(href="/css/style.css" rel="stylesheet")
21
- script(src="/js/script.js" type="module")
1
+ meta(charset="UTF-8")
2
+ meta(name="viewport" content="width=device-width")
3
+ title= titlelist(page, collections, pkg, " | ")
4
+ meta(name="format-detection" content="telephone=no")
5
+ meta(name="description" content=description || "")
6
+ meta(property="og:type" content=ogType || "website")
7
+ if pkg.production.siteName
8
+ meta(property="og:site_name" content=pkg.production.siteName || "__サイト名__")
9
+ if ogDescription || description
10
+ meta(property="og:description" content=ogDescription || description || "")
11
+ if pkg.production.host
12
+ meta(property="og:url" content=pkg.production.host + page.url)
13
+ meta(property="og:image" content=pkg.production.host + (ogImage || "/img/ogp.png"))
14
+ meta(name="twitter:card" content=ogCard || "summary_large_image")
15
+ meta(name="twitter:url" content=pkg.production.host + page.url)
16
+ if pkg.production.siteName
17
+ meta(name="twitter:title" content=pkg.production.siteName || "__サイト名__")
18
+ if ogDescription || description
19
+ meta(name="twitter:description" content=ogDescription || description || "")
20
+ if pkg.production.host
21
+ meta(name="twitter:image" content=pkg.production.host + (ogImage || "/img/ogp.png"))
22
+ link(rel="icon" href="/favicon.png")
23
+ link(rel="apple-touch-icon" href="/img/apple-touch-icon.png")
24
+ link(href="/css/style.css" rel="stylesheet")
25
+ script(src="/js/script.js" type="module")
@@ -6,4 +6,5 @@
6
6
  box-sizing: border-box;
7
7
  }
8
8
  }
9
+
9
10
  /* stylelint-enable selector-max-universal */
@@ -0,0 +1,4 @@
1
+ {
2
+ "layout": "home.pug",
3
+ "title": "トップページ"
4
+ }
@@ -1,20 +1,2 @@
1
- html(lang="ja")
2
- head
3
- include /mixin/meta.pug
4
- +meta("__サイトタイトル__")
5
- body.c-page-home
6
- .c-page-home__base
7
- .c-page-home__header
8
- - const isHome = true;
9
- include /component/c-header.pug
10
- .c-page-home__nav-global
11
- include /component/c-nav-global.pug
12
-
13
- .c-page-home__main
14
- main
15
- h2 メイン
16
-
17
- .c-page-home__nav-sitemap
18
- include /component/c-nav-sitemap.pug
19
- .c-page-home__footer
20
- include /component/c-footer.pug
1
+ h2 トップページ
2
+ div トップページ内容
@@ -0,0 +1,4 @@
1
+ {
2
+ "layout": "sub.pug",
3
+ "title": "下層固定ページ・ブログ詳細ページ"
4
+ }
@@ -1,23 +1 @@
1
- html(lang="ja")
2
- head
3
- include /mixin/meta.pug
4
- +meta("__ページタイトル__ | __サイトタイトル__")
5
- body.c-page-sub
6
- .c-page-sub__base
7
- .c-page-sub__header
8
- include /component/c-header.pug
9
- .c-page-sub__nav-global
10
- include /component/c-nav-global.pug
11
- .c-page-sub__main
12
- main
13
- article.c-page-sub__content
14
- .c-page-sub__title-page
15
- include /component/c-title-page.pug
16
- .c-page-sub__nav-breadcrumb
17
- include /component/c-nav-breadcrumb.pug
18
- .c-page-sub__content-main
19
- .c-content-main !{ blocks }
20
- .c-page-sub__nav-sitemap
21
- include /component/c-nav-sitemap.pug
22
- .c-page-sub__footer
23
- include /component/c-footer.pug
1
+ .c-content-main !{ blocks }
@@ -0,0 +1,5 @@
1
+ {
2
+ "layout": "sub.pug",
3
+ "title": "ブログA一覧ページ",
4
+ "hasPagination": true
5
+ }
@@ -1,40 +1,14 @@
1
- html(lang="ja")
2
- head
3
- include /mixin/meta.pug
4
- +meta("__ページタイトル__ | __サイトタイトル__")
5
- body.c-page-sub
6
- .c-page-sub__base
7
- .c-page-sub__header
8
- include /component/c-header.pug
9
- .c-page-sub__nav-global
10
- include /component/c-nav-global.pug
11
-
12
- .c-page-sub__main
13
- main
14
- article.c-page-sub__content
15
- .c-page-sub__title-page
16
- include /component/c-title-page.pug
17
- .c-page-sub__nav-breadcrumb
18
- include /component/c-nav-breadcrumb.pug
19
- .c-page-sub__content-index
20
- .c-content-index
21
- .c-content-index__categories
22
- // ⚠️ CMS要件:
23
- // - ページがカテゴリーインデックスの場合は aria-current="page" を付加する
24
- // - カテゴリーインデックスではなく、カテゴリーに属するページでは aria-current="page" は付加しない
25
- ul
26
- li: a(href="__PATH_TO__"): span ALL
27
- li: a(href="__PATH_TO__" aria-current="page"): span カテゴリー1
28
- li: a(href="__PATH_TO__"): span カテゴリー2
29
- li: a(href="__PATH_TO__"): span カテゴリー3
30
- .c-content-index__body
31
- .c-media-list
32
- each article in data.articles
33
- include /component/c-media.pug
34
- .c-page-sub__pagination
35
- include /component/c-pagination.pug
36
-
37
- .c-page-sub__nav-sitemap
38
- include /component/c-nav-sitemap.pug
39
- .c-page-sub__footer
40
- include /component/c-footer.pug
1
+ .c-content-index
2
+ .c-content-index__categories
3
+ // ⚠️ CMS要件:
4
+ // - ページがカテゴリーインデックスの場合は aria-current="page" を付加する
5
+ // - カテゴリーインデックスではなく、カテゴリーに属するページでは aria-current="page" は付加しない
6
+ ul
7
+ li: a(href="__PATH_TO__"): span ALL
8
+ li: a(href="__PATH_TO__" aria-current="page"): span カテゴリー1
9
+ li: a(href="__PATH_TO__"): span カテゴリー2
10
+ li: a(href="__PATH_TO__"): span カテゴリー3
11
+ .c-content-index__body
12
+ .c-media-list
13
+ each article in data.articles
14
+ include /component/c-media.pug
@@ -0,0 +1,5 @@
1
+ {
2
+ "layout": "sub.pug",
3
+ "title": "ブログB一覧ページ",
4
+ "hasPagination": true
5
+ }
@@ -1,40 +1,14 @@
1
- html(lang="ja")
2
- head
3
- include /mixin/meta.pug
4
- +meta("__ページタイトル__ | __サイトタイトル__")
5
- body.c-page-sub
6
- .c-page-sub__base
7
- .c-page-sub__header
8
- include /component/c-header.pug
9
- .c-page-sub__nav-global
10
- include /component/c-nav-global.pug
11
-
12
- .c-page-sub__main
13
- main
14
- article.c-page-sub__content
15
- .c-page-sub__title-page
16
- include /component/c-title-page.pug
17
- .c-page-sub__nav-breadcrumb
18
- include /component/c-nav-breadcrumb.pug
19
- .c-page-sub__content-index
20
- .c-content-index
21
- .c-content-index__categories
22
- // ⚠️ CMS要件:
23
- // - ページがカテゴリーインデックスの場合は aria-current="page" を付加する
24
- // - カテゴリーインデックスではなく、カテゴリーに属するページでは aria-current="page" は付加しない
25
- ul
26
- li: a(href="__PATH_TO__"): span ALL
27
- li: a(href="__PATH_TO__" aria-current="page"): span カテゴリー1
28
- li: a(href="__PATH_TO__"): span カテゴリー2
29
- li: a(href="__PATH_TO__"): span カテゴリー3
30
- .c-content-index__body
31
- .c-card-list
32
- each article in data.articles
33
- include /component/c-card.pug
34
- .c-page-sub__pagination
35
- include /component/c-pagination.pug
36
-
37
- .c-page-sub__nav-sitemap
38
- include /component/c-nav-sitemap.pug
39
- .c-page-sub__footer
40
- include /component/c-footer.pug
1
+ .c-content-index
2
+ .c-content-index__categories
3
+ // ⚠️ CMS要件:
4
+ // - ページがカテゴリーインデックスの場合は aria-current="page" を付加する
5
+ // - カテゴリーインデックスではなく、カテゴリーに属するページでは aria-current="page" は付加しない
6
+ ul
7
+ li: a(href="__PATH_TO__"): span ALL
8
+ li: a(href="__PATH_TO__" aria-current="page"): span カテゴリー1
9
+ li: a(href="__PATH_TO__"): span カテゴリー2
10
+ li: a(href="__PATH_TO__"): span カテゴリー3
11
+ .c-content-index__body
12
+ .c-card-list
13
+ each article in data.articles
14
+ include /component/c-card.pug
@@ -0,0 +1,4 @@
1
+ {
2
+ "layout": "sub.pug",
3
+ "title": "メールフォーム入力ページ"
4
+ }