Projet

Général

Profil

0001-caen-style-attention-information-and-error-messages-.patch

Serghei Mihai (congés, retour 15/05), 27 janvier 2022 10:56

Télécharger (4,08 ko)

Voir les différences:

Subject: [PATCH] caen: style attention, information and error messages
 (#61164)

 static/caen/_custom.scss             | 21 +++++++++++++++++++++
 static/caen/_vars.scss               |  2 ++
 static/caen/img/attention-icon.svg   |  1 +
 static/caen/img/error-icon.svg       |  1 +
 static/caen/img/information-icon.svg |  1 +
 5 files changed, 26 insertions(+)
 create mode 100644 static/caen/img/attention-icon.svg
 create mode 100644 static/caen/img/error-icon.svg
 create mode 100644 static/caen/img/information-icon.svg
static/caen/_custom.scss
1
$notification-blocks:
2
	"pk-information" "information-icon.svg" "#0d74ef",
3
	"pk-error" "error-icon.svg" "#ff5801",
4
	"pk-attention" "attention-icon.svg" "#ff1400",
5
;
6

  
1 7
@mixin fill-viewport() {
2 8
		width: 100vw;
3 9
		margin-left: calc(-50vw + 50%);
......
598 604
	margin-bottom: 0.25em;
599 605
}
600 606

  
607
@each $name, $img, $color in $notification-blocks {
608
	.#{$name} {
609
		border: 1px solid #{$color} !important;
610
		color: #{$color} !important;
611
		font-weight: bold;
612
		&::before {
613
			content: '';
614
			width: 1em;
615
			height: 1em;
616
			display: block;
617
			background: url('img/#{$img}') center no-repeat;
618
		}
619
	}
620
}
621

  
601 622
//
602 623
//	FOOTER
603 624
//
static/caen/_vars.scss
76 76
$widget-focus-border: 1px solid black;
77 77
$widget-unique-checkbox-position: left;
78 78

  
79
$notification_base_color: transparent;
80

  
79 81
$footer-background: black;
80 82
$footer-color: white;
81 83
$footer-link-color: white;
static/caen/img/attention-icon.svg
1
<svg id="Calque_1" data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 65 65"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:#ff1400;}</style></defs><rect class="cls-1" width="65" height="65" rx="32.5"/><circle class="cls-2" cx="32.5" cy="40.07" r="1.93"/><rect class="cls-2" x="30.57" y="23.25" width="3.86" height="12.68" rx="1.93" transform="translate(65 59.18) rotate(180)"/><path class="cls-2" d="M47.07,48.13H43.66a1.75,1.75,0,0,1,0-3.5h3.41A1.09,1.09,0,0,0,48,43L33.44,17.75a1.09,1.09,0,0,0-1.88,0L17,43a1.09,1.09,0,0,0,.95,1.63H35a1.75,1.75,0,0,1,0,3.5H17.93a4.59,4.59,0,0,1-4-6.88L28.53,16a4.59,4.59,0,0,1,7.94,0L51.05,41.25a4.59,4.59,0,0,1-4,6.88Z"/></svg>
static/caen/img/error-icon.svg
1
<svg id="Calque_1" data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 65 65"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:#ff5801;}.cls-3{fill:none;stroke:#ff5801;stroke-miterlimit:10;stroke-width:3.5px;}</style></defs><rect class="cls-1" width="65" height="65" rx="32.5"/><circle class="cls-2" cx="32.5" cy="39.07" r="1.93"/><rect class="cls-2" x="30.57" y="22.25" width="3.86" height="12.68" rx="1.93" transform="translate(65 57.18) rotate(-180)"/><circle class="cls-3" cx="32" cy="32" r="17.5"/></svg>
static/caen/img/information-icon.svg
1
<svg id="Calque_1" data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 65 65"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:#0d74ef;}</style></defs><rect class="cls-1" width="65" height="65" rx="32.5"/><circle class="cls-2" cx="32.5" cy="18.21" r="3.71"/><rect class="cls-2" x="28.79" y="26.15" width="7.41" height="24.35" rx="3.5"/></svg>
0
-