From 87895ef1c4864441b43c70597a3d94535f67f7ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 12 May 2017 13:15:59 +0200 Subject: [PATCH 1/2] grandlyon-gnm: add styles for the dashboard (#15043) --- static/grandlyon-gnm/_custom.scss | 68 ++++++++++++++++++++++ .../grandlyon-gnm/combo/dashboard_cell_icons.html | 0 .../variants/grandlyon-gnm/combo/json/velov.html | 1 + 3 files changed, 69 insertions(+) delete mode 100644 templates/variants/grandlyon-gnm/combo/dashboard_cell_icons.html diff --git a/static/grandlyon-gnm/_custom.scss b/static/grandlyon-gnm/_custom.scss index 5f554db..4762218 100644 --- a/static/grandlyon-gnm/_custom.scss +++ b/static/grandlyon-gnm/_custom.scss @@ -106,6 +106,7 @@ div#nav > ul { span.infos { flex: 0 0 auto; padding: 2ex 1ex; + padding-right: 25px; /* place for the dashboard menu */ text-align: right; border-radius: 5px; font-size: 80%; @@ -420,3 +421,70 @@ a#publik-portal-agent { } } } + +#content div.cell.dashboardcell { + border-radius: 5px; + background: $darkgray; + padding: 10px; + div.cell { + padding: 0px; + margin: 0; + margin-bottom: 1ex; + } +} + +div.cell { + position: relative; +} + +.dashboard-cell-icons { + position: absolute; + right: 5px; + top: 5px; + + a.add-to-dashboard { + color: #E5E5E5; + &::before { + font-family: FontAwesome; + content: "\f005"; /* star */ + font-size: 16px; + padding-left: 1ex; + } + &:hover { + color: #666; + } + } + a.dashboard-cell-menu { + &::before { + font-family: FontAwesome; + content: "\f142"; /* ellipsis-v */ + font-size: 16px; + padding-left: 0.5ex; + padding-right: 0.5ex; + cursor: pointer; + } + } + .menu { + position: absolute; + right: -2ex; + top: 1ex; + background: white; + border-radius: 5px; + z-index: 1000; + border: 1px solid #aaa; + box-shadow: 0 0 5px #aaa; + white-space: nowrap; + padding: 1ex; + list-style: none; + text-transform: uppercase; + font-size: 80%; + li a { + display: inline-block; + width: 100%; + padding: 1ex; + } + &.closed { + display: none; + } + } +} diff --git a/templates/variants/grandlyon-gnm/combo/dashboard_cell_icons.html b/templates/variants/grandlyon-gnm/combo/dashboard_cell_icons.html deleted file mode 100644 index e69de29..0000000 diff --git a/templates/variants/grandlyon-gnm/combo/json/velov.html b/templates/variants/grandlyon-gnm/combo/json/velov.html index 9d75815..bfb2432 100644 --- a/templates/variants/grandlyon-gnm/combo/json/velov.html +++ b/templates/variants/grandlyon-gnm/combo/json/velov.html @@ -2,6 +2,7 @@ {% if station.name == parameters.station %}

Station {{station.name}}

+ {% include "combo/dashboard_cell_icons.html" %} {{station.available_bikes}} vélos{{station.available_bike_stands}} places -- 2.11.0