@gouvfr/dsfr-roller 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.
- package/LICENSE.md +21 -0
- package/README.md +11 -0
- package/index.js +5 -0
- package/package.json +65 -0
- package/src/component/component.js +50 -0
- package/src/component/components/action.js +28 -0
- package/src/component/components/breadcrumb.js +33 -0
- package/src/component/components/button.js +37 -0
- package/src/component/components/display-body.js +41 -0
- package/src/component/components/display-modal.js +29 -0
- package/src/component/components/footer.js +85 -0
- package/src/component/components/header.js +96 -0
- package/src/component/components/navigation.js +72 -0
- package/src/component/components/sidemenu.js +58 -0
- package/src/component/components/skiplink.js +49 -0
- package/src/component/components/translate.js +32 -0
- package/src/component/components/version.js +21 -0
- package/src/component/ejs/version/version.ejs +46 -0
- package/src/component/ejs/version/versions.ejs +31 -0
- package/src/component/ejs-pkg.js +6 -0
- package/src/component/render.js +19 -0
- package/src/constants.js +7 -0
- package/src/core/format-html.js +16 -0
- package/src/core/format-link.js +8 -0
- package/src/core/html-renderable.js +10 -0
- package/src/core/renderable.js +20 -0
- package/src/integration/bundler.js +47 -0
- package/src/integration/indexing/indexer.js +23 -0
- package/src/integration/indexing/sitemap.js +44 -0
- package/src/integration/redirect/redirection-type.js +4 -0
- package/src/integration/redirect/redirection.js +77 -0
- package/src/node/custom/html-container-node.js +7 -0
- package/src/node/directive/doc/accordion-container-directive.js +59 -0
- package/src/node/directive/doc/accordions-group-container-directive.js +12 -0
- package/src/node/directive/doc/anatomy-container-directive.js +61 -0
- package/src/node/directive/doc/button-leaf-directive.js +37 -0
- package/src/node/directive/doc/changelog-leaf-directive.js +238 -0
- package/src/node/directive/doc/figma-leaf-directive.js +21 -0
- package/src/node/directive/doc/guideline-container-directive.js +71 -0
- package/src/node/directive/doc/guidelines-container-directive.js +13 -0
- package/src/node/directive/doc/image-text-directive.js +13 -0
- package/src/node/directive/doc/pin-leaf-directive.js +46 -0
- package/src/node/directive/doc/storybook-leaf-directive.js +18 -0
- package/src/node/directive/doc/tab-container-directive.js +22 -0
- package/src/node/directive/doc/tab-navigation-container-directive.js +49 -0
- package/src/node/directive/doc/table-container-directive.js +56 -0
- package/src/node/directive/doc/tabs-container-directive.js +71 -0
- package/src/node/generic/blockquote-node.js +26 -0
- package/src/node/generic/break-node.js +11 -0
- package/src/node/generic/code-node.js +37 -0
- package/src/node/generic/definition-node.js +13 -0
- package/src/node/generic/emphasis-node.js +11 -0
- package/src/node/generic/heading-node.js +56 -0
- package/src/node/generic/html-node.js +11 -0
- package/src/node/generic/image-node.js +14 -0
- package/src/node/generic/image-reference-node.js +14 -0
- package/src/node/generic/inline-code-node.js +21 -0
- package/src/node/generic/link-node.js +26 -0
- package/src/node/generic/link-reference-node.js +14 -0
- package/src/node/generic/list-item-node.js +11 -0
- package/src/node/generic/list-node.js +15 -0
- package/src/node/generic/paragraph-node.js +11 -0
- package/src/node/generic/strong-node.js +11 -0
- package/src/node/generic/text-node.js +15 -0
- package/src/node/generic/thematic-break-node.js +12 -0
- package/src/node/gfm/table-body-node.js +11 -0
- package/src/node/gfm/table-cell-node.js +17 -0
- package/src/node/gfm/table-head-node.js +11 -0
- package/src/node/gfm/table-header-node.js +16 -0
- package/src/node/gfm/table-node.js +91 -0
- package/src/node/gfm/table-row-node.js +11 -0
- package/src/node/node-factory.js +128 -0
- package/src/node/node-root.js +25 -0
- package/src/node/node.js +106 -0
- package/src/page/body/custom-header.js +40 -0
- package/src/page/body/main.js +23 -0
- package/src/page/body/scheme.js +9 -0
- package/src/page/head/canonical.js +16 -0
- package/src/page/head/favicon.js +14 -0
- package/src/page/head/head.js +35 -0
- package/src/page/head/share.js +14 -0
- package/src/page/head/stylesheets.js +48 -0
- package/src/page/head/title.js +9 -0
- package/src/page/html.js +46 -0
- package/src/page/page.js +39 -0
- package/src/page/scripts/highlight.js +53 -0
- package/src/page/scripts/scripts.js +57 -0
- package/src/script/main/core/element.js +29 -0
- package/src/script/main/elements/copy-snippet.js +35 -0
- package/src/script/main/elements/searchbar.js +18 -0
- package/src/script/main/elements/storybook.js +20 -0
- package/src/script/main/index.js +10 -0
- package/src/script/search/index.js +0 -0
- package/src/style/main/components/_dsfr-doc-anatomy.scss +54 -0
- package/src/style/main/components/_dsfr-doc-code-snippet.scss +9 -0
- package/src/style/main/components/_dsfr-doc-figma-leaf.scss +6 -0
- package/src/style/main/components/_dsfr-doc-guideline.scss +58 -0
- package/src/style/main/components/_dsfr-doc-tab-navigation.scss +99 -0
- package/src/style/main/components/_dsfr-doc-version.scss +154 -0
- package/src/style/main/components/_index.scss +6 -0
- package/src/style/main/index.scss +3 -0
- package/src/style/main/third-party/_highlight.scss +227 -0
- package/src/style/main/third-party/_index.scss +1 -0
- package/src/style/main/utility/_dsfr-doc-code.scss +9 -0
- package/src/style/main/utility/_font.scss +31 -0
- package/src/style/main/utility/_icon.scss +4 -0
- package/src/style/main/utility/_index.scss +3 -0
- package/src/style/search/index.scss +0 -0
- package/src/template/template-factory.js +16 -0
- package/src/template/template.js +27 -0
- package/src/template/templates/editorial-template.js +45 -0
- package/src/template/templates/home-template.js +18 -0
- package/src/template/templates/search-template.js +20 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.dsfr-doc-anatomy {
|
|
2
|
+
margin-bottom: 2rem;
|
|
3
|
+
|
|
4
|
+
&__image {
|
|
5
|
+
margin-bottom: 0.75rem;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&__content {
|
|
9
|
+
position: relative;
|
|
10
|
+
padding-left: 2rem;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&__pin {
|
|
14
|
+
padding-bottom: 0.5rem;
|
|
15
|
+
|
|
16
|
+
&::marker {
|
|
17
|
+
content: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&::before {
|
|
21
|
+
content: counter(li-counter);
|
|
22
|
+
position: absolute;
|
|
23
|
+
left: 0;
|
|
24
|
+
font-size: 0.75rem;
|
|
25
|
+
border-radius: 1.5rem;
|
|
26
|
+
width: 1.5rem;
|
|
27
|
+
height: 1.5rem;
|
|
28
|
+
border: 1px solid var(--background-action-high-pink-tuile);
|
|
29
|
+
color: var(--text-action-high-pink-tuile);
|
|
30
|
+
margin-right: 0.25rem;
|
|
31
|
+
display: flex;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
align-items: center;
|
|
34
|
+
font-weight: bold;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&--required {
|
|
38
|
+
&::before {
|
|
39
|
+
background-color: var(--background-action-high-pink-tuile);
|
|
40
|
+
color: var(--text-inverted-pink-tuile);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&__title {
|
|
46
|
+
font-weight: bold;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&__description {
|
|
50
|
+
&::before {
|
|
51
|
+
content: ' — ';
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.dsfr-doc-guideline {
|
|
2
|
+
&__img {
|
|
3
|
+
width: 100%;
|
|
4
|
+
border: 1px solid;
|
|
5
|
+
margin-bottom: 1rem;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&__title {
|
|
9
|
+
margin-bottom: 0.5rem;
|
|
10
|
+
font-weight: 700;
|
|
11
|
+
text-transform: uppercase;
|
|
12
|
+
|
|
13
|
+
&::before {
|
|
14
|
+
--icon-size: 1.5rem;
|
|
15
|
+
margin-right: 0.5rem;
|
|
16
|
+
flex: 0 0 auto;
|
|
17
|
+
display: inline-block;
|
|
18
|
+
vertical-align: calc((0.75em - var(--icon-size)) * 0.5);
|
|
19
|
+
background-color: currentColor;
|
|
20
|
+
width: var(--icon-size);
|
|
21
|
+
height: var(--icon-size);
|
|
22
|
+
-webkit-mask-size: 100% 100%;
|
|
23
|
+
mask-size: 100% 100%;
|
|
24
|
+
content: "";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
&--do {
|
|
30
|
+
.dsfr-doc-guideline__img {
|
|
31
|
+
border-color: var(--border-action-high-success);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.dsfr-doc-guideline__title {
|
|
35
|
+
color: var(--text-default-success);
|
|
36
|
+
|
|
37
|
+
&::before {
|
|
38
|
+
-webkit-mask-image: url("../dist/icons/system/fr--success-fill.svg");
|
|
39
|
+
mask-image: url("../dist/icons/system/fr--success-fill.svg");
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&--dont {
|
|
45
|
+
.dsfr-doc-guideline__img {
|
|
46
|
+
border-color: var(--border-action-high-error);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.dsfr-doc-guideline__title {
|
|
50
|
+
color: var(--text-default-error);
|
|
51
|
+
|
|
52
|
+
&::before {
|
|
53
|
+
-webkit-mask-image: url("../dist/icons/system/fr--error-fill.svg");
|
|
54
|
+
mask-image: url("../dist/icons/system/fr--error-fill.svg");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
.dsfr-doc-tab-navigation {
|
|
2
|
+
margin-bottom: 2rem;
|
|
3
|
+
padding-top: 1rem;
|
|
4
|
+
|
|
5
|
+
.fr-sidemenu {
|
|
6
|
+
padding-right: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
ul {
|
|
10
|
+
padding-top: 1rem;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&__tab {
|
|
14
|
+
display: block;
|
|
15
|
+
text-align: left;
|
|
16
|
+
width: 100%;
|
|
17
|
+
padding: 0.75rem 0.5rem;
|
|
18
|
+
text-decoration: none;
|
|
19
|
+
color: var(--text-default-grey);
|
|
20
|
+
font-weight: 700;
|
|
21
|
+
font-size: 1rem;
|
|
22
|
+
line-height: 1.5;
|
|
23
|
+
border: 0;
|
|
24
|
+
background-repeat: no-repeat;
|
|
25
|
+
background-image: linear-gradient(
|
|
26
|
+
0deg,
|
|
27
|
+
var(--border-default-grey),
|
|
28
|
+
var(--border-default-grey)
|
|
29
|
+
);
|
|
30
|
+
background-size: 100% 1px;
|
|
31
|
+
background-position: 0 100%;
|
|
32
|
+
|
|
33
|
+
&[aria-selected='true'] {
|
|
34
|
+
display: none;
|
|
35
|
+
color: var(--text-active-blue-france);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@media (min-width: 48em) {
|
|
40
|
+
padding-top: 2rem;
|
|
41
|
+
|
|
42
|
+
.fr-sidemenu__inner {
|
|
43
|
+
box-shadow: none;
|
|
44
|
+
padding: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
ul {
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: row;
|
|
50
|
+
padding-top: 0;
|
|
51
|
+
background-image: linear-gradient(
|
|
52
|
+
0deg,
|
|
53
|
+
var(--border-default-grey),
|
|
54
|
+
var(--border-default-grey)
|
|
55
|
+
);
|
|
56
|
+
background-size: 100% 2px;
|
|
57
|
+
background-position: 0 100%;
|
|
58
|
+
background-repeat: no-repeat;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&__tab {
|
|
62
|
+
font-size: 14px;
|
|
63
|
+
font-weight: 400;
|
|
64
|
+
padding: 0.75rem;
|
|
65
|
+
background-repeat: no-repeat;
|
|
66
|
+
background-image: linear-gradient(
|
|
67
|
+
0deg,
|
|
68
|
+
var(--border-default-grey),
|
|
69
|
+
var(--border-default-grey)
|
|
70
|
+
);
|
|
71
|
+
background-size: 100% 2px;
|
|
72
|
+
background-position: 0 100%;
|
|
73
|
+
|
|
74
|
+
&:hover:not([aria-selected='true']) {
|
|
75
|
+
background-color: var(
|
|
76
|
+
--background-default-grey-hover
|
|
77
|
+
) !important;
|
|
78
|
+
background-image: linear-gradient(
|
|
79
|
+
0deg,
|
|
80
|
+
var(--border-contrast-grey),
|
|
81
|
+
var(--border-contrast-grey)
|
|
82
|
+
);
|
|
83
|
+
background-size: 100% 2px;
|
|
84
|
+
background-position: 0 100%;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&[aria-selected='true'] {
|
|
88
|
+
display: block;
|
|
89
|
+
background-image: linear-gradient(
|
|
90
|
+
0deg,
|
|
91
|
+
var(--border-active-blue-france),
|
|
92
|
+
var(--border-active-blue-france)
|
|
93
|
+
);
|
|
94
|
+
background-size: 100% 2px;
|
|
95
|
+
background-position: 0 100%;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.fr-header .fr-header__menu-links .dsfr-doc-version {
|
|
3
|
+
margin-left: -.5rem;
|
|
4
|
+
margin-right: -.5rem;
|
|
5
|
+
|
|
6
|
+
&__btn {
|
|
7
|
+
padding-left: .5rem;
|
|
8
|
+
padding-right: .5rem;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.dsfr-doc-version {
|
|
13
|
+
--rows: 8;
|
|
14
|
+
position: relative;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.dsfr-doc-version .dsfr-doc-version__btn {
|
|
18
|
+
font-size: 1rem;
|
|
19
|
+
line-height: 1.5rem;
|
|
20
|
+
padding: 0.5rem 1rem;
|
|
21
|
+
overflow: initial;
|
|
22
|
+
max-width: 100%;
|
|
23
|
+
max-height: none;
|
|
24
|
+
font-weight: 500;
|
|
25
|
+
min-height: 3rem;
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dsfr-doc-version .dsfr-doc-version__btn::before {
|
|
30
|
+
--icon-size: 1rem;
|
|
31
|
+
margin-left: -0.125rem;
|
|
32
|
+
margin-right: 0.5rem;
|
|
33
|
+
flex: 0 0 auto;
|
|
34
|
+
display: inline-block;
|
|
35
|
+
vertical-align: calc((0.75em - var(--icon-size)) * 0.5);
|
|
36
|
+
background-color: currentColor;
|
|
37
|
+
width: var(--icon-size);
|
|
38
|
+
height: var(--icon-size);
|
|
39
|
+
-webkit-mask-size: 100% 100%;
|
|
40
|
+
mask-size: 100% 100%;
|
|
41
|
+
-webkit-mask-image: url("../static/icons/code-s-slash-line.svg");
|
|
42
|
+
mask-image: url("../static/icons/code-s-slash-line.svg");
|
|
43
|
+
content: "";
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.dsfr-doc-version .dsfr-doc-version__btn::after {
|
|
47
|
+
transition: transform 0.3s;
|
|
48
|
+
flex: 0 0 auto;
|
|
49
|
+
display: inline-block;
|
|
50
|
+
vertical-align: calc((0.75em - var(--icon-size)) * 0.5);
|
|
51
|
+
background-color: currentColor;
|
|
52
|
+
width: var(--icon-size);
|
|
53
|
+
height: var(--icon-size);
|
|
54
|
+
-webkit-mask-size: 100% 100%;
|
|
55
|
+
mask-size: 100% 100%;
|
|
56
|
+
-webkit-mask-image: url("../dist/icons/system/arrow-down-s-line.svg");
|
|
57
|
+
mask-image: url("../dist/icons/system/arrow-down-s-line.svg");
|
|
58
|
+
--icon-size: 1rem;
|
|
59
|
+
content: "";
|
|
60
|
+
margin-left: auto;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.dsfr-doc-version .dsfr-doc-version__btn[aria-expanded=true]::after {
|
|
64
|
+
transform: rotate(-180deg);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.dsfr-doc-version__version {
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.dsfr-doc-version__version[aria-current]:not([aria-current=false]) {
|
|
72
|
+
display: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.dsfr-doc-version__menu {
|
|
76
|
+
margin: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.dsfr-doc-version .fr-nav__item::before {
|
|
80
|
+
content: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.dsfr-doc-version .fr-menu__list {
|
|
84
|
+
width: auto;
|
|
85
|
+
padding: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.dsfr-doc-version .dsfr-doc-version__btn[aria-expanded=true] {
|
|
89
|
+
color: var(--text-active-blue-france);
|
|
90
|
+
background-color: var(--background-open-blue-france);
|
|
91
|
+
|
|
92
|
+
--idle: transparent;
|
|
93
|
+
--hover: var(--background-open-blue-france-hover);
|
|
94
|
+
--active: var(--background-open-blue-france-active);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.dsfr-doc-version .dsfr-doc-version__btn[aria-expanded=true]:hover {
|
|
98
|
+
background-color: var(--hover-tint);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.dsfr-doc-version .dsfr-doc-version__btn[aria-expanded=true]:active {
|
|
102
|
+
background-color: var(--active-tint);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.dsfr-doc-version__menu .dsfr-doc-version__version {
|
|
106
|
+
box-shadow: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@media (min-width: 62em) {
|
|
110
|
+
.dsfr-doc-version .dsfr-doc-version__btn {
|
|
111
|
+
min-height: auto;
|
|
112
|
+
width: auto;
|
|
113
|
+
font-size: 0.875rem;
|
|
114
|
+
line-height: 1.5rem;
|
|
115
|
+
padding: 0.25rem 0.75rem;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.dsfr-doc-version .dsfr-doc-version__btn::after {
|
|
119
|
+
margin-left: 0.25rem;
|
|
120
|
+
margin-right: -0.25rem;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.dsfr-doc-version .dsfr-doc-version__btn::before {
|
|
124
|
+
--icon-size: 1rem;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.dsfr-doc-version__version[aria-current]:not([aria-current=false]) {
|
|
128
|
+
display: inline-flex;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.dsfr-doc-version__menu {
|
|
132
|
+
margin: -0.25rem -1rem 0;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.dsfr-doc-version .fr-menu__list {
|
|
136
|
+
display: grid;
|
|
137
|
+
grid-template-rows: repeat(var(--rows), auto);
|
|
138
|
+
grid-auto-flow: column;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.fr-btns-group .dsfr-doc-version__menu {
|
|
142
|
+
margin: -1.25rem -0.75rem 0;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@media (prefers-reduced-motion: reduce) {
|
|
147
|
+
.dsfr-doc-version .dsfr-doc-version__btn::after {
|
|
148
|
+
transition: none;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.dsfr-doc-version__menu {
|
|
152
|
+
transition: none;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
@use '@gouvfr/dsfr-publisher/src/module/color/variable/options';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use 'sass:list';
|
|
4
|
+
|
|
5
|
+
@function get-color($name) {
|
|
6
|
+
@return list.nth(map.get(options.$values, $name), 1);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
pre code.hljs {
|
|
10
|
+
display: block;
|
|
11
|
+
overflow-x: auto;
|
|
12
|
+
padding: 1em;
|
|
13
|
+
font-family: JetBrains Mono, Spectral, courrier, monospace;
|
|
14
|
+
border-radius: 0.25rem;
|
|
15
|
+
font-size: 0.75rem;
|
|
16
|
+
}
|
|
17
|
+
code.hljs {
|
|
18
|
+
padding: 3px 5px
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:root[data-fr-theme="light"] {
|
|
22
|
+
.hljs {
|
|
23
|
+
color: get-color(grey-100);
|
|
24
|
+
background: get-color(grey-975);
|
|
25
|
+
border: #{get-color(grey-900)} solid 1px;
|
|
26
|
+
}
|
|
27
|
+
.hljs-doctag,
|
|
28
|
+
.hljs-keyword,
|
|
29
|
+
.hljs-meta .hljs-keyword,
|
|
30
|
+
.hljs-template-tag,
|
|
31
|
+
.hljs-template-variable,
|
|
32
|
+
.hljs-type,
|
|
33
|
+
.hljs-variable.language_ {
|
|
34
|
+
/* prettylights-syntax-keyword */
|
|
35
|
+
color: get-color(error-425);
|
|
36
|
+
}
|
|
37
|
+
.hljs-title,
|
|
38
|
+
.hljs-title.class_,
|
|
39
|
+
.hljs-title.class_.inherited__,
|
|
40
|
+
.hljs-title.function_ {
|
|
41
|
+
/* prettylights-syntax-entity */
|
|
42
|
+
color: get-color(purple-glycine-sun-319)
|
|
43
|
+
}
|
|
44
|
+
.hljs-attr,
|
|
45
|
+
.hljs-attribute,
|
|
46
|
+
.hljs-literal,
|
|
47
|
+
.hljs-meta,
|
|
48
|
+
.hljs-number,
|
|
49
|
+
.hljs-operator,
|
|
50
|
+
.hljs-variable,
|
|
51
|
+
.hljs-selector-attr,
|
|
52
|
+
.hljs-selector-class,
|
|
53
|
+
.hljs-selector-id {
|
|
54
|
+
/* prettylights-syntax-constant */
|
|
55
|
+
color: get-color(info-425)
|
|
56
|
+
}
|
|
57
|
+
.hljs-regexp,
|
|
58
|
+
.hljs-string,
|
|
59
|
+
.hljs-meta .hljs-string {
|
|
60
|
+
/* prettylights-syntax-string */
|
|
61
|
+
color: get-color(blue-ecume-sun-247)
|
|
62
|
+
}
|
|
63
|
+
.hljs-built_in,
|
|
64
|
+
.hljs-symbol {
|
|
65
|
+
/* prettylights-syntax-variable */
|
|
66
|
+
color: get-color(warning-425)
|
|
67
|
+
}
|
|
68
|
+
.hljs-comment,
|
|
69
|
+
.hljs-code,
|
|
70
|
+
.hljs-formula {
|
|
71
|
+
/* prettylights-syntax-comment */
|
|
72
|
+
color: get-color(grey-425)
|
|
73
|
+
}
|
|
74
|
+
.hljs-name,
|
|
75
|
+
.hljs-quote,
|
|
76
|
+
.hljs-selector-tag,
|
|
77
|
+
.hljs-selector-pseudo {
|
|
78
|
+
/* prettylights-syntax-entity-tag */
|
|
79
|
+
color: get-color(success-425)
|
|
80
|
+
}
|
|
81
|
+
.hljs-subst {
|
|
82
|
+
/* prettylights-syntax-storage-modifier-import */
|
|
83
|
+
color: get-color(info-100)
|
|
84
|
+
}
|
|
85
|
+
.hljs-section {
|
|
86
|
+
/* prettylights-syntax-markup-heading */
|
|
87
|
+
color: get-color(green-menthe-sun-373);
|
|
88
|
+
font-weight: bold
|
|
89
|
+
}
|
|
90
|
+
.hljs-bullet {
|
|
91
|
+
/* prettylights-syntax-markup-list */
|
|
92
|
+
color: get-color(yellow-moutarde-sun-348)
|
|
93
|
+
}
|
|
94
|
+
.hljs-emphasis {
|
|
95
|
+
/* prettylights-syntax-markup-italic */
|
|
96
|
+
color: get-color(info-100);
|
|
97
|
+
font-style: italic
|
|
98
|
+
}
|
|
99
|
+
.hljs-strong {
|
|
100
|
+
/* prettylights-syntax-markup-bold */
|
|
101
|
+
color: get-color(info-100);
|
|
102
|
+
font-weight: bold
|
|
103
|
+
}
|
|
104
|
+
.hljs-addition {
|
|
105
|
+
/* prettylights-syntax-markup-inserted */
|
|
106
|
+
color: get-color(success-425);
|
|
107
|
+
background-color: get-color(success-975)
|
|
108
|
+
}
|
|
109
|
+
.hljs-deletion {
|
|
110
|
+
/* prettylights-syntax-markup-deleted */
|
|
111
|
+
color: get-color(error-425);
|
|
112
|
+
background-color: get-color(error-975)
|
|
113
|
+
}
|
|
114
|
+
.hljs-char.escape_,
|
|
115
|
+
.hljs-link,
|
|
116
|
+
.hljs-params,
|
|
117
|
+
.hljs-property,
|
|
118
|
+
.hljs-punctuation,
|
|
119
|
+
.hljs-tag {
|
|
120
|
+
/* purposely ignored */
|
|
121
|
+
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:root[data-fr-theme="dark"] {
|
|
126
|
+
.hljs {
|
|
127
|
+
color: get-color(grey-950);
|
|
128
|
+
background: get-color(grey-75);
|
|
129
|
+
border: #{get-color(grey-150)} solid 1px;
|
|
130
|
+
}
|
|
131
|
+
.hljs-doctag,
|
|
132
|
+
.hljs-keyword,
|
|
133
|
+
.hljs-meta .hljs-keyword,
|
|
134
|
+
.hljs-template-tag,
|
|
135
|
+
.hljs-template-variable,
|
|
136
|
+
.hljs-type,
|
|
137
|
+
.hljs-variable.language_ {
|
|
138
|
+
/* prettylights-syntax-keyword */
|
|
139
|
+
color: get-color(error-625);
|
|
140
|
+
}
|
|
141
|
+
.hljs-title,
|
|
142
|
+
.hljs-title.class_,
|
|
143
|
+
.hljs-title.class_.inherited__,
|
|
144
|
+
.hljs-title.function_ {
|
|
145
|
+
/* prettylights-syntax-entity */
|
|
146
|
+
color: get-color(purple-glycine-moon-630)
|
|
147
|
+
}
|
|
148
|
+
.hljs-attr,
|
|
149
|
+
.hljs-attribute,
|
|
150
|
+
.hljs-literal,
|
|
151
|
+
.hljs-meta,
|
|
152
|
+
.hljs-number,
|
|
153
|
+
.hljs-operator,
|
|
154
|
+
.hljs-variable,
|
|
155
|
+
.hljs-selector-attr,
|
|
156
|
+
.hljs-selector-class,
|
|
157
|
+
.hljs-selector-id {
|
|
158
|
+
/* prettylights-syntax-constant */
|
|
159
|
+
color: get-color(info-625)
|
|
160
|
+
}
|
|
161
|
+
.hljs-regexp,
|
|
162
|
+
.hljs-string,
|
|
163
|
+
.hljs-meta .hljs-string {
|
|
164
|
+
/* prettylights-syntax-string */
|
|
165
|
+
color: get-color(blue-ecume-moon-675)
|
|
166
|
+
}
|
|
167
|
+
.hljs-built_in,
|
|
168
|
+
.hljs-symbol {
|
|
169
|
+
/* prettylights-syntax-variable */
|
|
170
|
+
color: get-color(warning-625)
|
|
171
|
+
}
|
|
172
|
+
.hljs-comment,
|
|
173
|
+
.hljs-code,
|
|
174
|
+
.hljs-formula {
|
|
175
|
+
/* prettylights-syntax-comment */
|
|
176
|
+
color: get-color(grey-625)
|
|
177
|
+
}
|
|
178
|
+
.hljs-name,
|
|
179
|
+
.hljs-quote,
|
|
180
|
+
.hljs-selector-tag,
|
|
181
|
+
.hljs-selector-pseudo {
|
|
182
|
+
/* prettylights-syntax-entity-tag */
|
|
183
|
+
color: get-color(success-625)
|
|
184
|
+
}
|
|
185
|
+
.hljs-subst {
|
|
186
|
+
/* prettylights-syntax-storage-modifier-import */
|
|
187
|
+
color: get-color(info-950)
|
|
188
|
+
}
|
|
189
|
+
.hljs-section {
|
|
190
|
+
/* prettylights-syntax-markup-heading */
|
|
191
|
+
color: get-color(green-menthe-moon-652);
|
|
192
|
+
font-weight: bold
|
|
193
|
+
}
|
|
194
|
+
.hljs-bullet {
|
|
195
|
+
/* prettylights-syntax-markup-list */
|
|
196
|
+
color: get-color(yellow-moutarde-moon-860)
|
|
197
|
+
}
|
|
198
|
+
.hljs-emphasis {
|
|
199
|
+
/* prettylights-syntax-markup-italic */
|
|
200
|
+
color: get-color(info-950);
|
|
201
|
+
font-style: italic
|
|
202
|
+
}
|
|
203
|
+
.hljs-strong {
|
|
204
|
+
/* prettylights-syntax-markup-bold */
|
|
205
|
+
color: get-color(info-950);
|
|
206
|
+
font-weight: bold
|
|
207
|
+
}
|
|
208
|
+
.hljs-addition {
|
|
209
|
+
/* prettylights-syntax-markup-inserted */
|
|
210
|
+
color: get-color(success-625);
|
|
211
|
+
background-color: get-color(success-75)
|
|
212
|
+
}
|
|
213
|
+
.hljs-deletion {
|
|
214
|
+
/* prettylights-syntax-markup-deleted */
|
|
215
|
+
color: get-color(error-625);
|
|
216
|
+
background-color: get-color(error-75)
|
|
217
|
+
}
|
|
218
|
+
.hljs-char.escape_,
|
|
219
|
+
.hljs-link,
|
|
220
|
+
.hljs-params,
|
|
221
|
+
.hljs-property,
|
|
222
|
+
.hljs-punctuation,
|
|
223
|
+
.hljs-tag {
|
|
224
|
+
/* purposely ignored */
|
|
225
|
+
|
|
226
|
+
}
|
|
227
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use 'highlight';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
.dsfr-doc-inline-code {
|
|
2
|
+
font-family: JetBrains Mono, Spectral, courrier, monospace;
|
|
3
|
+
font-size: 0.75rem;
|
|
4
|
+
padding: 0 0.25rem;
|
|
5
|
+
background-color: var(--background-alt-grey);
|
|
6
|
+
border: var(--border-default-grey) solid 1px;
|
|
7
|
+
border-radius: 0.25rem;
|
|
8
|
+
color: var(--text-default-warning);
|
|
9
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: 'JetBrains Mono';
|
|
3
|
+
font-style: normal;
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
font-display: swap;
|
|
6
|
+
src: url(../static/fonts/JetBrainsMono/JetBrainsMono-Regular.woff2) format('woff2');
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@font-face {
|
|
10
|
+
font-family: 'JetBrains Mono';
|
|
11
|
+
font-style: italic;
|
|
12
|
+
font-weight: 400;
|
|
13
|
+
font-display: swap;
|
|
14
|
+
src: url(../static/fonts/JetBrainsMono/JetBrainsMono-Italic.woff2) format('woff2');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@font-face {
|
|
18
|
+
font-family: 'JetBrains Mono';
|
|
19
|
+
font-style: normal;
|
|
20
|
+
font-weight: 700;
|
|
21
|
+
font-display: swap;
|
|
22
|
+
src: url(../static/fonts/JetBrainsMono/JetBrainsMono-Bold.woff2) format('woff2');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@font-face {
|
|
26
|
+
font-family: 'JetBrains Mono';
|
|
27
|
+
font-style: italic;
|
|
28
|
+
font-weight: 700;
|
|
29
|
+
font-display: swap;
|
|
30
|
+
src: url(../static/fonts/JetBrainsMono/JetBrainsMono-BoldItalic.woff2) format('woff2');
|
|
31
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HomeTemplate } from './templates/home-template.js';
|
|
2
|
+
import { EditorialTemplate } from './templates/editorial-template.js';
|
|
3
|
+
import { SearchTemplate } from './templates/search-template.js'
|
|
4
|
+
|
|
5
|
+
const TEMPLATES = [
|
|
6
|
+
EditorialTemplate,
|
|
7
|
+
HomeTemplate,
|
|
8
|
+
SearchTemplate
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
const templatesMap = new Map(TEMPLATES.map((Template) => [Template.NAME, Template]));
|
|
12
|
+
|
|
13
|
+
export const templateFactory = (data) => {
|
|
14
|
+
const Template = templatesMap.get(data.template) ?? TEMPLATES[0];
|
|
15
|
+
return new Template(data);
|
|
16
|
+
};
|