From 67f1bae704fbf5580f252620ee49a18486fd4466 Mon Sep 17 00:00:00 2001 From: Agate Berriot Date: Tue, 20 Sep 2022 10:03:14 +0200 Subject: [PATCH] univ-nantes: new theme (#68998) --- static/univ-nantes/_custom.scss | 117 ++++++++++++++++++++++++++++++++ static/univ-nantes/_vars.scss | 78 +++++++++++++++++++++ static/univ-nantes/config.json | 13 ++++ static/univ-nantes/style.scss | 6 ++ 4 files changed, 214 insertions(+) create mode 100644 static/univ-nantes/_custom.scss create mode 100644 static/univ-nantes/_vars.scss create mode 100644 static/univ-nantes/config.json create mode 100644 static/univ-nantes/style.scss diff --git a/static/univ-nantes/_custom.scss b/static/univ-nantes/_custom.scss new file mode 100644 index 00000000..e9f038a9 --- /dev/null +++ b/static/univ-nantes/_custom.scss @@ -0,0 +1,117 @@ + +%button { + box-shadow: none; + text-transform: uppercase; + font-weight: 700; + &:hover { + box-shadow: none; + } +} + +%inverted-button { + box-shadow: none; + &:hover { + box-shadow: none; + } +} +h1, h2, h3, h4, h5, h6 { + padding-left : 0.7em; + padding-right : 0.7em; +} +%cell { + border: none; + &:not(.transparent) { + box-shadow: 0 0.5em 1em rgba(0, 0, 0, 0.15); + border-top: 5px solid $blue; + } + &.transparent { + padding: 0; + } + & > div { + & > h1::after { + content: " "; + display: block; + position: relative; + bottom: -$space-xsmall; + width: 1.5em; + border-bottom: 5px solid $blue; + } + & > h2:first-child, .wcs-tracking-code-input > h2 { + border-bottom: 1px solid rgba(206, 206, 206, 0.75); + } + + } +} +.site-header { + padding: $space-small; +} +#nav-wrapper { + box-shadow: 0 0.225em 0.325em rgba(0, 0, 0, 0.1); +} + +#logo { + @media screen and ($max-mobile-viewport) { + padding-left: unset; + } +} + +div#nav { + max-width: 100%; + padding: 0 $space-large 0 $space-small; + +} +div.gru-nav { + @media screen and ($min-desktop-viewport) { + text-align: center; + } + @media screen and ($max-mobile-viewport) { + .gru-nav-button { + right: $space-medium; + left: unset; + & + ul::before { + display: none; + } + } + } +} +#toplinks { + font-size: $fz-small; + font-weight: 700; + right: $space-xlarge; + @media screen and ($max-mobile-viewport) { + margin-right: $nav-menu-side; + background: transparent; + } + a { + color: $black; + @media screen and ($max-mobile-viewport) { + padding: $space-xsmall 0; + margin-left: $space-large; + } + @media screen and ($min-desktop-viewport) { + padding: $space-xsmall; + &:not(:first-child) { + padding-left: $space-medium; + } + } + } +} + +main { + margin-top: $space-large; +} +div.gru-nav { + li > a { + border: 2px solid transparent; + } + li:focus-within > a, + li:hover > a { + border: 2px solid $blue; + } +} + +%cell-links-list { + > li:hover { + border-left: 5px solid blue; + } +} \ No newline at end of file diff --git a/static/univ-nantes/_vars.scss b/static/univ-nantes/_vars.scss new file mode 100644 index 00000000..c62c715e --- /dev/null +++ b/static/univ-nantes/_vars.scss @@ -0,0 +1,78 @@ +$blue: #3452ff; +$white: #ffffff; +$black: black; +$epicea: #5d7b84; + +$gray-light-1: rgba(0, 0, 0, 0.87); + +$primary-color: $blue; + +$space-xsmall: 0.25em; +$space-small: 0.5em; +$space-medium: 1em; +$space-large: 2em; +$space-xlarge: 3em; + +// // typo +$font-color: $black; +$font-family: "Source Sans Pro", sans-serif; +$font-size: 18px; +$font-line-height: 27px; +$base-font: 16; +$fz-1: 30em / $base-font; +$fz-2: 24em / $base-font; +$fz-3: 21em / $base-font; +$fz-4: 18em / $base-font; +$fz-small: 14em / $base-font; +$fz-xsmall: 12em / $base-font;; +$fz-xxsmall: 11em / $base-font;; + +$width: 890px; +$link-color: $blue; +$link-decoration: underline; +$link-hover-decoration: none; + +$responsive-menu: left-to-right; +$nav-button-background: $white; +$nav-button-color: $black; + +$nav-mobile-menu-background: $white; +$nav-item-selected-background: $blue; +$nav-item-selected-color: $white; + +$nav-item-hover-background: $white; +$nav-item-hover-color: $blue; + +$nav-submenu-background: $blue; +$nav-submenu-color: $white; + +$toplinks-border-radius: 0; +$toplinks-box-shadow: none; +$toplinks-padding: $space-medium; +$toplinks-border: none; + + +$title-color: $black; +$title-font-size: $fz-2; +$title-weight: 700; + +$button-background: $blue; +$button-color: $white; +$button-border: 2px solid $blue; +$button-hover-background: $white; +$button-hover-color: $blue; +$button-focus-outline: 2px solid $blue; +$button-focus-outline-offset: 2px; +$cancel-button-style: '%inverted-button'; +$buttons-order: previous, cancel (grow), submit; + +$form-sidebar-width: 30%; + +$widget-background: $white; +$widget-focus-border: 1px solid transparent; +$widget-border-radius: 4px; +$widget-focus-outline: 2px solid $blue; + +$footer-background: $black; +$footer-color: $white; +$footer-link-color: $white; diff --git a/static/univ-nantes/config.json b/static/univ-nantes/config.json new file mode 100644 index 00000000..eadeb902 --- /dev/null +++ b/static/univ-nantes/config.json @@ -0,0 +1,13 @@ +{ + "label": "Nantes Université", + "variables": { + "theme_color": "#3452ff" + }, + "settings": { + "combo": { + "COMBO_ASSET_SLOTS.update": { + "header:logo": { "label": "Têtière : logo" } + } + } + } +} diff --git a/static/univ-nantes/style.scss b/static/univ-nantes/style.scss new file mode 100644 index 00000000..2575fb1f --- /dev/null +++ b/static/univ-nantes/style.scss @@ -0,0 +1,6 @@ +@charset "UTF-8"; +@import '../includes/fonts/source-sans-pro'; + +@import 'vars'; +@import '../includes/publik'; +@import 'custom'; -- 2.37.2