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

Byline: adding documentation, moving to main title #2452

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
184 changes: 184 additions & 0 deletions _data/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,190 @@
}
]
}
,{
"@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": "Institutional byline",
"fr": "Institution responsable"
},
"description": {
"en": "The institutional byline provides people with a link to the institution or institutions responsible for the content.",
"fr": "La signature institutionnelle fournit aux personnes un lien vers l’institution ou les institutions responsables du contenu."
},
"modified": "2024-12-10",
"componentName": "byline",
"status": "deprecated",
"version": "1.1.0",
"pages": {
"docs": [
{
"title": "Institutional byline",
"language": "en",
"path": "byline-doc-en.html"
},
{
"title": "Institution responsable",
"language": "fr",
"path": "byline-doc-fr.html"
}
]
},
"a11yGuidance": "No accessibility guidance.",
"variations": [
{
"name": {
"en": "Institutional byline - default",
"fr": "Institution responsable - par défaut"
},
"status": "deprecated",
"description": {
"en": "The institutional byline provides people with a link to the institution or institutions responsible for the content.",
"fr": "La signature institutionnelle fournit aux personnes un lien vers l’institution ou les institutions responsables du contenu."
},
"iteration": "_:iteration_byline_2",
"example": [
{
"en": { "href": "../../templates/content-page/content-en.html", "text": "Content page (byline after the main title)" },
"fr": { "href": "../../templates/content-page/content-fr.html", "text": "Page de contenu (institution responsable sous le titre principal)" }
}
],
"implementation": [
"_:implement_byline"
],
"history": [
{
"en": "December 2024 - Deprecation of the component - Moved to the Main title component. Use the Contributors component instead.",
"fr": "Décembre 2024 - Composante maintenant obsolète - Déplacée vers la componante Titre principal. Utilisez plutôt la composante Contributeurs."
},
{
"en": "April 2016 - Addition of the class <code>.gc-byline</code>.",
"fr": "Avril 2016 - Ajout de la classe <code>.gc-byline</code>."
},
{
"en": "WET-BOEW 4 - Initial implementation of the component.",
"fr": "WET-BOEW 4 - Implémentation initiale pde la composante."
}
]
}
],
"implementation": [
{
"@id": "_:implement_byline",
"iteration": "_:iteration_byline_2",
"name": {
"en": "Standard",
"fr": "Standard"
},
"introduction": {
"en": "This implementation is meant for developers/publishers adding the component manually.",
"fr": "Cette implémentation est destinée aux développeurs/éditeurs qui ajoutent le composant manuellement."
},
"instructions": {
"en": [
"Refer to the following code sample."
],
"fr": [
"Référez-vous au code qui suit."
]
},
"sample": {
"en": [
{
"@type": "source-code",
"description": "Code sample:",
"code": "<p class=\"gc-byline\"><strong>From <a href=\"#\">[Institution name]</a></strong></p>"
}
],
"fr": [
{
"@type": "source-code",
"description": "Exemple de code :",
"code": "<p class=\"gc-byline\"><strong>De <a href=\"#\">[Nom de l'institution]</a></strong></p>"
}
]
}
}
],
"iteration": [
{
"@id": "_:iteration_byline_2",
"name": "Institutional byline - Iteration 2",
"date": "2024-12",
"detectableBy": "h1#wb-cont+p>strong>a",
"addition": [
"Added CSS class <code>.gc-byline</code>"
],
"assets": [
{
"@type": "source-code",
"@language": "en",
"description": "Code sample",
"code": "<p class=\"gc-byline\"><strong>From <a href=\"#\">[Institution name]</a></strong></p>"
}
],
"predecessor": "_:iteration_byline"
},
{
"@id": "_:iteration_byline",
"name": "Institutional byline - Iteration 1",
"date": "2017-10",
"detectableBy": "h1#wb-cont+p>strong>a",
"assets": [
{
"@type": "source-code",
"@language": "en",
"description": "Code sample",
"code": "<p><strong>From <a href=\"#\">[Institution name]</a></strong></p>"
}
],
"successor": "_:iteration_byline_2"
}
],
"changesets": [
{
"@id": "_:cs_byline_2",
"name": "Institutional byline - version 2",
"status": "deprecated",
"baseOnIteration": "_:iteration_byline_2",
"detectableBy": ".gc-byline",
"guidance": "The component must be located directly after the first <h1> of the page.",
"style": "The whole byline is bolded.",
"semantic": "p>strong>a",
"static": [
"From",
"De"
],
"schema": [
"insitution name",
"insitution url"
]
},
{
"@id": "_:cs_byline",
"name": "Institutional byline",
"status": "deprecated",
"baseOnIteration": "_:iteration_byline",
"detectableBy": "h1#wb-cont+p>strong>a",
"guidance": "The component must be located directly after the first <h1> of the page.",
"style": "The whole byline is bolded.",
"semantic": "p>strong>a",
"static": [
"From",
"De"
],
"schema": [
"insitution name",
"insitution url"
]
}
]
}
,{
"@context": {
"@version": 1.1,
Expand Down
148 changes: 145 additions & 3 deletions _data/sites.json
Original file line number Diff line number Diff line change
Expand Up @@ -2266,6 +2266,16 @@
"title": "Titre principal superposé aligné à droite",
"language": "fr",
"path": "main-page-title-stacked-align-right-fr.html"
},
{
"title": "Main page title with byline",
"language": "en",
"path": "main-page-title-byline-en.html"
},
{
"title": "Titre principal avec institution responsable",
"language": "fr",
"path": "main-page-title-byline-fr.html"
}
]
},
Expand Down Expand Up @@ -2362,6 +2372,38 @@
"fr": "2024-01 - Implémentation initiale de la variation."
}
]
},
{
"name": {
"en": "Main page title with byline",
"fr": "Titre principal avec institution responsable"
},
"status": "stable",
"description": {
"en": "This variation is limited to news pages. It is not permitted on any other page.",
"fr": "Cette variante est limitée aux pages de nouvelles. Elle n'est permise sur aucune autre page."
},
"guidance": {
"en": "https://design.canada.ca/common-design-patterns/institutional-byline.html",
"fr": "https://conception.canada.ca/configurations-conception-communes/institution-responsable.html"
},
"iteration": "_:iteration_mptb_1",
"example": [
{
"en": { "href": "main-page-title-byline-en.html", "text": "Main page title with byline" },
"fr": { "href": "main-page-title-byline-fr.html", "text": "Titre principal avec institution responsable" }
}
],
"implementation": [
"_:implement_mptb",
"_:implement_mptb_gcweb"
],
"history": [
{
"en": "2024-12 - Initial implementation of the variant.",
"fr": "2024-12 - Implémentation initiale de la variation."
}
]
}
],
"implementation": [
Expand Down Expand Up @@ -2516,6 +2558,78 @@
}
]
}
},
{
"@id": "_:implement_mptb",
"iteration": "_:iteration_mptb_1",
"name": {
"en": "Standard",
"fr": "Standard"
},
"introduction": {
"en": "This implementation is meant for developers/publishers adding the component manually.",
"fr": "Cette implémentation est destinée aux développeurs/éditeurs qui ajoutent le composant manuellement."
},
"instructions": {
"en": [
"Refer to the following code sample."
],
"fr": [
"Référez-vous au code qui suit."
]
},
"sample": {
"en": [
{
"@type": "source-code",
"description": "HTML sample",
"code": "<hgroup id=\"wb-cont\">\n\t<h1>Main page title</h1>\n\t<p>From: <a href=\"https://www.canada.ca/en/employment-social-development/corporate/portfolio/service-canada.html\">Service Canada</a></p>\n</hgroup>"
}
],
"fr": [
{
"@type": "source-code",
"description": "Exemple HTML",
"code": "<hgroup id=\"wb-cont\">\n\t<h1>Titre principal</h1>\n\t<p>De&nbsp;: <a href=\"https://www.canada.ca/fr/emploi-developpement-social/ministere/portefeuille/service-canada.html\">Service Canada</a></p>\n</hgroup>"
}
]
}
},
{
"@id": "_:implement_mptb_gcweb",
"iteration": "_:iteration_mptb_1",
"name": {
"en": "GCWeb Jekyll",
"fr": "GCWeb Jekyll"
},
"introduction": {
"en": "This implementation is meant for developers trying to implement this component within a GCWeb Jekyll site.",
"fr": "Cette implémentation est destinée aux développeurs essayant d'implémenter ce composant dans un site GCWeb Jekyll."
},
"instructions": {
"en": [
"In the page's front-matter do the following:<ul><li>set the variable <code>title</code> to the main title of the page.</li><li>set the variable <code>byline</code> to an object containing the following properties:<ul><li><code>institution</code>: which contains the name of the institution</li><li><code>url</code>: which contains the URL to the institution's page</li></ul></li></ul>"
],
"fr": [
"Dans l'en-tête de la page faites ce qui suit&nbsp;:<ul><li>définissez la variable <code>title</code> au titre principal de la page.</li><li>définissez la variable <code>byline</code> avec un objet contenant les propriétés suivantes&nbsp;:<ul><li><code>institution</code>&nbsp;: qui contient le nom de l'institution</li><li><code>url</code>&nbsp;: qui contient l'URL de la page de l'institution</li></ul></li></ul>"
]
},
"sample": {
"en": [
{
"@type": "source-code",
"description": "Code sample:",
"code": "---\n{\n\t\"title\": \"My page title\",\n\t\"byline\": {\n\t\t\"institution\": \"Service Canada\",\n\t\t\"url\": \"https://www.canada.ca/en/employment-social-development/corporate/portfolio/service-canada.html\"\n\t}\n}\n---"
}
],
"fr": [
{
"@type": "source-code",
"description": "Exemple de code :",
"code": "---\n{\n\t\"title\": \"Titre de la page\",\n\t\"byline\": {\n\t\t\"institution\": \"Service Canada\",\n\t\t\"url\": \"https://www.canada.ca/fr/emploi-developpement-social/ministere/portefeuille/service-canada.html\"\n\t}\n}\n---"
}
]
}
}
],
"changesets": [
Expand Down Expand Up @@ -2546,7 +2660,7 @@
"@id": "_:cs_smpt",
"name": "Stacked main page title",
"baseOnIteration": "_:iteration_smpt_2",
"detectableBy": "hgroup > h1#wb-cont",
"detectableBy": "hgroup#wb-cont > p:first-child + h1",
"layout": "The section page title is above the page title. The line is positioned below the page title.",
"semantic": "hgroup > p + h1",
"schema": "dct:title, sectionTitle",
Expand All @@ -2562,6 +2676,27 @@
"style": "The line has a width of 3.55em (71px) and a thickness of 0.18em (3.6px) with the color #af3c43. Optionally, include a byline, tagline, or subtitle. The section page title has a font-size of 26px and has a color of #555.",
"guidance": "https://design.canada.ca/styles/typography.html",
"context": "First semantic element inside the main"
},
{
"@id": "_:cs_mptb",
"name": "Main page title with byline",
"baseOnIteration": "_:iteration_mptb_1",
"detectableBy": "hgroup#wb-cont > h1 + p:last-child",
"layout": "The byline is below the page title. The line is positioned between the page title and the byline.",
"semantic": "hgroup > h1 + p",
"schema": "dct:title, institutionName, institutionUrl",
"include": {
"@type": "source-code",
"collapsed": true,
"description": "Include with logic in Liquid.",
"code": {
"@type": [ "@id", "rdf:HTML" ],
"@value": "includes/main-page-title.html"
}
},
"style": "The line has a width of 3.55em (71px) and a thickness of 0.18em (3.6px) with the color #af3c43. The byline is bolded.",
"guidance": "https://design.canada.ca/common-design-patterns/institutional-byline.html",
"context": "Page context: First semantic element inside the main. Site context: limited to news pages on Canada.ca."
}
],
"iteration": [
Expand Down Expand Up @@ -2609,18 +2744,25 @@
"@id": "_:iteration_smpt_1",
"name": "Stacked main page title - Iteration 1",
"date": "2024-08",
"detectableBy": "hgroup > h1#wb-cont",
"detectableBy": "hgroup#wb-cont > h1",
"successor": "_:iteration_smpt_2"
},
{
"@id": "_:iteration_smpt_2",
"name": "Stacked main page title - Iteration 2 (LTR support)",
"date": "2024-10",
"detectableBy": "hgroup > h1#wb-cont[dir='ltr'], [dir='ltr'] hgroup > h1#wb-cont",
"detectableBy": "hgroup#wb-cont > h1[dir='ltr'], [dir='ltr'] hgroup#wb-cont > h1",
"additions": [
"Added right to left support"
],
"predecessor": "_:iteration_smpt_1"
},
{
"@id": "_:iteration_mptb_1",
"name": "Main page title with byline - Iteration 1",
"date": "2024-12",
"detectableBy": "hgroup#wb-cont > h1 + p:last-child",
"successor": "_:iteration_mptb_1"
}
]
}
Expand Down
Loading
Loading