base.html 3.46 KB
Newer Older
cynddl's avatar
cynddl committed
1
{% load static %}
2
{% load i18n %}
cynddl's avatar
cynddl committed
3 4 5 6
<!DOCTYPE html>
<!-- Header -->
<html>
	<head>
7
	<title>Revue de presse de La Quadrature du Net</title>
cynddl's avatar
cynddl committed
8 9 10 11 12
	<meta charset="utf-8" />
	<meta name="author" content="La Quadrature du Net" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />

	<!-- Open graph -->
13 14
	<meta property="og:title" content="Revue de presse de La Quadrature du Net" />
	<meta property="og:url" content="https://www.laquadrature.net/rp/" />
cynddl's avatar
cynddl committed
15
	<meta property="og:site_name" content="La Quadrature du Net" />
16
	<meta property="og:description" content="" />
cynddl's avatar
cynddl committed
17

18
	<!-- Styles and scripts -->
Thibaut Broggi's avatar
Thibaut Broggi committed
19
	<script src="{% static 'admin.min.js' %}" charset="utf-8"></script>
20
	<link rel="stylesheet" href="{% static 'app.bundle.css' %}">
cynddl's avatar
cynddl committed
21 22 23 24
</head>
<body>

<div>
25
	<nav class="navbar navbar-sm sticky-top navbar-toggleable-md dark-blue-bg">
cynddl's avatar
cynddl committed
26 27
		<div class="collapse navbar-collapse" id="navbarSupportedContent">
			<ul class="navbar-nav ml-auto">
28 29
				{% if user.is_authenticated %}
				{% comment %} <li class="nav-item"><a class="nav-link" href="{% url 'account_profile' %}">Mon profile</a></li> {% endcomment %}
30
				<li class="nav-item"><a class="nav-link" href="{% url 'account_logout' %}">{% trans "Logout" %}</a></li>
31
				{% else %}
32 33
				<li class="nav-item"><a class="nav-link" href="{% url 'account_signup' %}">{% trans "Register" %}</a></li>
				<li class="nav-item"><a class="nav-link" href="{% url 'account_login' %}">{% trans "Login" %}</a></li>
34
				{% endif %}
35 36 37 38 39 40 41 42 43 44 45 46 47

				{% get_available_languages as LANGUAGES %}
				{% get_language_info_list for LANGUAGES as languages %}
				{% for language in languages %}
				<li class="nav-item">
					<form action="{% url 'set_language' %}" method="post">
						{% csrf_token %}
						<input name="next" type="hidden" value="{{ redirect_to }}" />
						<input name="language" type="hidden" value="{{ language.code }}" />
						<button class="btn btn-link" type="submit">[{{ language.code }}]</button>
					</form>
				</li>
				{% endfor %}
cynddl's avatar
cynddl committed
48 49
			</ul>
		</div>
50

cynddl's avatar
cynddl committed
51 52 53 54 55
	</nav>

	<nav class="navbar navbar-toggleable-md">
		<div class="collapse navbar-collapse" id="navbarSupportedContent">
			<a class="navbar-brand" href="/"><img class="float-left" src="/static/img/logo.png" alt=""></a>
56 57
				{% if user.is_authenticated %}
				<ul class="navbar-nav ml-auto">
Okhin's avatar
Okhin committed
58
                    <li class="nav-item">
Okhin's avatar
Okhin committed
59
                        <a class="nav-link" href="{% url 'rp:article-list' %}">{% trans "Publish interface" %}</a>
Okhin's avatar
Okhin committed
60
                    </li>
61 62
					<li class="nav-item">
						<a class="nav-link">
Okhin's avatar
Okhin committed
63
                            {% trans "Vous êtes" %} {{user.groups.last.name}}
64
						  {% if user.groups.last.name == "padawan" %}
Thibaut Broggi's avatar
Thibaut Broggi committed
65
						  <img class="inline-image ml-2" role="img" src="{% static 'img/padawan.svg' %}" />
66
						  {% elif user.groups.last.name == "jedi" %}
Thibaut Broggi's avatar
Thibaut Broggi committed
67 68
						  <img class="inline-image ml-2" role="img" src="{% static 'img/jedi.svg' %}" />
						  {% endif %}
69 70 71 72
						</a>
					</li>
				</ul>
				{% else %}
73
				<span class="navbar-text ml-auto text-muted">For jedi by jedi</span>
74
				{% endif %}
cynddl's avatar
cynddl committed
75 76 77 78
		</div>
	</nav>
</div>

79
<section class="container-fluid light-grey-bg">
80 81
	{% block content-banner %}
	<div id="main-banner" class="text-center row justify-content-center">
cynddl's avatar
cynddl committed
82 83 84 85
		<div class="page-header col-md-10">
			<h1><span>Bienvenue sur la revue de presse de La Quadrature</span></h1>
		</div>
	</div>
86
	{% endblock %}
cynddl's avatar
cynddl committed
87

88 89
	{% block content-header %}
	{% endblock %}
cynddl's avatar
cynddl committed
90 91 92
</section>


93
<section id="main" class="container-fluid light-grey-bg">
cynddl's avatar
cynddl committed
94 95 96 97 98
	{% block content %}
	{% endblock %}
</section>

</body>
luxcem's avatar
luxcem committed
99
</html>