Projet

Général

Profil

0001-nimes-create-theme-67991.patch

Corentin Séchet, 30 août 2022 11:21

Télécharger (7,8 ko)

Voir les différences:

Subject: [PATCH] nimes: create theme (#67991)

 static/nimes/_custom.scss                     | 209 ++++++++++++++++++
 static/nimes/_vars.scss                       |  87 ++++++++
 static/nimes/config.json                      |  14 ++
 static/nimes/style.scss                       |   5 +
 .../variants/nimes/combo/page_template.html   |   7 +
 5 files changed, 322 insertions(+)
 create mode 100644 static/nimes/_custom.scss
 create mode 100644 static/nimes/_vars.scss
 create mode 100644 static/nimes/config.json
 create mode 100644 static/nimes/style.scss
 create mode 100644 templates/variants/nimes/combo/page_template.html
static/nimes/_custom.scss
1
// Header
2
#toplinks a {
3
	@extend %button;
4
	border-color: white;
5
	padding: 0.2rem 0.5rem;
6
	margin-right: 0.5rem;
7
}
8

  
9
div#nav {
10
	margin-bottom: 10px;
11
	font-family: 'dosis_semibold', Arial, sans-serif;
12

  
13
	@media($max-mobile-viewport) {
14
		.gru-nav-button + ul {
15
			border-top: none;
16
		}
17
	}
18

  
19
	> ul {
20
		margin: 0;
21
		> li {
22
			a {
23
				font-weight: normal;
24
			}
25

  
26
			> a {
27
				padding: 1.2em 20px;
28
			}
29

  
30
			> ul {
31
				box-shadow: 0px 4px 12px 0px $gray-dark;
32
				border-radius: $nav-border-radius;
33

  
34
				> li {
35
					> a {
36
						display: flex;
37
						font-size: $fz-small;
38
						padding: 0.2em 20px;
39

  
40
						&:hover {
41
							font-weight: 700;
42
						}
43

  
44
						&::before {
45
							content: '>';
46
							font-size: $fz-xsmall;
47
							margin-right: 0.5rem;
48
						}
49
					}
50

  
51
					&:first-child > a {
52
						border-radius: $nav-border-radius $nav-border-radius 0 0;
53
					}
54
				}
55
			}
56
		}
57
	}
58
}
59

  
60
@media ($max-mobile-viewport) {
61
	#logo.has-logo {
62
		padding-left: 0;
63
		a {
64
			margin-top: 50px;
65
			margin-bottom: 20px;
66
			@media ($max-mobile-viewport) {
67
				&::before {
68
				}
69
			}
70
		}
71
	}
72

  
73
	div#nav {
74
		.gru-nav-button {
75
			top: -75px;
76
		}
77

  
78
		> ul > li > ul {
79
			box-shadow: none;
80
		}
81
	}
82
}
83

  
84
//
85
// CONTENT
86
//
87
.gru-content div#sidebar .cell {
88
	border: 1px solid $gray-xdark;
89
	h2:first-child {
90
		background: $gray-xdark;
91
		color: white;
92
	}
93
}
94

  
95
.gru-content .cell.foldable {
96
	border: 1px solid $red;
97

  
98
	h2:first-child {
99
		background: $red;
100
		color: white;
101
	}
102

  
103
	&.folded {
104
		border: 1px solid $gray-xdark;
105
		h2:first-child {
106
			background: $gray-xdark;
107
		}
108
	}
109
}
110

  
111
.gru-content #sidebar div.cell,
112
div#gauche
113
{
114
	background: $gray-xlight;
115
}
116

  
117
%button, %inverted-button {
118
	box-shadow: none;
119
	&:hover {
120
		box-shadow: none;
121
	}
122
}
123

  
124
%cancel-button {
125
	border: 1px solid $gray-dark;
126
	background: $gray-dark;
127
	color: white;
128
	&:hover {
129
		background: $white;
130
		color: $gray-dark;
131
	}
132
}
133

  
134
input, input[type="text"], input[type="email"], input[type="password"],
135
input[type="url"], input[type="tel"], input[type="number"],
136
input[type="search"], input[type="file"], input[type="date"],
137
input[type="datetime-local"], input[type="month"], input[type="time"],
138
input[type="week"], textarea, select {
139
	&:focus:not([readonly]) {
140
		border-bottom-color: $widget-border;
141
	}
142
}
143

  
144
.form-content--title {
145
	font-size: $fz-1;
146
}
147

  
148
//
149
// FOOTER
150
//
151
div#footer {
152
	border-top: 1px solid #b2b2b2;
153
	div.links-list ul > li > a:hover {
154
		text-decoration: underline;
155
		background: transparent;
156
	}
157
}
158

  
159

  
160
.nimes-footer-bottom {
161
	max-width: $width;
162
	margin: 0 auto;
163
	padding: 0.5rem;
164
	display: flex;
165
	justify-content: center;
166
	background: $gray-xdark;
167
	color: white;
168

  
169
	a {
170
		color: white;
171
		text-decoration: none;
172
	}
173
}
174

  
175
//
176
// FIXES
177
//
178

  
179
// Hard-coded color on links description
180
%cell-links-list {
181
	li div.description {
182
		color: $font-color;
183
	}
184
}
185

  
186
// h1 and h2 have no padding in text cells
187
div.text-cell {
188
	h1, h2 {
189
		margin: 0.7rem 1rem;
190
	}
191
}
192

  
193
// picture of foldable cell still visible when folded
194
div.cell.folded > div > picture {
195
	display: none;
196
}
197

  
198
// no padding in wcsformcell
199
div.wcs-form-cell {
200
	padding: 1rem;
201
}
202

  
203
// double border on pk-button cells
204
div.linkcell{
205
	&.pk-button,
206
	&.pk-big-button {
207
		border: none;
208
	}
209
}
static/nimes/_vars.scss
1
$red: #c51012;
2
$blue: #3584e4;
3
$red-dark: #890b0c;
4
$gray-xdark: #323232;
5
$gray-dark: #656565;
6
$gray: #dddddd;
7
$gray-light: #e7e7e7;
8
$gray-xlight: #eeeeee;
9

  
10
$primary-color: $red;
11
$box-shadow: 3px 3px 6px 0px $gray;
12

  
13
// typo
14
$base-font: 16;
15
$font-color: #333;
16

  
17
$fz-1: 30em / $base-font;
18
$fz-2: 24em / $base-font;
19
$fz-3: 21em / $base-font;
20
$fz-4: 18em / $base-font;
21
$fz-small: 14em / $base-font;
22
$fz-xsmall: 11em / $base-font;
23

  
24
$link-color: $primary-color;
25
$link-decoration: underline;
26
$font-family: Arial, Helvetica, sans-serif;
27

  
28
$header-background-color: $primary-color;
29
$header-logo-size: 260px 73px;
30
$toplinks-background: $primary-color;
31
$toplinks-box-shadow: none;
32
$toplinks-padding: 20px 0 0 0;
33
$toplinks-border: none;
34

  
35
$nav-active-background: $gray-light;
36
$nav-border-radius: 0;
37
$nav-color: $font-color;
38
$nav-item-hover-background: $gray-light;
39
$nav-item-hover-color: $font-color;
40
$nav-item-selected-background: $gray-light;
41
$nav-item-selected-color: $font-color;
42
$nav-submenu-background: $gray;
43
$nav-submenu-color: $font-color;
44
$nav-button-background: $red;
45
$nav-border-color: transparent;
46

  
47
$cell-entry-color: black;
48
$cell-border: none;
49
$cell-border-radius: 0;
50
$cell-entry-border: 1px solid $gray;
51
$cell-entry-hover-background: $gray;
52
$cell-entry-hover-color: black;
53
$cell-open-foldable-icon: "\f13A";
54
$cell-close-foldable-icon: "\f139";
55
$cell-image-padding: 0rem 0.1rem;
56

  
57
$title-background: transparent;
58
$title-color: black;
59
$title-transform: uppercase;
60
$title-font-size: $fz-4;
61
$title-weight: 600;
62
$title-padding: .7rem 0.5rem .7rem 0.5rem;
63

  
64
$button-color: white;
65
$button-background: $red;
66
$button-hover-background: white;
67
$button-hover-color: $red;
68
$button-border: 1px solid $red !default;
69
$buttons-order: previous, cancel (grow), submit;
70
$cancel-button-style: "%inverted-button";
71

  
72
$widget-background: white;
73
$widget-border: 1px solid $gray-dark;
74
$widget-focus-border: 1px solid $blue;
75
$widget-focus-outline: 2px solid $blue;
76
$widget-box-shadow: none;
77
$widget-focus-box-shadow: none;
78
$form-style: light;
79

  
80
$wcs-step-color: $font-color;
81

  
82
$carrousel-item-mask-color: transparent;
83

  
84
$footer-background: white;
85
$footer-color: black;
86
$footer-link-color: black;
87
$footer-full-width-background: false;
static/nimes/config.json
1
{
2
  "label": "Nîmes",
3
  "variables": {
4
    "theme_color": "#c51012"
5
  },
6
  "settings": {
7
    "combo": {
8
      "COMBO_ASSET_SLOTS.update": {
9
        "header:logo": { "label": "Têtière : logo" },
10
        "emails:logo": { "label": "Courriels : logo" }
11
      }
12
    }
13
  }
14
}
static/nimes/style.scss
1
@charset "UTF-8";
2

  
3
@import 'vars';
4
@import '../includes/publik';
5
@import 'custom';
templates/variants/nimes/combo/page_template.html
1
{% extends "combo/page_template.html" %}
2

  
3
{% block footer-post %}
4
  <div class="nimes-footer-bottom">
5
	  {% placeholder "footer-bottom" name="Bas du pied de page" acquired=True optional=True %}
6
  </div>
7
{% endblock %}
0
-