En-tête de ServiceOntario
Cet en-tête est destiné aux applications de ServiceOntario en dehors du site Web principal ontario.ca.
-
Contenu:
@use 'sass:math'; @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/global.variables' as globalVariables; @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/spacing.variables' as spacing; @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/colours.variables' as colours; @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/breakpoints.variables' as breakpoints; @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/typography.variables' as typography; @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/z-index.variables' as zIndex; @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/2-tools/functions/global.functions' as globalFunctions; @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/font-weights.variables' as fontWeights; .ontario-header.ontario-service-header { height: 3.125rem; z-index: 5; } .ontario-service-header__logo, .ontario-service-header__logo a, .ontario-service-header__lang-toggle, .ontario-service-subheader__container, .ontario-service-subheader__menu-container, .ontario-service-subheader__menu { display: flex; } .ontario-service-header__logo img { width: 100px; height: 25px; } .ontario-service-header__lang-toggle { justify-content: flex-end; a { font-size: globalFunctions.px-to-rem(16); line-height: globalFunctions.px-to-rem(22); height: auto; padding: spacing.$spacing-2 spacing.$spacing-3; } } .ontario-service-subheader { padding: spacing.$spacing-4 0; background-color: colours.$ontario-colour-service-ontario-header-brand; overflow: hidden; position: relative; z-index: 5; @media screen and (min-width: breakpoints.$medium-breakpoint) { z-index: zIndex.$ontario-z-index-neutral; } & > .ontario-row { position: relative; } } .ontario-service-subheader .ontario-header-button { display: flex; } .ontario-service-subheader .ontario-header-button { background-color: colours.$ontario-colour-service-ontario-header-brand; .ontario-icon { width: 2rem; height: 2rem; margin-bottom: spacing.$spacing-0; } &:hover { background-color: colours.$ontario-colour-service-ontario-header-hover; } &:active { background-color: colours.$ontario-colour-service-ontario-header-active; } &:focus { box-shadow: 0 0 0 4px colours.$ontario-colour-service-ontario-header-focus; } } .ontario-service-subheader__link { text-decoration: none; } .ontario-service-subheader__heading-container { a & { color: colours.$ontario-colour-white; font-weight: fontWeights.$ontario-font-weights-semi-bold; text-decoration: none; &:hover, &:active, &:visited { color: colours.$ontario-colour-white; text-decoration: underline; } &:focus { box-shadow: 0 0 0 4px colours.$ontario-colour-service-ontario-header-focus; } } } .ontario-service-subheader__heading { @extend %h3-styles; font-weight: fontWeights.$ontario-font-weights-semi-bold; padding: spacing.$spacing-0 spacing.$spacing-0 math.div(spacing.$spacing-1, 2) spacing.$spacing-0; margin-bottom: spacing.$spacing-0; text-decoration: none; } .ontario-service-subheader__description { padding: math.div(spacing.$spacing-1, 2) spacing.$spacing-0 spacing.$spacing-1 spacing.$spacing-0; @extend %h5-styles; margin-bottom: spacing.$spacing-0; color: colours.$ontario-colour-white; font-weight: fontWeights.$ontario-font-weights-semi-bold; text-decoration: none; } .ontario-service-subheader__container { align-items: center; justify-content: space-between; } .ontario-service-subheader__menu { list-style: none; margin: spacing.$spacing-0; padding-left: spacing.$spacing-0; align-items: center; } .ontario-service-subheader__menu li { padding: spacing.$spacing-0; margin-left: spacing.$spacing-4; } .ontario-service-subheader__menu a { border-radius: globalVariables.$global-radius; color: colours.$ontario-colour-white; display: block; font-family: typography.$ontario-font-open-sans; font-size: globalFunctions.px-to-rem(18); font-weight: fontWeights.$ontario-font-weights-semi-bold; height: globalVariables.$standard-input-height; line-height: globalFunctions.px-to-rem(23); padding: spacing.$spacing-3; text-decoration: none; white-space: nowrap; &.ontario-link--active { border-radius: globalVariables.$global-radius globalVariables.$global-radius 0 0; border-bottom: globalFunctions.px-to-rem(4) solid colours.$ontario-colour-white; } &:hover { color: colours.$ontario-colour-white; background-color: colours.$ontario-colour-service-ontario-header-hover; } &:active { color: colours.$ontario-colour-white; background-color: colours.$ontario-colour-service-ontario-header-active; } &:focus { box-shadow: 0 0 0 4px colours.$ontario-colour-service-ontario-header-focus; } } .ontario-overlay { display: none; position: fixed; top: 0; left: 0; background: rgba(colours.$ontario-colour-black, 0.6); width: 100%; height: 100%; z-index: zIndex.$ontario-z-index-above-medium; } .ontario-navigation--open { .ontario-service-subheader .ontario-header-button:first-of-type { display: none; } .ontario-service-subheader .ontario-header-button:last-of-type { display: flex; } @media screen and (max-width: breakpoints.$medium-breakpoint) { .ontario-service-subheader-menu__container { position: relative; z-index: 3; } } .ontario-overlay { display: block; @media screen and (min-width: breakpoints.$medium-breakpoint) { display: none; } } } .ontario-colour-service-ontario-header-brand { background-color: colours.$ontario-colour-service-ontario-header-brand; } .ontario-colour-service-ontario-header-focus { background-color: colours.$ontario-colour-service-ontario-header-focus; } .ontario-colour-service-ontario-header-hover { background-color: colours.$ontario-colour-service-ontario-header-hover; } .ontario-colour-service-ontario-header-active { background-color: colours.$ontario-colour-service-ontario-header-active; }
- URL: /components/raw/service-ontario-header/service-ontario-header.scss
- Chemin du système de fichiers: fractal/components/components/headers/service-ontario-header/service-ontario-header.scss
- Taille: 6.1 KB
-
Contenu:
.ontario-service-subheader__description,.ontario-service-subheader__heading{font-style:normal;font-weight:700;text-rendering:optimizeLegibility;margin-bottom:1rem;font-feature-settings:normal;font-family:"Raleway","Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif}.ontario-service-subheader__heading{font-size:1.4375rem;letter-spacing:.02rem;line-height:1.39;margin:0 0 .75rem 0;max-width:48rem}@media screen and (min-width: 40em){.ontario-service-subheader__heading{font-size:1.75rem;letter-spacing:.02rem;line-height:1.43}}.ontario-service-subheader__description{font-size:1.125rem;letter-spacing:.03rem;line-height:1.56;margin:0 0 .75rem 0;max-width:48rem}@media screen and (min-width: 40em){.ontario-service-subheader__description{font-size:1.1875rem;letter-spacing:.025rem;line-height:1.5}}.ontario-header.ontario-service-header{height:3.125rem;z-index:5}.ontario-service-header__logo,.ontario-service-header__logo a,.ontario-service-header__lang-toggle,.ontario-service-subheader__container,.ontario-service-subheader__menu-container,.ontario-service-subheader__menu{display:flex}.ontario-service-header__logo img{width:100px;height:25px}.ontario-service-header__lang-toggle{justify-content:flex-end}.ontario-service-header__lang-toggle a{font-size:1rem;line-height:1.375rem;height:auto;padding:.5rem .75rem}.ontario-service-subheader{padding:1rem 0;background-color:#03713d;overflow:hidden;position:relative;z-index:5}@media screen and (min-width: 73em){.ontario-service-subheader{z-index:0}}.ontario-service-subheader>.ontario-row{position:relative}.ontario-service-subheader .ontario-header-button{display:flex}.ontario-service-subheader .ontario-header-button{background-color:#03713d}.ontario-service-subheader .ontario-header-button .ontario-icon{width:2rem;height:2rem;margin-bottom:0}.ontario-service-subheader .ontario-header-button:hover{background-color:#048b4b}.ontario-service-subheader .ontario-header-button:active{background-color:#024122}.ontario-service-subheader .ontario-header-button:focus{box-shadow:0 0 0 4px #42c7ff}.ontario-service-subheader__link{text-decoration:none}a .ontario-service-subheader__heading-container{color:#fff;font-weight:600;text-decoration:none}a .ontario-service-subheader__heading-container:hover,a .ontario-service-subheader__heading-container:active,a .ontario-service-subheader__heading-container:visited{color:#fff;text-decoration:underline}a .ontario-service-subheader__heading-container:focus{box-shadow:0 0 0 4px #42c7ff}.ontario-service-subheader__heading{font-weight:600;padding:0 0 .125rem 0;margin-bottom:0;text-decoration:none}.ontario-service-subheader__description{padding:.125rem 0 .25rem 0;margin-bottom:0;color:#fff;font-weight:600;text-decoration:none}.ontario-service-subheader__container{align-items:center;justify-content:space-between}.ontario-service-subheader__menu{list-style:none;margin:0;padding-left:0;align-items:center}.ontario-service-subheader__menu li{padding:0;margin-left:1rem}.ontario-service-subheader__menu a{border-radius:4px;color:#fff;display:block;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.125rem;font-weight:600;height:48px;line-height:1.4375rem;padding:.75rem;text-decoration:none;white-space:nowrap}.ontario-service-subheader__menu a.ontario-link--active{border-radius:4px 4px 0 0;border-bottom:.25rem solid #fff}.ontario-service-subheader__menu a:hover{color:#fff;background-color:#048b4b}.ontario-service-subheader__menu a:active{color:#fff;background-color:#024122}.ontario-service-subheader__menu a:focus{box-shadow:0 0 0 4px #42c7ff}.ontario-overlay{display:none;position:fixed;top:0;left:0;background:rgba(26,26,26,.6);width:100%;height:100%;z-index:2}.ontario-navigation--open .ontario-service-subheader .ontario-header-button:first-of-type{display:none}.ontario-navigation--open .ontario-service-subheader .ontario-header-button:last-of-type{display:flex}@media screen and (max-width: 73em){.ontario-navigation--open .ontario-service-subheader-menu__container{position:relative;z-index:3}}.ontario-navigation--open .ontario-overlay{display:block}@media screen and (min-width: 73em){.ontario-navigation--open .ontario-overlay{display:none}}.ontario-colour-service-ontario-header-brand{background-color:#03713d}.ontario-colour-service-ontario-header-focus{background-color:#42c7ff}.ontario-colour-service-ontario-header-hover{background-color:#048b4b}.ontario-colour-service-ontario-header-active{background-color:#024122}
- URL: /components/raw/service-ontario-header/service-ontario-header.css
- Chemin du système de fichiers: fractal/components/components/headers/service-ontario-header/service-ontario-header.css
- Taille: 4.5 KB
Quand utiliser cet en-tête
Il convient d’utiliser cet en-tête pour les applications de ServiceOntario qui ne font pas partie du site Web principal ontario.ca. L’en-tête d’une application peut comporter l’un ou plusieurs des éléments suivants :
- un nom spécifique;
- un volet de navigation ou des sous-pages;
- sa propre fonction de recherche;
- des comptes d’utilisateur ou son propre système d’ouverture de session.
Caractéristiques
L’en-tête de ServiceOntario est une variante de l’en-tête pour les applications régulier. Il comprend :
une barre noire avec :
- une version plus petite du logo de l’Ontario;
- une option de bascule de langue.
une barre secondaire avec :
- la couleur verte de marque de ServiceOntario (
#03713D
); - le nom de ServiceOntario;
- le nom de l’application;
- les liens de navigation (si nécessaire);
- le menu du site (si nécessaire);
- la modification des couleurs de l’état actif et de l’état de survol pour qu’il y ait un assez grand contraste avec le fond vert.
- la couleur verte de marque de ServiceOntario (
L’utilisation de la couleur verte de la marque pour la barre d’application secondaire est une exception unique visant à soutenir la marque officielle et établie de ServiceOntario. Les autres services doivent utiliser l’en-tête pour les applications régulier, tel qu’il est conçu, et ne doivent pas modifier la couleur de la barre d’application secondaire.
Couleurs propres aux en-têtes
Couleur | Nom de la couleur | Code de couleur hexadécimal | Variable SCSS |
---|---|---|---|
Couleur de marque verte – ServiceOntario | #03713D |
$ontario-colour-service-ontario-header-brand |
|
Bague de mise au point – ServiceOntario | #42C7FF |
$ontario-colour-service-ontario-header-focus |
|
Effet de survol – ServiceOntario | #048B4B |
$ontario-colour-service-ontario-header-active |
|
Actif – ServiceOntario | #024122 |
$ontario-colour-service-ontario-header-hover |
Pratiques exemplaires
Suivez les pratiques exemplaires décrites dans la directive de l’En-tête pour les applications.
Note technique
L’en-tête ServiceOntario nécessite les deux fichiers JavaScript suivants :
Si vous avez des questions ou souhaitez donner de la rétroaction, veuillez communiquer avec nous.