hautes-alpes-2018 : add categories cells (#23644)

This commit is contained in:
Elias Showk 2018-05-11 16:46:33 +02:00
parent 1402d2cf07
commit 8ccb5667df
6 changed files with 113 additions and 3 deletions

View File

@ -99,6 +99,8 @@ icons:
# somme
cd src/ && python render-imgs-categories.py ../static/somme-cd80/img/ --primary A8002B --secondary A8002B
cd src/ && python render-imgs-dashboard.py ../static/somme-cd80/img/ --normal 4D4D4D --selected 87A738 --title FFFFFF --title-width 80
cd src/ && python render-imgs-categories.py ../static/hautes-alpes-2018/img/icon-rouge --primary B73720 --secondary B73720
cd src/ && python render-imgs-categories.py ../static/hautes-alpes-2018/img/icon-bleu --primary 1C515E --secondary 1C515E
# tournai
cd static/tournai/ && for F in assets/*.svg; do inkscape --without-gui --file $$F --export-area-drawing --export-area-snap --export-png img/$$(basename $$F .svg).png --export-width 40; done

View File

@ -162,6 +162,96 @@ div#content {
max-width: 100%;
}
}
div.cell.wcsformsofcategorycell {
background-color: $category-title-background;
border-color: $category-title-background;
&.toggled {
h2:first-child {
color: $title-color;
background-color: $category-title-background;
}
ul {
background-color: $title-background;
color: $title-color;
padding: 0;
li {
a {
padding: 1rem;
color: $title-color;
}
a:hover {
color: $title-color;
background-color: $button-hover-background;
}
}
}
}
h2:first-child {
color: $title-color;
background-color: $category-title-background;
text-transform: capitalize;
border: none;
background-repeat: no-repeat;
background-position: top left;
padding-left: 140px;
min-height: 95px;
letter-spacing: 0.025em;
line-height: 1.25;
font-size: 1.6rem;
font-weight: 600;
transition: all 0.3s;
box-sizing: border-box;
&:hover {
background-color: $cell-entry-hover-background;
}
&::before {
content: $minus-icon;
font-family: FontAwesome;
font-size: 0.9rem;
position: relative;
margin-bottom: 0.2em;
-webkit-font-smoothing: antialiased;
color: $primary-color;
}
&::after {
content: $arrow-down-icon;
font-family: FontAwesome;
font-size: 10px;
position: absolute;
right: 20px;
vertical-align: middle;
}
&.on {
&::after {
content: $arrow-up-icon;
}
}
}
@each $category in $category-slugs {
@if $category-has-toggled-icons {
&.#{$category} h2:first-child { background-image: url(img/icon-rouge/#{$category}.png), url(img/icon-rouge/#{$category}-on.png); }
&.#{$category}.#{$_category_selector_class} h2:first-child { background-image: url(img/icon-rouge/#{$category}-on.png); }
&.bleu {
&.#{$category} h2:first-child { background-image: url(img/icon-bleu/#{$category}.png), url(img/icon-bleu/#{$category}-on.png); }
&.#{$category}.#{$_category_selector_class} h2:first-child { background-image: url(img/icon-bleu/#{$category}-on.png); }
}
} @else {
&.#{$category} h2:first-child { background-image: url(img/icon-rouge/#{$category}.png); }
&.bleu.#{$category} h2:first-child { background-image: url(img/icon-bleu/#{$category}.png); }
}
}
}
}
div.ui-dialog {
@ -193,4 +283,4 @@ div.ui-dialog {
}
}
}
}

View File

@ -1,5 +1,6 @@
$primary-color: #B73720; /* red/bordeau */
$secondary-color: #1C515E; /* bleu */
$width: 1170px;
$mobile-limit: 768px;
$tablet-limit: 1024px;
@ -45,6 +46,15 @@ $cell-entry-color: #202020;
$block-padding: 1em;
$mobile-block-padding: 0 0.1em;
$category-title-background: #ECB500;
$category-color: $font-color;
$category-has-toggled-icons: false;
$arrow-down-icon: '\f107';
$arrow-up-icon: '\f106';
$arrow-right-icon: '\f105';
$minus-icon : '\f068';
%button-style {
margin: 2ex 0 0 2ex;
transition: all 0.2s;

View File

@ -0,0 +1,6 @@
$(function() {
$('div.wcsformsofcategorycell').delegate('h2', 'click', function() {
$(this).parents('div.wcsformsofcategorycell').toggleClass('toggled');
$(this).toggleClass('on');
});
})

View File

@ -1,8 +1,10 @@
@charset "UTF-8";
@import '../includes/font-asap';
@import '../includes/flexbox_mixins';
@import 'vars';
@import '../includes/publik';
@import '../includes/categories';
@import '../includes/flexbox_mixins';
@import '../includes/publik';
@import 'custom';
@import 'circle-steps';

View File

@ -193,7 +193,7 @@
"label": "Hautes-Alpes 2018",
"variables": {
"css_variant": "hautes-alpes-2018",
"no_extra_js": true,
"no_extra_js": false,
"theme_color": "#B73720"
}
},