diff --git a/src/accounts/templates/accounts/profile.html b/src/accounts/templates/accounts/profile.html index f1d788c..dc446e3 100644 --- a/src/accounts/templates/accounts/profile.html +++ b/src/accounts/templates/accounts/profile.html @@ -53,9 +53,9 @@ {% endif %} {% if member %} -
  • {% trans "Status: Member" %}
  • +
  • Status: {% trans "Member" %}
  • {% else %} -
  • {% trans "Status: Visitor" %}
  • +
  • Status: {% trans " Visitor" %}
  • {% endif %}
  • {% trans "Registered since" %} {{ user.date_joined|date:"d-m-Y" }}
  • diff --git a/src/resources/templates/resources/42ctf.html b/src/resources/templates/resources/42ctf.html deleted file mode 100644 index 4951bcc..0000000 --- a/src/resources/templates/resources/42ctf.html +++ /dev/null @@ -1,31 +0,0 @@ -{% block content %} -{% load i18n %} -{% get_current_language as lang %} -
    -
    -
    -

    {% trans "What is 42CTF ?" %}

    -
    -
    -

    {% trans "A short introduction to CTF" %}

    - {% trans "CTF stands for Capture The Flag. It is a cybersecurity competition, where participants have to solve challenges of various categories to gain points and progress on the scoreboard." %} - {% blocktranslate %}The challenges require participants to find sort of passwords called "flags" and to submit them on the platform.{% endblocktranslate %} -

    - -

    {% trans "Functionment of 42CTF" %}

    - {% trans "42CTF is what we call a permanent CTF." %}
    - {% trans "Except from the" %} {% translate "events" %}, {% trans "challenges are available on the platform without time limitations." %} - {% trans "The registration on 42CTF is open to everyone, 42 students or not." %}
    - {% trans "Events may or may not be open. If you would like to organize an event on 42CTF, feel free to contact us." %}
    -

    - -

    {% trans "42CTF Team" %}

    - {% trans "42CTF is managed by 42 students." %}
    - {% trans "You can meet the team on" %} .
    - {% trans "Challenges are created by various contributors, not necessarily 42 students."%}
    - {% trans "Anyone is welcome to submit their own challenges, either on the permanent CTF or for a specific event." %} -
    -
    -
    - -{% endblock %} \ No newline at end of file diff --git a/src/resources/templates/resources/about.html b/src/resources/templates/resources/about.html new file mode 100644 index 0000000..bd896cb --- /dev/null +++ b/src/resources/templates/resources/about.html @@ -0,0 +1,36 @@ +{% extends 'base.html' %} +{% block content %} +{% load i18n %} +{% get_current_language as lang %} +
    + {% load i18n %} + {% get_current_language as lang %} +
    +
    +
    +

    {% trans "What is 42CTF ?" %}

    +
    +
    +

    {% trans "A short introduction to CTF" %}

    + {% trans "CTF stands for Capture The Flag. It is a cybersecurity competition, where participants have to solve challenges of various categories to gain points and progress on the scoreboard." %} + {% blocktranslate %}The challenges require participants to find sort of passwords called "flags" and to submit them on the platform.{% endblocktranslate %} +

    + +

    {% trans "Functionment of 42CTF" %}

    + {% trans "42CTF is what we call a permanent CTF." %}
    + {% trans "Except from the" %} {% translate "events" %}, {% trans "challenges are available on the platform without time limitations." %} + {% trans "The registration on 42CTF is open to everyone, 42 students or not." %}
    + {% trans "Events may or may not be open. If you would like to organize an event on 42CTF, feel free to contact us." %}
    +

    + +

    {% trans "42CTF Team" %}

    + {% trans "42CTF is managed by 42 students." %}
    + {% trans "You can meet the team on" %} .
    + {% trans "Challenges are created by various contributors, not necessarily 42 students."%}
    + {% trans "Anyone is welcome to submit their own challenges, either on the permanent CTF or for a specific event." %} +
    +
    +
    + + {% endblock %} +
    \ No newline at end of file diff --git a/src/resources/templates/resources/becomeMember.html b/src/resources/templates/resources/becomeMember.html new file mode 100644 index 0000000..638a53b --- /dev/null +++ b/src/resources/templates/resources/becomeMember.html @@ -0,0 +1,65 @@ +{% extends 'base.html' %} +{% load static %} +{% block content %} +{% load i18n %} +{% get_current_language as lang %} +
    +
    +

    {% trans "Become a 42CTF member" %}

    +
    +
    +
    +
    +

    {% trans "Why should i become a 42CTF member ?" %}

    +
    +
    + 42ctf logo +

    + {% trans "42CTF is a non-profit organization with a legal status under the french law (Association loi 1901)." %} +
    +
    +
    +
    +

    {% trans "I want to be a member !" %}

    +
    +
    + {% trans "You're welcome ! To become a member, you need to support us by paying a fee of 15 euros for 1 year." %} +
    + + + +
    + {% trans "If you want to use another method, contact us !" %} +
    +
    +
    +
    +
    +
    +

    {% trans "What i got ?" %}

    +
    + - {% trans "A different color for your pseudo in the scoreboard, to let everyone know you're a member." %}
    + - {% trans "The possibility to play past CTF, with challenges no longer available, in the form of private events with the people of your choice." %}
    +
    +

    + {% trans "More advantages may come later, and you can submit us your ideas." %} +

    +
    +
    +
    +

    {% trans "How do i claim it ?" %}

    +
    +
    + {% trans "Once you payed 15 euros, you just need to contact us on discord or by mail !" %} +
    +
    + + 42ctf discord server banner + +
    + 42ctf@protonmail.com +
    +
    +
    +
    +{% endblock %} \ No newline at end of file diff --git a/src/resources/templates/resources/resources.html b/src/resources/templates/resources/contribute.html similarity index 59% rename from src/resources/templates/resources/resources.html rename to src/resources/templates/resources/contribute.html index 2d863be..fb8be97 100644 --- a/src/resources/templates/resources/resources.html +++ b/src/resources/templates/resources/contribute.html @@ -3,11 +3,8 @@ {% load i18n %} {% get_current_language as lang %}
    - {% block 42ctf %} - {% include "./42ctf.html" %} - {% endblock %} - {% block tools %} - {% include "./tools.html" %} + {% block donate %} + {% include "./donate.html" %} {% endblock %} {% block translate %} {% include "./translate.html" %} @@ -15,11 +12,5 @@ {% block create_challenge %} {% include "./create_challenge.html" %} {% endblock %} - {% block edit %} - {% include "./edit.html" %} - {% endblock %} - {% block donate %} - {% include "./donate.html" %} - {% endblock %}
    {% endblock %} \ No newline at end of file diff --git a/src/resources/templates/resources/create_challenge.html b/src/resources/templates/resources/create_challenge.html index a9da07c..875f3c3 100644 --- a/src/resources/templates/resources/create_challenge.html +++ b/src/resources/templates/resources/create_challenge.html @@ -9,8 +9,8 @@
    {% trans "If you want to create new challenges for 42CTF, send us a message on " %} !

    {% trans "If your challenge is offline, then you don't have to ask us in advance." %}
    - {% trans "If your challenge is online (for example web or pwn), then you should give us a short description of what you want to do." %} - {% trans "We may be able to help you or to give you resources such as dockerfiles." %} + {% trans "If your challenge is online (for example web or pwn), then you should give us a short description of what you want to do." %}
    + {% trans "We may be able to help you or to give you resources such as dockerfiles." %}

    {% trans "We plan to make those resources publicly available in a near future." %}
    diff --git a/src/resources/templates/resources/donate.html b/src/resources/templates/resources/donate.html index acc445c..ab58f0c 100644 --- a/src/resources/templates/resources/donate.html +++ b/src/resources/templates/resources/donate.html @@ -2,57 +2,29 @@ {% load i18n %} {% get_current_language as lang %}
    -
    +
    -

    {% trans "Donate" %}

    +

    {% trans "Donate" %}

    +
    +
    + + +
    +

    + {% trans "If you would like us to add another payment method or if you want to pay in cash, send us a message !" %}

    +

    +
    +
    +

    {% trans "What will we do with your money ?" %}

    -

    {% trans "Become a 42CTF member" %}

    - {% trans "42CTF is a non-profit organization with a legal status under the french law (Association loi 1901)." %}
    - {% trans "You can support us by becoming a member and paying a fee of 15 euros." %}
    - {% trans "Membership is then granted for 1 year." %}

    - - {% trans "When you become a member, you gain the following advantages:" %}
    - - {% trans "A different color for your pseudo in the scoreboard, to let everyone know you're a member." %}
    - - {% trans "The possibility to play again past CTF, with challenges no longer available, in the form of private events with the people of your choice." %}
    - {% trans "Ex: you played Welcome CTF 2021, and want to play it again with your friends during one weekend." %} - {% trans "Or you didn't play Welcome CTF 2021 because you were not eligible." %} -

    - - {% trans "More advantages may come later, and you can submit us your ideas." %}
    - {% trans "However, we will not organize limited time CTF for members only, as this will be equivalent to organize paid events, and we want 42CTF to remain FREE for all." %}
    -

    - -

    {% trans "Donate to 42CTF" %}

    - {% trans "You can donate to 42CTF or pay your membership with the following means:" %}
    - - - - - -
    -
    - {% trans "If you would like us to add another payment method or if you want to pay in cash, send us a message !" %}

    - - {% trans "If you're paying for your membership, don't forget to send us your first and last name, as well as your 42CTF pseudo." %} - {% trans "We will only use thoe data to keep track of our members and grant you advantages, and we will never communicate them to any third party." %} -

    - -

    {% trans "What will we do with your money ?" %}

    - {% blocktranslate %}Hosting a website - and especially a CTF platform - costs money: - more precisely, it costs us 50 euros per month.
    - If we had 40 members each year, it would be enough to cover the hosting of 42CTF.
    - We currently have {{nb_members}} members.
    - 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 :){% endblocktranslate %} + {% blocktranslate %}Hosting a website - and especially a CTF platform - costs money: more precisely, it costs us 50 euros per month. +

    + If we had 40 members each year, it would be enough to cover the hosting of 42CTF. +
    + We currently have {{nb_members}} members. +

    + 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 :){% endblocktranslate %}
    diff --git a/src/resources/templates/resources/howToStart.html b/src/resources/templates/resources/howToStart.html new file mode 100644 index 0000000..fef277a --- /dev/null +++ b/src/resources/templates/resources/howToStart.html @@ -0,0 +1,10 @@ +{% extends 'base.html' %} +{% block content %} +{% load i18n %} +{% get_current_language as lang %} +
    + {% block tools %} + {% include "./tools.html" %} + {% endblock %} +
    +{% endblock %} \ No newline at end of file diff --git a/src/resources/templates/resources/tools.html b/src/resources/templates/resources/tools.html index 8595255..f943921 100644 --- a/src/resources/templates/resources/tools.html +++ b/src/resources/templates/resources/tools.html @@ -1,7 +1,7 @@ {% block content %} {% load i18n %} {% get_current_language as lang %} -
    +

    {% trans "Recommended Tools" %}

    diff --git a/src/resources/templates/resources/translate.html b/src/resources/templates/resources/translate.html index a881d6a..df3f5d4 100644 --- a/src/resources/templates/resources/translate.html +++ b/src/resources/templates/resources/translate.html @@ -1,17 +1,19 @@ {% block content %} {% load i18n %} {% get_current_language as lang %} -
    +

    {% trans "Translate 42CTF" %}

    - {% trans "42CTF source code is publicly available on this"%} git.
    - {% trans "Translation does not require any programming skill and is a good way to contribute if you want to help us, by making the platform always more accessible." %}

    - {% trans "We have a" %} wiki {% trans "describing how to translate pages with the Django internalization module." %}
    - {% trans "We invite you to read it to know all the details, but it merely requires you to edit text files, so you see, no programming skills required ;)" %} - {% trans "You will need to fork the git repository, make your changes, push them, and then open a pull request so that we can merge your contributions into our repository." %}

    + {% trans "42CTF source code is publicly available on this"%} git. +
    + {% trans "Translation does not require any programming skill and is a good way to contribute if you want to help us, by making the platform always more accessible." %} +

    + {% trans "We have a" %} wiki {% trans "describing how to translate pages with the Django internalization module." %} +

    + {% trans "Don't hesitate to reach for help on" %}
    diff --git a/src/resources/urls.py b/src/resources/urls.py index 53f26cd..8cb1c68 100644 --- a/src/resources/urls.py +++ b/src/resources/urls.py @@ -4,5 +4,8 @@ from . import views app_name = "resources" urlpatterns = [ - path('', views.resources, name='resources'), + path('about', views.about, name='about'), + path('how-to-start', views.howToStart, name='howToStart'), + path('contribute', views.contribute, name='contribute'), + path('become-member', views.becomeMember, name='becomeMember'), ] diff --git a/src/resources/views.py b/src/resources/views.py index fb41648..07523fc 100644 --- a/src/resources/views.py +++ b/src/resources/views.py @@ -4,6 +4,15 @@ from django.contrib.auth.models import timezone # Create your views here. -def resources(request): +def contribute(request): nb_members = UserProfileInfo.objects.filter(member=True, member_until__gt=timezone.now()).count() - return render(request, 'resources/resources.html', {'nb_members':nb_members}) \ No newline at end of file + return render(request, 'resources/contribute.html', {'nb_members':nb_members}) + +def about(request): + return render(request, 'resources/about.html') + +def howToStart(request): + return render(request, 'resources/howToStart.html') + +def becomeMember(request): + return render(request, 'resources/becomeMember.html') diff --git a/src/statics/css/style.css b/src/statics/css/style.css index 4731362..79f7bf5 100644 --- a/src/statics/css/style.css +++ b/src/statics/css/style.css @@ -4,6 +4,7 @@ body { } .card-body { background-color: #1d1d1d; + padding:30px; } a { color: #4375aa; @@ -13,10 +14,10 @@ a:hover { text-decoration: none; } .main-div { - margin-top: 40px; + margin-top: 30px; } .news-card { - margin-bottom: 20px; + margin-bottom: 30px; border: none; } .news-card .card-header { @@ -68,6 +69,12 @@ pre { padding-right: 15px; padding-left: 15px; } +.nav-distinguish{ + border: 1.8px solid #333; + border-radius: 1.5px; + color: #fff; + text-transform: uppercase; +} .flag_img { margin-top: 10px; width: 28px; @@ -83,15 +90,15 @@ pre { .ctf-block { background-color: #1d1d1d; - min-height: 235px; - padding: 15px; - margin-bottom: 20px; + min-height: 30vh; + padding: 30px; + margin-bottom: 30px; } .ctf-body { - margin-top: 50px; + margin-top: 30px; } .bloc-body { - margin-top: 25px; + margin-top: 30px; } .ctf-footer { margin-top: 15px; @@ -103,8 +110,8 @@ pre { margin-bottom: 20px; } .event-body { - padding: 15px; - margin-top: 50px; + padding: 30px; + margin-top: 30px; } .event-footer { margin-top: 15px; @@ -271,91 +278,7 @@ footer { visibility: visible; padding-top: 5px; } -.patreon { - width: 250px; - height: 59px; - background-color: #ff6363; - font-family: America, "GT America", Lato, "Helvetica Neue", Helvetica, Arial, - sans-serif; - text-rendering: optimizeLegibility; - -moz-box-align: center; - backface-visibility: hidden; - box-sizing: border-box; - cursor: pointer; - display: inline-flex; - font-size: 0.875rem !important; - font-weight: 500; - -moz-box-pack: center; - justify-content: center; - padding: 0.46875rem 1rem; - position: relative; - pointer-events: unset; - text-align: center; - text-decoration: none; - text-transform: none; - transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1) 0s; - user-select: none; - white-space: unset; - align-items: center; - color: #fff; -} -.li-patreon { - width: 120px; - height: 37px; - background-color: #ff6363; - font-family: America, "GT America", Lato, "Helvetica Neue", Helvetica, Arial, - sans-serif; - text-rendering: optimizeLegibility; - -moz-box-align: center; - backface-visibility: hidden; - box-sizing: border-box; - cursor: pointer; - font-size: 0.875rem !important; - font-weight: 500; - -moz-box-pack: center; - justify-content: center; - padding: 0.46875rem 1rem; - text-align: center; - text-decoration: none; - text-transform: none; - transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1) 0s; - user-select: none; - align-items: center; - color: #fff; - margin-top: 4px; - margin-right: 13px; -} -.patreon:hover { - background-color: #ff4a4a; - color: #fff; -} -.patreon-text { - padding-left: 1em; -} -.patreon svg { - height: 1.3rem; - width: 1.3rem; - fill: #fff; -} -.patreon-content { - -moz-box-align: center; - align-items: center; - display: flex; - -moz-box-pack: center; - justify-content: center; - visibility: visible; -} -.svg-box { - align-self: center; - -moz-box-align: center; - align-items: center; - display: inline-flex; - filter: none; - vertical-align: unset; - height: unset; - width: unset; - cursor: unset; -} + .is-member { color: #26fcef; } diff --git a/src/templates/base.html b/src/templates/base.html index 2b09380..aedcb11 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -1,157 +1,165 @@ {% load static %} +{% load is_member %} {% load i18n %} - - - - - - - - 42CTF - - - - - - - - - - - - - - - - - - - + + + + + + + + 42CTF + + + + + + + + + + + + + + + + + + + -
    - - -
    -
    - {% block content %} - {% endblock %} -
    - - - - - - - - - - +
    + + +
    + +
    + {% block content %} + {% endblock %} +
    + + + + + + + + + + +