armentieres: split scss files (#70745)

This commit is contained in:
Corentin Sechet 2022-11-21 22:00:41 +01:00
parent e6af7f431c
commit 2c4d560d51
7 changed files with 670 additions and 674 deletions

View File

@ -0,0 +1,269 @@
// Combo page header
.arm-page-header {
background: url('/assets/page-header:background');
background-size: cover;
background-position: center;
color: white;
h1 {
font-size: 48em / $base-font;
}
&--default {
display: none;
}
&--content {
max-width: $width;
clear: both;
margin: 0 auto;
.cell {
padding: 3rem 0rem;
}
}
@media ($max-mobile-viewport) {
display: none;
}
}
// Sidebar
div#sidebar {
div.cell h2:first-child {
display: flex;
align-items: center;
&::after {
content: '';
background: $gray-light;
flex-grow: 1;
height: 1px;
margin-left: 8px;
}
}
@media($max-mobile-viewport) {
display: none;
}
}
// Cells
%title {
margin-top: 1rem;
margin-bottom: 1rem;
}
.gru-content div.cell {
h2:first-child:not(:only-child) {
border-bottom-left-radius: $border-radius;
border-bottom-right-radius: $border-radius;
}
&.foldable > div > h2:first-child {
background: $yellow;
border: $yellow solid $gray;
color: black;
display: flex;
font-size: $fz-3;
align-items: center;
height: 4rem;
margin: 0;
padding-left: 1rem;
text-transform: none;
&:hover {
box-shadow: $widget-focus-box-shadow;
}
}
&.folded > div > h2:first-child {
border: 1px solid $gray;
background: transparent;
&::after {
color: $gray;
}
}
&.has-asset-picture {
position: relative;
> div > h2:first-child {
padding-left: 6rem;
}
picture {
height: 3rem;
left: 1.5rem;
position: absolute;
top: 0rem;
width: 3rem;
}
}
}
//Link lists
%cell-links-list {
> li > a {
padding-left: 0;
&:hover {
text-decoration: underline;
}
}
}
div#rub_service div.category,
div#services,
div#account-management,
#columns div.cell:not(.pk-button,.pk-big-button) div.links-list,
#columns div.menucell,
div.wcsformcell,
div.wcsformsofcategorycell,
div.wcscurrentdraftscell,
div.wcscurrentformscell {
.links-list > ul > li {
margin: 0.5rem;
border: 1px solid $gray-light;
border-radius: $border-radius;
padding: 0rem 0.8rem;
a {
text-decoration: none;
}
&:hover {
box-shadow: $widget-focus-box-shadow;
}
&.required-authentication, &.external-link {
a{
padding-right: 2rem;
&::after {
content: '';
height: 1.3rem;
width: 1.3rem;
position: absolute;
right: 0.7rem;
}
}
}
&.required-authentication a::after {
background: center / contain no-repeat url('/assets/authentication-required:icon');
}
&.external-link a::after {
background: center / contain no-repeat url('/assets/external-link:icon');
}
&:not(:last-child) {
border-bottom: 1px solid $gray-light;
}
}
}
// Search cell
.gru-content div.searchcell form {
padding: 0;
input[type="search"] {
background: $gray-xlight;
border: none;
&:focus {
background: $gray-xlight;
border: none;
}
}
.combo-search--button {
display: none;
}
}
// Tracking code input cell
.gru-content div.tracking-code-input-cell {
background: right / cover url('/assets/tracking-code-input:background');
div.wcs-tracking-code-input {
padding: 1rem;
div {
padding: 0;
form {
display: flex;
flex-wrap: wrap;
input {
flex-grow: 99999;
width: 11rem;
}
button {
flex-grow: 1;
@extend %black-button;
margin-right: 0;
min-width: 10rem;
&, &:hover {
color: $primary-color;
}
}
}
}
}
h2:first-child {
color: black;
background: transparent;
font-size: $fz-3;
margin-bottom: 0.5rem;
}
}
// Custom elements
.arm-salmon {
color: $salmon;
}
@mixin custom-background-cell($background, $button-color) {
border: 1px solid transparent;
background: right / cover no-repeat url($background);
.pk-button, .pk-big-button {
@extend %black-button;
&, &:hover {
color: $button-color;
}
}
}
.gru-content .cell {
&.arm-report {
@include custom-background-cell('/assets/report:background', $secondary-color);
font-size: 120%;
padding: 2rem;
}
&.arm-suggest {
@include custom-background-cell('/assets/suggest:background', $primary-color)
}
&.arm-register {
@include custom-background-cell('/assets/register:background', $primary-color)
}
}
@mixin arm-link-icon($name) {
& > li.arm-icon-#{$name} {
display: flex;
align-items: center;
&::before {
content: '';
width: 32px;
height: 32px;
background: center / cover no-repeat url(img/icon-#{$name}.png);
margin-right: 0.8rem;
}
}
}
%cell-links-list {
@include arm-link-icon('user');
}

View File

@ -0,0 +1,59 @@
// Typos
h1 {
font-size: $fz-1;
}
h2 {
font-size: $fz-2;
}
h3 {
font-size: $fz-3;
}
// Layout
div#main-content-wrapper {
max-width: none;
}
.central-content {
max-width: $width;
clear: both;
margin: 0 auto;
}
@media ($min-desktop-viewport) {
.gru-content {
padding: 3rem 0.5rem 0 0.5rem;
}
}
// Notices
.errornotice, .warningnotice, .successnotice, .infonotice {
border-radius: $border-radius;
padding-top: 2rem;
padding-bottom: 2rem;
padding-right: 2rem;
a {
color: $red;
}
&::before {
top: calc(50% - 1rem);
}
}
.errornotice, .warningnotice {
&::before {
color: $red;
}
}
.infonotice::before {
color: $yellow;
}
.successnotice::before {
color: $green-dark;
}

View File

@ -1,673 +0,0 @@
//
// Typo
//
h1 {
font-size: $fz-1;
}
h2 {
font-size: $fz-2;
}
h3 {
font-size: $fz-3;
}
//
// Header
//
div#top {
display: flex;
align-items: center;
flex-wrap: wrap;
padding-top: 0.5rem;
}
#logo{
@media($max-mobile-viewport) {
padding-left: 0;
}
}
nav.site-nav {
flex-grow: 1;
@media($max-mobile-viewport) {
position: absolute;
top: 75px;
right: 10px;
}
}
div.gru-nav > ul {
margin: 0;
@media($max-mobile-viewport) {
position: fixed;
top: 0;
right: 0;
z-index: 10;
}
li a {
font-weight: normal;
padding: 30px 20px;
}
}
div#header {
max-width: calc(#{$width} + 100px);
}
div#toplinks {
position: static;
padding-top: 1rem;
padding-bottom: 1rem;
padding-right: 2rem;
@media($max-mobile-viewport) {
flex-grow: 1;
padding-right: 50px;
}
.logged-in, .login {
display: flex;
flex-wrap: wrap;
@media($max-mobile-viewport) {
span {
display: flex;
a:first-child {
flex-grow: 1;
}
}
}
> * {
margin: 0 .3rem;
}
a {
color: black;
font-weight: bold;
display: flex;
align-items: center;
}
&::before {
font-family: FontAwesome;
content: '';
width: 1.5rem;
height: 1.5rem;
background: url('/assets/profile:icon');
margin-right: 0.5rem;
}
}
}
.arm-page-header {
background: url('/assets/page-header:background');
background-size: cover;
background-position: center;
color: white;
h1 {
font-size: 48em / $base-font;
}
&--default {
display: none;
}
&--content {
max-width: $width;
clear: both;
margin: 0 auto;
.cell {
padding: 3rem 0rem;
}
}
@media ($max-mobile-viewport) {
display: none;
}
}
//
// Content
//
div#main-content-wrapper {
max-width: none;
}
.central-content {
max-width: $width;
clear: both;
margin: 0 auto;
}
@media ($min-desktop-viewport) {
.gru-content {
padding: 3rem 0.5rem 0 0.5rem;
}
}
div#sidebar {
div.cell h2:first-child {
display: flex;
align-items: center;
&::after {
content: '';
background: $gray-light;
flex-grow: 1;
height: 1px;
margin-left: 8px;
}
}
@media($max-mobile-viewport) {
display: none;
}
}
.errornotice, .warningnotice, .successnotice, .infonotice {
border-radius: $border-radius;
padding-top: 2rem;
padding-bottom: 2rem;
padding-right: 2rem;
a {
color: $red;
}
&::before {
top: calc(50% - 1rem);
}
}
.errornotice, .warningnotice {
&::before {
color: $red;
}
}
.infonotice::before {
color: $yellow;
}
.successnotice::before {
color: $green-dark;
}
//
// Footer
//
#footer-wrapper {
padding: 3rem 1.5rem 0;
#footer {
position: relative;
}
.back-top {
position: absolute;
top: -4.5rem;
right: 0rem;
background: $primary-color;
border-radius: $border-radius;
padding: 0.5rem;
&--link {
color: black;
&:hover {
text-decoration: none;
}
&::before {
font-size: 1.8rem;
}
}
&--link-label {
display: none;
}
}
}
.arm-footer-bottom {
padding: 1rem;
background: $gray;
color: white;
.menu-cell {
text-align: center;
li {
display: inline-block;
border: none;
a {
border-radius: 0;
border: none;
color: white;
padding: 0.5rem 2rem;
&:hover {
color: white;
}
}
}
}
}
//
// Cells
//
%title {
margin-top: 1rem;
margin-bottom: 1rem;
}
%cell-links-list {
> li > a {
padding-left: 0;
&:hover {
text-decoration: underline;
}
}
}
div#rub_service div.category,
div#services,
div#account-management,
#columns div.cell:not(.pk-button,.pk-big-button) div.links-list,
#columns div.menucell,
div.wcsformcell,
div.wcsformsofcategorycell,
div.wcscurrentdraftscell,
div.wcscurrentformscell {
.links-list > ul > li {
margin: 0.5rem;
border: 1px solid $gray-light;
border-radius: $border-radius;
padding: 0rem 0.8rem;
a {
text-decoration: none;
}
&:hover {
box-shadow: $widget-focus-box-shadow;
}
&.required-authentication, &.external-link {
a{
padding-right: 2rem;
&::after {
content: '';
height: 1.3rem;
width: 1.3rem;
position: absolute;
right: 0.7rem;
}
}
}
&.required-authentication a::after {
background: center / contain no-repeat url('/assets/authentication-required:icon');
}
&.external-link a::after {
background: center / contain no-repeat url('/assets/external-link:icon');
}
&:not(:last-child) {
border-bottom: 1px solid $gray-light;
}
}
}
.gru-content div.cell {
h2:first-child:not(:only-child) {
border-bottom-left-radius: $border-radius;
border-bottom-right-radius: $border-radius;
}
&.foldable > div > h2:first-child {
background: $yellow;
border: $yellow solid $gray;
color: black;
display: flex;
font-size: $fz-3;
align-items: center;
height: 4rem;
margin: 0;
padding-left: 1rem;
text-transform: none;
&:hover {
box-shadow: $widget-focus-box-shadow;
}
}
&.folded > div > h2:first-child {
border: 1px solid $gray;
background: transparent;
&::after {
color: $gray;
}
}
&.has-asset-picture {
position: relative;
> div > h2:first-child {
padding-left: 6rem;
}
picture {
height: 3rem;
left: 1.5rem;
position: absolute;
top: 0rem;
width: 3rem;
}
}
}
.gru-content div.searchcell form {
padding: 0;
input[type="search"] {
background: $gray-xlight;
border: none;
&:focus {
background: $gray-xlight;
border: none;
}
}
.combo-search--button {
display: none;
}
}
.gru-content div.tracking-code-input-cell {
background: right / cover url('/assets/tracking-code-input:background');
div.wcs-tracking-code-input {
padding: 1rem;
div {
padding: 0;
form {
display: flex;
flex-wrap: wrap;
input {
flex-grow: 99999;
width: 11rem;
}
button {
flex-grow: 1;
@extend %black-button;
margin-right: 0;
min-width: 10rem;
&, &:hover {
color: $primary-color;
}
}
}
}
}
h2:first-child {
color: black;
background: transparent;
font-size: $fz-3;
margin-bottom: 0.5rem;
}
}
/// WCS
.arm-form-header {
background: $gray-xlight;
&--content {
max-width: $width;
margin: 0 auto;
padding: 1.5rem 0 2.5rem 0;
}
&--title {
margin: 0;
font-weight: 900;
max-width: 35rem;
text-transform: uppercase;
font-size: 48em / $base-font;
}
&--description {
@media($max-mobile-viewport) {
display: none;
}
margin-top: 4rem;
}
@media($max-mobile-viewport) {
&--content {
padding: 1rem 0 1rem 0;
}
&--title {
font-size: $fz-1;
text-align: center;
}
}
}
div#tracking-code {
padding: 1rem;
background: right / cover url('/assets/tracking-code:background');
border-radius: $border-radius;
.tracking-code-part {
display: flex;
flex-direction: column;
h3 {
background: transparent;
color: black;
text-transform: none;
text-align: center;
margin-bottom: 0.7rem;
}
a {
text-align:center;
background: white;
padding: 0.5rem;
border-radius: $border-radius;
font-weight: bold;
}
}
form[action="removedraft"] {
display: flex;
justify-content: center;
.form-discard-draft {
@extend %black-button;
margin-right: 0;
&, &:hover {
color: $primary-color;
}
}
}
}
%button {
box-shadow: none;
padding: 0.5rem 1.5rem;
}
%black-button {
@extend %button;
background: black;
&:hover {
background: black;
}
}
%gray-button {
background: $gray-xlight;
color: black;
&:hover {
background: $gray-xlight;
}
}
.wcs-step {
border-radius: 0;
align-items: center;
&.current {
font-weight: normal;
}
&--marker-nb {
font-weight: bold;
}
@media($min-desktop-viewport) {
&.step-before::after {
content: '\f00c';
font-family: FontAwesome;
margin: 0rem 1rem;
color: $green;
}
}
}
.field {
&--label .required {
margin: 0;
color: $primary-color;
}
}
input[type=radio], input[type=checkbox] {
&:focus {
box-shadow: none;
}
}
input[readonly], select[readonly], textarea[readonly] {
border-radius: $widget-border-radius;
background: transparent;
border: $widget-border;
}
input::placeholder {
font-style: italic;
}
@mixin form-button-left($symbol) {
&::before {
content: $symbol;
font-family: FontAwesome;
font-size: 0.7rem;
margin-right: 1rem;
}
}
@mixin form-button-right($symbol) {
&::after {
content: $symbol;
font-family: FontAwesome;
font-size: 0.7rem;
margin-left: 1rem;
}
}
.form-content {
&--body .buttons.submit {
.form-next{
@include form-button-right('\f054');
}
.form-previous {
@include form-button-left('\f053');
}
.form-submit {
@include form-button-left('\f00c');
}
.form-discard, .cancel {
@include form-button-left('\f00d');
}
}
}
div.form-validation div.page {
border-radius: $border-radius;
}
.back-home-button {
display: flex;
justify-content: center;
a {
@extend %button;
&::after {
content: '\f0e2';
font-family: FontAwesome;
margin-left: 1rem;
}
}
}
///
/// Custom classes
///
.arm-salmon {
color: $salmon;
}
@mixin custom-background-cell($background, $button-color) {
border: 1px solid transparent;
background: right / cover no-repeat url($background);
.pk-button, .pk-big-button {
@extend %black-button;
&, &:hover {
color: $button-color;
}
}
}
.gru-content .cell {
&.arm-report {
@include custom-background-cell('/assets/report:background', $secondary-color);
font-size: 120%;
padding: 2rem;
}
&.arm-suggest {
@include custom-background-cell('/assets/suggest:background', $primary-color)
}
&.arm-register {
@include custom-background-cell('/assets/register:background', $primary-color)
}
}
@mixin arm-link-icon($name) {
& > li.arm-icon-#{$name} {
display: flex;
align-items: center;
&::before {
content: '';
width: 32px;
height: 32px;
background: center / cover no-repeat url(img/icon-#{$name}.png);
margin-right: 0.8rem;
}
}
}
%cell-links-list {
@include arm-link-icon('user');
}

View File

@ -0,0 +1,56 @@
#footer-wrapper {
padding: 3rem 1.5rem 0;
#footer {
position: relative;
}
.back-top {
position: absolute;
top: -4.5rem;
right: 0rem;
background: $primary-color;
border-radius: $border-radius;
padding: 0.5rem;
&--link {
color: black;
&:hover {
text-decoration: none;
}
&::before {
font-size: 1.8rem;
}
}
&--link-label {
display: none;
}
}
}
.arm-footer-bottom {
padding: 1rem;
background: $gray;
color: white;
.menu-cell {
text-align: center;
li {
display: inline-block;
border: none;
a {
border-radius: 0;
border: none;
color: white;
padding: 0.5rem 2rem;
&:hover {
color: white;
}
}
}
}
}

View File

@ -0,0 +1,86 @@
div#top {
display: flex;
align-items: center;
flex-wrap: wrap;
padding-top: 0.5rem;
}
#logo{
@media($max-mobile-viewport) {
padding-left: 0;
}
}
nav.site-nav {
flex-grow: 1;
@media($max-mobile-viewport) {
position: absolute;
top: 75px;
right: 10px;
}
}
div.gru-nav > ul {
margin: 0;
@media($max-mobile-viewport) {
position: fixed;
top: 0;
right: 0;
z-index: 10;
}
li a {
font-weight: normal;
padding: 30px 20px;
}
}
div#header {
max-width: calc(#{$width} + 100px);
}
div#toplinks {
position: static;
padding-top: 1rem;
padding-bottom: 1rem;
padding-right: 2rem;
@media($max-mobile-viewport) {
flex-grow: 1;
padding-right: 50px;
}
.logged-in, .login {
display: flex;
flex-wrap: wrap;
@media($max-mobile-viewport) {
span {
display: flex;
a:first-child {
flex-grow: 1;
}
}
}
> * {
margin: 0 .3rem;
}
a {
color: black;
font-weight: bold;
display: flex;
align-items: center;
}
&::before {
font-family: FontAwesome;
content: '';
width: 1.5rem;
height: 1.5rem;
background: url('/assets/profile:icon');
margin-right: 0.5rem;
}
}
}

View File

@ -0,0 +1,195 @@
// WCS page header
.arm-form-header {
background: $gray-xlight;
&--content {
max-width: $width;
margin: 0 auto;
padding: 1.5rem 0 2.5rem 0;
}
&--title {
margin: 0;
font-weight: 900;
max-width: 35rem;
text-transform: uppercase;
font-size: 48em / $base-font;
}
&--description {
@media($max-mobile-viewport) {
display: none;
}
margin-top: 4rem;
}
@media($max-mobile-viewport) {
&--content {
padding: 1rem 0 1rem 0;
}
&--title {
font-size: $fz-1;
text-align: center;
}
}
}
// Tracking code
div#tracking-code {
padding: 1rem;
background: right / cover url('/assets/tracking-code:background');
border-radius: $border-radius;
.tracking-code-part {
display: flex;
flex-direction: column;
h3 {
background: transparent;
color: black;
text-transform: none;
text-align: center;
margin-bottom: 0.7rem;
}
a {
text-align:center;
background: white;
padding: 0.5rem;
border-radius: $border-radius;
font-weight: bold;
}
}
form[action="removedraft"] {
display: flex;
justify-content: center;
.form-discard-draft {
@extend %black-button;
margin-right: 0;
&, &:hover {
color: $primary-color;
}
}
}
}
// Widgets
%button {
box-shadow: none;
padding: 0.5rem 1.5rem;
}
%black-button {
@extend %button;
background: black;
&:hover {
background: black;
}
}
%gray-button {
background: $gray-xlight;
color: black;
&:hover {
background: $gray-xlight;
}
}
.field {
&--label .required {
margin: 0;
color: $primary-color;
}
}
input[type=radio], input[type=checkbox] {
&:focus {
box-shadow: none;
}
}
input[readonly], select[readonly], textarea[readonly] {
border-radius: $widget-border-radius;
background: transparent;
border: $widget-border;
}
input::placeholder {
font-style: italic;
}
@mixin form-button-left($symbol) {
&::before {
content: $symbol;
font-family: FontAwesome;
font-size: 0.7rem;
margin-right: 1rem;
}
}
@mixin form-button-right($symbol) {
&::after {
content: $symbol;
font-family: FontAwesome;
font-size: 0.7rem;
margin-left: 1rem;
}
}
.form-content {
&--body .buttons.submit {
.form-next{
@include form-button-right('\f054');
}
.form-previous {
@include form-button-left('\f053');
}
.form-submit {
@include form-button-left('\f00c');
}
.form-discard, .cancel {
@include form-button-left('\f00d');
}
}
}
.back-home-button {
display: flex;
justify-content: center;
a {
@extend %button;
&::after {
content: '\f0e2';
font-family: FontAwesome;
margin-left: 1rem;
}
}
}
// Steps
.wcs-step {
border-radius: 0;
align-items: center;
&.current {
font-weight: normal;
}
&--marker-nb {
font-weight: bold;
}
@media($min-desktop-viewport) {
&.step-before::after {
content: '\f00c';
font-family: FontAwesome;
margin: 0rem 1rem;
color: $green;
}
}
}
div.form-validation div.page {
border-radius: $border-radius;
}

View File

@ -2,4 +2,8 @@
@import 'vars';
@import '../includes/publik';
@import 'custom';
@import 'combo';
@import 'common';
@import 'footer';
@import 'header';
@import 'wcs';