Skip to content

Commit

Permalink
Date modified: Adding date modified site functionality documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Garneauma committed Nov 2, 2023
1 parent d4086bb commit 73b72d2
Show file tree
Hide file tree
Showing 9 changed files with 214 additions and 59 deletions.
1 change: 1 addition & 0 deletions _data/design-patterns.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
96 changes: 65 additions & 31 deletions _data/sites.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _data/wet-boew.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@
]
}
}
]
]
53 changes: 53 additions & 0 deletions sites/date-modified/date-modified-en.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
{
"altLangPage": "date-modified-fr.html",
"breadcrumbs": [
{ "title": "GCWeb home", "link": "https://wet-boew.github.io/GCWeb/index-en.html" }
],
"dateModified": "2023-11-02",
"description": "Documentation on how to use the date modified.",
"language": "en",
"title": "Date modified"
}
---
<div class="wb-prettify all-pre hide"></div>

<dl class="horizontal">
<dt>Status</dt>
<dd>Stable</dd>
<dt>Version</dt>
<dd>1.0.0</dd>
<dt>Type</dt>
<dd>Canada.ca site functionality</dd>
</dl>

<h2>Introduction</h2>

<h3>Purpose</h3>
<p>Use the date modified component to provide a person with the date that the content was last updated.</p>

<h3>Evaluation and report</h3>
<p>There is no evaluation and report available for this component.</p>

<h3>Guidance</h3>
<ul>
<li><a href="https://design.canada.ca/common-design-patterns/date-modified.html">Date modified</a></li>
</ul>

<h3>Variants</h3>
<p>This component supports only 1 variant:</p>
<ul>
<li><a href="#variantDefault">Date modified (default)</a></li>
</ul>

<h2 id="variantDefault">Date modified (default)</h2>

<h3>Iteration 1</h3>
<p>Code:</p>
<pre><code>&lt;dl id="wb-dtmd">
&lt;dt>Date modified:&lt;/dt>
&lt;dd>&lt;time property="dateModified">YYYY-MM-DD&lt;/time>&lt;/dd>
&lt;/dl></code></pre>

<h4>Working example(s)</h4>
<p>Refer to the date modified at the bottom of this page.</p>
55 changes: 55 additions & 0 deletions sites/date-modified/date-modified-fr.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
{
"altLangPage": "date-modified-en.html",
"breadcrumbs": [
{ "title": "GCWeb accueil", "link": "https://wet-boew.github.io/GCWeb/index-fr.html" },
{ "title": "Méli-mélo", "link": "https://wet-boew.github.io/GCWeb/méli-mélo/méli-mélo-fr.html" }

],
"dateModified": "2023-11-02",
"description": "Documentation sur l'utilisation de la date de modification.",
"language": "fr",
"title": "Date de modification"
}
---
<div class="wb-prettify all-pre hide"></div>

<dl class="horizontal">
<dt>Statut</dt>
<dd>Stable</dd>
<dt>Version</dt>
<dd>1.0.0</dd>
<dt>Type</dt>
<dd>Fonctionnalité globale de site de Canada.ca</dd>
</dl>

<h2>Introduction</h2>

<h3>Objectif</h3>
<p>Utilisez la composante « Date de modification » pour fournir à aux gens la date où le contenu a été mis à jour en dernier.</p>

<h3>Évaluation et rapport</h3>
<p>Il n'y a pas d'évaluation ni de rapport disponible pour cette composante.</p>

<h3>Orientation</h3>
<ul>
<li><a href="https://conception.canada.ca/configurations-conception-communes/date-modification.html">Date de modification</a></li>
</ul>

<h3>Variantes</h3>
<p>Ce composant prend en charge 1 variante:</p>
<ul>
<li><a href="#variantDefault">Date de modification (par défaut)</a></li>
</ul>

<h2 id="variantDefault">Date de modification (par défaut)</h2>

<h3>Itération 1</h3>
<p>Code:</p>
<pre><code>&lt;dl id="wb-dtmd">
&lt;dt>Date de modification&nbsp;:&lt;/dt>
&lt;dd>&lt;time property="dateModified">AAAA-MM-JJ&lt;/time>&lt;/dd>
&lt;/dl></code></pre>

<h4>Exemple(s) pratique(s)</h4>
<p>Veuillez vous référer à la date de modification au bas de cette page.</p>
4 changes: 4 additions & 0 deletions sites/date-modified/includes/date-modified.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<dl id="wb-dtmd">
<dt>{{ i18nText-dateModified }}</dt>
<dd><time property="dateModified">{{ page.dateModified }}</time></dd>
</dl>
34 changes: 34 additions & 0 deletions sites/date-modified/index.json-ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"@context": {
"@version": 1.1,
"dct": "http://purl.org/dc/terms/",
"title": { "@id": "dct:title", "@container": "@language" },
"description": { "@id": "dct:description", "@container": "@language" },
"modified": "dct:modified"
},
"title": {
"en": "Date modified",
"fr": "Date de modification"
},
"description": {
"en": "Indicates the date on which the current page was last modified.",
"fr": "Indique la date à laquelle la page courante a été modifiée pour la dernière fois."
},
"modified": "2023-11-02",
"componentName": "date-modified",
"status": "stable",
"pages": {
"docs": [
{
"title": "Date modified",
"language": "en",
"path": "date-modified-en.html"
},
{
"title": "Date de modification",
"language": "fr",
"path": "date-modified-fr.html"
}
]
}
}
23 changes: 0 additions & 23 deletions sites/page-details/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,6 @@ main {
padding-bottom: 2em;
padding-top: 2em;

// Needed for backwards compatibility with GCWeb 4.0.26 and below's HTML markup. Remove in GCWeb 4.1+.
&.row {
details {
margin: {
bottom: .25em;
left: 1.1em;
right: 1.1em;
}
}
}

// Add a top margin to the report a problem link/summary.
.row {
div {
Expand All @@ -64,18 +53,6 @@ main {
}
}

// Needed for backwards compatibility with GCWeb 4.0.26 and below's HTML markup. Remove in GCWeb 4.1+.
.datemod {
padding: {
bottom: 7px;
top: 7px;
}

#wb-dtmd {
margin-top: 0;
}
}

details {
margin-bottom: 0;

Expand Down
5 changes: 1 addition & 4 deletions sites/page-details/includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ <h2 class="wb-inv">{{ i18nText-pageDetails }}</h2>
{%- endif -%}

<div class="{{ col-modified }}">
<dl id="wb-dtmd">
<dt>{{ i18nText-dateModified }}</dt>
<dd><time property="dateModified">{{ page.dateModified }}</time></dd>
</dl>
{%- include date-modified/date-modified.html -%}
</div>
</div>
</section>

0 comments on commit 73b72d2

Please sign in to comment.