Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topic template: content edits #2420

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 26 additions & 8 deletions _data/templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -1416,10 +1416,7 @@
"en": "Use the stacked main page title to display the page's section title as well as the page title.",
"fr": "Utilisez le titre de la page principale superposé pour afficher le titre de la section de la page ainsi que le titre de la page."
},
"guidance": {
"en": "https://design.canada.ca/mandatory-templates/theme-topic.html",
"fr": "https://conception.canada.ca/modeles-obligatoire/theme-sujet.html"
},
"guidance": "no guidance defined.",
"iteration": "_:iteration_topic_3",
"example": [
{
Expand All @@ -1429,7 +1426,7 @@
],
"implementation": [
"_:implement_topic_stackedheader",
"_:implement_topic_aem",
"_:implement_topic_stackedheader_aem",
"_:implement_topic_1_to_2"
],
"history": [
Expand Down Expand Up @@ -1474,9 +1471,8 @@
"fr": "Utilisateurs AEM"
},
"introduction": {
"en": "Use the stacked main page title to display the page's section title as well as the page title.",
"fr": "Utilisez le titre de la page principale superposé pour afficher le titre de la section de la page ainsi que le titre de la page."

"en": "This implementation is meant for publishers adding the template manually into an AEM page.",
"fr": "Cette implémentation est destinée aux éditeurs qui ajoutent le gabarit manuellement à une page d'AEM."
},
"instructions": {
"en": [
Expand Down Expand Up @@ -1532,6 +1528,28 @@
"en": "topic-stackedheader-en.html main > *:not(.pagedetails)",
"fr": "topic-stackedheader-fr.html main > *:not(.pagedetails)"
}
},
{
"@id": "_:implement_topic_stackedheader_aem",
"iteration": "_:iteration_topic_3",
"name": {
"en": "AEM users",
"fr": "Utilisateurs AEM"
},
"introduction": {
"en": "This implementation is meant for publishers adding the template manually into an AEM page.",
"fr": "Cette implémentation est destinée aux éditeurs qui ajoutent le gabarit manuellement à une page d'AEM."
},
"instructions": {
"en": [
"Use the stacked main page title to display the page's section title as well as the page title.",
"Please refer to the documentation on GCPedia."
],
"fr": [
"Utilisez le titre de la page principale superposé pour afficher le titre de la section de la page ainsi que le titre de la page.",
"Veuillez vous référer à la documentation dans GCPedia."
]
}
}
],
"iteration": [
Expand Down
4 changes: 2 additions & 2 deletions _includes/alert-softlaunch.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{%- if page.language == "fr" -%}
<section class="alert alert-info">
<h2>Prélancement</h2>
<p>{%- if include.genre == "f" -%}La composante{%- else -%}Le composant{%- endif %} <strong>{{ include.component }}</strong> sur cette page implémente la <em>version {{ include.version }}</em> qui a été prélancé{%- if include.genre == "f" -%}e{%- endif %} jusqu'à ce que les lignes directrices officielles soient publiées par le Bureau de la transformation numérique du SCT.</p>
<p>{%- if include.genre == "f" -%}La composante{%- else -%}Le composant{%- endif %} <strong>{{ include.component }}</strong> sur cette page implémente la <em>version {{ include.version }}</em> qui a été prélancé{%- if include.genre == "f" -%}e{%- endif %} jusqu'à ce que les lignes directrices officielles soient publiées par le Bureau de la transformation numérique du SNC.</p>
</section>
{%- elsif page.language == "en" -%}
<section class="alert alert-info">
<h2>Soft launch</h2>
<p>The <strong>{{ include.component }}</strong> component on this page implements the <em>version {{ include.version }}</em> which has been soft launched until the official guidance is published by the Digital Transformation Office at TBS.</p>
<p>The <strong>{{ include.component }}</strong> component on this page implements the <em>version {{ include.version }}</em> which has been soft launched until the official guidance is published by the Digital Transformation Office at CDS.</p>
</section>
{%- endif -%}
35 changes: 28 additions & 7 deletions sites/layouts/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,24 @@ <h2 id="variations">{% if lng == "fr" %}Variantes{% else %}Variations{% endif %}
"mapping": [
{ "selector": "[data-name]", "value": "/name/{{lng}}" },
{ "selector": "[data-description]", "value": "/description/{{lng}}", "isHTML": true },
{ "selector": "[data-guidance]", "value": "/guidance/{{lng}}", "attr": "href" },
{ "selector": "[data-iteration]", "value": "/revisedFor/name/{{lng}}" },

{
"template": "[data-guidance]",
"test": "fn:guessType",
"expect": "rdfs:Resource",
"assess": "/guidance",
"mapping": [
{
"selector": "p",
"value": "/guidance",
"mapping": [
{ "selector": "a", "value": "/{{lng}}", "attr": "href" }
]
}
]
},

{
"@type": "rdf:Alt",
"mapping": [
Expand Down Expand Up @@ -500,11 +515,14 @@ <h3>
</h3>

<p data-description>[[ Short description ]]</p>
{%- if lng == "fr" -%}
<p>Consultez les <a data-guidance href>guides de conception concernant cette variante</a>.</p>
{%- else -%}
<p>Consult the <a data-guidance href>design guidance about this variation</a>.</p>
{%- endif -%}

<template data-guidance>
{%- if lng == "fr" -%}
<p>Consultez les <a href>guides de conception concernant cette variante</a>.</p>
{%- else -%}
<p>Consult the <a href>design guidance about this variation</a>.</p>
{%- endif -%}
</template>

<!--
<p>TODO: Screen capture</p>
Expand Down Expand Up @@ -548,7 +566,10 @@ <h4>{% if lng == "fr" %}Implémentation{% else %}Implementation{% endif %}</h4>
</template>

<template data-ajax-source-code>
<pre><code data-wb-ajax='{ "encode": true }'></code></pre>
<details>
<summary>{% if lng == "fr" %}Exemple de code{% else %}Code sample{% endif %}</summary>
<pre><code data-wb-ajax='{ "encode": true }'></code></pre>
</details>
</template>

<template data-notes>
Expand Down
29 changes: 23 additions & 6 deletions sites/layouts/documentation_pattern.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,21 @@ <h2 id="variations">{% if lng == "fr" %}Variantes{% else %}Variations{% endif %}
"mapping": [
{ "selector": "[data-name]", "value": "/name/{{lng}}" },
{ "selector": "[data-description]", "value": "/description/{{lng}}", "isHTML": true },
{ "selector": "[data-guidance]", "value": "/guidance/{{lng}}", "attr": "href" },

{
"template": "[data-guidance]",
"test": "fn:guessType",
"assess": "/guidance",
"mapping": [
{
"selector": "p",
"value": "/guidance",
"mapping": [
{ "selector": "a", "value": "/{{lng}}", "attr": "href" }
]
}
]
},

{
"template": "[data-variation-example]",
Expand Down Expand Up @@ -430,11 +444,14 @@ <h2 id="variations">{% if lng == "fr" %}Variantes{% else %}Variations{% endif %}
<h3><span data-name>[[ Name of the variation ]]</span></h3>

<p data-description>[[ Short description ]]</p>
{%- if lng == "fr" -%}
<p>Consultez les <a data-guidance href>guides de conception concernant cette variante</a>.</p>
{%- else -%}
<p>Consult the <a data-guidance href>design guidance about this variation</a>.</p>
{%- endif -%}

<template data-guidance>
{%- if lng == "fr" -%}
<p>Consultez les <a data-guidance href>guides de conception concernant cette variante</a>.</p>
{%- else -%}
<p>Consult the <a data-guidance href>design guidance about this variation</a>.</p>
{%- endif -%}
</template>

<!--
<p>TODO: Screen capture</p>
Expand Down
34 changes: 26 additions & 8 deletions templates/topic/index.json-ld
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,7 @@
"en": "Use the stacked main page title to display the page's section title as well as the page title.",
"fr": "Utilisez le titre de la page principale superposé pour afficher le titre de la section de la page ainsi que le titre de la page."
},
"guidance": {
"en": "https://design.canada.ca/mandatory-templates/theme-topic.html",
"fr": "https://conception.canada.ca/modeles-obligatoire/theme-sujet.html"
},
"guidance": "no guidance defined.",
"iteration": "_:iteration_topic_3",
"example": [
{
Expand All @@ -158,7 +155,7 @@
],
"implementation": [
"_:implement_topic_stackedheader",
"_:implement_topic_aem",
"_:implement_topic_stackedheader_aem",
"_:implement_topic_1_to_2"
],
"history": [
Expand Down Expand Up @@ -203,9 +200,8 @@
"fr": "Utilisateurs AEM"
},
"introduction": {
"en": "Use the stacked main page title to display the page's section title as well as the page title.",
"fr": "Utilisez le titre de la page principale superposé pour afficher le titre de la section de la page ainsi que le titre de la page."

"en": "This implementation is meant for publishers adding the template manually into an AEM page.",
"fr": "Cette implémentation est destinée aux éditeurs qui ajoutent le gabarit manuellement à une page d'AEM."
},
"instructions": {
"en": [
Expand Down Expand Up @@ -261,6 +257,28 @@
"en": "topic-stackedheader-en.html main > *:not(.pagedetails)",
"fr": "topic-stackedheader-fr.html main > *:not(.pagedetails)"
}
},
{
"@id": "_:implement_topic_stackedheader_aem",
"iteration": "_:iteration_topic_3",
"name": {
"en": "AEM users",
"fr": "Utilisateurs AEM"
},
"introduction": {
"en": "This implementation is meant for publishers adding the template manually into an AEM page.",
"fr": "Cette implémentation est destinée aux éditeurs qui ajoutent le gabarit manuellement à une page d'AEM."
},
"instructions": {
"en": [
"Use the stacked main page title to display the page's section title as well as the page title.",
"Please refer to the documentation on GCPedia."
],
"fr": [
"Utilisez le titre de la page principale superposé pour afficher le titre de la section de la page ainsi que le titre de la page.",
"Veuillez vous référer à la documentation dans GCPedia."
]
}
}
],
"iteration": [
Expand Down
Loading