website/src/templates/base.html

153 lines
12 KiB
HTML

{% load static %}
{% 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">
<!-- 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/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>
<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>
<li class="nav-item">
<a class="nav-link" href="{% url 'scoreboard:scoreboard' %}">{% translate "Scoreboard" %}</a>
<li class="nav-item">
<a class="nav-link" href="{% url 'events:events' %}">{% translate "Events" %}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'resources:resources' %}">{% translate "Resources" %}</a>
</li>
</ul>
<ul class="navbar-nav ">
<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>
{% if request.user.is_authenticated %}
<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 %}
</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">
</a>
</div>
<div class="col-lg-1 col-6">
<a href="https://twitter.com/42ctf">
<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">
</a>
</div>
<div class="col-lg-4 col-12 bottom-md">
<a href="https://www.patreon.com/42ctf" target="_blank" class="patreon">
<div class="patreon-content">
<span class="svg-box">
<svg viewBox="0 0 569 546" xmlns="http://www.w3.org/2000/svg"><g><circle cx="362.589996" cy="204.589996" data-fill="1" id="Oval" r="204.589996"></circle><rect data-fill="2" height="545.799988" id="Rectangle" width="100" x="0" y="0"></rect></g></svg>
</span>
<span class="patreon-text">
{% trans "Become a Patron!" %}
</span>
</div>
</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>