From 11a3fc9a4958c4b4f3e31542553bf7dbe387143f Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Sun, 17 Dec 2017 20:44:23 +0100 Subject: [PATCH] Improve public screen page --- admin/static/js/app.js | 63 ++++++++-- admin/static/views/public.html | 166 ++++++++++++++++---------- frontend/static/css/fic.css | 6 + frontend/static/img/logo-epita-bw.png | Bin 0 -> 225513 bytes frontend/static/js/common.js | 1 + frontend/static/js/public.js | 22 +++- frontend/static/public.html | 67 ++++++----- 7 files changed, 223 insertions(+), 102 deletions(-) create mode 100644 frontend/static/img/logo-epita-bw.png diff --git a/admin/static/js/app.js b/admin/static/js/app.js index 6f693e47..3d6f65b1 100644 --- a/admin/static/js/app.js +++ b/admin/static/js/app.js @@ -384,6 +384,7 @@ angular.module("FICApp") $scope.types = { "welcome": "Messages de bienvenue", + "countdown": "Compte à rebours", "message": "Message", "panel": "Boîte", "exercice": "Exercice", @@ -391,16 +392,18 @@ angular.module("FICApp") "rank": "Classement", }; $scope.welcome_types = { - "init": "Accueil des équipes", + "teams": "Accueil des équipes", "public": "Accueil du public", - "countdown": "Compte à rebours lancement", }; - $scope.panel_types = { - "panel-default": "Default", - "panel-info": "Info", - "panel-success": "Success", - "panel-warning": "Warning", - "panel-danger": "Danger", + $scope.colors = { + "primary": "Primaire", + "secondary": "Secondaire", + "info": "Info", + "success": "Success", + "warning": "Warning", + "danger": "Danger", + "light": "Clair", + "dark": "Foncé", }; $scope.rank_types = { "general": "Classement général", @@ -415,6 +418,50 @@ angular.module("FICApp") $scope.someUpdt = true; $scope.scenes = []; }; + $scope.presetScene = function(scene) { + $scope.someUpdt = true; + if (scene == "registration") + $scope.scenes = [ + { + type: "welcome", + params: { kind: "teams" }, + }, + { + type: "welcome", + params: { kind: "public", notitle: true }, + }, + ]; + else if (scene == "welcome") + $scope.scenes = [ + { + type: "welcome", + params: { kind: "public" }, + }, + ]; + else if (scene == "start") + $scope.scenes = [ + { + type: "welcome", + params: { kind: "public" }, + }, + { + type: "countdown", + params: { color: "success", end: null, lead: "Go, go, go !", title: "Le challenge forensic va bientôt commencer !" }, + }, + ]; + else if (scene == "summary") { + $scope.scenes = [ + { + type: "table", + params: { kind: "levels", themes: $scope.themes.map(function(z, i) { return z.id; }), total: true }, + }, + { + type: "rank", + params: { limit: 5, which: "general" }, + }, + ]; + } + }; $scope.saveScenes = function() { $scope.someUpdt = false; var prms = Scene.update($scope.scenes); diff --git a/admin/static/views/public.html b/admin/static/views/public.html index 22f1b550..46eab8a9 100644 --- a/admin/static/views/public.html +++ b/admin/static/views/public.html @@ -1,133 +1,175 @@
-

Interface publique Vider la scène Ajouter un élément +

+ Interface publique + + +

+
+
Aucun contenu n'est actuellement affiché. Aucun contenu à afficher.
-
-
-
-
-