diff --git a/_data/components.json b/_data/components.json
index 92630e7b9e..b8cc9e9ffb 100644
--- a/_data/components.json
+++ b/_data/components.json
@@ -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 .gc-byline
.",
+ "fr": "Avril 2016 - Ajout de la classe .gc-byline
."
+ },
+ {
+ "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": "
From [Institution name]
"
+ }
+ ],
+ "fr": [
+ {
+ "@type": "source-code",
+ "description": "Exemple de code :",
+ "code": "De [Nom de l'institution]
"
+ }
+ ]
+ }
+ }
+ ],
+ "iteration": [
+ {
+ "@id": "_:iteration_byline_2",
+ "name": "Institutional byline - Iteration 2",
+ "date": "2024-12",
+ "detectableBy": "h1#wb-cont+p>strong>a",
+ "addition": [
+ "Added CSS class .gc-byline
"
+ ],
+ "assets": [
+ {
+ "@type": "source-code",
+ "@language": "en",
+ "description": "Code sample",
+ "code": "From [Institution name]
"
+ }
+ ],
+ "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": "From [Institution name]
"
+ }
+ ],
+ "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 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 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,
diff --git a/_data/sites.json b/_data/sites.json
index 86e1d751fa..a0af01be1c 100644
--- a/_data/sites.json
+++ b/_data/sites.json
@@ -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"
}
]
},
@@ -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": [
@@ -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": "\n\tMain page title
\n\tFrom: Service Canada
\n"
+ }
+ ],
+ "fr": [
+ {
+ "@type": "source-code",
+ "description": "Exemple HTML",
+ "code": "\n\tTitre principal
\n\tDe : Service Canada
\n"
+ }
+ ]
+ }
+ },
+ {
+ "@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:- set the variable
title
to the main title of the page. - set the variable
byline
to an object containing the following properties:institution
: which contains the name of the institutionurl
: which contains the URL to the institution's page
"
+ ],
+ "fr": [
+ "Dans l'en-tête de la page faites ce qui suit :- définissez la variable
title
au titre principal de la page. - définissez la variable
byline
avec un objet contenant les propriétés suivantes :institution
: qui contient le nom de l'institutionurl
: qui contient l'URL de la page de l'institution
"
+ ]
+ },
+ "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": [
@@ -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",
@@ -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": [
@@ -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"
}
]
}
diff --git a/components/_base.scss b/components/_base.scss
index 6116991b39..7463268c11 100644
--- a/components/_base.scss
+++ b/components/_base.scss
@@ -45,11 +45,6 @@
}
}
-.gc-byline { // byline text for linking to institution pages
- font-weight: 700;
- margin-bottom: 30px;
-}
-
/*
* Corporate information on Institution and Organization pages
*/
diff --git a/components/byline/_base.scss b/components/byline/_base.scss
new file mode 100644
index 0000000000..b232f8c203
--- /dev/null
+++ b/components/byline/_base.scss
@@ -0,0 +1,6 @@
+/* Byline */
+
+.gc-byline {
+ font-weight: 700;
+ margin-bottom: 30px;
+}
diff --git a/components/byline/byline-doc-en.html b/components/byline/byline-doc-en.html
new file mode 100644
index 0000000000..f614c4de92
--- /dev/null
+++ b/components/byline/byline-doc-en.html
@@ -0,0 +1,9 @@
+---
+title: Institutional byline
+description: Documentation for the Institutional byline component
+language: en
+altLangPage: byline-doc-fr.html
+dateModified: 2024-12-10
+layout: documentation
+index_json: index.json-ld
+---
diff --git a/components/byline/byline-doc-fr.html b/components/byline/byline-doc-fr.html
new file mode 100644
index 0000000000..aaca8a5030
--- /dev/null
+++ b/components/byline/byline-doc-fr.html
@@ -0,0 +1,9 @@
+---
+title: Institution responsable
+description: Documentation pour la composante Institution responsable
+language: fr
+altLangPage: byline-doc-en.html
+dateModified: 2024-12-10
+layout: documentation
+index_json: index.json-ld
+---
diff --git a/components/byline/index.json-ld b/components/byline/index.json-ld
new file mode 100644
index 0000000000..0f7a9f2b44
--- /dev/null
+++ b/components/byline/index.json-ld
@@ -0,0 +1,184 @@
+{
+ "@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 .gc-byline
.",
+ "fr": "Avril 2016 - Ajout de la classe .gc-byline
."
+ },
+ {
+ "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": "
From [Institution name]
"
+ }
+ ],
+ "fr": [
+ {
+ "@type": "source-code",
+ "description": "Exemple de code :",
+ "code": "De [Nom de l'institution]
"
+ }
+ ]
+ }
+ }
+ ],
+ "iteration": [
+ {
+ "@id": "_:iteration_byline_2",
+ "name": "Institutional byline - Iteration 2",
+ "date": "2024-12",
+ "detectableBy": "h1#wb-cont+p>strong>a",
+ "addition": [
+ "Added CSS class .gc-byline
"
+ ],
+ "assets": [
+ {
+ "@type": "source-code",
+ "@language": "en",
+ "description": "Code sample",
+ "code": "From [Institution name]
"
+ }
+ ],
+ "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": "From [Institution name]
"
+ }
+ ],
+ "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 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 of the page.",
+ "style": "The whole byline is bolded.",
+ "semantic": "p>strong>a",
+ "static": [
+ "From",
+ "De"
+ ],
+ "schema": [
+ "insitution name",
+ "insitution url"
+ ]
+ }
+ ]
+}
diff --git a/sites/main-page-title/_base.scss b/sites/main-page-title/_base.scss
index 8eec0e2cac..d94452baf9 100644
--- a/sites/main-page-title/_base.scss
+++ b/sites/main-page-title/_base.scss
@@ -22,7 +22,7 @@ h1#wb-cont[dir="rtl"], hgroup#wb-cont[dir="rtl"] h1, [dir="rtl"] h1#wb-cont, [di
hgroup#wb-cont {
margin-top: 1em;
- p {
+ p:first-child {
color: #555;
font-size: 26px;
font-weight: 500;
@@ -32,4 +32,9 @@ hgroup#wb-cont {
h1 {
margin-top: 0;
}
+
+ p:last-child {
+ font-weight: $bold-weight;
+ margin-bottom: 30px;
+ }
}
diff --git a/sites/main-page-title/includes/main-page-title.html b/sites/main-page-title/includes/main-page-title.html
index 9e8c13e1bd..f790baebc5 100644
--- a/sites/main-page-title/includes/main-page-title.html
+++ b/sites/main-page-title/includes/main-page-title.html
@@ -1,7 +1,12 @@
-{%- if page.sectionTitle -%}
+{%- if page.sectionTitle or page.byline -%}
+ {%- if page.sectionTitle -%}
{{ page.sectionTitle }}
+ {%- endif -%}
{{ page.title }}
+ {%- if page.byline -%}
+ {% if page.language == "fr" %}De :{% else %}From:{% endif %} {{ page.byline.institution }}
+ {%- endif -%}
{%- else -%}
{{ page.title }}
diff --git a/sites/main-page-title/index.json-ld b/sites/main-page-title/index.json-ld
index 2873a4720e..55945fc8cd 100644
--- a/sites/main-page-title/index.json-ld
+++ b/sites/main-page-title/index.json-ld
@@ -91,6 +91,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"
}
]
},
@@ -187,6 +197,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": [
@@ -341,6 +383,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": "\n\tMain page title
\n\tFrom: Service Canada
\n"
+ }
+ ],
+ "fr": [
+ {
+ "@type": "source-code",
+ "description": "Exemple HTML",
+ "code": "\n\tTitre principal
\n\tDe : Service Canada
\n"
+ }
+ ]
+ }
+ },
+ {
+ "@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:- set the variable
title
to the main title of the page. - set the variable
byline
to an object containing the following properties:institution
: which contains the name of the institutionurl
: which contains the URL to the institution's page
"
+ ],
+ "fr": [
+ "Dans l'en-tête de la page faites ce qui suit :- définissez la variable
title
au titre principal de la page. - définissez la variable
byline
avec un objet contenant les propriétés suivantes :institution
: qui contient le nom de l'institutionurl
: qui contient l'URL de la page de l'institution
"
+ ]
+ },
+ "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": [
@@ -371,7 +485,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",
@@ -387,6 +501,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": [
@@ -434,18 +569,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"
}
]
}
diff --git a/sites/main-page-title/main-page-title-byline-en.html b/sites/main-page-title/main-page-title-byline-en.html
new file mode 100644
index 0000000000..26a78db94c
--- /dev/null
+++ b/sites/main-page-title/main-page-title-byline-en.html
@@ -0,0 +1,28 @@
+---
+{
+ "altLangPage": "main-page-title-byline-fr.html",
+ "dateModified": "2024-12-11",
+ "description": "Example of the main page title with byline.",
+ "language": "en",
+ "title": "Main page title with byline",
+ "byline": {
+ "institution": "Service Canada",
+ "url": "https://www.canada.ca/en/employment-social-development/corporate/portfolio/service-canada.html"
+ },
+ "breadcrumbs": [
+ { "title": "Main page title - Documentation", "link": "sites/main-page-title/main-page-title-en.html" }
+ ]
+}
+---
+
+
+ Context of use
+ This variation is limited to news pages. It is not permitted on any other page.
+
+
+
{{ page.description }}
+
+<hgroup id="wb-cont">
+ <h1>Main page title with byline</h1>
+ <p>From: <a href="https://www.canada.ca/en/employment-social-development/corporate/portfolio/service-canada.html">Service Canada</a></p>
+</hgroup>
diff --git a/sites/main-page-title/main-page-title-byline-fr.html b/sites/main-page-title/main-page-title-byline-fr.html
new file mode 100644
index 0000000000..ee690ee00b
--- /dev/null
+++ b/sites/main-page-title/main-page-title-byline-fr.html
@@ -0,0 +1,28 @@
+---
+{
+ "altLangPage": "main-page-title-byline-en.html",
+ "dateModified": "2024-12-11",
+ "description": "Exemple du titre principal superposé avec institution responsable.",
+ "language": "fr",
+ "title": "Titre principal avec institution responsable",
+ "byline": {
+ "institution": "Service Canada",
+ "url": "https://www.canada.ca/fr/emploi-developpement-social/ministere/portefeuille/service-canada.html"
+ },
+ "breadcrumbs": [
+ { "title": "Titre principal - Documentation", "link": "sites/main-page-title/main-page-title-fr.html" }
+ ]
+}
+---
+
+
+ Contexte d'utilisation
+ Cette variante est limitée aux pages de nouvelles. Elle n'est permise sur aucune autre page.
+
+
+{{ page.description }}
+
+<hgroup id="wb-cont">
+ <h1>Titre principal superposé</h1>
+ <p>From: <a href="https://www.canada.ca/fr/emploi-developpement-social/ministere/portefeuille/service-canada.html">Service Canada</a></p>
+</hgroup>
diff --git a/sites/theme.scss b/sites/theme.scss
index a14cdcca37..ce748b5135 100644
--- a/sites/theme.scss
+++ b/sites/theme.scss
@@ -171,6 +171,7 @@
@import "../components/redacted";
@import "../components/dshbrd/base";
@import "../components/triangle-up";
+@import "../components/byline/base";
@import "../components/gc-contributors/base";
@import "../components/gc-follow-us/base";
@import "../components/gc-minister/base";