cnil-2023: new theme (#81078)
gitea/publik-base-theme/pipeline/head This commit looks good Details

This commit is contained in:
Thomas Jund 2023-09-12 10:25:03 +02:00 committed by Thomas Jund
parent 38f5b75989
commit 399e88cefe
12 changed files with 787 additions and 0 deletions

View File

@ -0,0 +1,574 @@
//
// Typo
//
h1, .h1 {
font-size: $fz-1;
font-family: $ff-ss-serif-cond;
text-align: center;
@media ($max-mobile-viewport) {
font-size: $fz-1m;
}
}
h2, .h2 {
@extend %title;
color: $font-color;
}
h3, .h3 {
font-size: $fz-2;
color: $font-color;
font-weight: 300;
text-transform: uppercase;
@media ($max-mobile-viewport) {
font-size: $fz-2m;
}
}
h4, .h4 {
font-size: $fz-3;
color: $font-color;
font-family: $ff-ss-serif-cond;
font-weight: bold;
@media ($max-mobile-viewport) {
font-size: $fz-3m;
}
}
a {
&:hover {
color: $blue-dark;
}
&.arrow-link {
font-family: $ff-ss-serif-cond;
font-weight: bold;
text-decoration: none;
&::before {
content: "\f061"; // arrow right
font-family: FontAwesome;
margin-right: .5em;
text-decoration: none;
}
}
}
.cnil-blue-title {
color: $blue;
}
label {
color: $gray;
font-size: $fz-small;
.required {
color: $error-color;
}
}
//
// Layout
//
div#header,
div#footer,
div#main-content-wrapper,
.page-width,
.header-width {
padding-left: $columns-gutter;
padding-right: $columns-gutter;
}
@media ($max-mobile-viewport) {
.central-content #sidebar {
margin: 0;
}
#columns-wrapper {
padding: 0;
}
}
//
// Header
//
$header-padding-desktop: 28px;
$header-padding-mobile: 12px;
.portal-profil {
background-color: var(--portal-profil-color);
color: white;
font-family: $ff-ss-serif;
text-transform: uppercase;
p {
margin: 0;
padding: 0.2em 0;
}
}
#top {
display: flex;
align-items: flex-end;
@media ($max-mobile-viewport) {
flex-wrap: wrap;
}
}
#logo.has-logo {
flex-grow: 1;
line-height: 0;
padding-top: $header-padding-desktop;
padding-bottom: $header-padding-desktop;
text-align: left;
@media ($max-mobile-viewport) {
padding-top: $header-padding-mobile;
padding-bottom: $header-padding-mobile;
padding-left: $nav-menu-side + 10px;
}
a::before {
@media ($max-mobile-viewport) {
height: 24px;
width: 79px;
}
}
}
#toplinks {
position: static;
font-family: $ff-ss-serif;
font-size: $fz-xsmall;
margin-bottom: $header-padding-desktop;
@media ($max-mobile-viewport) {
margin-bottom: $header-padding-mobile;
}
@media ($min-desktop-viewport) {
white-space: nowrap;
}
}
.toplinks--list-item:first-child {
&::after {
content: ""
}
}
//
// NAV
//
.site-nav {
flex-grow: 1;
@media (max-width: $nav-mobile-limit) {
order: 1;
flex-basis: 100%;
}
}
.gru-nav-wrapper {
@media (max-width: $nav-mobile-limit) {
margin-top: calc(-1 * #{$nav-menu-side} - 7px);
}
}
div.gru-nav {
.gru-nav-button {
margin-left: 0;
margin-bottom: 12px;
}
> ul {
margin: 0;
}
}
//
// Main
//
main {
margin-top: 20px;
}
.cnil-page-header {
p {
@extend .h3;
margin-bottom: 2rem;
text-transform: none;
text-align: center;
font-family: $ff-ss-serif-cond;
}
}
//
// Cells
//
%title {
line-height: 1.1;
}
// foldable icon to left
div.cell.foldable > div > h2:first-child {
display: flex;
padding-right: extract-right($title-padding);
&::after {
font-size: $fz-3;
color: $font-color;
position: static;
display: inline-block;
flex: 0 0 1.5rem;
margin-right: 1rem;
text-align: center;
line-height: 1;
order: -1;
align-self: center;
}
}
// More left padding on cells
@media($min-desktop-viewport) {
.page-template-standard-sidebar #columns .cell {
&:not(.foldable) .cell--title,
&:not(.foldable) h2:first-child,
h2:first-child ~ * {
padding-left: 3.5rem;
}
div.links-list ul {
padding-left: 0;
}
}
}
// Default links-list
%cell-links-list {
padding-left: 1em;
padding-right: 1em;
& > li > a {
font-family: $ff-ss-serif;
font-weight: 600;
padding-left: 0;
padding-right: 0;
&:hover {
text-decoration: underline;
}
}
li div.description {
padding: 0;
p {
margin-right: 0;
margin-left: 0;
}
}
}
// Custom cells
.bordered-links-list {
.gru-content &.cell {
.links-list ul {
& > li {
position: relative;
border: 1px solid $gray-dark;
background-color: $gray-xxlight;
margin-bottom: 1em;
padding: 0 1em;
}
& > li > a {
position: static;
&::before {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
}
}
}
}
.two-cols-links-list {
.gru-content &.cell {
.links-list ul {
@extend .fx-grid;
--grid-gutter: 1em;
padding: 1em;
@media ($min-desktop-viewport) {
--nb-cols: 2;
}
}
}
}
.cell-light-title {
.gru-content &.cell {
.cell--title, h2:first-child {
@extend .h3;
}
}
}
.wcs-current-drafts-cell,
.wcs-current-forms-cell {
@extend .bordered-links-list;
.list-of-forms {
.form-title {
flex-grow: 1;
}
.form-number {
flex-grow: 0;
font-family: $ff-serif;
font-weight: normal;
color: $font-color;
}
.form-status {
font-family: $ff-serif;
font-size: $fz-small;
color: $font-color;
}
}
}
#sidebar .cell {
@extend .cell-light-title;
}
//
// WCS & Forms
//
%button {
text-transform: uppercase;
font-family: $ff-ss-serif-cond;
font-weight: bold;
box-shadow: none !important;
&:disabled {
--background: #{$gray};
}
}
%submit-button {
--background: #{$blue};
border-color: var(--background);
}
%cancel-button {
--color: #{$blue};
--background: white;
--hover-color: #{$blue-dark};
--hover-background: white;
border-color: currentColor;
}
div.buttons {
.previous-button button {
@extend %cancel-button;
}
.cancel-button button {
&:not(:hover) {
border-color: white;
}
}
}
$form-padding: 1rem;
%form-separator {
&::before {
content: "";
display: block;
background-color: $body-background;
height: $fz-small;
margin-bottom: $form-padding;
margin-left: -1*$form-padding;
margin-right: -1*$form-padding;
}
}
div#rub_service {
.drafts-recall,
form {
padding: $form-padding;
}
.drafts-recall {
border-bottom: $form-padding solid $body-background;
}
h3 {
@extend .h4;
}
h3.separator {
@extend %form-separator;
}
h4 {
font-size: 1rem;
color: $blue;
font-family: $ff-serif;
font-weight: normal;
&::before {
content: " "
}
}
div.buttons {
@extend %form-separator;
&::before {
flex-basis: calc(100% + #{$form-padding*2)};
}
}
}
.widget-with-error {
input, textarea, select {
border-color: $error-color;
border-width: 1px;
outline: 1px solid $error-color;
}
}
div#tracking-code {
background-color: white;
padding-bottom: 1rem;
h3 {
@extend .h3;
padding-bottom: 0;
}
a {
font-family: $ff-ss-serif;
color: $blue;
}
form {
padding-left: 1rem;
}
.form-discard-draft {
margin-right: 0;
}
}
// Steps
.wcs-steps {
background-color: white;
font-family: $ff-ss-serif-cond;
h2 {
@extend .h3;
display: block;
}
}
@media ($mq-max--wcs-steps-small-layout) {
.wcs-steps {
display: flex;
align-items: baseline;
}
.wcs-step {
&.current {
font-weight: normal;
}
&--marker::before {
all: unset;
content: "/";
order: 2;
}
&--marker-nb, &--marker-total {
transform: none;
font-size: 1rem;
}
}
}
@include desktop-vertical-steps() {
.wcs-steps {
font-size: 1rem;
padding-bottom: 1rem;
&--list {
margin-bottom: 0;
}
}
.wcs-step {
padding-left: 2em;
&.current {
background-size: 1ex 1ex;
background-repeat: no-repeat;
background-position: top 50% left 1em;
background-image: radial-gradient(closest-side, #{$font-color} 100%, transparent);
}
&--label {
font-size: 1em;
}
&--marker-nb::after {
content: ".";
}
}
}
//
// A2
//
.cnil-login-page,
.cnil-registration-page {
--padding: 0.5rem;
background: white;
padding: var(--padding);
padding-top: 1px;
@media ($min-desktop-viewport) {
--padding: 1rem
}
}
.a2-block-title,
div.block h2.a2-block-title,
div.a2-block h2.a2-block-title,
#frontend-registration-email h2 {
@extend .h4;
text-align: center;
}
//
// Notifications
//
.errornotice,
.warningnotice,
.successnotice,
.infonotice {
border: 1px solid var(--dark-color);
font-size: $fz-small;
padding: 1em;
padding-left: 3em;
a:not(.pk-button) {
color: var(--dark-color);
}
&::before {
top: 1em;
color: var(--dark-color);
}
}
.errornotice {
--dark-color: #D02829;
}
.warningnotice {
--dark-color: #776100;
}
.successnotice {
--dark-color: #008619;
}
.infonotice {
--dark-color: #004084;
}
//
// Footer
//
#footer {
font-size: $fz-small;
.cell h2:first-child,
.cell--title {
background-color: transparent;
color: white;
font-size: 1em;
font-weight: bold;
font-family: $ff-ss-serif;
}
div.links-list ul > li {
border-bottom: none
}
div.links-list ul > li > a {
font-size: $fz-xsmall;
font-family: $ff-serif;
font-style: italic;
padding-bottom: 0.15em;
padding-top: 0.15em;
}
}

112
static/cnil-2023/_vars.scss Normal file
View File

@ -0,0 +1,112 @@
// Colors
$gray: #686767;
$gray-dark: #444;
$gray-xdark: #222;
$gray-xlight: #EFEDE2;
$gray-xxlight: #FAFAF7;
$blue: #3879BF;
$blue-dark: #004084;
$red: #D02829;
// Typo
$ff-serif: Georgia, serif;
$ff-ss-serif: 'Open Sans', sans-serif;
$ff-ss-serif-cond: 'Open Sans Condensed', sans-serif;
$base-font: 18;
$fz-1: 38rem / $base-font;
$fz-1m: 28rem / $base-font;
$fz-2: 32rem / $base-font;
$fz-2m: 24rem / $base-font;
$fz-3: 22rem / $base-font;
$fz-3m: 20rem / $base-font;
$fz-small: 16rem / $base-font;
$fz-xsmall: 14rem / $base-font;
// Core vars
$width: 1280em / $base-font;
$mobile-limit: 64em;
$very-small-limit: 35em;
$columns-gutter: 16px;
$sidebar-width: 290px;
$font-family: Georgia, "Times New Roman", Times, serif;
$font-size: 100% / ( 16 / $base-font );
$font-size-small: $fz-small;
$font-size-xsmall: $fz-xsmall;
$font-color: $gray-xdark;
$link-color: $blue;
$link-decoration: underline;
$primary-color: #003D8D;
$body-background: $gray-xlight;
$header-background-color: white;
$header-logo-size: 155px 47px;
$toplinks-style: none;
$nav-font-family: $ff-ss-serif;
$nav-font-weight: 400;
$nav-item-transform: uppercase;
$nav-item-selected-mode: bottom-border;
$nav-border-color: none;
$nav-button-color: $gray;
$nav-button-background: transparent;
$nav-menu-side: 32px;
$nav-color: $blue;
$nav-item-selected-border: 13px solid $red;
$nav-item-hover-background: none;
$nav-item-hover-color: $nav-color;
$nav-mobile-menu-background: white;
$nav-mobile-menu-item-color: $nav-color;
$title-font-family: $ff-ss-serif-cond;
$title-font-size: $fz-2;
$title-weight: bold;
$title-color: $blue;
$title-padding: 1rem;
$cell-border: none;
$cell-entry-hover-background: transparent;
$cell-entry-hover-color: $blue-dark;
$cell-open-foldable-icon: "\f105"; // angle-right
$cell-close-foldable-icon: "\f107"; // angle-down
$form-title-style: none;
$form-sidebar-width: $sidebar-width;
$form-sidebar-gutter: $columns-gutter;
$button-background: $gray-dark;
$button-color: white;
$button-border: 1px solid $button-background;
$button-hover-background: $blue-dark;
$button-border-radius: 2px;
$buttons-order: cancel, previous, submit;
$button-padding: 0.625rem 2em;
$form-background: white;
$error-color: $red;
$form-accent-color: $blue;
$widget-unique-checkbox-position: left;
$widget-border: 1px solid $gray;
$widget-focus-border: 1px solid $blue;
$widget-focus-outline: 1px solid $blue;
$wcs-steps-small-layout-limit: $mobile-limit;
$wcs-steps-spacing: 0;
$wcs-step-color: $gray;
$wcs-step-current-color: $font-color;
$wcs-step-border-bottom: none;
$notification_error_color: #FFF4F4;
$notification_warning_color: #FFF9E3;
$notification_success_color: #F0FFF2;
$notification_info_color: #F0F8FF;
$notification-icon-size: 20px;
$footer-background: $gray-xdark;
$footer-color: white;
$footer-link-color: $footer-color;

View File

@ -0,0 +1,15 @@
{
"label": "CNIL (2023)",
"variables": {
"theme_color": "#003D8D",
"email_header_asset": "emails:logo"
},
"settings": {
"combo": {
"COMBO_ASSET_SLOTS.update": {
"header:logo": { "label": "Têtière : logo" },
"emails:logo": {"label": "Emails : logo"}
}
}
}
}

View File

@ -0,0 +1,7 @@
@charset "UTF-8";
@import '../includes/fonts/opensans-condensed';
@import '../includes/fonts/opensans';
@import 'vars';
@import '../includes/publik';
@import 'custom';

View File

@ -0,0 +1,11 @@
{% extends "authentic2/login.html" %}
{% block content %}
<div class="cnil-login-page">
<h1 class="cnil-blue-title">Connectez-vous à votre compte CNIL</h1>
{{ block.super }}
</div>
{% endblock %}

View File

@ -0,0 +1,5 @@
{% extends "authentic2/login_password_form.html" %}
{% block login-block-title %}
<h2 class="a2-block-title">S'identifier avec votre courriel</h2>
{% endblock %}

View File

@ -0,0 +1,5 @@
{% extends "authentic2_auth_fc/login.html" %}
{% block login-block-title %}
<h2 class="a2-block-title">S'identifier avec France Connect</h2>
{% endblock %}

View File

@ -0,0 +1,6 @@
{% extends "authentic2_auth_fc/registration.html" %}
{% load i18n %}
{% block registration-block-title %}
<h2 class="a2-block-title">S'identifier avec France Connect</h2>
{% endblock %}

View File

@ -0,0 +1,19 @@
{% extends "combo/page_template.html" %}
{% block title %}{{ block.super }} {{ portal_profil }}{% endblock %}
{% block extra_css %}
<style>
html {
--portal-profil-color: {{ portal_profil_color }};
}
</style>
{% endblock %}
{% block header-pre %}
<div class="portal-profil">
<div class="header-width">
<p>{{ portal_profil }}</p>
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,6 @@
<span class="connected-user--first-name">
{{ user.first_name }}
</span>
<span class="connected-user--last-name">
{{ user.last_name|slice:"1" }}
</span>

View File

@ -0,0 +1,10 @@
{% extends "registration/registration_form.html" %}
{% load i18n %}
{% block placeholder-content %}
<div class="cnil-registration-page clearfix">
<h1 class="cnil-blue-title">Inscription</h1>
{{ block.super }}
</div>
{% endblock %}

View File

@ -0,0 +1,17 @@
{% extends "theme.html" %}
{% block header-content %}
{% block nav %}{% endblock %}
{{ block.super }}
{% endblock %}
{% block after-header %}{% endblock %}
{% block content-pre %}
{% if cnil_page_header %}
<header class="cnil-page-header">
<p><strong>
{{ cnil_page_header }}
</strong></p>
</header>
{% endif %}
{% endblock %}