@gouvfr/dsfr-roller 1.0.26 → 1.0.27

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 (51) hide show
  1. package/package.json +2 -2
  2. package/src/component/components/button.js +3 -1
  3. package/src/component/components/edit.js +20 -0
  4. package/src/component/components/header.js +2 -2
  5. package/src/component/components/sidemenu.js +60 -3
  6. package/src/component/components/skiplink.js +1 -1
  7. package/src/component/ejs/edit/edit.ejs +32 -0
  8. package/src/component/ejs/version/version.ejs +2 -4
  9. package/src/core/format-link.js +6 -0
  10. package/src/node/directive/components/accordion/accordions-group-container-directive.js +1 -0
  11. package/src/node/directive/components/button/button-leaf-directive.js +1 -1
  12. package/src/node/directive/components/card/card-container-directive.js +3 -0
  13. package/src/node/directive/components/table/table-container-directive.js +1 -1
  14. package/src/node/directive/core/grid-container-directive.js +1 -0
  15. package/src/node/directive/doc/guidance/guideline-container-directive.js +1 -1
  16. package/src/node/directive/doc/page-item-card-container-directive.js +1 -1
  17. package/src/node/directive/doc/storybook-leaf-directive.js +1 -1
  18. package/src/node/directive/doc/tab-navigation-container-directive.js +25 -30
  19. package/src/node/directive/doc/video-leaf-directive.js +0 -2
  20. package/src/node/directive/home/hp-analytics-container-directive.js +3 -2
  21. package/src/node/directive/home/hp-community-container-directive.js +7 -2
  22. package/src/node/directive/home/hp-community-tile-container-directive.js +2 -1
  23. package/src/node/directive/home/hp-discover-tile-container-directive.js +4 -1
  24. package/src/node/directive/home/hp-hero-container-directive.js +4 -4
  25. package/src/node/directive/home/hp-showcase-card-container-directive.js +1 -1
  26. package/src/node/directive/home/hp-showcase-container-directive.js +1 -1
  27. package/src/node/directive/home/hp-slice-video-container-directive.js +11 -3
  28. package/src/node/generic/blockquote-node.js +1 -0
  29. package/src/node/generic/code-node.js +1 -1
  30. package/src/page/body/custom-header.js +8 -2
  31. package/src/page/body/toc.js +1 -1
  32. package/src/script/home/inject-svg.js +1 -2
  33. package/src/script/main/cmp/tarteaucitron/services.js +1 -1
  34. package/src/script/main/cmp/tarteaucitron/tarteaucitron.js +7 -7
  35. package/src/script/main/elements/pagination/pagination-list.js +89 -113
  36. package/src/script/main/elements/search-bar/index.js +15 -5
  37. package/src/script/main/elements/search-bar/results/results-button.js +1 -1
  38. package/src/script/main/elements/search-bar/results/results-dropdown.js +1 -0
  39. package/src/script/main/elements/storybook.js +1 -4
  40. package/src/script/search/elements/search-page.js +1 -0
  41. package/src/style/home/_community.scss +22 -19
  42. package/src/style/home/_showcase.scss +3 -0
  43. package/src/style/main/components/_dsfr-doc-code-snippet.scss +3 -2
  44. package/src/style/main/components/_dsfr-doc-edit.scss +34 -0
  45. package/src/style/main/components/_dsfr-doc-tab-navigation.scss +3 -3
  46. package/src/style/main/components/_dsfr-doc-version.scss +4 -3
  47. package/src/style/main/components/_index.scss +1 -0
  48. package/src/style/main/utility/_global.scss +64 -0
  49. package/src/style/main/utility/_index.scss +1 -0
  50. package/src/template/templates/editorial-template.js +8 -2
  51. package/src/template/templates/search-template.js +1 -1
@@ -436,9 +436,9 @@ export var tarteaucitron = {
436
436
  </button>
437
437
  </div>
438
438
  <div class="fr-modal__content">
439
- <h3 class="fr-modal__title fr-h3" id="fr-consent-modal-title">
439
+ <h2 class="fr-modal__title fr-h3" id="fr-consent-modal-title">
440
440
  ${tarteaucitron.lang.title}
441
- </h3>
441
+ </h2>
442
442
  <div class="fr-consent-manager">
443
443
  <div class="fr-consent-service fr-consent-manager__header">
444
444
  <fieldset class="fr-fieldset fr-fieldset--inline">
@@ -447,7 +447,7 @@ export var tarteaucitron = {
447
447
  tarteaucitron
448
448
  .lang
449
449
  .disclaimer
450
- ? `<p class="fr-mb-0">${tarteaucitron.lang.disclaimer}</p>`
450
+ ? `${tarteaucitron.lang.disclaimer} `
451
451
  : ''
452
452
  }
453
453
  ${
@@ -455,7 +455,7 @@ export var tarteaucitron = {
455
455
  .parameters
456
456
  .privacyUrl !==
457
457
  ''
458
- ? `<a class="fr-link" id="tarteaucitronPrivacyUrlDialog" href="${tarteaucitron.parameters.privacyUrl}" title="${tarteaucitron.lang.privacyUrl} (${tarteaucitron.lang.newWindow})">${tarteaucitron.lang.privacyUrl}</a>`
458
+ ? `<a class="fr-link" id="tarteaucitronPrivacyUrlDialog" href="${tarteaucitron.parameters.privacyUrl}" title="${tarteaucitron.lang.privacyUrl}">${tarteaucitron.lang.privacyUrl}</a>`
459
459
  : ''
460
460
  }
461
461
  ${
@@ -666,14 +666,14 @@ export var tarteaucitron = {
666
666
  !tarteaucitron.parameters.AcceptAllCta
667
667
  ) {
668
668
  html += `<div tabindex="-1" id="tarteaucitronAlertBig" class="fr-consent-banner" ${modalAttrs}>`;
669
- html += `<h3 class="fr-h6">${tarteaucitron.lang.alertBigPrivacy.title}</h3>`;
669
+ html += `<h2 class="fr-h6">${tarteaucitron.lang.alertBigPrivacy.title}</h2>`;
670
670
  html += `<div id="tarteaucitronDisclaimerAlert" class="fr-consent-banner__content"><p class="fr-text--sm">${tarteaucitron.lang.alertBigPrivacy.content}</p></div>`;
671
671
  html += `<ul class="fr-consent-banner__buttons fr-btns-group fr-btns-group--right fr-btns-group--inline-reverse fr-btns-group--inline-sm">`;
672
672
  html += `<li><button class="fr-btn fr-btn--secondary" data-fr-opened="false" aria-controls="consent-modal" aria-label="${tarteaucitron.lang.personalize} ${tarteaucitron.lang.modalWindow}" title="${tarteaucitron.lang.personalize} ${tarteaucitron.lang.modalWindow}" type="button" id="tarteaucitronPersonalize">${tarteaucitron.lang.personalize}</button></li>`;
673
673
  html += '</ul></div>';
674
674
  } else {
675
675
  html += `<div tabindex="-1" id="tarteaucitronAlertBig" class="fr-consent-banner" ${modalAttrs}>`;
676
- html += `<h3 class="fr-h6">${tarteaucitron.lang.alertBigPrivacy.title}</h3>`;
676
+ html += `<h2 class="fr-h6">${tarteaucitron.lang.alertBigPrivacy.title}</h2>`;
677
677
  html += `<div id="tarteaucitronDisclaimerAlert" class="fr-consent-banner__content"><p class="fr-text--sm">${
678
678
  tarteaucitron.parameters.highPrivacy
679
679
  ? tarteaucitron.lang.alertBigPrivacy.content
@@ -925,7 +925,7 @@ export var tarteaucitron = {
925
925
  // The setimeout at 1500 ms will prevent the location.reload event to be properly binded...
926
926
  if (tarteaucitronNoAdBlocker === false) {
927
927
  html = `<div id="tarteaucitronAlertBig" class="fr-consent-banner tarteaucitronAlertBig tarteaucitron-display-block" role="alert" aria-live="polite">`;
928
- html += `<h3 class="fr-h6">${tarteaucitron.lang.adblock}</h3>`;
928
+ html += `<h2 class="fr-h6">${tarteaucitron.lang.adblock}</h2>`;
929
929
  html += `<div id="tarteaucitronDisclaimerAlert" class="fr-consent-banner__content"><p class="fr-text--sm">${tarteaucitron.lang.adblock_call}</p></div>`;
930
930
  html += `<ul class="fr-consent-banner__buttons fr-btns-group fr-btns-group--right fr-btns-group--inline-reverse fr-btns-group--inline-sm">`;
931
931
  html += `<li><button class="fr-btn tarteaucitronCTAButton" aria-label="${tarteaucitron.lang.reload}" title="${tarteaucitron.lang.reload}" type="button" id="tarteaucitronCTAButton">${tarteaucitron.lang.reload}</button></li>`;
@@ -1,131 +1,107 @@
1
- import {
2
- PaginationItem,
3
- PaginationItemTypes,
4
- PaginationItemPositions,
5
- } from './pagination-item.js';
1
+ import { PaginationItem, PaginationItemTypes, PaginationItemPositions } from './pagination-item.js';
6
2
  import { getCurrentPagination } from '../../core/get-query.js';
7
3
 
8
4
  class PaginationList {
9
- constructor(pagesNumber) {
10
- this._currentPage = getCurrentPagination() || 1;
11
- this._totalPages = pagesNumber;
12
- this._items = [];
13
- this.init();
14
- }
5
+ constructor (pagesNumber) {
6
+ this._currentPage = getCurrentPagination() || 1;
7
+ this._totalPages = pagesNumber;
8
+ this._items = [];
9
+ this.init();
10
+ }
15
11
 
16
- getPosition() {
17
- switch (true) {
18
- case this._currentPage === 1:
19
- return PaginationItemPositions.FIRST;
20
- case this._currentPage === this._totalPages:
21
- return PaginationItemPositions.LAST;
22
- default:
23
- return null;
24
- }
12
+ getPosition () {
13
+ switch (true) {
14
+ case this._currentPage === 1:
15
+ return PaginationItemPositions.FIRST;
16
+ case this._currentPage === this._totalPages:
17
+ return PaginationItemPositions.LAST;
18
+ default:
19
+ return null;
25
20
  }
21
+ }
26
22
 
27
- init() {
28
- const position = this.getPosition();
29
- this._items.push(
30
- new PaginationItem(
31
- PaginationItemTypes.FIRST,
32
- 1,
33
- this._currentPage === 1,
34
- position
35
- )
36
- );
37
- this._items.push(
38
- new PaginationItem(
39
- PaginationItemTypes.PREV,
40
- Math.max(this._currentPage - 1, 1),
41
- this._currentPage === 1,
42
- position
43
- )
44
- );
23
+ init () {
24
+ this.setPageTitle();
45
25
 
46
- const pages =
47
- this._totalPages <= 5 ? this.getAllPages() : this.getDynamicPages();
26
+ const position = this.getPosition();
27
+ this._items.push(new PaginationItem(PaginationItemTypes.FIRST, 1, this._currentPage === 1, position));
28
+ this._items.push(new PaginationItem(PaginationItemTypes.PREV, Math.max(this._currentPage - 1, 1), this._currentPage === 1, position));
48
29
 
49
- for (const page of pages) {
50
- this._items.push(
51
- new PaginationItem(
52
- page.type,
53
- page.index,
54
- this._currentPage === page.index
55
- )
56
- );
57
- }
30
+ const pages = this._totalPages <= 5 ? this.getAllPages() : this.getDynamicPages();
58
31
 
59
- this._items.push(
60
- new PaginationItem(
61
- PaginationItemTypes.NEXT,
62
- Math.min(this._currentPage + 1, this._totalPages),
63
- this._currentPage === this._totalPages,
64
- position
65
- )
66
- );
67
- this._items.push(
68
- new PaginationItem(
69
- PaginationItemTypes.LAST,
70
- this._totalPages,
71
- this._currentPage === this._totalPages,
72
- position
73
- )
74
- );
32
+ for (const page of pages) {
33
+ this._items.push(new PaginationItem(page.type, page.index, this._currentPage === page.index));
75
34
  }
76
35
 
77
- getAllPages() {
78
- return [
79
- ...Array.from({ length: this._totalPages }, (_, i) => ({
80
- type: PaginationItemTypes.PAGE,
81
- index: i + 1,
82
- })),
83
- ];
84
- }
36
+ this._items.push(
37
+ new PaginationItem(
38
+ PaginationItemTypes.NEXT,
39
+ Math.min(this._currentPage + 1, this._totalPages),
40
+ this._currentPage === this._totalPages,
41
+ position
42
+ )
43
+ );
44
+ this._items.push(new PaginationItem(PaginationItemTypes.LAST, this._totalPages, this._currentPage === this._totalPages, position));
45
+ }
85
46
 
86
- getDynamicPages() {
87
- const ellipsis = { type: PaginationItemTypes.ELLIPSIS };
88
- if (this._currentPage <= 3) {
89
- return [
90
- ...Array.from({ length: 3 }, (_, i) => ({
91
- type: PaginationItemTypes.PAGE,
92
- index: i + 1,
93
- })),
94
- ellipsis,
95
- { type: PaginationItemTypes.PAGE, index: this._totalPages },
96
- ];
97
- } else if (this._currentPage >= this._totalPages - 2) {
98
- return [
99
- { type: PaginationItemTypes.PAGE, index: 1 },
100
- ellipsis,
101
- { type: PaginationItemTypes.PAGE, index: this._totalPages - 2 },
102
- { type: PaginationItemTypes.PAGE, index: this._totalPages - 1 },
103
- { type: PaginationItemTypes.PAGE, index: this._totalPages },
104
- ];
105
- } else {
106
- return [
107
- { type: PaginationItemTypes.PAGE, index: 1 },
108
- ellipsis,
109
- {
110
- type: PaginationItemTypes.PAGE,
111
- index: this._currentPage - 1,
112
- },
113
- { type: PaginationItemTypes.PAGE, index: this._currentPage },
114
- {
115
- type: PaginationItemTypes.PAGE,
116
- index: this._currentPage + 1,
117
- },
118
- ellipsis,
119
- { type: PaginationItemTypes.PAGE, index: this._totalPages },
120
- ];
121
- }
47
+ getAllPages () {
48
+ return [
49
+ ...Array.from({ length: this._totalPages }, (_, i) => ({
50
+ type: PaginationItemTypes.PAGE,
51
+ index: i + 1,
52
+ })),
53
+ ];
54
+ }
55
+
56
+ getDynamicPages () {
57
+ const ellipsis = { type: PaginationItemTypes.ELLIPSIS };
58
+ if (this._currentPage <= 3) {
59
+ return [
60
+ ...Array.from({ length: 3 }, (_, i) => ({
61
+ type: PaginationItemTypes.PAGE,
62
+ index: i + 1,
63
+ })),
64
+ ellipsis,
65
+ { type: PaginationItemTypes.PAGE, index: this._totalPages },
66
+ ];
67
+ } else if (this._currentPage >= this._totalPages - 2) {
68
+ return [
69
+ { type: PaginationItemTypes.PAGE, index: 1 },
70
+ ellipsis,
71
+ { type: PaginationItemTypes.PAGE, index: this._totalPages - 2 },
72
+ { type: PaginationItemTypes.PAGE, index: this._totalPages - 1 },
73
+ { type: PaginationItemTypes.PAGE, index: this._totalPages },
74
+ ];
75
+ } else {
76
+ return [
77
+ { type: PaginationItemTypes.PAGE, index: 1 },
78
+ ellipsis,
79
+ {
80
+ type: PaginationItemTypes.PAGE,
81
+ index: this._currentPage - 1,
82
+ },
83
+ { type: PaginationItemTypes.PAGE, index: this._currentPage },
84
+ {
85
+ type: PaginationItemTypes.PAGE,
86
+ index: this._currentPage + 1,
87
+ },
88
+ ellipsis,
89
+ { type: PaginationItemTypes.PAGE, index: this._totalPages },
90
+ ];
122
91
  }
92
+ }
123
93
 
124
- render() {
125
- return `<ul class="fr-pagination__list">
126
- ${this._items.map((item) => item.render()).join('')}
127
- </ul>`;
94
+ setPageTitle () {
95
+ if (this._totalPages > 0) {
96
+ document.title = `${document.title} - ${window.resource.pagination.page} ${this._currentPage} ${window.resource.pagination.on} ${this._totalPages}`;
128
97
  }
98
+ }
99
+
100
+ render () {
101
+ return `<ul class="fr-pagination__list">
102
+ ${this._items.map(item => item.render()).join('')}
103
+ </ul>`;
104
+ }
129
105
  }
130
106
 
131
107
  export { PaginationList };
@@ -7,17 +7,21 @@ class SearchBar extends Element {
7
7
  this._searchInput = this.element.querySelector('#search-input');
8
8
  this._searchButton = this.element.querySelector('#search-button');
9
9
  this._query = this._searchInput.value;
10
+ this._url = this._searchButton.getAttribute('data-href');
10
11
  }
11
12
 
12
13
  async init () {
13
- this._url = this._searchButton.getAttribute('data-href');
14
-
15
14
  this._resultsDropdown = new ResultsDropdown(this._url);
16
- this.element.appendChild(this._resultsDropdown.element);
15
+ this._searchInput.after(this._resultsDropdown.element);
17
16
  await this._resultsDropdown.init();
18
17
 
19
18
  document.addEventListener('click', this.handleDocumentClick.bind(this));
20
19
 
20
+ this._searchButton.addEventListener(
21
+ 'click',
22
+ this.handleButtonClick.bind(this)
23
+ );
24
+
21
25
  this._searchInput.addEventListener(
22
26
  'focus',
23
27
  this.handleInputFocus.bind(this)
@@ -37,10 +41,14 @@ class SearchBar extends Element {
37
41
 
38
42
  update (query) {
39
43
  this._query = query;
40
- this._searchButton.setAttribute('href', `${this._url}?query=${query}`);
41
44
  this._resultsDropdown.update(query);
42
45
  }
43
46
 
47
+ handleButtonClick (event) {
48
+ event.preventDefault();
49
+ document.location.href = `${this._url}?query=${this._query}`;
50
+ }
51
+
44
52
  handleDocumentClick (event) {
45
53
  const outsideClick = !this.element.contains(event.target);
46
54
  if (outsideClick) {
@@ -50,7 +58,9 @@ class SearchBar extends Element {
50
58
 
51
59
  handleKeyup (event) {
52
60
  if (event.key === 'Enter') {
53
- document.location.href = this._searchButton.getAttribute('href');
61
+ this.handleButtonClick(event);
62
+ } else if (event.key === 'Escape') {
63
+ this._resultsDropdown.reset();
54
64
  } else {
55
65
  this.update(event.target.value);
56
66
  }
@@ -13,7 +13,7 @@ class ResultsButton {
13
13
  }
14
14
 
15
15
  render () {
16
- return `<a class="fr-btn fr-btn--secondary fr-mt-2v" href="${this._url}?query=${this._query}" id="search-button">${window.resource?.search?.results?.button}</a>`;
16
+ return `<button id="results-dropdown-button" class="fr-btn fr-btn--secondary fr-mt-2v" onclick="document.location.href='${this._url}?query=${this._query}';">${window.resource?.search?.results?.button}</button>`;
17
17
  }
18
18
  }
19
19
 
@@ -7,6 +7,7 @@ class ResultsDropdown extends Element {
7
7
  constructor(url) {
8
8
  const element = document.createElement('div');
9
9
  element.classList.add('dsfr-doc-search-results--dropdown');
10
+ element.setAttribute('aria-live', 'polite');
10
11
  super(element);
11
12
 
12
13
  this._button = new ResultsButton(url);
@@ -6,7 +6,6 @@ class Storybook extends Element {
6
6
  }
7
7
 
8
8
  init() {
9
- this.isResized = false;
10
9
  this.setIframeTheme();
11
10
  this.listenChangeDisplay();
12
11
  window.addEventListener('message', this.handleMessage.bind(this));
@@ -18,10 +17,8 @@ class Storybook extends Element {
18
17
 
19
18
  if (eventType === 'storyRendered') {
20
19
  this._iframeDoc = this.iframe.contentDocument;
21
- if (!this._iframeDoc || this.isResized) return;
22
-
20
+ if (!this._iframeDoc) return;
23
21
  this.resize();
24
- this.isResized = true;
25
22
  }
26
23
  }
27
24
 
@@ -28,6 +28,7 @@ class SearchPage extends Element {
28
28
  const resultsList = new ResultsList(results, RESULTS_PER_PAGES);
29
29
 
30
30
  this._resultsCount.innerHTML = count.render();
31
+ document.title = `${document.title} - ${count.render()}`;
31
32
 
32
33
  this._container.appendChild(resultsList.element);
33
34
  resultsList.init();
@@ -1,31 +1,19 @@
1
1
  .dsfr-doc-hp-community {
2
2
  padding: 2rem 0 3.25rem;
3
3
 
4
- &__container {
5
- display: flex;
6
- flex-direction: column;
7
- align-items: flex-start;
8
- }
9
-
10
- &__img {
11
- margin-bottom: 2rem;
12
- width: 100%;
13
-
4
+ &[dsfr-doc-in-view='true'] {
14
5
  img,
15
6
  svg {
16
- display: flex;
17
- border: 1px solid var(--border-default-grey);
18
-
19
7
  #cursor-1 {
20
- animation: cursor1 3.2s ease-out infinite;
8
+ animation: cursor1 3.2s ease-out 1;
21
9
  }
22
10
 
23
11
  #cursor-2 {
24
- animation: cursor2 3.2s ease-out infinite;
12
+ animation: cursor2 3.2s ease-out 1;
25
13
  }
26
14
 
27
15
  #cursor-3 {
28
- animation: cursor3 3.2s ease-out infinite;
16
+ animation: cursor3 3.2s ease-out 1;
29
17
  }
30
18
 
31
19
  @media (prefers-reduced-motion: reduce) {
@@ -36,6 +24,23 @@
36
24
  }
37
25
  }
38
26
  }
27
+ }
28
+
29
+ &__container {
30
+ display: flex;
31
+ flex-direction: column;
32
+ align-items: flex-start;
33
+ }
34
+
35
+ &__img {
36
+ margin-bottom: 2rem;
37
+ width: 100%;
38
+
39
+ img,
40
+ svg {
41
+ display: flex;
42
+ border: 1px solid var(--border-default-grey);
43
+ }
39
44
 
40
45
  &--dark {
41
46
  display: none;
@@ -174,7 +179,6 @@
174
179
  }
175
180
  }
176
181
 
177
-
178
182
  @keyframes cursor3 {
179
183
  0% {
180
184
  transform: translate(50, 106);
@@ -211,7 +215,6 @@
211
215
  }
212
216
  }
213
217
 
214
-
215
218
  [data-fr-theme='dark'] {
216
219
  .dsfr-doc-hp-community .dsfr-doc-hp-community__img--dark {
217
220
  display: block;
@@ -220,4 +223,4 @@
220
223
  .dsfr-doc-hp-community .dsfr-doc-hp-community__img--light {
221
224
  display: none;
222
225
  }
223
- }
226
+ }
@@ -12,6 +12,8 @@
12
12
  gap: 2.5rem;
13
13
  flex-wrap: wrap;
14
14
  margin: 4rem 0;
15
+ list-style: none;
16
+ padding: 0;
15
17
  }
16
18
 
17
19
  &__link {
@@ -23,6 +25,7 @@
23
25
 
24
26
  &-card {
25
27
  width: 100%;
28
+ padding: 0;
26
29
 
27
30
  &__img {
28
31
  display: flex;
@@ -1,9 +1,10 @@
1
1
  .code-snippet {
2
2
  position: relative;
3
+ margin-top: 2.5rem;
3
4
 
4
5
  &--copy {
5
6
  position: absolute;
6
- bottom: 0.5rem;
7
- right: 0.5rem;
7
+ top: calc(1px - 2rem);
8
+ right: 0;
8
9
  }
9
10
  }
@@ -0,0 +1,34 @@
1
+ .dsfr-doc-edit {
2
+ margin-top: 2rem;
3
+ margin-bottom: 3rem;
4
+ margin-right: -1rem;
5
+ margin-left: -1rem;
6
+ padding: 2rem 1.5rem 1.25rem 3.375rem;
7
+ position: relative;
8
+
9
+ &::before {
10
+ --icon-size: 1.125rem;
11
+ position: absolute;
12
+ top: 2.25rem;
13
+ left: 1.5rem;
14
+ }
15
+
16
+ &__title,
17
+ &__description,
18
+ &__link {
19
+ margin-bottom: 0.75rem;
20
+ }
21
+
22
+ @media (min-width: 36em) {
23
+ margin-right: 0;
24
+ margin-left: 0;
25
+ padding: 2.5rem 2rem 1.75rem 3.875rem;
26
+
27
+ &::before {
28
+ --icon-size: 1.25rem;
29
+ top: 2.75rem;
30
+ left: 2rem;
31
+ }
32
+ }
33
+ }
34
+
@@ -30,7 +30,7 @@
30
30
  background-size: 100% 1px;
31
31
  background-position: 0 100%;
32
32
 
33
- &[aria-selected='true'] {
33
+ &[aria-current='page'] {
34
34
  display: none;
35
35
  color: var(--text-active-blue-france);
36
36
  }
@@ -71,7 +71,7 @@
71
71
  background-size: 100% 2px;
72
72
  background-position: 0 100%;
73
73
 
74
- &:hover:not([aria-selected='true']) {
74
+ &:hover:not([aria-current='page']) {
75
75
  background-color: var(
76
76
  --background-default-grey-hover
77
77
  ) !important;
@@ -84,7 +84,7 @@
84
84
  background-position: 0 100%;
85
85
  }
86
86
 
87
- &[aria-selected='true'] {
87
+ &[aria-current='page'] {
88
88
  display: block;
89
89
  background-image: linear-gradient(
90
90
  0deg,
@@ -68,9 +68,10 @@
68
68
  white-space: nowrap;
69
69
  }
70
70
 
71
- .dsfr-doc-version__version[aria-current]:not([aria-current=false]) {
72
- display: none;
73
- }
71
+ // Hide the current version in the mobile menu while there is only one version available
72
+ // .dsfr-doc-version__version[aria-current]:not([aria-current=false]) {
73
+ // display: none;
74
+ // }
74
75
 
75
76
  .dsfr-doc-version__menu {
76
77
  margin: 0;
@@ -6,3 +6,4 @@
6
6
  @use 'dsfr-doc-anatomy';
7
7
  @use 'dsfr-doc-searchbar';
8
8
  @use 'dsfr-doc-pagination';
9
+ @use 'dsfr-doc-edit';
@@ -0,0 +1,64 @@
1
+ :root {
2
+ --block-spacing: 1.5rem;
3
+ }
4
+
5
+ .fr-container {
6
+ img {
7
+ max-width: 100%;
8
+ height: auto;
9
+ }
10
+
11
+ dl,
12
+ ol,
13
+ ul {
14
+ margin-block-end: var(--block-spacing);
15
+
16
+ dl,
17
+ ol,
18
+ ul {
19
+ margin-block-end: var(--xl-block);
20
+ }
21
+ }
22
+
23
+ :not(.fr-callout) > p {
24
+ & + {
25
+ dl,
26
+ ol,
27
+ ul {
28
+ margin-top: -1rem;
29
+ }
30
+ }
31
+ }
32
+
33
+ .fr-accordion {
34
+ margin-bottom: var(--block-spacing);
35
+
36
+ & + .fr-accordion {
37
+ margin-top: calc(var(--block-spacing) * -1);
38
+ }
39
+ }
40
+
41
+ // .fr-sr-only attributes
42
+ .fr-sidemenu {
43
+ &__title {
44
+ clip: rect(0, 0, 0, 0);
45
+ height: 1px;
46
+ margin: -1px;
47
+ overflow: hidden;
48
+ padding: 0;
49
+ position: absolute;
50
+ white-space: nowrap;
51
+ width: 1px;
52
+ border: 0;
53
+ display: block;
54
+ }
55
+ }
56
+
57
+ pre code.hljs {
58
+ border-radius: 0;
59
+ }
60
+ }
61
+
62
+ .fr-footer {
63
+ margin-top: var(--block-spacing);
64
+ }
@@ -1,3 +1,4 @@
1
+ @use 'global';
1
2
  @use 'font';
2
3
  @use 'dsfr-doc-code';
3
4
  @use 'icon';