scss: build an extra css file for backoffice usage (#47838)

This commit is contained in:
Frédéric Péters 2020-11-05 08:51:18 +01:00
parent 26ce0c24a5
commit af82f1474a
6 changed files with 72 additions and 66 deletions

View File

@ -29,7 +29,7 @@ themes.json: $(wildcard static/*/config.json) help/fr/misc-scss.page
%.css: %.scss $(wildcard static/includes/*.scss static/includes/*/*.scss) static/includes/_data_uris.scss static/lille/_data_uris.scss static/lomme/_data_uris.scss static/hellemmes/_data_uris.scss static/toodego/_data_uris.scss $$(wildcard $$(@D)/*.scss)
sassc --sourcemap $< $@
css: $(shell python3 get_themes.py) static/portal-agent/css/agent-portal.css
css: $(shell python3 get_themes.py) static/portal-agent/css/agent-portal.css static/includes/gadjo-extra.css
rm -rf static/*/.sass-cache/
icons:

View File

@ -718,70 +718,6 @@ div.leaflet-control-gps {
}
}
// evaluation field
.template-evaluation label.star-choice,
div.star-choice {
span.star {
&::before {
position: static;
height: auto;
width: auto;
border: none;
font-family: FontAwesome;
content: "\f006"; // star-o
color: #776;
font-size: 22px;
display: inline-block;
transition: transform ease 0.2s;
}
&.selected::before, &:hover::before {
content: "\f005"; // star
color: #ffaa00;
}
}
input[type=radio]:hover + span.star::before,
input[type=radio]:focus + span.star::before,
span.star:hover::before {
transform: scale(1.4);
opacity: 0.8;
}
}
.RadiobuttonsWidget.template-evaluation {
br {
display: none;
}
input {
@extend .sr-only;
}
input:focus + span.star {
@if $widget-focus-outline == none {
outline: $widget-border;
@if extract-color($widget-border) == transparent {
outline-color: #444;
}
outline-style: dotted;
} @else {
outline: $widget-focus-outline;
outline-offset: $widget-focus-outline-offset;
}
}
input + span::after {
// cancel custom radio rendering
display: none;
}
label {
margin-right: 0;
}
input + span {
padding-left: 0;
}
.star-label {
@extend .sr-only;
}
}
#fc-linking {
padding: 0 1rem;
&.no-account {

View File

@ -1,4 +1,5 @@
@import 'grid';
@import 'wcs/bulk';
@import 'wcs/evaluation';
@import 'wcs/steps';
@import 'wcs/nearby-form';

View File

@ -0,0 +1,5 @@
$widget-focus-outline: none;
$widget-border: 1px solid #AAA;
@import 'utils';
@import 'wcs/evaluation';

View File

@ -0,0 +1,63 @@
// style for ../../templates/qommon/forms/widgets/*evaluation.html
.template-evaluation label.star-choice,
div.star-choice {
span.star {
&::before {
position: static;
height: auto;
width: auto;
border: none;
font-family: FontAwesome;
content: "\f006"; // star-o
color: #776;
font-size: 22px;
display: inline-block;
transition: transform ease 0.2s;
}
&.selected::before, &:hover::before {
content: "\f005"; // star
color: #ffaa00;
}
}
input[type=radio]:hover + span.star::before,
input[type=radio]:focus + span.star::before,
span.star:hover::before {
transform: scale(1.4);
opacity: 0.8;
}
}
.RadiobuttonsWidget.template-evaluation {
br {
display: none;
}
input {
@extend .sr-only;
}
input:focus + span.star {
@if $widget-focus-outline == none {
outline: $widget-border;
@if extract-color($widget-border) == transparent {
outline-color: #444;
}
outline-style: dotted;
} @else {
outline: $widget-focus-outline;
outline-offset: $widget-focus-outline-offset;
}
}
input + span::after {
// cancel custom radio rendering
display: none;
}
label {
margin-right: 0;
}
input + span {
padding-left: 0;
}
.star-label {
@extend .sr-only;
}
}

View File

@ -1,5 +1,5 @@
{% extends "gadjo/root.html" %}
{% load gadjo %}
{% load gadjo static %}
{% block site-header %}
<h1 class="breadcrumbs">{% block breadcrumb %}{% endblock %}</h1>
@ -11,6 +11,7 @@
{% endblock %}
{% block extrascripts %}
<link rel="stylesheet" type="text/css" href="{{site_base}}{% static "" %}includes/gadjo-extra.css">
{% if manager_homepage_url %}
<script src="{{manager_homepage_url}}__services.js"></script>
<script src="{{manager_homepage_url}}static/portal-agent/js/publik.js?{% start_timestamp %}"></script>