website/src/templates/base.html

172 lines
8.4 KiB
HTML
Raw Normal View History

2021-07-10 11:18:24 +02:00
{% load static %}
{% load is_member %}
2021-07-10 11:18:24 +02:00
{% load i18n %}
<!doctype html>
<html lang="en">
<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" %}">
<!-- Primary Meta Tags -->
<title>42CTF</title>
<meta name="title" content="42CTF">
<meta name="description" content="42CTF is a cybersecurity challenges platform created by School 42 students.">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://www.42ctf.org/">
<meta property="og:title" content="42CTF">
<meta property="og:description" content="42CTF is a cybersecurity challenges platform created by School 42 students.">
<meta property="og:image" content="{% static "img/42ctf_logo.png" %}">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://www.42ctf.org/">
<meta property="twitter:title" content="42CTF">
<meta property="twitter:description" content="42CTF is a cybersecurity challenges platform created by School 42 students.">
<meta property="twitter:image" content="{% static "img/42ctf_logo.png" %}">
<meta name="Description" content="42CTF is a cybersecurity challenges platform created by School 42 students.">
<meta name="keywords" content="42, cybersécurité, cybersecurity, hack, hacking, challenge, solution, exercice, hacking challenge, hack challenge, exercice hack, exercice hacking, capture the flag, CTF, security, sécurité, Documentation,Applicatif,Cryptologie,Challenges,Outils,R&#233;seaux,CrackinWebW Client,Programmation,Cryptanaly,Application,Pr&#233;sentation,R&#233;seau,St&#233;ganographie,Web Serveur,Cracking,Classement,Challenges, Informatique,Capture The Flag,Forensic,Web," />
</head>
<body>
<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>
<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>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
CTFs
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
{% if cats %}
{% for c in cats %}
<a class="dropdown-item" href="{% url 'category' cat_slug=c.slug %}">{{ c.name }}</a>
{% endfor %}
{% else %}
<a class="dropdown-item">{% translate "No category available." %}</a>
{% endif %}
</div>
</li>
2022-08-17 12:59:29 +02:00
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% trans "Scoreboard" %}
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{% url 'scoreboard:main' %}">{% trans "Main" %}</a>
<a class="dropdown-item" href="{% url 'scoreboard:network' %}">{% trans "42 Network" %}</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'events:events' %}">{% translate "Events" %}</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
2022-08-17 12:59:29 +02:00
{% trans "Resources" %}
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
2022-08-17 12:59:29 +02:00
<a class="dropdown-item" href="{% url 'resources:about' %}">{% trans "About"%}</a>
<a class="dropdown-item" href="{% url 'resources:howToStart' %}">{% trans "How To Start" %}</a>
<a class="dropdown-item" href="{% url 'resources:contribute' %}">{% trans "Contribute" %}</a>
</div>
</li>
</ul>
<ul class="navbar-nav ">
{% if request.user.is_authenticated %}
{% ismember request.user.userprofileinfo as is_member %}
{% if not is_member %}
<li class="nav-item">
<a class="nav-link nav-distinguish" href="{% url 'resources:becomeMember' %}">{% translate "Become a member" %}</a>
</li>
{% endif %}
<li class="nav-item dropdown">
<a href="{% url 'accounts:edit' %}" class="nav-link">{{ request.user.username }}</a>
</li>
<li class="nav-item dropdown">
<span class="nav-link">{{ request.user.userprofileinfo.score }}</span>
</li>
<li class="nav-item dropdown">
<a class="nav-link" href="{% url 'accounts:out' %}">{% translate "Logout" %}</a>
</li>
{% else %}
<li class="nav-item dropdown">
<a class="nav-link" href="{% url 'accounts:signin' %}">{% translate "Login" %}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'accounts:signup' %}">{% translate "Sign Up" %}</a>
</li>
{% endif %}
<li class="nav-item dropdown">
{% get_current_language as LANGUAGE_CODE %}
<a class="nav-link" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img class="flag_img" src="{% static "img/"|add:LANGUAGE_CODE|add:".svg" %}" alt="flag {{ LANGUAGE_CODE }}" style="margin-top: -5px;"/>
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
{% get_available_languages as languages %}
{% for lang_code, lang_name in languages %}
<a class="dropdown-item" href="{% url 'set_language' lang_code %}?next={{request.path|slice:"3:"}}">
<img class="flag_img" src="{% static "img/"|add:lang_code|add:".svg" %}" alt="flag {{ lang_name }}"/>
</a>
{% endfor %}
</div>
</li>
</ul>
</div>
</nav>
</header>
<div class="container main-div">
{% block content %}
{% endblock %}
</div>
<footer class="container">
<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">
</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">
</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">
</a>
</div>
<div class="col-lg-4 col-12 bottom-md">
<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">
</a>
</div>
<div class="col-lg-2 footer-text col-sm-12">
<p>42ctf@protonmail.com <br>Made with <img src="{% static "img/smoke.png" %}" width="20px" style="margin-top:-5px"> by <a href="https://ix-56h.github.io/">ix-56h</a> - <a href="{% url "cgu" %}">CGU</a></p>
</div>
</div>
</footer>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>