Projet

Général

Profil

0001-mnhn-int-gration-graphique-initiale-68742.patch

A. Berriot, 07 septembre 2022 10:22

Télécharger (9,05 ko)

Voir les différences:

Subject: [PATCH] =?UTF-8?q?mnhn:=20int=C3=A9gration=20graphique=20initiale?=
 =?UTF-8?q?=20(#68742)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

 static/mnhn/_custom.scss | 204 +++++++++++++++++++++++++++++++++++++++
 static/mnhn/_vars.scss   |  97 +++++++++++++++++++
 static/mnhn/config.json  |  14 +++
 static/mnhn/style.scss   |   6 ++
 4 files changed, 321 insertions(+)
 create mode 100644 static/mnhn/_custom.scss
 create mode 100644 static/mnhn/_vars.scss
 create mode 100644 static/mnhn/config.json
 create mode 100644 static/mnhn/style.scss
static/mnhn/_custom.scss
1
$remote-font-path: 'https://www.mnhn.fr/themes/custom/front_common/source/fonts/woff2/';
2

  
3

  
4

  
5
@mixin buffon-font($type, $weight, $style) {
6
    @font-face {
7
        font-family: 'Buffon';
8
        src: url('#{$remote-font-path}/BuffonStandard-#{$type}.woff2') format('woff2');
9
        src: url('#{$remote-font-path}/BuffonStandard-#{$type}.woff2') format('woff2');
10
        font-weight: $weight;
11
        font-style: $style;
12
    }
13
}
14

  
15
@include buffon-font('Light', 200, normal);
16
@include buffon-font('Regular', 400, normal);
17
@include buffon-font('Bold', 700, bold);
18

  
19
$toplink-separator: 1px solid rgba(34, 34, 34, 0.3);
20

  
21
%button {
22
    box-shadow: none;
23
    text-transform: uppercase;
24
    &:hover {
25
		box-shadow: none;
26
	}
27
}
28

  
29
%inverted-button {
30
	background-color: $white;
31
	color: $carbon;
32
    border: 2px solid $button-background;
33
	&:hover {
34
        border: 2px solid $button-hover-background;
35
		background: $gray-light-2;
36
		color: $carbon;
37
	}
38
}
39

  
40
%title {
41
    text-transform: uppercase;
42
}
43

  
44
main {
45
    line-height: 1.5em;
46
}
47
// header and navigation
48

  
49
div#header {
50
    background: $white;
51
    max-width: 100%;
52
    box-shadow: 0 9px 9px 0 rgba(0, 0, 0, 10%);
53
    padding: $space-small $space-medium;
54
    @media screen and ($min-desktop-viewport) {
55
        padding: $space-large;
56
    }
57
}
58
#logo {
59
    @media screen and ($max-mobile-viewport) {
60
        padding-left: unset;
61
    }
62
}
63
#logo.has-logo a::before {
64
    @media screen and ($min-desktop-viewport) {
65
        z-index: 3;
66
        width: 100px;
67
        height: 62.5px
68
	}
69
}
70
.site-nav {
71
    z-index: 2;
72
    margin-bottom: $space-xlarge;
73
    @media screen and ($min-desktop-viewport) {
74
        margin-top: -$space-xlarge * 1.75;
75
    }
76
}
77
div#nav {
78
    max-width: 100%;
79
    padding: 0 $space-large 0 $space-small;
80

  
81
}
82
div.gru-nav {
83
    @media screen and ($min-desktop-viewport) {
84
        text-align: right;
85
	}
86
    @media screen and ($max-mobile-viewport) {
87
        .gru-nav-button {
88
            right: $space-medium;
89
            left: unset;
90
            & + ul::before {
91
                display: none;
92
            }
93
        }
94
        &.togglable .menu {
95
            box-shadow: 0 9px 9px 0 rgba(0, 0, 0, 10%);
96
            & > li {
97
                border-bottom: 1px solid $gray-light-3;
98
            }
99
        }
100
    }
101
    li .menu--label, li .submenu--label {
102
        text-transform: uppercase;
103
        font-size: $fz-small;
104
        &:hover {
105
            padding-bottom: $space-small;
106
            border-bottom: 2px solid $carbon;
107
        }
108
    }
109
    li.selected .menu--label {
110
        padding-bottom: $space-small;
111
        border-bottom: 2px solid $carbon;
112
    }
113
    .submenu {
114
        @media screen and ($min-desktop-viewport) {
115
            box-shadow: 0 9px 9px 0 rgba(0, 0, 0, 10%);
116
            font-size: $fz-xsmall;
117
            z-index: 101;
118
        }
119
    }
120
}
121
#toplinks {
122
    text-transform: uppercase;
123
    font-size: $fz-xxsmall;
124
    font-weight: 700;
125
    right: $space-xlarge;
126
    @media screen and ($max-mobile-viewport) {
127
        margin-right: $nav-menu-side;
128
        background: transparent;
129
    }
130
    a {
131
        color: $carbon;
132
        @media screen and ($max-mobile-viewport) {
133
            padding: $space-medium 0;
134
            margin-left: $space-large;
135
        }
136
        @media screen and ($min-desktop-viewport) {
137
            padding: $space-xsmall;
138
            &:not(:first-child) {
139
                padding-left: $space-medium;
140
                border-left: $toplink-separator;
141
            }
142
        }
143
    }
144
}
145

  
146
div#main-content-wrapper {
147
    z-index: 1;
148
}
149

  
150

  
151
a#publik-portal-agent {
152
	right: 45%;
153
	left: 45%;
154
    text-align: center;
155
}
156

  
157
// forms
158

  
159
.title label {
160
    text-transform: uppercase;
161
    font-weight: 700;
162
}
163

  
164
#side {
165
    font-size: 90%;
166
    border: $wcs-step-border-bottom;
167
    box-shadow: 0 3px 9px 0 rgba(0, 0, 0, 10%);
168
}
169
[role="radiogroup"] {
170
    margin-top: $space-medium;
171
}
172
.previous-button button {
173
    @extend %inverted-button;
174
}
175

  
176
// cells
177

  
178
.cell {
179
    h1, h2, h3, h4, h5, h6 {
180
        text-transform: uppercase;
181
        text-align: center;
182
    }
183
}
184

  
185
// links / underline expand/collapse animation
186
main a:not(.links-list *, .categories-cell *, .carrousel-content *, .pk-button, .pk-big-button, .account-management *) {
187
    background-size: 100% 2px;
188
    background-repeat: no-repeat;
189
    background-position: center 100%;
190
    background-image: linear-gradient(120deg, lighten($epicea, 15%), lighten($epicea, 15%));
191
    transition: background-size .2s ease-in-out;
192
    &:hover {
193
        background-image: linear-gradient(120deg, lighten($epicea, 35%), lighten($epicea, 35%));
194
        background-size: 100% 100%;
195
    }
196
}
197
//  other content
198

  
199
hr {
200
    margin: $space-large 0;
201
    border: none;
202
    border-bottom: 1px solid $gray-light-3;
203

  
204
}
static/mnhn/_vars.scss
1
$carbon: #222222;
2
$white: #ffffff;
3
$epicea: #5d7b84;
4

  
5
$gray-secondary: #666666;
6
$gray-light-1: #f5f5f5;
7
$gray-light-2: #f0f0f0;
8
$gray-light-3: #d8d8d8;
9
$gray-secondary: #656565;
10

  
11
$primary-color: $epicea;
12

  
13
$space-xsmall: 0.25em;
14
$space-small: 0.5em;
15
$space-medium: 1em;
16
$space-large: 2em;
17
$space-xlarge: 3em;
18

  
19
// typo
20
$font-color: $carbon;
21
$font-family: Buffon, Montserrat, Arial, sans-serif;
22
$font-size: 18px;
23
$font-line-height: 3.1em;
24
$base-font: 16;
25
$fz-1: 30em / $base-font;
26
$fz-2: 24em / $base-font;
27
$fz-3: 21em / $base-font;
28
$fz-4: 18em / $base-font;
29
$fz-small: 14em / $base-font;
30
$fz-xsmall: 12em / $base-font;;
31
$fz-xxsmall: 11em / $base-font;;
32

  
33
$width: 890px;
34
$link-color: $carbon;
35
$link-decoration: none;
36
$link-hover-decoration: none;
37

  
38
$header-logo-size: 59px 37px;
39
$responsive-menu: left-to-right;
40
$nav-color: $carbon;
41
$nav-background: transparent;
42
$nav-button-background: $white;
43
$nav-button-color: $carbon;
44

  
45
$nav-mobile-menu-background: $white;
46

  
47
$nav-item-background: transparent;
48
$nav-item-selected-background: $white;
49
$nav-item-selected-color: $carbon;
50

  
51
$nav-item-hover-background: transparent;
52
$nav-item-hover-color: $nav-color;
53
$nav-item-hover-border: 2px solid $carbon;
54

  
55
$nav-submenu-background: $gray-light-1;
56
$nav-submenu-color: $gray-secondary;
57

  
58
$toplinks-border-radius: 0;
59
$toplinks-background: $gray-light-2;
60
$toplinks-box-shadow: none;
61
$toplinks-padding: $space-medium;
62
$toplinks-border: none;
63

  
64
$cell-border: none;
65
$cell-background: $gray-light-1;
66
$cell-entry-hover-background: $epicea;
67
$cell-entry-hover-color: $white;
68

  
69
$title-color: $carbon;
70
$title-transform: uppercase;
71
$title-font-size: $fz-4;
72
$title-weight: 700;
73
$title-background: transparent;
74
$title-padding: $space-medium;
75

  
76
$button-background: $epicea;
77
$button-border-radius: 2px;
78
$button-border: none;
79
$button-hover-background: darken($button-background, 20%);
80
$button-focus-outline: 2px solid $carbon;
81
$button-focus-outline-offset: 2px;
82
$cancel-button-style: '%inverted-button';
83
$buttons-order: previous, cancel (grow), submit;
84

  
85
$form-style: light;
86
$form-sidebar-width: 30%;
87
$form-sidebar-position: right;
88

  
89
$widget-focus-border: 1px solid $primary-color;
90
$widget-focus-outline: 1px solid $primary-color;
91

  
92
$wcs-step-color: $carbon;
93
$wcs-step-border-bottom: 1px solid $gray-light-3;
94

  
95
$footer-background: $epicea;
96
$footer-color: $white;
97
$footer-link-color: $white;
static/mnhn/config.json
1
{
2
  "label": "Musée National d'Histoire Naturelle",
3
  "variables": {
4
    "theme_color": "#5d7b84"
5
  },
6
  "settings": {
7
    "combo": {
8
      "COMBO_ASSET_SLOTS.update": {
9
        "header:logo": { "label": "Têtière : logo" },
10
        "header:background": { "label": "Têtière : bannière" }
11
      }
12
    }
13
  }
14
}
static/mnhn/style.scss
1
@charset "UTF-8";
2
@import '../includes/fonts/montserrat';
3

  
4
@import 'vars';
5
@import '../includes/publik';
6
@import 'custom';
0
-