Skip to content

Commit 7a994ad

Browse files
authored
Fix NBC24 theme (#181)
* impr: change default password according to org's practices * impr: stylesheet based upon core-beta and dark/white modes
1 parent f26cb5b commit 7a994ad

File tree

5 files changed

+99
-104
lines changed

5 files changed

+99
-104
lines changed

examples/minimal/.ctfd.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ appearance:
33
description: 'MyCTF description'
44

55
admin:
6-
name: 'my-name'
7-
8-
password: 'dont put password in a config file, use the varenv'
6+
name: 'ctfer'
7+
8+
password: 'ctfer'

examples/nobrackets2024/.ctfd.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ theme:
77
from_file: logo.png
88
small_icon:
99
from_file: tab-icon.png
10-
name: core
10+
name: core-beta
1111
header:
1212
from_file: theme-header.html
1313

@@ -17,6 +17,11 @@ settings:
1717
score_visibility: private
1818
registration_visibility: public
1919

20+
accounts:
21+
# Team creation was set to false in production as teams where created ahead of the event,
22+
# thanks to a qualification round.
23+
team_creation: true
24+
2025
# Don't set time, not very usefull in replicability
2126

2227
legal:
@@ -27,9 +32,9 @@ legal:
2732
mode: teams
2833

2934
admin:
30-
name: 'my-name'
31-
32-
password: 'dont put password in a config file, use the varenv'
35+
name: 'ctfer'
36+
37+
password: 'ctfer'
3338

3439
pages:
3540
additional:

examples/nobrackets2024/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@
55

66
The NoBrackets 2024 example shows how to setup CTFd for this event.
77

8-
Stylesheet and images are the property of GCC and were granted free right of use by [GCC](https://github.com/gcc-ensibs)
8+
Original stylesheet and images are the property of GCC and were granted free right of use by [GCC](https://github.com/gcc-ensibs).
9+
10+
We modified the stylesheet to be based upon `core-beta` for compatibility purposes with recent CTFd versions API, to support the white and dark themes, and due to [ctfd-chall-manager plugin](https://github.com/ctfer-io/ctfd-chall-manager) limitations.

examples/nobrackets2024/index.html

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,16 @@ <h1 class="text-center"><a class="btn" href="https://nobrackets.fr/docs/intro">A
1111
<h1 class="text-center"><a class="btn" href="https://discord.gg/njcQxMEkNQ">Rejoindre le Discord</a></h1>
1212
<hr>
1313
<h3 class="text-center">Un grand merci à nos partenaires et sponsors&nbsp;:</h3>
14-
<img class="w-100 mx-auto d-block" style="max-width: 70%; margin-bottom: 60px; margin-top: 20px;" src="https://hackmd.io/_uploads/H1d2a0GE1l.png" />
15-
<img class="w-100 mx-auto d-block" style="max-height: 10%;" src="https://hackmd.io/_uploads/rku3p0zE1e.svg" />
16-
<img class="w-100 mx-auto d-block" style="max-width: 60%; margin: 50px;" src="https://hackmd.io/_uploads/SkO26RzVJe.png" />
17-
<hr>
14+
<!-- Pole d'Excellence Cyber -->
15+
<img class="w-100 mx-auto d-block theme-light" style="max-width: 70%; margin-bottom: 60px; margin-top: 20px;" src="https://hackmd.io/_uploads/r1_WiSeKxx.png" />
16+
<img class="w-100 mx-auto d-block theme-dark" style="max-width: 70%; margin-bottom: 60px; margin-top: 20px;" src="https://hackmd.io/_uploads/H1d2a0GE1l.png" />
17+
<!-- RootMe Pro -->
18+
<img class="w-100 mx-auto d-block theme-light" style="max-height: 10%;" src="https://hackmd.io/_uploads/Hyk7jBeYel.svg" />
19+
<img class="w-100 mx-auto d-block theme-dark" style="max-height: 10%;" src="https://hackmd.io/_uploads/rku3p0zE1e.svg" />
20+
<!-- SynAcktiv -->
21+
<img class="w-100 mx-auto d-block theme-light" style="max-width: 60%; margin: 50px;" src="https://hackmd.io/_uploads/rywrS8xFgg.png" />
22+
<img class="w-100 mx-auto d-block theme-dark" style="max-width: 60%; margin: 50px;" src="https://hackmd.io/_uploads/SkO26RzVJe.png" />
23+
<hr>
1824
<p class="text-justify">Le NoBracketsCTF est organisé par le club étudiant <a href="https://gcc-ensibs.fr/">Galette Cidre CTF (GCC)</a>, par des élèves des spécialités <a href="https://www-ensibs.univ-ubs.fr/fr/formations/formations/diplome-d-ingenieur-DI/sciences-technologies-sante-STS/diplome-d-ingenieur-cyberdefense-ICYB00_213.html">Cyberdéfense</a>, <a href="https://www-ensibs.univ-ubs.fr/fr/formations/formations/diplome-d-ingenieur-DI/sciences-technologies-sante-STS/diplome-d-ingenieur-cybersecurite-du-logiciel-IINF00_207.html">Cybersécurité du Logiciel</a> et <a href="https://www-ensibs.univ-ubs.fr/fr/formations/formations/diplome-d-ingenieur-DI/sciences-technologies-sante-STS/diplome-d-ingenieur-cybersecurite-et-sciences-des-donnees-KWW171GO.html">Cybersécurité et Sciences des Données</a> de <a href="https://www-ensibs.univ-ubs.fr/fr/index.html">l'Ecole Nationale Supérieure d'Ingénieurs de Bretagne Sud (ENSIBS).</a></p>
1925
<p class="text-center">Suivez-nous sur les réseaux !</p>
2026
<p class="text-center">
@@ -23,4 +29,4 @@ <h3 class="text-center">Un grand merci à nos partenaires et sponsors&nbsp;:</h3
2329
<a target="_blank" href="https://discord.gg/njcQxMEkNQ"><i class="fab fa-discord fa-2x" aria-hidden="true"></i></a>
2430
</p>
2531
</div>
26-
</div>
32+
</div>
Lines changed: 73 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,80 @@
11
<style id="theme-color">
2-
.tag-Introduction > button{border: 5px solid #cad3f5; border-radius: 5px;}
3-
.tag-Facile > button{border: 5px solid #a6da95; border-radius: 5px;}
4-
.tag-Moyen > button{border: 5px solid #eed49f; border-radius: 5px;}
5-
.tag-Difficile > button{border: 5px solid #ed8796; border-radius: 5px;}
6-
.tag-D\u00e9mon > button{border: 5px solid #c6a0f6; border-radius: 5px;}
7-
8-
button > p::before{white-space: pre;}
9-
10-
.solved-challenge {
11-
background-color: #a6da95 !important;
12-
opacity: 100;
13-
border-radius: 0px;
14-
}
15-
16-
.tag-Introduction > button.solved-challenge {
17-
border: 5px solid;
18-
border-color: #a6da95;
19-
border-radius: 5px;
20-
}
21-
.tag-Facile > button.solved-challenge {
22-
border: 5px solid;
23-
border-color: #a6da95;
24-
border-radius: 5px;
25-
}
26-
.tag-Moyen > button.solved-challenge {
27-
border: 5px solid;
28-
border-color: #a6da95;
29-
border-radius: 5px;
30-
}
31-
.tag-Difficile > button.solved-challenge {
32-
border: 5px solid;
33-
border-color: #a6da95;
34-
border-radius: 5px;
35-
}
36-
.tag-Démon > button.solved-challenge {
37-
border: 5px solid;
38-
border-color: #a6da95;
39-
border-radius: 5px;
40-
}
41-
42-
body {
43-
background-color: #212529
44-
}
45-
h4, .h4, h3, .h3, h2, .h2, h1, .h1 {
46-
color: #dee2e6;
47-
}
48-
49-
p, li {
50-
color: white;
51-
}
52-
53-
.challenge-desc p {
54-
color: black;
55-
}
56-
57-
.challenge-button {
58-
&:hover {
59-
background-color: #212529;
60-
border-color: inherit; /* Keeps original border color on hover */
61-
}
62-
}
63-
64-
.challenge-button > p{
2+
/* Logos on the main page */
3+
[data-bs-theme="light"] .theme-dark {
4+
display: none !important;
5+
}
6+
7+
[data-bs-theme="light"] .theme-light {
8+
display: block !important;
9+
}
10+
11+
[data-bs-theme="dark"] .theme-dark {
12+
display: block !important;
13+
}
14+
15+
[data-bs-theme="dark"] .theme-light {
16+
display: none !important;
17+
}
18+
19+
/* Button on the main page */
20+
h1 .btn {
21+
padding: 20px !important;
22+
/* Invert background and color to highlight */
23+
color: var(--bs-body-bg);
24+
background-color: var(--bs-btn-color) !important;
25+
border-radius: 5px !important;
26+
font-size: 20px !important;
27+
28+
&:hover {
29+
background-color: #48808a !important;
30+
}
31+
}
32+
33+
/* Challenge difficulty */
34+
button.tag-Introduction {
35+
border: 5px solid #cad3f5 !important;
36+
border-radius: 5px;
37+
}
38+
39+
button.tag-Facile {
40+
border: 5px solid #a6da95 !important;
41+
border-radius: 5px;
42+
}
43+
44+
button.tag-Moyen {
45+
border: 5px solid #eed49f !important;
46+
border-radius: 5px;
47+
}
48+
49+
button.tag-Difficile {
50+
border: 5px solid #ed8796 !important;
51+
border-radius: 5px;
52+
}
53+
54+
button.tag-D\u00e9mon {
55+
border: 5px solid #c6a0f6 !important;
56+
border-radius: 5px;
57+
}
58+
59+
/* Customize challenge display */
60+
.challenge-button {
61+
box-shadow: 3px 3px 3px grey;
62+
63+
p {
6564
overflow: hidden;
6665
white-space: nowrap;
6766
text-overflow: ellipsis;
6867
}
69-
table thead td, table tbody td, table tbody tr, label{
70-
color: #ffff;
71-
}
72-
73-
74-
h2.challenge-name, h3.challenge-value, #solves table thead td, #solves table tbody td{
75-
color: #000000 !important;
76-
}
77-
78-
h1 .btn{
79-
padding:20px!important;
80-
color:black!important;
81-
background-color:white!important;
82-
border-radius:5px!important;
83-
font-size:20px!important;
84-
}
85-
h1 .btn:hover{
86-
background-color:#48808a!important;
68+
69+
&:hover {
70+
background-color: var(--bs-body-color);
8771
}
88-
89-
blockquote p, .card-title, .modal-body p{
90-
color:black;
91-
}
92-
93-
tr td a {
94-
color: white;
72+
73+
.challenge-solved {
74+
background-color: #a6da95 !important;
75+
border: 5px solid;
76+
border-color: #a6da95;
77+
border-radius: 5px;
9578
}
96-
97-
</style>
98-
79+
}
80+
</style>

0 commit comments

Comments
 (0)