Projet

Général

Profil

0001-saumur-new-theme-69791.patch

A. Berriot, 06 octobre 2022 17:27

Télécharger (102 ko)

Voir les différences:

Subject: [PATCH] univ-nantes: new theme (#69791)

 static/saumur/_custom.scss                    | 268 ++++++++++++++++++
 static/saumur/_vars.scss                      |  92 ++++++
 static/saumur/config.json                     |  14 +
 static/saumur/img/facebook.png                | Bin 0 -> 15877 bytes
 static/saumur/img/instagram.png               | Bin 0 -> 50060 bytes
 static/saumur/img/linkedin.png                | Bin 0 -> 24208 bytes
 static/saumur/style.scss                      |   6 +
 .../variants/saumur/combo/page_template.html  |  15 +
 .../saumur/includes/social-links.html         |   9 +
 9 files changed, 404 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/img/facebook.png
 create mode 100644 static/saumur/img/instagram.png
 create mode 100644 static/saumur/img/linkedin.png
 create mode 100644 static/saumur/style.scss
 create mode 100644 templates/variants/saumur/combo/page_template.html
 create mode 100644 templates/variants/saumur/includes/social-links.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-xsmall;
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

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

  
154
%orange-border {
155
    content: " ";
156
    display: block;
157
    margin: $space-small auto;
158
    border-bottom: 3px solid $orange;
159
}
160

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

  
175
.gru-content div.cell.has-asset-picture {
176
    & > div {
177
        position: relative;
178
    }
179
    h2:first-child {
180
        padding-left: $space-large * 1.75;
181
        width: 100%;
182
    }
183
    img {
184
        position: absolute;
185
        width: $space-large * 1.5;
186
        top: $space-xsmall;
187
        left: $space-small;
188
    }
189
    &.foldable:not(.folded) picture::after {
190
        @extend %orange-border;
191
        margin: 0 1rem;
192
    }
193
    &:not(.foldable) picture::after {
194
        @extend %orange-border;
195
        margin: 0 1rem;
196
    }
197
}
198

  
199
// forms
200
.form-content, .form-content--sidebox, .form-content--body {
201
    @extend %cell;
202
}
203

  
204
.form-previous {
205
    &::before {
206
        content: '\f053';
207
        font-family: FontAwesome;
208
        margin-right: 0.6em;
209
        font-size: 0.6em;
210
        display: inline-block;
211
        vertical-align: middle;
212
    }
213
}
214
.form-next {
215
    &::after {
216
        content: '\f054';
217
        font-family: FontAwesome;
218
        margin-left: 0.6em;
219
        font-size: 0.6em;
220
        display: inline-block;
221
        vertical-align: middle;
222
    }
223
}
224

  
225
// footer
226
#footer-wrapper {
227
    margin-top: 0;
228
}
229
.social-links {
230
    h2 {
231
        font-size: $fz-2;
232
        text-transform: uppercase;
233
        margin-top: $space-medium;
234
        border-top: 3px solid $light-green;
235
        border-bottom: 3px solid $light-green;
236
        margin-left: auto;
237
        margin-right: auto;
238
        display: inline-block;
239
        strong {
240
            color: $primary-color;
241
        }
242
    }
243
    a {
244
        display: inline-block;
245
        height: 80px! important;
246
        width: 80px! important;
247
        border-radius: 50%;
248
        padding: $space-small;
249
        border: 2px solid $light-green;
250
        margin: $space-medium;
251
        background-position: center;
252
        background-repeat: no-repeat;
253
        background-size: 80%;
254
    }
255

  
256
    .link--linkedin { 
257
        background-image: url(img/linkedin.png);
258
    }
259
    .link--instagram {
260
        background-image: url(img/instagram.png);
261
    }
262
    .link--facebook {
263
        background-image: url(img/facebook.png);
264
    }
265
}
266
footer {
267
    text-align: center;
268
}
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-button-color: $black;
50

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

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

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

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

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

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

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

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

  
90
$footer-background: $orange;
91
$footer-color: $white;
92
$footer-link-color: $white;
static/saumur/config.json
1
{
2
  "label": "Saumur Agglomération",
3
  "variables": {
4
    "theme_color": "#EA5625"
5
  },
6
  "settings": {
7
    "combo": {
8
      "COMBO_ASSET_SLOTS.update": {
9
        "header:logo": { "label": "Têtière : logo" },
10
        "banner:background": {"label": "Bannière : image de fond"}
11
      }
12
    }
13
  }
14
}
static/saumur/style.scss
1
@charset "UTF-8";
2
@import '../includes/fonts/montserrat';
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 %}
11

  
12
{% block footer-pre %}
13
  {% include 'variants/saumur/includes/social-links.html' %}
14
  {{ block.super }}
15
{% endblock %}
templates/variants/saumur/includes/social-links.html
1
<div class="social-links">
2
  <h2>Suivez <strong>#PLUSSLV</strong> sur :</h2>
3
  <div>
4
    <a class="link--linkedin" href="{{ social_linkedin_url }}" title="Nous suivre sur LinkedIn"></a>
5
    <a class="link--facebook" href="{{ social_facebook_url }}" title="Nous suivre sur Facebook"></a>
6
    <a class="link--instagram" href="{{ social_instagram_url }}" title="Nous suivre sur Instagram"></a>
7
  </div>
8
</div>
9

  
0
-