From e630bc3d75cd2852277242a97a21e1829fd58cdd Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Sun, 17 Dec 2017 16:07:04 +0100 Subject: [PATCH] Improve bootstrap 4 support --- admin/static/js/app.js | 4 ++ admin/static/views/event-list.html | 10 ++- admin/static/views/event.html | 10 +-- admin/static/views/exercice-list.html | 12 ++-- admin/static/views/exercice.html | 56 +++++++++-------- admin/static/views/settings.html | 34 +++++++---- admin/static/views/team-edit.html | 87 +++++++++++++-------------- admin/static/views/team-list.html | 8 +-- admin/static/views/team-print.html | 2 +- admin/static/views/team-stats.html | 14 +++-- admin/static/views/theme-list.html | 10 ++- admin/static/views/theme.html | 24 +++++--- frontend/static/css/fic.css | 15 +++-- frontend/static/index.html | 6 +- frontend/static/public.html | 10 +-- frontend/static/views/theme.html | 16 +++-- libfic/db.go | 2 +- 17 files changed, 181 insertions(+), 139 deletions(-) diff --git a/admin/static/js/app.js b/admin/static/js/app.js index 6fc22cca..6f693e47 100644 --- a/admin/static/js/app.js +++ b/admin/static/js/app.js @@ -474,10 +474,14 @@ angular.module("FICApp") $scope.event = Event.get({ eventId: $routeParams.eventId }); $scope.fields = ["kind", "txt", "time"]; $scope.kinds = { + "alert-secondary": "Par défaut", + "alert-primary": "Mise en valeur", "alert-info": "Info", "alert-warning": "Warning", "alert-success": "Success", "alert-danger": "Danger", + "alert-light": "Clair", + "alert-dark": "Foncé", }; $scope.saveEvent = function() { diff --git a/admin/static/views/event-list.html b/admin/static/views/event-list.html index c5c20d5f..81b20411 100644 --- a/admin/static/views/event-list.html +++ b/admin/static/views/event-list.html @@ -1,8 +1,12 @@ -

Événements Vider la liste Ajouter un événement

+

+ Événements + + +

- - +
+
{{ field }} diff --git a/admin/static/views/event.html b/admin/static/views/event.html index 70f08ea9..a6bf8b49 100644 --- a/admin/static/views/event.html +++ b/admin/static/views/event.html @@ -1,18 +1,18 @@

Événement

-
-
- + +
+
-
- Delete +
diff --git a/admin/static/views/exercice-list.html b/admin/static/views/exercice-list.html index 2476ad6e..252a3507 100644 --- a/admin/static/views/exercice-list.html +++ b/admin/static/views/exercice-list.html @@ -1,9 +1,9 @@

Exercices - Synchroner + -
-
-
+
+
+

@@ -13,8 +13,8 @@

- - +
+
{{ field }} diff --git a/admin/static/views/exercice.html b/admin/static/views/exercice.html index 5a3ced48..91b81db9 100644 --- a/admin/static/views/exercice.html +++ b/admin/static/views/exercice.html @@ -1,21 +1,21 @@

{{exercice.title}}

- -
- -
- - - - - + + + +
- Delete +
@@ -27,26 +27,28 @@
-
-
-

Indices

+
+
+ + +

Indices

- +
- +
- +
@@ -59,9 +61,11 @@
-
-
-

Téléchargements

+
+
+ + +

Téléchargements

@@ -77,14 +81,16 @@
-
-
-

Drapeaux

+
+
+ + +

Drapeaux

- +
@@ -93,7 +99,7 @@
- +
@@ -102,7 +108,7 @@
- +
diff --git a/admin/static/views/settings.html b/admin/static/views/settings.html index 430824f1..9f5035e9 100644 --- a/admin/static/views/settings.html +++ b/admin/static/views/settings.html @@ -72,32 +72,42 @@
-
-
-
-
-
@@ -113,12 +123,12 @@
- +
-
+
diff --git a/admin/static/views/team-edit.html b/admin/static/views/team-edit.html index 078cdc43..43b31daa 100644 --- a/admin/static/views/team-edit.html +++ b/admin/static/views/team-edit.html @@ -1,37 +1,37 @@

{{ team.name }} ({{ team.initialName}}) - +

-
-
- + +
+
- {{ team.id }} +
-
- +
+
- {{ team.initialName }} +
-
- +
+
- - + +
- - Delete + +
@@ -40,51 +40,48 @@
- -
-
+
+ +
Membres - - - Add member + +
-
+
This team has no member!
-
- -
- +
+ +
+
-
- +
+
-
- + -
-
-
-
- - Certificate - Generated - Not found -
+
+
+ + Certificate + Generated + Not found
-
- - Generate certificate - - Revoke certificate +
+ +
+
diff --git a/admin/static/views/team-list.html b/admin/static/views/team-list.html index 8da078d1..b8f2aa70 100644 --- a/admin/static/views/team-list.html +++ b/admin/static/views/team-list.html @@ -1,12 +1,12 @@

Équipes - Ajouter une équipe - Imprimer les équipes + +

- - +
+
{{ field }} diff --git a/admin/static/views/team-print.html b/admin/static/views/team-print.html index 8bffed6c..74c46a5d 100644 --- a/admin/static/views/team-print.html +++ b/admin/static/views/team-print.html @@ -26,7 +26,7 @@
{{ team.initialName }}
- +
{{ member[field] }} diff --git a/admin/static/views/team-stats.html b/admin/static/views/team-stats.html index 0cb25168..5c49c6b1 100644 --- a/admin/static/views/team-stats.html +++ b/admin/static/views/team-stats.html @@ -9,9 +9,15 @@ .RdYlGn .q7-8{fill:rgb(70,80,80)} -

{{ team.name }} ({{ team.initialName}}) et , {{ member.firstname | capitalize }} {{ member.nickname }} {{ member.lastname | capitalize }}

+

+ {{ team.name }} + ({{ team.initialName}}) + + et , {{ member.firstname | capitalize }} {{ member.nickname }} {{ member.lastname | capitalize }} + +

-
+
Points
@@ -40,8 +46,7 @@
-
-
+

Tentatives par niveaux

@@ -49,6 +54,5 @@

Tentatives par thèmes

-
diff --git a/admin/static/views/theme-list.html b/admin/static/views/theme-list.html index 1a54c0ae..fbe60d46 100644 --- a/admin/static/views/theme-list.html +++ b/admin/static/views/theme-list.html @@ -1,8 +1,12 @@ -

Thèmes Synchroniser Ajouter un thème

+

+ Thèmes + + +

- - +
+
{{ field }} diff --git a/admin/static/views/theme.html b/admin/static/views/theme.html index 58cf7340..3d5122e6 100644 --- a/admin/static/views/theme.html +++ b/admin/static/views/theme.html @@ -1,27 +1,33 @@

{{theme.name}} {{theme.authors}}

-
-
- + +
+
- +
- - Delete + +
+
+
-

Exercices Synchroniser Ajouter un exercice

+

+ Exercices + + +

- - +
+
{{ field }} diff --git a/frontend/static/css/fic.css b/frontend/static/css/fic.css index 4436c005..ecee7a50 100644 --- a/frontend/static/css/fic.css +++ b/frontend/static/css/fic.css @@ -68,15 +68,12 @@ body { .point { text-shadow: 0 0 20px #0055ff; } -.navbar-inverse .point { +.bg-dark .point { text-shadow: 0 0 12px #0055ff; } .end .point { text-shadow: 0 0 20px #ff5500; } -.navbar-inverse .end .point { - text-shadow: 0 0 12px #ff5500; -} @-webkit-keyframes clockanim { 0% { opacity: 1.0; } 50% { opacity: 0; } @@ -96,7 +93,7 @@ keyframes clockanim { samp.cksum { overflow-x: hidden; text-overflow: ellipsis; - max-width: 20vw; + max-width: 16vw; display: inline-block; vertical-align: middle; } @@ -111,10 +108,16 @@ h1 small.authors { font-style: italic; } +a.badge:hover { + text-decoration: none; +} .teamname { -webkit-filter: invert(100%); filter: invert(100%); } +a:hover .teamname { + text-shadow: 0px 0px 10px #888888; +} .heading { font-style: italic; @@ -162,7 +165,7 @@ h1 small.authors { .carousel .table { margin-bottom: 0; } -.carousel .table-condensed td { +.carousel .table-sm td { padding: 2px; } diff --git a/frontend/static/index.html b/frontend/static/index.html index 4677eb34..396a673b 100644 --- a/frontend/static/index.html +++ b/frontend/static/index.html @@ -74,12 +74,12 @@ - - {{ my.name }} + + {{ my.name }} diff --git a/frontend/static/public.html b/frontend/static/public.html index 0043d304..624a33db 100644 --- a/frontend/static/public.html +++ b/frontend/static/public.html @@ -22,7 +22,7 @@ -
+
@@ -105,7 +105,7 @@
- +
@@ -149,7 +149,7 @@
-
+
@@ -180,7 +180,7 @@ -
Place
+
diff --git a/frontend/static/views/theme.html b/frontend/static/views/theme.html index 8f7ff9f5..b7a61a78 100644 --- a/frontend/static/views/theme.html +++ b/frontend/static/views/theme.html @@ -1,14 +1,16 @@
Vous n'avez pas encore accès à cet exercice.
-
-

+
+

{{ themes[current_theme].exercices[current_exercice].title }}

+

+
  • Gain : {{ 1 + settings.firstBlood | coeff }} prem's {{ themes[current_theme].exercices[current_exercice].curcoeff | coeff }} bonus
  • Résolu par : .
  • @@ -62,9 +64,9 @@
-
+
- +
@@ -90,7 +92,9 @@ Challenge réussi !
- Vous êtes la {{ my.exercices[current_exercice].solved_rank }} équipe à avoir résolu ce challenge à {{ my.exercices[current_exercice].solved_time | date:"mediumTime" }}. Vous avez marqué ! +

+ Vous êtes la {{ my.exercices[current_exercice].solved_rank }} équipe à avoir résolu ce challenge à {{ my.exercices[current_exercice].solved_time | date:"mediumTime" }}. Vous avez marqué ! +

diff --git a/libfic/db.go b/libfic/db.go index 59788557..eb406acc 100644 --- a/libfic/db.go +++ b/libfic/db.go @@ -49,7 +49,7 @@ func DBCreate() error { CREATE TABLE IF NOT EXISTS events( id_event INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, txt VARCHAR(255) NOT NULL UNIQUE, - kind ENUM('alert-default', 'alert-primary', 'alert-info', 'alert-warning', 'alert-danger', 'alert-success') NOT NULL, + kind ENUM('alert-primary', 'alert-secondary', 'alert-success', 'alert-danger', 'alert-warning', 'alert-info', 'alert-light', 'alert-dark') NOT NULL, time TIMESTAMP NOT NULL ); `); err != nil {
11 h