Skip to content

Commit

Permalink
🐛 fix(footer): title des liens obligatoires du footer [DS-3760, DS-37…
Browse files Browse the repository at this point in the history
…89] (#905)

- remplace l'intitulé par défaut "[A modifier]" de l'attribut title par l'intitulé officiel sur les liens obligatoires du footer.
- change l'ordre des liens, et gouvernement.fr devient info.gouv.fr
  • Loading branch information
keryanS authored May 29, 2024
1 parent 5626b7a commit 568afce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/component/footer/example/sample/footer.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ if (footer.brand === true) {
if (footer.content === true) data.content = {
desc: lorem('', 240),
links: [
{label: 'legifrance.gouv.fr'},
{label: 'gouvernement.fr'},
{label: 'info.gouv.fr'},
{label: 'service-public.fr'},
{label: 'legifrance.gouv.fr'},
{label: 'data.gouv.fr'}
]
};
Expand Down Expand Up @@ -50,7 +50,7 @@ if (footer.bottom === true) data.bottom = {
{label: 'Données personnelles', url: footer.href},
{label: 'Gestion des cookies', url: footer.href}
],
copyright: `Sauf mention explicite de propriété intellectuelle détenue par des tiers, les contenus de ce site sont proposés sous <a href="https://github.com/etalab/licence-ouverte/blob/master/LO.md" ${includeAttrs(targetBlankData())}>licence etalab-2.0</a>`
copyright: `Sauf mention explicite de propriété intellectuelle détenue par des tiers, les contenus de ce site sont proposés sous <a href="https://github.com/etalab/licence-ouverte/blob/master/LO.md" ${includeAttrs(targetBlankData('Licence etalab'))}>licence etalab-2.0</a>`
};
%>

Expand Down
2 changes: 1 addition & 1 deletion src/component/footer/template/ejs/content.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
attributes.id = uniqueId('footer__content-link');
%>
<li class="<%= prefix %>-footer__content-item">
<a <%- includeAttrs({...targetBlankData(), ...attributes}) %> class="<%= prefix %>-footer__content-link" href="https://<%= links[i].label %>"><%= links[i].label %></a>
<a <%- includeAttrs({...targetBlankData(links[i].label), ...attributes}) %> class="<%= prefix %>-footer__content-link" href="https://<%= links[i].label %>"><%= links[i].label %></a>
</li>
<% } %>
</ul>
Expand Down
4 changes: 2 additions & 2 deletions tool/example/decorator.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,11 @@ const errorData = (error) => {
locals.errorData = errorData;
const targetBlankData = () => {
const targetBlankData = (title = contentPlaceholder('Intitulé')) => {
const attr = {};
attr.target = '_blank';
attr.rel = 'noopener external';
attr.title = `${contentPlaceholder('Intitulé')} - ${getText('blank')}`;
attr.title = `${title} - ${getText('blank')}`;
return attr;
}
Expand Down

0 comments on commit 568afce

Please sign in to comment.