Projet

Général

Profil

0001-saumur-new-theme-69791.patch

A. Berriot, 14 octobre 2022 16:41

Télécharger (9,57 ko)

Voir les différences:

Subject: [PATCH 1/2] saumur: new theme (#69791)

 static/saumur/_custom.scss                    | 238 ++++++++++++++++++
 static/saumur/_vars.scss                      | 101 ++++++++
 static/saumur/config.json                     |  15 ++
 static/saumur/style.scss                      |   6 +
 .../variants/saumur/combo/page_template.html  |  10 +
 5 files changed, 370 insertions(+)
 create mode 100644 static/saumur/_custom.scss
 create mode 100644 static/saumur/_vars.scss
 create mode 100644 static/saumur/config.json
 create mode 100644 static/saumur/style.scss
 create mode 100644 templates/variants/saumur/combo/page_template.html
static/saumur/_custom.scss
1
$logo-height: 140px;
2
$banner-height: 300px;
3

  
4
%button {
5
    box-shadow: none;
6
    text-transform: uppercase;
7
    &:hover {
8
        box-shadow: none;
9
    }
10
}
11

  
12
%title {
13
    text-transform: uppercase;
14
}
15

  
16
// golbal layout
17

  
18
main {
19
    background: $gray-light-2;
20
    padding: $space-large 0;
21
}
22

  
23

  
24
// header and navigation
25

  
26
#logo {
27
    @media screen and ($max-mobile-viewport) { 
28
        padding: 0 $space-small;
29
        
30
    }
31
}
32

  
33
#logo.has-logo a {
34
    z-index: 2;
35
    height: $logo-height / 2;
36
    min-width: $logo-height;
37
    @media screen and ($min-desktop-viewport) { 
38
        height: $logo-height;
39
        min-width: $logo-height * 2;
40
    }
41
}
42

  
43
.site-nav {
44
    z-index: 101;
45
}
46
.gru-nav-wrapper {
47
    margin-top: -$logo-height * 0.85;
48
}
49
div#nav {
50
    text-transform: uppercase;
51
}
52
div.gru-nav {
53
    background: transparent;
54
    @media screen and ($min-desktop-viewport) {
55
        > ul {
56
            text-align: right;
57
            float: right;
58
        }
59
    }
60
    & > ul > li:first-child > a {
61
        border-radius: $border-radius-1;
62
    }
63
    & > ul > li a {
64
        font-weight: 500;
65
    }
66
    .menu--link {
67
        border-radius: $border-radius-1;
68
        
69
    }
70
    @media screen and ($max-mobile-viewport) {
71
        .gru-nav-button {
72
            top: $space-small;
73
            right: $space-small;
74
            left: unset;
75
            & + ul::before {
76
                display: none;
77
            }
78
        }
79
        &.togglable .menu {
80
            box-shadow: 0 9px 9px 0 rgba(0, 0, 0, 0.1);
81
            & > li {
82
                border-bottom: 1px solid $gray-light-3;
83
            }
84
        }
85
    }
86
}
87

  
88
#toplinks {
89
    @media screen and ($max-mobile-viewport) {
90
        margin-top: $space-small;
91
        margin-right: $nav-menu-side;
92
        background: transparent;
93
    }
94
}
95

  
96
//  banner
97

  
98
.banner {
99
    background-image: url(/assets/banner:background);
100
    background-size: cover;
101
    background-position: center;
102
    background-repeat: no-repeat;
103
    height: $banner-height / 1.5;
104
    @media screen and ($min-desktop-viewport) {
105
        height: $banner-height;
106
    }
107
}
108
// content and cells
109

  
110
h1, h2, h3, h4, h5, h6 {
111
    @extend %title;
112
}
113
h1 {
114
    font-size: $fz-1;
115
}
116
h2 {
117
    font-size: $fz-2;
118
}
119
h3 {
120
    font-size: $fz-3;
121
}
122

  
123
.search-cell.transparent {
124
    border: none;
125
    background: transparent;
126
    form {
127
        padding: 0;
128
    }
129
}
130

  
131
div.link-cell {
132
    &.pk-button, &.pk-big-button {
133
        background: transparent;
134
        border: none;
135
    }
136
}
137

  
138
#sidebar {
139
    div#rub_service div.category h3,
140
    div.a2-block h2,
141
    .block h2,
142
    div.links-list h2,
143
    div#services > ul > li > strong > a,
144
    div.textcell h2:first-child,
145
    div.cell h2:first-child {
146
        background-color: $gray-dark-1;
147
        color: $white;
148
        font-weight: 600;
149
        &::before {
150
			content: '\f054';
151
			font-family: FontAwesome;
152
			margin-right: 0.6em;
153
            font-size: 0.6em;
154
			display: inline-block;
155
			vertical-align: middle;
156
		}
157
    }
158
}
159

  
160
%orange-border {
161
    content: " ";
162
    display: block;
163
    margin: $space-small auto;
164
    border-bottom: 3px solid $orange;
165
}
166

  
167
#columns-wrapper {
168
    div#rub_service div.category h3,
169
    div.a2-block h2,
170
    .block h2,
171
    div.links-list h2,
172
    div#services > ul > li > strong > a,
173
    div.textcell h2:first-child,
174
    div.cell:not(.has-asset-picture) h2:first-child {
175
        &::after {
176
            @extend %orange-border
177
        }
178
    }
179
}
180

  
181
.gru-content div.cell.has-asset-picture {
182
    & > div {
183
        position: relative;
184
    }
185
    h2:first-child {
186
        padding-left: $space-large * 1.5;
187
        width: 100%;
188
    }
189
    img {
190
        position: absolute;
191
        padding: 0 !important;
192
        width: $space-large;
193
        top: $space-small;
194
        left: $space-medium;
195
    }
196
    &.foldable:not(.folded) picture::after {
197
        @extend %orange-border;
198
        margin: 0 1rem;
199
    }
200
    &:not(.foldable) picture::after {
201
        @extend %orange-border;
202
        margin: 0 1rem;
203
    }
204
}
205

  
206
// forms
207
.form-content {
208
    @extend %cell;
209
}
210

  
211
.form-previous {
212
    &::before {
213
        content: '\f100';
214
        font-family: FontAwesome;
215
        margin-right: 0.6em;
216
        font-size: 0.6em;
217
        display: inline-block;
218
        vertical-align: middle;
219
    }
220
}
221
.form-next {
222
    &::after {
223
        content: '\f101';
224
        font-family: FontAwesome;
225
        margin-left: 0.6em;
226
        font-size: 0.6em;
227
        display: inline-block;
228
        vertical-align: middle;
229
    }
230
}
231

  
232
// footer
233
#footer-wrapper {
234
    margin-top: 0;
235
}
236
footer {
237
    text-align: center;
238
}
static/saumur/_vars.scss
1
$orange: #EA5625;
2
$pink: #F4A7A8;
3
$light-green: #C5DED1;
4
$black: black;
5
$white: white;
6

  
7

  
8
// $carbon: #222222;
9
// $white: #ffffff;
10
// $epicea: #5d7b84;
11

  
12
// $gray-secondary: #666666;
13
$gray-light-1: #EEEEEE;
14
$gray-light-2: #EAECE8;
15
$gray-light-3: #A9A9A9;
16
$gray-dark-1: #596E80;
17

  
18
$primary-color: $orange;
19

  
20
$space-xsmall: 0.25em;
21
$space-small: 0.5em;
22
$space-medium: 1em;
23
$space-large: 2em;
24
$space-xlarge: 3em;
25

  
26
$border-radius-1: 15px;
27

  
28
// // typo
29
$font-color: $black;
30
$font-family: Manrope, sans-serif;
31
$font-size: 18px;
32
$font-line-height: 1.4;
33
$base-font: 16;
34
$fz-1: 30em / $base-font;
35
$fz-2: 24em / $base-font;
36
$fz-3: 21em / $base-font;
37
$fz-4: 18em / $base-font;
38
$fz-small: 14em / $base-font;
39
$fz-xsmall: 12em / $base-font;;
40
$fz-xxsmall: 11em / $base-font;;
41

  
42
$width: 1200px;
43
$link-color: inherit;
44
$link-decoration: underline;
45
$link-hover-decoration: none;
46

  
47
$responsive-menu: left-to-right;
48
$nav-button-background: $white;
49
$nav-after-image: false;
50
$nav-button-color: $black;
51

  
52
$nav-mobile-menu-background: $white;
53

  
54
$nav-item-selected-background: $orange;
55
$nav-item-selected-color: $white;
56

  
57
$nav-item-hover-background: $white;
58
$nav-item-hover-color: $orange;
59
$nav-item-hover-border: 1px solid $orange;
60

  
61
$nav-submenu-background: $orange;
62
$nav-submenu-color: $white;
63

  
64
$toplinks-border-radius: 0;
65
$toplinks-background: transparent;
66
$toplinks-box-shadow: none;
67
$toplinks-padding: $space-medium;
68
$toplinks-border: none;
69

  
70
$cell-border: 1px solid $gray-dark-1;
71
$cell-entry-border: 2px dotted $gray-dark-1;
72
$cell-title-cover-border: false;
73
$title-color: $gray-dark-1;
74
$title-transform: uppercase;
75

  
76
$button-background: $light-green;
77
$button-color: $gray-dark-1;
78
$button-border-radius: $border-radius-1;
79
$button-box-shadow: none;
80
$button-hover-background: $orange;
81
$button-hover-color: $white;
82
$button-focus-outline: 2px solid $orange;
83
$button-focus-outline-offset: 2px;
84
$buttons-order: previous, cancel (grow), submit;
85

  
86
$widget-background: $gray-light-1;
87
$widget-border: 1px solid $gray-dark-1;
88
$widget-focus-border: 1px solid $orange;
89
$widget-focus-background: $white;
90

  
91
$footer-background: $orange;
92
$footer-color: $white;
93
$footer-link-color: $white;
94

  
95
$form-sidebar-position: top;
96
$wcs-step-marker-type: disc tied;
97
$wcs-step-current-marker-background: $primary-color;
98
$wcs-step-current-marker-color: white;
99
$wcs-step-marker-background: $light-green;
100
$wcs-step-border-bottom: none;
101
$wcs-step-marker-tie-color: $light-green;
static/saumur/config.json
1
{
2
  "label": "Saumur Agglomération",
3
  "variables": {
4
    "theme_color": "#EA5625",
5
    "cell_picture_size" : "150x150"
6
  },
7
  "settings": {
8
    "combo": {
9
      "COMBO_ASSET_SLOTS.update": {
10
        "header:logo": { "label": "Têtière : logo" },
11
        "banner:background": {"label": "Bannière : image de fond"}
12
      }
13
    }
14
  }
15
}
static/saumur/style.scss
1
@charset "UTF-8";
2
@import '../includes/fonts/manrope';
3

  
4
@import 'vars';
5
@import '../includes/publik';
6
@import 'custom';
templates/variants/saumur/combo/page_template.html
1
{% extends 'combo/page_template.html' %}
2
{% load assets combo i18n %}
3

  
4
{% block before-main-content %}
5
  {{ block.super }}
6
  {% get_asset "banner:background" as banner_background %}
7
  {% if banner_background %}
8
    <div class="banner"></div>
9
  {% endif %}
10
{% endblock %}
0
-