Compare commits

..

No commits in common. "b61bc5d4f345a8b69b42493481512a8070e7aeb3" and "ba7992e7be1c803b1d98ef5042ad1e58a3f0c8eb" have entirely different histories.

37 changed files with 96 additions and 520 deletions

View File

@ -1,6 +1,5 @@
from .models import UserProfileInfo
from django.contrib import admin
from .models import Campus
#admin.site.register(UserProfileInfo)
# Register your models here.
@ -8,10 +7,6 @@ from .models import Campus
@admin.register(UserProfileInfo)
class userprofile(admin.ModelAdmin):
#list display
list_display = ['user', 'score', 'last_submission_date', 'intra42_campus']
list_display = ['user', 'score', 'last_submission_date']
# search list
search_fields = ['score', 'user__username', 'intra42_campus']
@admin.register(Campus)
class campus(admin.ModelAdmin):
list_display = ['name']
search_fields = ['score', 'user__username']

View File

@ -1,23 +0,0 @@
# Generated by Django 3.2.11 on 2022-03-29 08:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0007_auto_20220123_1704'),
]
operations = [
migrations.AddField(
model_name='userprofileinfo',
name='intra42_campus',
field=models.CharField(blank=True, max_length=50, null=True),
),
migrations.AddField(
model_name='userprofileinfo',
name='intra42_id',
field=models.CharField(blank=True, max_length=20, null=True, unique=True),
),
]

View File

@ -1,22 +0,0 @@
# Generated by Django 3.2.11 on 2022-03-29 11:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0008_auto_20220329_1034'),
]
operations = [
migrations.AlterModelOptions(
name='userprofileinfo',
options={'ordering': ['-score', 'last_submission_date', 'user__username', 'intra42_campus'], 'permissions': (('view_info', 'View user info'),), 'verbose_name': 'profile', 'verbose_name_plural': 'profiles'},
),
migrations.AddField(
model_name='userprofileinfo',
name='intra42_campus_id',
field=models.CharField(blank=True, max_length=10, null=True),
),
]

View File

@ -1,31 +0,0 @@
# Generated by Django 3.2.11 on 2022-05-17 12:52
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('accounts', '0009_auto_20220329_1339'),
]
operations = [
migrations.CreateModel(
name='Campus',
fields=[
('id', models.IntegerField(primary_key=True, serialize=False, unique=True)),
('name', models.CharField(max_length=50)),
],
options={
'verbose_name': 'campus',
'verbose_name_plural': 'campuses',
'permissions': (('view_info', 'View user info'),),
},
),
migrations.AddField(
model_name='userprofileinfo',
name='campus',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='accounts.campus'),
),
]

View File

@ -1,23 +0,0 @@
# Generated by Django 3.2.11 on 2022-05-17 12:54
from django.db import migrations
from accounts.models import UserProfileInfo
from accounts.models import Campus
def migrate_campus(apps, schema_editor):
UserProfileInfo = apps.get_model('accounts', 'UserProfileInfo')
Campus = apps.get_model('accounts', 'Campus')
for user in UserProfileInfo.objects.all():
if user.intra42_campus_id:
user.campus, created = Campus.objects.get_or_create(id=user.intra42_campus_id, name=user.intra42_campus)
user.save()
class Migration(migrations.Migration):
dependencies = [
('accounts', '0010_auto_20220517_1452'),
]
operations = [
migrations.RunPython(migrate_campus),
]

View File

@ -12,29 +12,15 @@ class UserProfileInfo(models.Model):
last_submission_date = models.DateTimeField('Last Submission Date', default=timezone.now)
token = models.CharField(max_length=200, blank=True)
discord_id = models.CharField(max_length=20, null=True, blank=True, unique=True)
intra42_id = models.CharField(max_length=20, null=True, blank=True, unique=True)
campus = models.ForeignKey('Campus', on_delete=models.DO_NOTHING, null=True, blank=True)
intra42_campus = models.CharField(max_length=50, null=True, blank=True)
intra42_campus_id = models.CharField(max_length=10, null=True, blank=True)
member = models.BooleanField(default=False)
member_since = models.DateTimeField('Member since', default=timezone.now)
member_until = models.DateTimeField('Member until', default=timezone.now)
def __str__(self):
return self.user.username
class Meta:
ordering = ['-score', 'last_submission_date', 'user__username', 'intra42_campus']
ordering = ['-score', 'last_submission_date', 'user__username']
verbose_name = 'profile'
verbose_name_plural = 'profiles'
permissions = (("view_info", "View user info"),)
class Campus(models.Model):
id = models.IntegerField(primary_key=True, unique=True)
name = models.CharField(max_length=50)
def __str__(self):
return self.name
class Meta:
verbose_name = 'campus'
verbose_name_plural = 'campuses'
permissions = (("view_info", "View user info"),)
# Create your models here.

View File

@ -60,21 +60,6 @@
</form>
{% endif %}
</div>
<div class="d-flex">
{% if user.userprofileinfo.intra42_id|length > 0 %}
<form action="{% url 'accounts:connections-disconnect-intra42' %}" method='POST'
class="form-inline p-2">
{%csrf_token%}
<button class="btn btn-dark" type="submit">{% trans "Disconnect 42" %}</button>
</form>
{% else %}
<form action="{% url 'accounts:connections-connect-intra42' %}" method='POST'
class="form-inline p-2">
{%csrf_token%}
<button class="btn btn-dark" type="submit">{% trans "Connect 42" %}</button>
</form>
{% endif %}
</div>
</div>
</div>
</div>
@ -102,4 +87,4 @@
</ul>
</div>
</div>
{% endblock %}
{% endblock %}

View File

@ -75,26 +75,13 @@
</li>
{% endfor %}
</ul>
<ul class="list-group">
<ul class="list-group">
<li class="list-group-item">{% trans "Challenges created" %}</li>
{% if created %}
{% for creat in created %}
<li class="list-group-item"><a href="{% url 'ctf' cat_slug=creat.category.slug ctf_slug=creat.slug %}">{{ creat.name }}</a></li>
{% endfor %}
{% else %}
<p>{% trans "It seems that this user has not created any challenge yet..." %}</p>
{% endif %}
</ul>
</ul>
</div>
</div>
<script src="https://code.highcharts.com/highcharts.src.js"></script>
<script>
Highcharts.theme={colors:["#2b908f","#90ee7e","#f45b5b","#7798BF","#aaeeee","#ff0066","#eeaaee","#55BF3B","#DF5353","#7798BF","#aaeeee"],chart:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:1,y2:1},stops:[[0,"#1D1D1D"],[1,"#1D1D1D"]]},style:{fontFamily:"'Unica One', sans-serif"},plotBorderColor:"#606063"},title:{style:{color:"#E0E0E3",textTransform:"uppercase",fontSize:"20px"}},subtitle:{style:{color:"#E0E0E3",textTransform:"uppercase"}},xAxis:{gridLineColor:"#707073",labels:{style:{color:"#E0E0E3"}},lineColor:"#707073",minorGridLineColor:"#505053",tickColor:"#707073",title:{style:{color:"#A0A0A3"}}},yAxis:{gridLineColor:"#707073",labels:{style:{color:"#E0E0E3"}},lineColor:"#707073",minorGridLineColor:"#505053",tickColor:"#707073",tickWidth:1,title:{style:{color:"#A0A0A3"}}},tooltip:{backgroundColor:"rgba(0, 0, 0, 0.85)",style:{color:"#F0F0F0"}},plotOptions:{series:{dataLabels:{color:"#F0F0F3",style:{fontSize:"13px"}},marker:{lineColor:"#333"}},boxplot:{fillColor:"#505053"},candlestick:{lineColor:"white"},errorbar:{color:"white"}},legend:{backgroundColor:"#1D1D1D",itemStyle:{color:"#E0E0E3"},itemHoverStyle:{color:"#FFF"},itemHiddenStyle:{color:"#606063"},title:{style:{color:"#C0C0C0"}}},credits:{style:{color:"#666"}},labels:{style:{color:"#707073"}},drilldown:{activeAxisLabelStyle:{color:"#F0F0F3"},activeDataLabelStyle:{color:"#F0F0F3"}},navigation:{buttonOptions:{symbolStroke:"#DDDDDD",theme:{fill:"#505053"}}},rangeSelector:{buttonTheme:{fill:"#505053",stroke:"#000000",style:{color:"#CCC"},states:{hover:{fill:"#707073",stroke:"#000000",style:{color:"white"}},select:{fill:"#000003",stroke:"#000000",style:{color:"white"}}}},inputBoxBorderColor:"#505053",inputStyle:{backgroundColor:"#333",color:"silver"},labelStyle:{color:"silver"}},navigator:{handles:{backgroundColor:"#666",borderColor:"#AAA"},outlineColor:"#CCC",maskFill:"rgba(255,255,255,0.1)",series:{color:"#7798BF",lineColor:"#A6C7ED"},xAxis:{gridLineColor:"#505053"}},scrollbar:{barBackgroundColor:"#808083",barBorderColor:"#808083",buttonArrowColor:"#CCC",buttonBackgroundColor:"#606063",buttonBorderColor:"#606063",rifleColor:"#FFF",trackBackgroundColor:"#404043",trackBorderColor:"#404043"}};
Highcharts.setOptions(Highcharts.theme);
Highcharts.chart('time-chart', {
@ -135,7 +122,7 @@
series: [
{
name: 'Total',
data: {{ solved|safe }}
data: {{ solved|safe }}
},
{% for cat in cats %}
{

View File

@ -10,11 +10,8 @@ urlpatterns = [
path('edit/', views.edit, name='edit'),
path('logout/', views.out, name='out'),
path('rank/<str:token>', views.rank, name='rank'),
path('connections/connect/discord', views.connection.connect_discord, name='connections-connect-discord'),
path('connections/connect/discord/authorize', views.connection.authorize_discord, name='connections-connect-discord-authorize'),
path('connections/disconnect/discord', views.connection.disconnect_discord, name='connections-disconnect-discord'),
path('connections/connect/intra42', views.connection.connect_intra42, name='connections-connect-intra42'),
path('connections/connect/intra42/authorize', views.connection.authorize_intra42, name='connections-connect-intra42-authorize'),
path('connections/disconnect/intra42', views.connection.disconnect_intra42, name='connections-disconnect-intra42'),
path('connections/connect/discord', views.connection.connect, name='connections-connect-discord'),
path('connections/connect/discord/authorize', views.connection.authorize, name='connections-connect-discord-authorize'),
path('connections/disconnect/discord', views.connection.disconnect, name='connections-disconnect-discord'),
path('delete_account/', views.delete_account, name='delete_account'),
]

View File

@ -5,8 +5,6 @@ from django.views.defaults import bad_request
from django.urls import reverse
from django.shortcuts import redirect
from django.contrib.sites.models import Site
from accounts.models import Campus
from django.db import IntegrityError
import os
oauth = OAuth()
@ -21,73 +19,20 @@ oauth.register(
api_base_url='https://discord.com/api/'
)
oauth.register(
name='intra42',
client_id=os.getenv('OAUTH2_INTRA42_CLIENT_ID'),
client_secret=os.getenv('OAUTH2_INTRA42_CLIENT_SECRET'),
access_token_url='https://api.intra.42.fr/oauth/token',
authorize_url='https://api.intra.42.fr/oauth/authorize',
api_base_url='https://api.intra.42.fr/'
)
@login_required
@require_POST
def connect_intra42(request):
if request.user.userprofileinfo.intra42_id:
return bad_request(request, "Already connected")
site = Site.objects.get_current()
redirect_uri = reverse('accounts:connections-connect-intra42-authorize')
redirect_uri = "https://" + site.domain + redirect_uri[3:] # remove language code
return oauth.intra42.authorize_redirect(request, redirect_uri)
@login_required
def authorize_intra42(request):
if request.user.userprofileinfo.intra42_id:
return bad_request(request, "Already connected")
try:
token = oauth.intra42.authorize_access_token(request)
except:
return redirect('accounts:edit')
response = oauth.intra42.get('v2/me', token=token)
response = response.json()
intra42_id = response['id']
intra42_campus = response['campus'][0]['name']
intra42_campus_id = response['campus'][0]['id']
request.user.userprofileinfo.intra42_id = intra42_id
request.user.userprofileinfo.campus, created = Campus.objects.get_or_create(id=intra42_campus_id, name=intra42_campus)
try:
request.user.userprofileinfo.save()
return redirect('accounts:edit')
except IntegrityError:
return redirect('accounts:edit')
@login_required
@require_POST
def disconnect_intra42(request):
if not request.user.userprofileinfo.intra42_id:
return bad_request(request, "Already disconnected")
request.user.userprofileinfo.intra42_id = None
request.user.userprofileinfo.intra42_campus = None
request.user.userprofileinfo.intra42_campus_id = None
request.user.userprofileinfo.campus = None
request.user.userprofileinfo.save()
return redirect('accounts:edit')
@login_required
@require_POST
def connect_discord(request):
def connect(request):
if request.user.userprofileinfo.discord_id:
return bad_request(request, "Already connected")
site = Site.objects.get_current()
redirect_uri = reverse('accounts:connections-connect-discord-authorize')
redirect_uri = "https://" + site.domain + redirect_uri[3:] # remove language code
print(redirect_uri)
return oauth.discord.authorize_redirect(request, redirect_uri)
@login_required
def authorize_discord(request):
def authorize(request):
if request.user.userprofileinfo.discord_id:
print("Already")
return bad_request(request, "Already connected")
try:
token = oauth.discord.authorize_access_token(request)
@ -102,7 +47,7 @@ def authorize_discord(request):
@login_required
@require_POST
def disconnect_discord(request):
def disconnect(request):
if not request.user.userprofileinfo.discord_id:
return bad_request(request, "Already disconnected")
request.user.userprofileinfo.discord_id = None

View File

@ -172,7 +172,7 @@ def profile(request, user_name):
# get datas
somme = 0
solved_count = len(solved)
pointDatas[cat.name] = []
pointDatas[cat.name].append([user_obj.date_joined.timestamp() * 1000, 0])
percent = (solved_count / max_count) * 100
@ -188,9 +188,9 @@ def profile(request, user_name):
for s in solves.reverse():
somme += s.ctf.points
solved.append([s.flag_date.timestamp() * 1000,somme])
created = CTF.objects.filter(author=user_obj)
return render(request,'accounts/profile.html', {'user':user_obj, 'solves':solves,'solved':solved,'catsDatas': catsDatas, 'pointDatas': pointDatas,
'rank': rank, 'score' : somme, 'member' : member, 'cats':cats, 'created':created})
'rank': rank, 'score' : somme, 'member' : member, 'cats':cats})
@login_required
def delete_account(request):

@ -1 +1 @@
Subproject commit 5c7b5995fe12c0ed1bb10f97e56ec89377c98b54
Subproject commit 18fac3978d21dc824bcffa2bc960aa2bf6b4abd9

View File

@ -1,3 +1,3 @@
We're pleased to announce that 42CTF source code is now available on a self-hosted gitea <a class="footer_imgs" href="https://gitea.42ctf.org" target="_blank"><img src="/static/img/gitea_logo.png" width="30" alt="Gitea logo"></a><br><br>
We're pleased to announce that 42CTF source code is now available on a self-hosted gitea <a class="footer_imgs" href="https://gitea.42ctf.org" target="_blank"><img src="/static/img/gitea_logo.png" width="30"></a><br><br>
If you want to contribute to the platform (development or translation), you can send us a message on <a class="footer_imgs" href="https://discord.gg/DwZqPpA" target="_blank"><img src="/static/img/discord.png" width="30" alt="Discord logo"></a> or simply fill this <a href="https://forms.42l.fr/apps/forms/bpmyGR37AR4yHGnC">form</a> and we'll contact you !
If you want to contribute to the platform (development or translation), you can send us a message on <a class="footer_imgs" href="https://discord.gg/DwZqPpA" target="_blank"><img src="/static/img/discord.png" width="30"></a> or simply fill this <a href="https://forms.42l.fr/apps/forms/bpmyGR37AR4yHGnC">form</a> and we'll contact you !

View File

@ -5,4 +5,4 @@ We offer you three brand new challenges created by <b><a class=profile_link href
- <b><a href='https://www.42ctf.org/ctfs/web/simple_question_2'>Simple Question of Logic 2</a></b> (30 points)<br>
- <b><a href='https://www.42ctf.org/ctfs/web/simple_question_3'>Simple Question of Logic 3</a></b> (40 points)<br>
<br>
Don't forget that you can always reach out on <a class="footer_imgs" href="https://discord.gg/DwZqPpA" target="_blank"><img src="/static/img/discord.png" width="30" alt="Discord logo"></a> to propose new challenges !
Don't forget that you can always reach out on <a class="footer_imgs" href="https://discord.gg/DwZqPpA" target="_blank"><img src="/static/img/discord.png" width="30"></a> to propose new challenges !

View File

@ -1,3 +1,3 @@
Nous sommes heureux de vous annoncer que le code source de 42CTF est désormais disponible sur un <a class="footer_imgs" href="https://gitea.42ctf.org" target="_blank"><img src="/static/img/gitea_logo.png" width="30" alt="Logo Gitea"></a> auto-hébergé.<br><br>
Nous sommes heureux de vous annoncer que le code source de 42CTF est désormais disponible sur un <a class="footer_imgs" href="https://gitea.42ctf.org" target="_blank"><img src="/static/img/gitea_logo.png" width="30"></a> auto-hébergé.<br><br>
Si vous voulez contribuer a la plateforme (développement ou traduction), vous pouvez nous envoyer un message sur <a class="footer_imgs" href="https://discord.gg/DwZqPpA" target="_blank"><img src="/static/img/discord.png" width="30" alt="Logo Discord"></a> ou simplement remplir ce <a href="https://forms.42l.fr/apps/forms/bpmyGR37AR4yHGnC">formulaire</a> et nous vous contacterons !
Si vous voulez contribuer a la plateforme (développement ou traduction), vous pouvez nous envoyer un message sur <a class="footer_imgs" href="https://discord.gg/DwZqPpA" target="_blank"><img src="/static/img/discord.png" width="30"></a> ou simplement remplir ce <a href="https://forms.42l.fr/apps/forms/bpmyGR37AR4yHGnC">formulaire</a> et nous vous contacterons !

View File

@ -5,4 +5,4 @@ On vous propose trois nouveaux challenges créés par <b><a class=profile_link
- <b><a href='https://www.42ctf.org/ctfs/web/simple_question_2'>Simple Question of Logic 2</a></b> (30 points)<br>
- <b><a href='https://www.42ctf.org/ctfs/web/simple_question_3'>Simple Question of Logic 3</a></b> (40 points)<br>
<br>
N'oubliez pas que vous pouvez toujours nous contacter sur <a class="footer_imgs" href="https://discord.gg/DwZqPpA" target="_blank"><img src="/static/img/discord.png" width="30" alt="Logo Discord"></a> pour proposer des nouveaux challenges !
N'oubliez pas que vous pouvez toujours nous contacter sur <a class="footer_imgs" href="https://discord.gg/DwZqPpA" target="_blank"><img src="/static/img/discord.png" width="30"></a> pour proposer des nouveaux challenges !

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-29 16:42+0200\n"
"POT-Creation-Date: 2022-03-13 18:04+0100\n"
"PO-Revision-Date: 2022-02-10 19:50+0100\n"
"Last-Translator: Clément Hamada <clementhamada@pm.me>\n"
"Language-Team: \n"
@ -87,15 +87,7 @@ msgstr ""
msgid "Connect Discord"
msgstr ""
#: accounts/templates/accounts/edit.html:68
msgid "Disconnect 42"
msgstr ""
#: accounts/templates/accounts/edit.html:74
msgid "Connect 42"
msgstr ""
#: accounts/templates/accounts/edit.html:85
#: accounts/templates/accounts/edit.html:70
#: accounts/templates/accounts/profile.html:46
#: ctfs/templates/ctfs/ctf_info.html:65 ctfs/templates/ctfs/ctfs_list.html:13
#: events/templates/events/event_info.html:66
@ -106,12 +98,12 @@ msgstr ""
msgid "Score"
msgstr "Punktzahl"
#: accounts/templates/accounts/edit.html:93
#: accounts/templates/accounts/edit.html:78
#: accounts/templates/accounts/profile.html:60
msgid "Registered since"
msgstr "Registriert seit"
#: accounts/templates/accounts/edit.html:99
#: accounts/templates/accounts/edit.html:84
#, fuzzy
#| msgid "Delete my account"
msgid " Delete my account"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-29 16:42+0200\n"
"POT-Creation-Date: 2022-03-13 18:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -84,15 +84,7 @@ msgstr ""
msgid "Connect Discord"
msgstr ""
#: accounts/templates/accounts/edit.html:68
msgid "Disconnect 42"
msgstr ""
#: accounts/templates/accounts/edit.html:74
msgid "Connect 42"
msgstr ""
#: accounts/templates/accounts/edit.html:85
#: accounts/templates/accounts/edit.html:70
#: accounts/templates/accounts/profile.html:46
#: ctfs/templates/ctfs/ctf_info.html:65 ctfs/templates/ctfs/ctfs_list.html:13
#: events/templates/events/event_info.html:66
@ -103,12 +95,12 @@ msgstr ""
msgid "Score"
msgstr ""
#: accounts/templates/accounts/edit.html:93
#: accounts/templates/accounts/edit.html:78
#: accounts/templates/accounts/profile.html:60
msgid "Registered since"
msgstr ""
#: accounts/templates/accounts/edit.html:99
#: accounts/templates/accounts/edit.html:84
msgid " Delete my account"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-29 16:42+0200\n"
"POT-Creation-Date: 2022-03-13 18:04+0100\n"
"PO-Revision-Date: 2022-02-09 10:55+0100\n"
"Last-Translator: Javier Uhagón (uhagontorralvojavier@gmail.com)\n"
"Language-Team: \n"
@ -88,15 +88,7 @@ msgstr ""
msgid "Connect Discord"
msgstr ""
#: accounts/templates/accounts/edit.html:68
msgid "Disconnect 42"
msgstr ""
#: accounts/templates/accounts/edit.html:74
msgid "Connect 42"
msgstr ""
#: accounts/templates/accounts/edit.html:85
#: accounts/templates/accounts/edit.html:70
#: accounts/templates/accounts/profile.html:46
#: ctfs/templates/ctfs/ctf_info.html:65 ctfs/templates/ctfs/ctfs_list.html:13
#: events/templates/events/event_info.html:66
@ -107,12 +99,12 @@ msgstr ""
msgid "Score"
msgstr "Puntuación"
#: accounts/templates/accounts/edit.html:93
#: accounts/templates/accounts/edit.html:78
#: accounts/templates/accounts/profile.html:60
msgid "Registered since"
msgstr "Registrado desde"
#: accounts/templates/accounts/edit.html:99
#: accounts/templates/accounts/edit.html:84
#, fuzzy
#| msgid "Delete my account"
msgid " Delete my account"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-29 16:42+0200\n"
"POT-Creation-Date: 2022-03-13 18:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -92,19 +92,7 @@ msgstr "Déconnecter Discord"
msgid "Connect Discord"
msgstr "Connecter Discord"
#: accounts/templates/accounts/edit.html:68
#, fuzzy
#| msgid "Disconnect Discord"
msgid "Disconnect 42"
msgstr "Déconnecter Discord"
#: accounts/templates/accounts/edit.html:74
#, fuzzy
#| msgid "Connect Discord"
msgid "Connect 42"
msgstr "Connecter Discord"
#: accounts/templates/accounts/edit.html:85
#: accounts/templates/accounts/edit.html:70
#: accounts/templates/accounts/profile.html:46
#: ctfs/templates/ctfs/ctf_info.html:65 ctfs/templates/ctfs/ctfs_list.html:13
#: events/templates/events/event_info.html:66
@ -115,12 +103,12 @@ msgstr "Connecter Discord"
msgid "Score"
msgstr "Score"
#: accounts/templates/accounts/edit.html:93
#: accounts/templates/accounts/edit.html:78
#: accounts/templates/accounts/profile.html:60
msgid "Registered since"
msgstr "Inscrit depuis"
#: accounts/templates/accounts/edit.html:99
#: accounts/templates/accounts/edit.html:84
#, fuzzy
#| msgid "Connected accounts"
msgid " Delete my account"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-29 16:42+0200\n"
"POT-Creation-Date: 2022-03-13 18:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -88,15 +88,7 @@ msgstr ""
msgid "Connect Discord"
msgstr ""
#: accounts/templates/accounts/edit.html:68
msgid "Disconnect 42"
msgstr ""
#: accounts/templates/accounts/edit.html:74
msgid "Connect 42"
msgstr ""
#: accounts/templates/accounts/edit.html:85
#: accounts/templates/accounts/edit.html:70
#: accounts/templates/accounts/profile.html:46
#: ctfs/templates/ctfs/ctf_info.html:65 ctfs/templates/ctfs/ctfs_list.html:13
#: events/templates/events/event_info.html:66
@ -107,12 +99,12 @@ msgstr ""
msgid "Score"
msgstr "スコア"
#: accounts/templates/accounts/edit.html:93
#: accounts/templates/accounts/edit.html:78
#: accounts/templates/accounts/profile.html:60
msgid "Registered since"
msgstr "登録日"
#: accounts/templates/accounts/edit.html:99
#: accounts/templates/accounts/edit.html:84
#, fuzzy
#| msgid "Delete my account"
msgid " Delete my account"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-29 16:42+0200\n"
"POT-Creation-Date: 2022-03-13 18:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -86,19 +86,7 @@ msgstr "Отключить Discord"
msgid "Connect Discord"
msgstr "Подключить Discord"
#: accounts/templates/accounts/edit.html:68
#, fuzzy
#| msgid "Disconnect Discord"
msgid "Disconnect 42"
msgstr "Отключить Discord"
#: accounts/templates/accounts/edit.html:74
#, fuzzy
#| msgid "Connect Discord"
msgid "Connect 42"
msgstr "Подключить Discord"
#: accounts/templates/accounts/edit.html:85
#: accounts/templates/accounts/edit.html:70
#: accounts/templates/accounts/profile.html:46
#: ctfs/templates/ctfs/ctf_info.html:65 ctfs/templates/ctfs/ctfs_list.html:13
#: events/templates/events/event_info.html:66
@ -109,12 +97,12 @@ msgstr "Подключить Discord"
msgid "Score"
msgstr "Счет"
#: accounts/templates/accounts/edit.html:93
#: accounts/templates/accounts/edit.html:78
#: accounts/templates/accounts/profile.html:60
msgid "Registered since"
msgstr "Зарегистрирован с"
#: accounts/templates/accounts/edit.html:99
#: accounts/templates/accounts/edit.html:84
msgid " Delete my account"
msgstr " Удалить мой аккаунт"
@ -262,7 +250,7 @@ msgstr "Поздравление !"
#: ctfs/templates/ctfs/ctf_info.html:31
#: events/templates/events/ctf_info.html:26
msgid "Already flagged"
msgstr "Этот челлендж уже пройден"
msgstr "Уже отмечено"
#: ctfs/templates/ctfs/ctf_info.html:33 ctfs/templates/ctfs/ctf_info.html:42
#: events/templates/events/ctf_info.html:36
@ -393,8 +381,7 @@ msgstr "Событие"
msgid ""
"No translation available. Please try another language (English or French)."
msgstr ""
"Перевод недоступен. Пожалуйста, попобуй другой язык (английский или "
"французский)."
"Перевод недоступен. Пожалуйста, попобуй другой язык (английский или французский)."
#: events/templates/events/ctf_info.html:28
#: events/templates/events/event_info.html:18
@ -413,8 +400,7 @@ msgstr "Перед вводом флагов необходимо зарегис
msgid ""
"This is a team event, please create or join a team before submitting flags."
msgstr ""
"Это командное соревнование, пожалуйста, создай или вступи в команду перед "
"тем как отправить флаги."
"Это командное соревнование, пожалуйста, создай или вступи в команду перед тем как отправить флаги."
#: events/templates/events/event_info.html:9
msgid "Subscriptions is over."
@ -530,7 +516,7 @@ msgstr "Нет доступных статей."
#: home/templates/home/home.html:53
msgid "Latest challenges added"
msgstr "Недавно добавленные челленджы"
msgstr "Последние добавленные челленджы"
#: home/templates/home/home.html:58
msgid "points"
@ -542,7 +528,7 @@ msgstr "Нет доступных CTF."
#: home/templates/home/home.html:66
msgid "Latest Flags"
msgstr "Недавно кто решил челлендж"
msgstr "Последние флаги"
#: home/templates/home/home.html:80
msgid "Flags"
@ -598,7 +584,7 @@ msgstr "Последний"
#: templates/base.html:59
msgid "Scoreboard"
msgstr "Таблица результатов"
msgstr "Табло"
#: templates/base.html:64
msgid "Resources"
@ -649,8 +635,8 @@ msgid ""
"We've emailed you instructions for setting your password. You should receive "
"the email shortly!"
msgstr ""
"Мы отправили тебе по электронной почте инструкции по установке пароля.Письмо "
"будет получено совсем скоро!"
"Мы отправили тебе по электронной почте инструкции по установке пароля."
"Письмо будет получено совсем скоро!"
#: templates/registration/password_reset_form.html:16
msgid "Reset"

View File

@ -151,10 +151,7 @@ TEMPLATES[0]['OPTIONS']['context_processors'].append("ctfs.context_processors.ca
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
LOGIN_URL = '/accounts/signin/'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'mail.42ctf.local'
EMAIL_BACKEND = 'django_mailjet.backends.MailjetBackend'
EMAIL_HOST = 'in-v3.mailjet.com'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = os.getenv("EMAIL_USER")
EMAIL_HOST_PASSWORD = os.getenv("EMAIL_PASSWORD")
DEFAULT_FROM_EMAIL = '42CTF <no-reply@42ctf.org>'
DEFAULT_FROM_EMAIL = '42ctf <no-reply@42ctf.org>'

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-29 16:42+0200\n"
"POT-Creation-Date: 2022-03-13 18:04+0100\n"
"PO-Revision-Date: 2022-02-10 19:27+0100\n"
"Last-Translator: Clément Hamada <clementhamada@pm.me>\n"
"Language-Team: \n"
@ -255,13 +255,11 @@ msgid "What will we do with your money ?"
msgstr ""
#: resources/templates/resources/donate.html:51
#, python-format
msgid ""
"Hosting a website - and especially a CTF platform - costs money:\n"
" more precisely, it costs us <b>50 euros per month</b>.<br>\n"
" If we had <b>40 members</b> each year, it would be enough to "
"cover the hosting of 42CTF.<br>\n"
" We currently have %(nb_members)s members. <br>\n"
" With the additional money, we could for example offer prizes "
"for limited-time events, but we will update this page as soon as we reach "
"this threshold :)"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-29 16:42+0200\n"
"POT-Creation-Date: 2022-03-13 18:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -210,13 +210,11 @@ msgid "What will we do with your money ?"
msgstr ""
#: resources/templates/resources/donate.html:51
#, python-format
msgid ""
"Hosting a website - and especially a CTF platform - costs money:\n"
" more precisely, it costs us <b>50 euros per month</b>.<br>\n"
" If we had <b>40 members</b> each year, it would be enough to "
"cover the hosting of 42CTF.<br>\n"
" We currently have %(nb_members)s members. <br>\n"
" With the additional money, we could for example offer prizes "
"for limited-time events, but we will update this page as soon as we reach "
"this threshold :)"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-29 16:42+0200\n"
"POT-Creation-Date: 2022-03-13 18:04+0100\n"
"PO-Revision-Date: 2022-02-09 10:55+0100\n"
"Last-Translator: Javier Uhagón (uhagontorralvojavier@gmail.com)\n"
"Language-Team: \n"
@ -244,13 +244,11 @@ msgid "What will we do with your money ?"
msgstr ""
#: resources/templates/resources/donate.html:51
#, python-format
msgid ""
"Hosting a website - and especially a CTF platform - costs money:\n"
" more precisely, it costs us <b>50 euros per month</b>.<br>\n"
" If we had <b>40 members</b> each year, it would be enough to "
"cover the hosting of 42CTF.<br>\n"
" We currently have %(nb_members)s members. <br>\n"
" With the additional money, we could for example offer prizes "
"for limited-time events, but we will update this page as soon as we reach "
"this threshold :)"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-29 16:42+0200\n"
"POT-Creation-Date: 2022-03-13 18:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -254,13 +254,11 @@ msgid "What will we do with your money ?"
msgstr ""
#: resources/templates/resources/donate.html:51
#, python-format
msgid ""
"Hosting a website - and especially a CTF platform - costs money:\n"
" more precisely, it costs us <b>50 euros per month</b>.<br>\n"
" If we had <b>40 members</b> each year, it would be enough to "
"cover the hosting of 42CTF.<br>\n"
" We currently have %(nb_members)s members. <br>\n"
" With the additional money, we could for example offer prizes "
"for limited-time events, but we will update this page as soon as we reach "
"this threshold :)"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-29 16:42+0200\n"
"POT-Creation-Date: 2022-03-13 18:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -248,13 +248,11 @@ msgid "What will we do with your money ?"
msgstr ""
#: resources/templates/resources/donate.html:51
#, python-format
msgid ""
"Hosting a website - and especially a CTF platform - costs money:\n"
" more precisely, it costs us <b>50 euros per month</b>.<br>\n"
" If we had <b>40 members</b> each year, it would be enough to "
"cover the hosting of 42CTF.<br>\n"
" We currently have %(nb_members)s members. <br>\n"
" With the additional money, we could for example offer prizes "
"for limited-time events, but we will update this page as soon as we reach "
"this threshold :)"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-29 16:42+0200\n"
"POT-Creation-Date: 2022-03-13 18:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -212,13 +212,11 @@ msgid "What will we do with your money ?"
msgstr ""
#: resources/templates/resources/donate.html:51
#, python-format
msgid ""
"Hosting a website - and especially a CTF platform - costs money:\n"
" more precisely, it costs us <b>50 euros per month</b>.<br>\n"
" If we had <b>40 members</b> each year, it would be enough to "
"cover the hosting of 42CTF.<br>\n"
" We currently have %(nb_members)s members. <br>\n"
" With the additional money, we could for example offer prizes "
"for limited-time events, but we will update this page as soon as we reach "
"this threshold :)"

View File

@ -12,7 +12,6 @@
<th scope="col">{% trans "Rank" %}</th>
<th scope="col">{% trans "Username" %}</th>
<th scope="col">{% trans "Website" %}</th>
<th scope="col">{% trans "Campus" %}</th>
<th scope="col">{% trans "Score" %}</th>
</tr>
</thead>
@ -27,13 +26,6 @@
<a href="{{ s.user.userprofileinfo.portfolio_site }}" target="_blank">{{ s.user.userprofileinfo.portfolio_site }}</a>
{% endif %}
</td>
<td>
{% if s.user.userprofileinfo.intra42_campus %}
<a href="{% url 'scoreboard:campus' campus=s.user.userprofileinfo.intra42_campus %}">
{{ s.user.userprofileinfo.intra42_campus }}
</a>
{% endif %}
</td>
<td>{{ s.user.userprofileinfo.score }}</td>
</tr>
{% endfor %}

View File

@ -4,6 +4,5 @@ from . import views
app_name = "scoreboard"
urlpatterns = [
path('', views.scoreboard, name='scoreboard'),
path('campus/<str:campus>', views.campus, name='campus')
path('', views.scoreboard, name='scoreboard')
]

View File

@ -8,12 +8,5 @@ def scoreboard(request):
page = request.GET.get('page')
scores_p = paginator.get_page(page)
return render(request, 'scoreboard/scoreboard.html', {'scores':scores_p})
def campus(request, campus):
scores = UserProfileInfo.objects.filter(score__gt=0, intra42_campus__exact=campus).select_related().order_by('-score', 'last_submission_date', 'user__username')
paginator = Paginator(scores, 20)
page = request.GET.get('page')
scores_p = paginator.get_page(page)
return render(request, 'scoreboard/scoreboard.html', {'scores':scores_p})
# Create your views here.

BIN
src/statics/img/42ctf_logo.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,130 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="4487.6143mm"
height="1053.2188mm"
viewBox="0 0 4487.6143 1053.2188"
version="1.1"
id="svg887"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
sodipodi:docname="42ctf_logo_big_no_bg_full_white.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview889"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:pageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="0.092365554"
inkscape:cx="3155.9384"
inkscape:cy="1169.2671"
inkscape:window-width="1856"
inkscape:window-height="993"
inkscape:window-x="29"
inkscape:window-y="52"
inkscape:window-maximized="1"
inkscape:current-layer="text14333" />
<defs
id="defs884" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(1823.5311,156.47152)">
<g
id="g28009"
transform="matrix(1.0000013,0,0,0.99999497,-1790.2968,3673.4424)">
<g
id="g1328"
transform="matrix(1.8079585,0,0,1.8079585,-6120.2987,-4183.4979)">
<path
id="path892"
style="color:#000000;fill:#ffffff;stroke-linejoin:round;-inkscape-stroke:none;fill-opacity:1"
d="m 3429.7852,260.05664 a 10.001,10.001 0 0 0 -2.584,0.24609 10.001,10.001 0 0 0 -7.543,11.88868 l 50.8516,231.84961 c -8.0433,50.54175 -18.4962,83.38434 -10.0821,113.95703 4.2599,15.47831 13.8073,29.4333 29.5254,42.57031 15.4175,12.88578 36.9112,25.45154 66.6641,39.83008 29.3397,32.4749 71.8944,54.602 116.3652,60.33984 44.2125,5.70449 90.6965,-5.23805 125.961,-39.25 41.0031,-6.77869 71.1344,-17.1823 93.0586,-31.875 22.4915,-15.07297 36.0189,-34.95663 42.6464,-57.71289 12.1554,-41.73612 3.4108,-92.32777 -4.375,-152.31445 l -18.1738,16.0625 c 6.9573,54.19372 12.7038,98.52852 3.3457,130.66015 -5.5196,18.95192 -15.6037,33.97353 -34.5781,46.68946 -18.9744,12.71594 -47.2581,22.79932 -88.1738,29.28515 a 10.001,10.001 0 0 0 -5.5372,2.83789 c -30.7955,31.08045 -71.388,40.97154 -111.6152,35.78125 -40.2272,-5.1903 -79.5879,-25.92311 -105.4492,-55.30468 a 10.001,10.001 0 0 0 -3.1758,-2.40625 c -29.9263,-14.37694 -50.5867,-26.64378 -64.1367,-37.96875 -13.55,-11.32497 -19.9624,-21.24579 -23.0684,-32.53125 -6.2119,-22.57092 2.6054,-54.52185 10.8672,-107.32032 a 10.001,10.001 0 0 0 -0.1113,-3.68945 l -46.1914,-210.61328 103.2598,64.25391 a 10.001,10.001 0 0 0 6.8535,1.38476 c 101.0075,-16.0581 198.5231,-2.99499 300.5293,9.73633 a 10.001,10.001 0 0 0 5.0722,-0.68555 l 126.4903,-52.49414 -71.0039,134.95117 17.6933,9.32227 83.9043,-159.46875 a 10.001,10.001 0 0 0 -12.6816,-13.89258 l -149.6406,62.10156 c -99.7291,-12.46388 -197.3928,-25.43702 -299.7364,-9.85546 l -120.3047,-74.86329 a 10.001,10.001 0 0 0 -4.9257,-1.50195 z"
transform="translate(0,4.5838445)" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 3527.9156,562.18166 42.6109,16.8649 c 16.7292,46.1214 40.4484,45.6318 63.9976,46.2755 l 11.9704,32.0331 c 0,0 62.9831,-86.6735 -118.5789,-95.1735 z"
id="path894"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 3880.1258,592.94106 -45.0518,8.3934 c -25.2514,42.0644 -48.4379,37.0419 -71.6746,33.1644 l -17.8828,29.1481 c 0,0 -45.2207,-97.1302 134.6092,-70.7059 z"
id="path896"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 3692.9385,715.37226 c -15.7925,-3.6732 -22.0278,-10.7121 -29.2363,4.1074 5.902,0.5487 12.1205,0.6112 15.9283,4.3774 0.059,24.1798 24.3616,28.1471 22.7779,2.4787 4.0032,-3.2853 8.4983,-5.6589 15.9731,-2.5092 -2.1673,-17.5646 -10.8503,-10.4507 -25.443,-8.4543 z"
id="path898"
sodipodi:nodetypes="cccccc" />
<path
style="color:#000000;fill:#ffffff;-inkscape-stroke:none;fill-opacity:1"
d="m 3433.1099,271.25146 -7.3652,6.7636 c 0,0 29.0621,31.6444 58.998,69.2617 14.968,18.8087 30.1434,39.1065 41.9473,57.5645 l 32.125,32.41153 c -2.0573,-13.6978 -11.5933,-18.86803 -23.6992,-37.79833 -12.1059,-18.9302 -27.4498,-39.4309 -42.5488,-58.4042 -30.1981,-37.9467 -59.4571,-69.7988 -59.4571,-69.7988 z"
id="path900"
sodipodi:nodetypes="ccsccssc" />
<path
style="color:#000000;fill:#ffffff;-inkscape-stroke:none;fill-opacity:1"
d="m 4008.225,297.99676 5.5749,8.3015 c 0,0 -35.6691,23.9517 -73.5876,53.5052 -18.9593,14.7768 -38.4692,30.9525 -54.2703,46.1299 l -41.0812,35.6821 c 5.2103,-12.8341 17.9471,-27.3278 34.1525,-42.8935 16.2054,-15.5657 35.9267,-31.8992 55.0519,-46.8054 38.2506,-29.8122 74.1598,-53.9198 74.1598,-53.9198 z"
id="path902"
sodipodi:nodetypes="ccsccssc" />
<g
id="g914"
transform="matrix(1.0763584,0.09091724,-0.09091724,1.0763584,2884.4125,-924.2937)">
<g
id="g908"
transform="matrix(1.288481,0,0,1.1087193,-1703.4773,538.66999)">
<path
id="path904"
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 1971.0918,398.34375 -78.7422,24.52344 -39.3359,157.64648 c 67.4756,63.35272 201.1134,73.65398 285.1543,0 l -39.336,-157.64648 -78.7422,-24.52344 -24.5,21.14453 z"
sodipodi:nodetypes="cccccccc" />
<path
id="path906"
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 1827.0195,592.78063 -62.414,12.2207 c 137.3398,147.76478 333.9643,135.43034 451.7968,0 l -54.71,-12.2207 c -110.1435,81.05461 -235.0036,76.56686 -334.6728,0 z"
sodipodi:nodetypes="ccccc" />
</g>
<path
style="fill:none;stroke:#ffffff;stroke-width:10;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 638.772,1205.6514 59.86027,-25.3526"
id="path910"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#ffffff;stroke-width:10;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 1088.7943,1202.8548 -59.8603,-25.3526"
id="path912"
sodipodi:nodetypes="cc" />
</g>
</g>
<g
aria-label="42CTF"
transform="matrix(23.766838,0,0,23.766838,-32926.98,-18251.25)"
id="text14333"
style="font-size:50.8px;line-height:1.25;font-family:Lovelo;-inkscape-font-specification:Lovelo;white-space:pre;fill:#ffffff;stroke-width:1.66987">
<path
d="m 1460.5686,646.43126 v -9.0932 h 3.9624 v -7.2644 h -3.9624 v -11.0236 l -7.2644,4.8768 v 6.1468 h -4.6228 l 7.4168,-19.9136 h -7.62 l -10.3124,27.178 h 15.1384 v 9.0932 z"
id="path837" />
<path
d="m 1479.6695,624.94286 -13.5636,21.5392 h 23.9776 v -7.366 h -10.7696 l 7.1628,-11.0744 c 6.096,-8.4836 2.54,-17.8308 -8.128,-18.3896 -3.556,-0.1524 -7.9756,1.27 -10.7696,3.302 l 1.778,7.0104 c 1.1684,-1.016 5.1816,-3.0988 8.382,-2.8956 2.1336,0.1016 3.7592,1.6256 3.7592,3.6576 0,0 0.1016,1.4732 -1.8288,4.2164 z"
id="path839" />
<path
d="m 1519.4459,618.59286 0.8636,-7.4676 c -2.1844,-0.9652 -4.6228,-1.4224 -7.1628,-1.4224 -24.5872,0 -24.638,36.8808 0,36.8808 2.54,0 5.7404,-0.6096 7.9756,-1.524 l -0.9652,-7.5184 c -1.3716,0.7112 -3.8608,1.6256 -7.0104,1.6256 -14.3764,0 -14.3764,-22.1488 0,-22.1488 3.1496,0 4.9276,0.8636 6.2992,1.5748 z"
id="path841" />
<path
d="m 1540.1722,646.48206 v -29.0576 h 9.0424 v -7.2136 h -25.3492 v 7.2136 h 9.0424 v 29.0576 z"
id="path843" />
<path
d="m 1572.8367,617.42446 v -7.2644 h -18.1356 v 36.322 h 7.2644 v -14.5288 h 9.2456 v -7.2644 h -9.2456 v -7.2644 z"
id="path845" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 KiB

View File

@ -5,7 +5,6 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" type="image/x-icon" href="{% static 'img/favicon.ico' %}"/>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="{% static "css/style.css" %}">
@ -35,7 +34,7 @@
<header>
<!-- As a link -->
<nav class="navbar navbar-expand-lg navbar-dark">
<a class="navbar-brand" href="{% url "home" %}"><img src="{% static "img/42ctf_logo_big_no_bg_full_white.svg" %}" width="150px" alt="42ctf logo"/></a>
<a class="navbar-brand" href="{% url "home" %}"><img src="{% static "img/cover.png" %}" width="110px"/></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
@ -113,17 +112,17 @@
<div class="row">
<div class="col-lg-4 col-12">
<a href="https://discord.gg/DwZqPpA">
<img width="250px" src="https://discordapp.com/api/guilds/606162827274616845/widget.png?style=banner2" style="margin-bottom:5px" alt="42ctf discord server banner">
<img width="250px" src="https://discordapp.com/api/guilds/606162827274616845/widget.png?style=banner2" style="margin-bottom:5px">
</a>
</div>
<div class="col-lg-1 col-6">
<a href="https://twitter.com/42ctf">
<img width="50px" src="{% static "img/twitter.png" %}" alt="Twitter logo">
<img width="50px" src="{% static "img/twitter.png" %}">
</a>
</div>
<div class="col-lg-1 col-6 middle-md">
<a href="https://fr.linkedin.com/company/42ctf">
<img width="50px" src="{% static "img/linkedin.png" %}" style="margin-bottom:5px" alt="Linkedin logo">
<img width="50px" src="{% static "img/linkedin.png" %}" style="margin-bottom:5px">
</a>
</div>
<div class="col-lg-4 col-12 bottom-md">
@ -138,7 +137,7 @@
</div>
</a> -->
<a href="https://www.paypal.com/donate/?hosted_button_id=M6YBYZ63MQGAY" target="_blank">
<img src="/static/img/paypal.png" width="250" style="margin-top: -20px;" alt="'Donate with Paypal' banner">
<img src="/static/img/paypal.png" width="250" style="margin-top: -20px;">
</a>
</div>
<div class="col-lg-2 footer-text col-sm-12">
@ -154,4 +153,4 @@
</body>
</html>

View File

@ -2,31 +2,31 @@
{% block content %}
{% load i18n %}
<div class="row">
<div class="col-sm-12 col-md-9">
<div class="ctf-block">
<div class="ctf-head">
<h3>Reset password</h3>
</div>
<div class="ctf-body">
<div class="col-sm-8 col-md-6 mx-auto">
<form method="post">
{% csrf_token %}
<div class="form-group">
<input class="form-control" type="email" name="email" autocomplete="email" maxlength="254" required="" placeholder="Email"><br>
<input class="form-control" type="submit" value='{% trans "Reset" %}'>
</div>
</form>
</div>
</div>
</div>
<div class="col-sm-12 col-md-9">
<div class="ctf-block">
<div class="ctf-head">
<h3>Reset password</h3>
</div>
<div class="ctf-body">
<div class="col-sm-8 col-md-6 mx-auto">
<form method="post">
{% csrf_token %}
<div class="form-group">
<input class="form-control" type="email" name="email" autocomplete="email" maxlength="254" required="" placeholder="Email"><br>
<input class="form-control" type="submit" value="{% trans "Reset" %}">
</div>
</form>
</div>
</div>
</div>
</div>
<div class="col-sm-12 col-md-3 right-sidebar">
<ul class="list-group">
<a href="/accounts/signin" class="list-group-item">{% trans "Login" %}</a>
<a href="/accounts/signup" class="list-group-item">{% trans "Sign up" %}</a>
</ul>
</div>
</div>
<div class="col-sm-12 col-md-3 right-sidebar">
<ul class="list-group">
<a href="/accounts/signin" class="list-group-item">{% trans "Login" %}</a>
<a href="/accounts/signup" class="list-group-item"{% trans "Sign up" %}</a>
</ul>
</div>
</div>
{% endblock %}