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

Content - Text-level Modifiers - Created Example Pages #2211

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
34 changes: 34 additions & 0 deletions common/text-level-modifiers/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": "Text-level Modifiers",
"fr": "Modificateurs de niveau de texte"
},
"description": {
"en": "Text-level modifiers for styling and formatting",
"fr": "Modificateurs de niveau de texte pour le style et le formatage"
},
"modified": "2024-03-06",
"componentName": "text-level-modifiers",
"status": "stable",
"pages": {
"docs": [
{
"title": "Text-level Modifiers",
"language": "en",
"path": "text-level-modifiers-en.html"
},
{
"title": "Modificateurs de niveau de texte",
"language": "fr",
"path": "text-level-modifiers-fr.html"
}
]
}
}
147 changes: 147 additions & 0 deletions common/text-level-modifiers/text-level-modifiers-en.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
---
{
"title": "Text-Level Modifiers",
"language":"en",
"altLangPage":"text-level-modifiers-fr.html",
"breadcrumbs":
[
{
"title": "GCWeb home",
"link": "https://wet-boew.github.io/themes-dist/GCWeb/index-en.html"
}
],
Comment on lines +6 to +12
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can now remove that breadcrumb item because it is there by default.

Suggested change
"breadcrumbs":
[
{
"title": "GCWeb home",
"link": "https://wet-boew.github.io/themes-dist/GCWeb/index-en.html"
}
],

"secondlevel": false,
"dateModified": "2024-03-06",
"share": "true"
}
---

<p>In the realm of GCweb, text-level modifiers play a pivotal role in shaping the visual and
functional aspects of website text.They enable web developers to fine-tune text attributes such as size, color, weight, and
style, ensuring that the textual content is not only aesthetically pleasing but also accessible and easy to read.</p>
<h2>Overview</h2>
<dl class="dl-horizontal brdr-bttm">
<dt><code>.stretched-link</code></dt>
<dd>Works in conjunction with position-relative to set a link's clickable area</dd>
<dt><code>.small</code></dt>
<dd>Decreases the font size of the element</dd>
<dt><code>.mark</code></dt>
<dd>Highlights the text</dd>
<dt><code>.lead</code></dt>
<dd>Increases the font size and line height</dd>
<dt><code>.text-*</code></dt>
<dd>Changes the alignment or case of the text</dd>
<dt><code>.no-wrap</code></dt>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo, see the other comment

<dd>Prevents the text from wrapping</dd>
<dt><code>.fnt-nrml</code></dt>
<dd>Resets the font size to the default</dd>
</dl>
<div class="row">
<div class="position-relative">
<h2><code>.stretched-link</code></h2>
<dd>Used to make an entire containing block clickable, effectively "stretching" a hyperlink over the entire block.
Make sure the element that you want to be clickable is positioned. This can be done by setting its CSS position to relative.</dd>

<a class="stretched-link" href="">Stretched link</a>
<pre><code>&lt;div <strong>class=&quot;positon-relative&quot;</strong>&gt;&lt;a <strong>class=&quot;stretched-link&quot; href=&quot;&quot;</strong>&gt;Stretched link&lt;/a&gt;&lt;/div&gt;</code></pre>
</div>
<div>
<h2><code>.small</code></h2>
<dd>Decreases the font size of the element.</dd>
<p class="small">
Example small text
</p>
<pre><code>&lt;p <strong>class=&quot;small&quot;</strong>&gt;...&lt;/p&gt;</code></pre>
</div>
<div>
<h2><code>.mark</code></h2>
<dd>Highlights the text</dd>
<p class="mark">
Example highlighted text
</p>
<pre><code>&lt;p <strong>class=&quot;mark&quot;</strong>&gt;...&lt;/p&gt;</code></pre>
</div>
<div>
<h2><code>.lead</code></h2>
<dd>Increases the font size and line height</dd>
<p class="lead">
Example lead text
</p>
<pre><code>&lt;p <strong>class=&quot;lead&quot;</strong>&gt;...&lt;/p&gt;</code></pre>
</div>
<div>
<h2><code>.text-*</code></h2>
<dd>Can be used to align text or change its case.</dd>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be paragraph <p>, not a definition description <dd> because those must be in a description list

Suggested change
<dd>Can be used to align text or change its case.</dd>
<p>Can be used to align text or change its case.</p>

And apply the same change across both working example

<h2>Alignment examples:</h2>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a sub-heading of the "h2" at line 73.

Suggested change
<h2>Alignment examples:</h2>
<h3>Alignment examples:</h3>

And apply the similar fix for the other similar sub-heading

<div class="row">
<p class="text-left col-sm-6">
Aligned left
</p>
<pre class="text-left col-sm-6"><code>&lt;p <strong>class=&quot;text-left&quot;</strong>&gt;...&lt;/p&gt;</code></pre>
</div>
<div class="row">
<p class="text-right col-sm-6">
Aligned right
</p>
<pre class="text-right col-sm-6"><code>&lt;p <strong>class=&quot;text-right&quot;</strong>&gt;...&lt;/p&gt;</code></pre>
</div>
<div class="row">
<p class="text-center col-sm-6">
Aligned center
</p>
<pre class="text-center col-sm-6"><code>&lt;p <strong>class=&quot;text-center&quot;</strong>&gt;...&lt;/p&gt;</code></pre>
</div>
<div class="row">
<p class="text-justify col-sm-6">
Justified text
</p>
<pre class="text-justify col-sm-6"><code>&lt;p <strong>class=&quot;text-justify&quot;</strong>&gt;...&lt;/p&gt;</code></pre>
</div>
<div class="row">
<p class="text-nowrap col-sm-6">
No-wrap text: xxxxxxxxxxxxxxxxxxxxxxx
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add 23-25 more "x" because we don't see the effet on large page view port

</p>
<pre class="text-nowrap col-sm-6"><code>&lt;p <strong>class=&quot;text-danger&quot;</strong>&gt;...&lt;/p&gt;</code></pre>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code example don't match the example.

</div>

<h2>Transformation examples:</h2>
<div class="row">
<p class="text-lowercase col-sm-6">
LOWERCASE TEXT
</p>
<pre class="col-sm-6"><code>&lt;p <strong>class=&quot;text-lowercase&quot;</strong>&gt;LOWERCASE TEXT&lt;/p&gt;</code></pre>
</div>
<div class="row">
<p class="text-uppercase col-sm-6">
uppercase text
</p>
<pre class="col-sm-6"><code>&lt;p <strong>class=&quot;text-uppercase&quot;</strong>&gt;uppercase text&lt;/p&gt;</code></pre>
</div>
<div class="row">
<p class="text-capitalize col-sm-6">
capitalized text
</p>
<pre class="col-sm-6"><code>&lt;p <strong>class=&quot;text-capitalize&quot;</strong>&gt;capitalized text&lt;/p&gt;</code></pre>
</div>
</div>
<div>
<h2><code>.no-wrap</code></h2>
<dd>Prevents the text from wrapping</dd>
<p class="no-wrap">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo, there is no dash

Suggested change
<p class="no-wrap">
<p class="nowrap">

See: https://github.com/wet-boew/wet-boew/blob/442cc90ece58e548682b402d1553a7cfac1e2bd3/src/base/views/_screen.scss#LL66-L72C2

Example no wrap: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a few word or a few "x" to ensure the no wrap is demoed in large view

</p>
<pre><code>&lt;p <strong>class=&quot;no-wrap&quot;</strong>&gt;...&lt;/p&gt;</code></pre>
</div>
<div>
Comment on lines +134 to +135
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those wrapper <div> don't provide any value added to the content, please remove all the plain div that contains no HTML attribute.

<h2><code>.fnt-nrml</code></h2>
<dd>Resets the font size to the default</dd>
<p>Example 1: Default font style</p>
<p class="fnt-nrml">Example 2: Normal font style</p>
<p><strong>Example 3: <em class="fnt-nrml">Normal font style</em></strong></p>
<p><em>Example 4: <strong class="fnt-nrml">Normal font style</strong></em></p>
Comment on lines +140 to +141
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use some bracket to indicate where the effect is applied. like:

Suggested change
<p><strong>Example 3: <em class="fnt-nrml">Normal font style</em></strong></p>
<p><em>Example 4: <strong class="fnt-nrml">Normal font style</strong></em></p>
<p><strong>Example 3: <em class="fnt-nrml">[Normal font style in <code>&lt;em></code> element]</em></strong></p>
<p><em>Example 4: <strong class="fnt-nrml">[Normal font style in <code>&lt;strong></code> element]</strong></em></p>

<pre><code>&lt;p&gt;Example 1: Default font style&lt;/p&gt;</code></pre>
<pre><code>&lt;p <strong>class=&quot;fnt-nrml&quot;</strong>&gt;Example 2: Normal font style&lt;/p&gt;</code></pre>
<pre><code>&lt;p <strong>class=&quot;fnt-nrml&quot;</strong>&gt;&lt;strong&gt;Example 3: &lt;em class="fnt-nrml"&gt;Normal font style&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;</code></pre>
<pre><code>&lt;p <strong>class=&quot;fnt-nrml&quot;</strong>&gt;&lt;em&gtExample 4: &lt;strong class="fnt-nrml"&gtNormal font style&lt;/strong&gt&lt;/em&gt&lt;/p&gt;</code></pre>
Comment on lines +142 to +145
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put it in one block like

Suggested change
<pre><code>&lt;p&gt;Example 1: Default font style&lt;/p&gt;</code></pre>
<pre><code>&lt;p <strong>class=&quot;fnt-nrml&quot;</strong>&gt;Example 2: Normal font style&lt;/p&gt;</code></pre>
<pre><code>&lt;p <strong>class=&quot;fnt-nrml&quot;</strong>&gt;&lt;strong&gt;Example 3: &lt;em class="fnt-nrml"&gt;Normal font style&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;</code></pre>
<pre><code>&lt;p <strong>class=&quot;fnt-nrml&quot;</strong>&gt;&lt;em&gtExample 4: &lt;strong class="fnt-nrml"&gtNormal font style&lt;/strong&gt&lt;/em&gt&lt;/p&gt;</code></pre>
<pre><code>&lt;p&gt;Example 1: Default font style&lt;/p&gt;
&lt;p <strong>class=&quot;fnt-nrml&quot;</strong>&gt;Example 2: Normal font style&lt;/p&gt;
&lt;p <strong>class=&quot;fnt-nrml&quot;</strong>&gt;&lt;strong&gt;Example 3: &lt;em class="fnt-nrml"&gt;Normal font style&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p <strong>class=&quot;fnt-nrml&quot;</strong>&gt;&lt;em&gtExample 4: &lt;strong class="fnt-nrml"&gtNormal font style&lt;/strong&gt&lt;/em&gt&lt;/p&gt;</code></pre>

</div>
</div>
158 changes: 158 additions & 0 deletions common/text-level-modifiers/text-level-modifiers-fr.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
---
{
"title": "Modificateurs de niveau de texte",
"language": "fr",
"altLangPage": "text-level-modifiers-en.html",
"breadcrumbs":
[
{
"title": "Accueil GCWeb",
"link": "https://wet-boew.github.io/themes-dist/GCWeb/index-fr.html"
}
],
"secondlevel": false,
"dateModified": "2024-03-06",
"share": "true"
}

<p>Dans le domaine de GCWeb, les modificateurs de niveau de texte jouent un rôle crucial dans la formation des aspects
visuels et
fonctionnels du texte des sites web. Ils permettent aux développeurs web d'ajuster finement les attributs du texte
tels que la taille, la couleur, le poids et
le style, assurant que le contenu textuel est non seulement esthétiquement agréable mais également accessible et
facile à lire.</p>
<h2>Aperçu</h2>
<dl class="dl-horizontal brdr-bttm">
<dt><code>.stretched-link</code></dt>
<dd>Utilisé en conjonction avec position-relative pour définir la zone cliquable d'un lien</dd>
<dt><code>.small</code></dt>
<dd>Diminue la taille de la police de l'élément</dd>
<dt><code>.mark</code></dt>
<dd>Met en évidence le texte</dd>
<dt><code>.lead</code></dt>
<dd>Augmente la taille de la police et l'interligne</dd>
<dt><code>.text-*</code></dt>
<dd>Modifie l'alignement ou la casse du texte</dd>
<dt><code>.no-wrap</code></dt>
<dd>Empêche le texte de passer à la ligne</dd>
<dt><code>.fnt-nrml</code></dt>
<dd>Réinitialise la taille de la police par défaut</dd>
</dl>
<div class="row">
<div class="position-relative">
<h2><code>.stretched-link</code></h2>
<dd>Utilisé pour rendre un bloc contenant entièrement cliquable, étendant efficacement un hyperlien sur tout le
bloc.
Assurez-vous que l'élément que vous souhaitez rendre cliquable est positionné. Cela peut être réalisé en
définissant sa position CSS sur relative.</dd>
<a class="stretched-link" href="">Lien étendu</a>
<pre><code>&lt;div <strong>class=&quot;position-relative&quot;</strong>&gt;&lt;a <strong>class=&quot;stretched-link&quot; href=&quot;&quot;</strong>&gt;Lien étendu&lt;/a&gt;&lt;/div&gt;</code></pre>
</div>
<div>
<h2><code>.small</code></h2>
<dd>Diminue la taille de la police de l'élément.</dd>
<p class="small">
Exemple de texte petit
</p>
<pre><code>&lt;p <strong>class=&quot;small&quot;</strong>&gt;...&lt;/p&gt;</code></pre>
</div>
<div>
<h2><code>.mark</code></h2>
<dd>Met en évidence le texte</dd>
<p class="mark">
Exemple de texte surligné
</p>
<pre><code>&lt;p <strong>class=&quot;mark&quot;</strong>&gt;...&lt;/p&gt;</code></pre>
</div>
<div>
<h2><code>.lead</code></h2>
<dd>Augmente la taille de la police et l'interligne</dd>
<p class="lead">
Exemple de texte principal
</p>
<pre><code>&lt;p <strong>class=&quot;lead&quot;</strong>&gt;...&lt;/p&gt;</code></pre>
</div>
<div>
<h2><code>.text-*</code></h2>
<dd>Peut être utilisé pour aligner le texte ou changer sa casse.</dd>
<h2>Exemples d'alignement :</h2>
<div class="row">
<p class="text-left col-sm-6">
Aligné à gauche
</p>
<pre
class="text-left col-sm-6"><code>&lt;p <strong>class=&quot;text-left&quot;</strong>&gt;...&lt;/p&gt;</code></pre>
</div>
<div class="row">
<p class="text-right col-sm-6">
Aligné à droite
</p>
<pre
class="text-right col-sm-6"><code>&lt;p <strong>class=&quot;text-right&quot;</strong>&gt;...&lt;/p&gt;</code></pre>
</div>
<div class="row">
<p class="text-center col-sm-6">
Centré
</p>
<pre
class="text-center col-sm-6"><code>&lt;p <strong>class=&quot;text-center&quot;</strong>&gt;...&lt;/p&gt;</code></pre>
</div>
<div class="row">
<p class="text-justify col-sm-6">
Texte justifié
</p>
<pre
class="text-justify col-sm-6"><code>&lt;p <strong>class=&quot;text-justify&quot;</strong>&gt;...&lt;/p&gt;</code></pre>
</div>
<div class="row">
<p class="text-nowrap col-sm-6">
Texte sans retour à la ligne : xxxxxxxxxxxxxxxxxxxxxxx
</p>
<pre
class="text-nowrap col-sm-6"><code>&lt;p <strong>class=&quot;text-danger&quot;</strong>&gt;...&lt;/p&gt;</code></pre>
</div>

<h2>Exemples de transformation :</h2>
<div class="row">
<p class="text-lowercase col-sm-6">
TEXTE EN MINUSCULES
</p>
<pre
class="col-sm-6"><code>&lt;p <strong>class=&quot;text-lowercase&quot;</strong>&gt;TEXTE EN MINUSCULES&lt;/p&gt;</code></pre>
</div>
<div class="row">
<p class="text-uppercase col-sm-6">
texte en majuscules
</p>
<pre
class="col-sm-6"><code>&lt;p <strong>class=&quot;text-uppercase&quot;</strong>&gt;texte en majuscules&lt;/p&gt;</code></pre>
</div>
<div class="row">
<p class="text-capitalize col-sm-6">
texte capitalisé
</p>
<pre
class="col-sm-6"><code>&lt;p <strong>class=&quot;text-capitalize&quot;</strong>&gt;texte capitalisé&lt;/p&gt;</code></pre>
</div>
</div>
<div>
<h2><code>.no-wrap</code></h2>
<dd>Empêche le texte de passer à la ligne</dd>
<p class="no-wrap">
Exemple sans retour à la ligne : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</p>
<pre><code>&lt;p <strong>class=&quot;no-wrap&quot;</strong>&gt;...&lt;/p&gt;</code></pre>
</div>
<div>
<h2><code>.fnt-nrml</code></h2>
<dd>Réinitialise la taille de la police à la valeur par défaut</dd>
<p>Exemple 1 : Style de police par défaut</p>
<p class="fnt-nrml">Exemple 2 : Style de police normal</p>
<p><strong>Exemple 3 : <em class="fnt-nrml">Style de police normal</em></strong></p>
<p><em>Exemple 4 : <strong class="fnt-nrml">Style de police normal</strong></em></p>
<pre><code>&lt;p&gt;Exemple 1 : Style de police par défaut&lt;/p&gt;</code></pre>
<pre><code>&lt;p <strong>class=&quot;fnt-nrml&quot;</strong>&gt;Exemple 2 : Style de police normal&lt;/p&gt;</code></pre>
<pre><code>&lt;p <strong>class=&quot;fnt-nrml&quot;</strong>&gt;&lt;strong&gt;Exemple 3 : &lt;em class="fnt-nrml"&gt;Style de police normal&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;</code></pre>
<pre><code>&lt;p <strong>class=&quot;fnt-nrml&quot;</strong>&gt;&lt;em&gt;Exemple 4 : &lt;strong class="fnt-nrml"&gt;Style de police normal&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;</code></pre>
</div>
</div>
Loading