From d8304703b3681207638868c1c592368ef2ca0425 Mon Sep 17 00:00:00 2001
From: Nicolas ROCHE <nroche@entrouvert.com>
Date: Fri, 7 May 2021 11:14:39 +0200
Subject: [PATCH] new theme: braine-l-alleud (#53844)

---
 static/braine-l-alleud/_custom.scss           | 39 +++++++++++++++++++
 static/braine-l-alleud/_vars.scss             | 20 ++++++++++
 static/braine-l-alleud/config.json            | 24 ++++++++++++
 static/braine-l-alleud/style.scss             |  5 +++
 .../combo/json/activite-favorite.html         | 27 +++++++++++++
 5 files changed, 115 insertions(+)
 create mode 100644 static/braine-l-alleud/_custom.scss
 create mode 100644 static/braine-l-alleud/_vars.scss
 create mode 100644 static/braine-l-alleud/config.json
 create mode 100644 static/braine-l-alleud/style.scss
 create mode 100644 templates/variants/braine-l-alleud/combo/json/activite-favorite.html

diff --git a/static/braine-l-alleud/_custom.scss b/static/braine-l-alleud/_custom.scss
new file mode 100644
index 00000000..c2096192
--- /dev/null
+++ b/static/braine-l-alleud/_custom.scss
@@ -0,0 +1,39 @@
+#header #top #logo a {
+	height: 100px;
+	line-height: 100px;
+	color: $primary-color;
+	text-transform: uppercase;
+	font-weight: normal;
+}
+
+#nav-wrapper {
+	background: $nav-background;
+	border-top: 1px solid #EAEAEA;
+	border-bottom: 1px solid #EAEAEA;
+	margin-bottom: 10px;
+	div#nav > ul > li > a {
+		border-radius: $border-radius;
+	}
+}
+
+@media screen and ($max-mobile-viewport) {
+	#header #top #logo a {
+		display: block;
+		height: 75px;
+		overflow: hidden;
+	}
+}
+
+.dashboard-cell-icons .remove-from-dashboard {
+    display: inline-block;
+    height: 20px;
+    width: 20px;
+    background: blue;
+  }
+
+  .dashboard-cell-icons .add-to-dashboard {
+    display: inline-block;
+    height: 20px;
+    width: 20px;
+    background: green;
+  }
diff --git a/static/braine-l-alleud/_vars.scss b/static/braine-l-alleud/_vars.scss
new file mode 100644
index 00000000..d50b8990
--- /dev/null
+++ b/static/braine-l-alleud/_vars.scss
@@ -0,0 +1,20 @@
+$primary-color: #018B9D;
+
+$width: 1160px;
+$font-color: #666;
+$font-size: 0.938em;
+$nav-background: #fafafa;
+$nav-submenu-background: #eee;
+$nav-submenu-color: #333;
+$nav-color: $font-color;
+$nav-active-color: $primary-color;
+$nav-item-selected-color: white;
+$nav-item-hover-color: white;
+$border-radius: 4px;
+$button-background: $primary-color;
+$title-background: $primary-color;
+$title-color: white;
+$nav-mobile-mode: bottom-bar;
+
+$cell-image-position: top;
+$cell-image-padding: none;
diff --git a/static/braine-l-alleud/config.json b/static/braine-l-alleud/config.json
new file mode 100644
index 00000000..e711a9b1
--- /dev/null
+++ b/static/braine-l-alleud/config.json
@@ -0,0 +1,24 @@
+{
+  "label": "Braine l'Alleud",
+  "variables": {
+    "theme_color": "#018B9D"
+  },
+  "settings": {
+    "combo": {
+      "COMBO_ASSET_SLOTS.update": {
+        "header:background": { "label": "Têtière : fond" },
+        "header:logo": { "label": "Têtière : logo" }
+      },
+      "JSON_CELL_TYPES.update": {
+        "activite-favorite": {
+          "url": "https://perso.entrouvert.org/~nroche/contenu.json",
+          "name": "Activité favorite",
+          "cache_duration": 0,
+          "force_async": true,
+          "form": [{"varname": "activite", "type": "string", "label": "Activité"}]
+        }
+      }
+    }
+  }
+}
+
diff --git a/static/braine-l-alleud/style.scss b/static/braine-l-alleud/style.scss
new file mode 100644
index 00000000..1fd447de
--- /dev/null
+++ b/static/braine-l-alleud/style.scss
@@ -0,0 +1,5 @@
+@charset "UTF-8";
+
+@import 'vars';
+@import '../includes/publik';
+@import 'custom';
diff --git a/templates/variants/braine-l-alleud/combo/json/activite-favorite.html b/templates/variants/braine-l-alleud/combo/json/activite-favorite.html
new file mode 100644
index 00000000..d0aa150d
--- /dev/null
+++ b/templates/variants/braine-l-alleud/combo/json/activite-favorite.html
@@ -0,0 +1,27 @@
+{% include "combo/dashboard_cell_icons.html" %}
+{% load dashboard %}
+
+<h2>
+  Activité {{ activite }}
+</h2
+{% if not in_dashboard %}>
+  {% with tile=cell|as_dashboard_cell:request.user %}
+    {% if tile %}
+      (suivie)
+    {% else %}
+      (non suivie)
+    {% endif %}
+  {% endwith %}
+{% else %}
+<div>
+<ul>
+  {% for content in json.data %}
+  <li>
+    <a href="{{ content.url }}">
+      {{ content.title }}
+    </a>
+  </li>
+  {% endfor %}
+</ul>
+</div>
+{% endif %}
-- 
2.30.2

