Projet

Général

Profil

0001-new-theme-calvados-intranet-cd14-41570.patch

Thomas Jund, 09 avril 2020 17:58

Télécharger (8,16 ko)

Voir les différences:

Subject: [PATCH] new theme: calvados-intranet-cd14 (#41570)

 static/calvados-intranet-cd14/_custom.scss    | 291 ++++++++++++++++++
 static/calvados-intranet-cd14/_vars.scss      |  61 ++++
 static/calvados-intranet-cd14/config.json     |   8 +
 .../img/Connect_intranet-logo.png             | Bin 0 -> 60041 bytes
 static/calvados-intranet-cd14/style.scss      |   7 +
 5 files changed, 367 insertions(+)
 create mode 100644 static/calvados-intranet-cd14/_custom.scss
 create mode 100644 static/calvados-intranet-cd14/_vars.scss
 create mode 100644 static/calvados-intranet-cd14/config.json
 create mode 100644 static/calvados-intranet-cd14/img/Connect_intranet-logo.png
 create mode 100644 static/calvados-intranet-cd14/style.scss
static/calvados-intranet-cd14/_custom.scss
1
@mixin fixed-header {
2
	transition: all ease 0.2s;
3
	margin-top: $toplinks-height;
4
	@media ($min-desktop-viewport) {
5
		position: fixed;
6
		top: 0;
7
		right: 0;
8
		left: 0;
9

  
10
		body.scrolled & {
11
			transform: translateY(-#{$toplinks-height});
12
		}
13
	}
14
}
15

  
16

  
17
@mixin fixed-header-height {
18
	@media ($min-desktop-viewport) {
19
		display: flex;
20
		height: $header-desktop-height;
21
		body.scrolled & {
22
			height: $header-desktop-fixed-height;
23
		}
24
	}
25
}
26

  
27
@mixin h1 {
28
	font-size: $fz-h1;
29
	font-weight: bold;
30
	color: $font-color;
31
	font-family: $ff-serif;
32
	line-height: 1.1;
33

  
34
}
35
@mixin h2 {
36
	font-size: $fz-h2;
37
	font-weight: bold;
38
	color: $primary-color;
39
	font-family: $ff-serif;
40
}
41
@mixin h3 {
42
	font-size: $fz-h3;
43
	font-weight: bold;
44
	color: $blue-dark;
45
	font-family: $ff-serif;
46
}
47
@mixin h4 {
48
	font-size: $fz-h4;
49
	font-weight: bold;
50
}
51

  
52
%cancel-button {
53
	@extend %button;
54
	background-color: white;
55
	color: $primary-color;
56
	border-color: currentColor;
57

  
58
	&:hover {
59
		background-color: white;
60
		color: $blue-dark;
61
	}
62
}
63

  
64
* {
65
	box-sizing: border-box;
66
}
67

  
68
html {
69
	@media (max-width: $very-small-limit) {
70
		font-size: $fz-mobile;
71
	}
72
}
73

  
74
a {
75
	&:hover, &:focus {
76
		text-decoration: underline;
77
	}
78
}
79

  
80
a#publik-portal-agent {
81
	right: auto;
82
	left: 5px;
83
}
84

  
85
#toplinks {
86
	height: $toplinks-height;
87
	top: -($toplinks-height);
88
	left: 0;
89
	max-width: none;
90
	width: 100vw;
91

  
92
	box-shadow: none;
93
	border-radius: 0;
94
	line-height: $toplinks-height / 1.5;
95
	font-size: 14px;
96
	text-align: right;
97
	border: 0;
98
	background: #eae9e2;
99
	text-transform: uppercase;
100
	a {
101
		color: #555;
102
		&:hover {
103
			color: black;
104
		}
105
	}
106
}
107

  
108
.site-header {
109

  
110
	#header {
111
		background-color: $grayish-yellow;
112
		max-width: none;
113

  
114
		@include fixed-header;
115
		@include fixed-header-height;
116

  
117
		@media ($min-desktop-viewport) {
118
			z-index: 20;
119
			background-color: transparent;
120
			right: auto;
121
			width: auto;
122
			align-items: center;
123
		}
124

  
125
		h1 {
126
			@media ($max-mobile-viewport) {
127
				padding-top: 0.5rem;
128
				padding-bottom: 0.5rem;
129
			}
130

  
131
			a {
132
				background: url(img/Connect_intranet-logo.png) bottom left no-repeat;
133
				background-size: auto 100%;
134
				width: 220px;
135
				height: 50px;
136
				display: block;
137
				text-indent: -10000px;
138
				@media ($max-mobile-viewport) {
139
					padding-left: 0;
140
				}
141
			}
142
		}
143
	}
144
}
145

  
146
.gru-nav-wrapper {
147
	@media ($max-mobile-viewport) {
148
		margin-top: -($nav-menu-side);
149
	}
150
}
151

  
152
div#nav {
153
	font-size: 16px;
154
	max-width: none;
155
	text-transform: uppercase;
156

  
157
	@include fixed-header;
158

  
159
	@media ($min-desktop-viewport) {
160
		z-index: 10;
161
		padding-right: 1rem;
162
		border-bottom: 1px solid #aaa;
163
	}
164

  
165
	@media ($max-mobile-viewport) {
166
		margin-top: 0;
167
	}
168

  
169

  
170
	& > ul {
171
		margin-top: 0;
172
		margin-bottom: 0;
173

  
174
		@include fixed-header-height;
175

  
176
		@media ($min-desktop-viewport) {
177
			justify-content: flex-end;
178

  
179
			> li {
180
				display: flex;
181

  
182
				> a {
183
					display: flex;
184
					align-items: center;
185
					padding: 1em;
186
				}
187
			}
188
		}
189

  
190
		li > a {
191
			font-weight: normal;
192
		}
193
		// Sub nav
194
		ul {
195
			@media ($min-desktop-viewport) {
196
				top: 100%;
197
			}
198
		}
199

  
200
	}
201
}
202

  
203
// Picture
204
body.has-picture nav::after {
205
	top: 0;
206
}
207
@media ($min-desktop-viewport) {
208
	body.has-picture nav::after {
209
		transition: top ease 0.2s;
210
		top: calc(#{$toplinks-height} + #{$header-desktop-height});
211
	}
212
	body.has-picture.scrolled nav::after {
213
		top: $header-desktop-fixed-height;
214
	}
215
}
216

  
217

  
218
div#main-content-wrapper {
219
	z-index: 0;
220
	line-height: 1.5;
221
	padding-top: 2rem;
222

  
223
	@media ($min-desktop-viewport) {
224
		padding-top: calc(#{$toplinks-height} + #{$header-desktop-height} + 2rem);
225
	}
226
}
227

  
228
// cells
229

  
230
.text-cell {
231
	h1 { @include h1; }
232
	h2 { @include h2; }
233
	h3 { @include h3; }
234
	h4 { @include h4; }
235
}
236

  
237
div#tracking-code h3 {
238
	border-bottom: none;
239
	padding-left: 0.5rem;
240
}
241

  
242
div#rub_service {
243
	> h2 {
244
		text-align: left;
245
		padding-left: 0.5rem;
246
		border-bottom: none;
247
		@include h1;
248
	}
249
	h3 { @include h2; }
250
	h4 { @include h3; }
251
}
252

  
253
body.has-picture {
254
	div#main-content-wrapper {
255
		padding-top: 0;
256
		#columns {
257
			> div:first-child {
258
				padding-top: 2rem;
259
			}
260
			> div#rub_service,
261
			> div#gauche {
262
				padding-top: 0rem;
263
				background: white;
264
			}
265
		}
266
	}
267
}
268

  
269
div.widget div.title {
270
	margin-bottom: 2px;
271
}
272

  
273
span.helptext, div.hint {
274
	font-size: $fz-small;
275
	color: $gray;
276
}
277

  
278
#footer {
279
	font-size: 14px;
280
	.menu-cell {
281
		li a {
282
			color: $footer-color;
283
			text-transform: uppercase;
284
			font-weight: 600;
285

  
286
			&:hover, &:focus {
287
				color: $blue-dark;
288
			}
289
		}
290
	}
291
}
static/calvados-intranet-cd14/_vars.scss
1
// custom vars
2
// Colors
3
$rose: #e40d7e;
4
$blue-dark: #003d7e;
5
$blue: #2ba3d7;
6
$grayish-yellow: #f4f2e6;
7
$gray-dark: #333;
8
$gray: #737373;
9
// typo
10
$fz-desktop: 125%; // 20px
11
$fz-mobile: 100%; // 16px
12
$fz-h1: 2.2em;
13
$fz-h2: 1.25em;
14
$fz-h3: 1.1em;
15
$fz-h4: 1em;
16
$fz-small: 0.8em;
17
$ff-ss-serif: Raleway, sans-serif;
18
$ff-serif: "Roboto Slab", serif;
19
// Layout
20
$toplinks-height: 40px;
21
$header-desktop-height: 6rem;
22
$header-desktop-fixed-height: 4rem;
23

  
24

  
25
// Core vars
26
$width: 1140px;
27
$mobile-limit: 1024px !default;
28
$very-small-limit: 560px;
29
$font-family: $ff-ss-serif;
30
$primary-color: $rose;
31
$font-color: black;
32
$font-size: $fz-desktop;
33
$border-radius: 0px;
34

  
35
$link-color: $blue-dark;
36

  
37
$nav-background: $grayish-yellow;
38
$nav-active-color: $primary-color;
39
$nav-item-selected-mode: bottom-border;
40
$nav-submenu-color: $font-color;
41
$nav-after-image-height: 300px;
42
$nav-item-selected-border: 4px solid $primary-color;
43

  
44
$button-background: $primary-color;
45
$cell-border: none;
46

  
47
$title-font-size: $fz-h2;
48
$title-color: $gray-dark;
49
$title-weight: bold;
50
$title-border-bottom: 2px solid $primary-color;
51
$title-border-radius: 0;
52

  
53
$button-hover-background: $blue-dark;
54
$widget-focus-border: 1px solid $blue-dark;
55

  
56
$wcs-step-current-color: $gray-dark;
57

  
58
$notification-style: border-icon;
59

  
60
$footer-background: white;
61
$footer-color: $gray;
static/calvados-intranet-cd14/config.json
1
{
2
  "label": "Calvados (CD14) Intranet",
3
  "redmine_url": "https://dev.entrouvert.org/projects/calvados-portail-agents",
4
  "variables": {
5
    "theme_color": "#e40d7e",
6
    "email_header_img": "img/Connect_intranet-logo.png"
7
  }
8
}
static/calvados-intranet-cd14/style.scss
1
@charset "UTF-8";
2
@import '../includes/font-roboto-slab';
3
@import '../includes/font-raleway';
4

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