First Commit
This commit is contained in:
commit
ce0758fbbb
496 changed files with 52062 additions and 0 deletions
41
templates/components/banner.html
Normal file
41
templates/components/banner.html
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{% if request.theme_active != '00s' %}
|
||||
<div class="warning-announce-not-mobile-compatible">
|
||||
Le design séléctionné n'est pas compatible avec les appareils mobiles. Veuillez choisir un autre design pour une meilleure expérience utilisateur.
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if request.theme_active == 'rpg' %}
|
||||
<div class="banner-container">
|
||||
<div class="banner rpg-banner">
|
||||
<div class="rpg-frame">
|
||||
<div class="rpg-background">
|
||||
<div class="rpg-cloud"></div>
|
||||
<div class="rpg-cloud"></div>
|
||||
<div class="rpg-tree"></div>
|
||||
<div class="rpg-tree"></div>
|
||||
</div>
|
||||
<div class="rpg-text-box">
|
||||
<div class="rpg-title">Passion Retro</div>
|
||||
<div class="rpg-message">
|
||||
Bienvenue sur le portail web 100% Rétro ! Attention, ce site web n'est pas conseillé aux personnes<br>nées après 2005 sous peine de crise existensielle.
|
||||
</div>
|
||||
<div class="rpg-pointer">▼</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="banner-container">
|
||||
<div class="banner">
|
||||
<div class="galaxy-background"></div>
|
||||
{% if request.theme_active == "80s" %}
|
||||
<div class="grid"></div>
|
||||
<div class="sun"></div>
|
||||
<div class="spaceship">
|
||||
<div class="engine"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="banner-text" id="bannerText">Passion Retro</div>
|
||||
<div class="slogan">Bienvenue sur le portail web 100% Rétro ! Attention, ce site web n'est pas conseillé aux personnes nées après 2005 sous peine de crise existensielle.</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
48
templates/components/forum_home.html
Executable file
48
templates/components/forum_home.html
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
{% extends 'forum_layout.html' %}
|
||||
{% load forum_extras %}
|
||||
|
||||
{% block forum_content %}
|
||||
<h2>Forum</h2>
|
||||
<div class="forum">
|
||||
{% for category in categories %}
|
||||
<div class="forum-body forum-column category-name"><h3>{{ category.name }}</h3></div>
|
||||
<div class="forum-header">
|
||||
<div class="forum-column">Description</div>
|
||||
<div class="forum-column">Nombre de topics</div>
|
||||
<div class="forum-column">Dernier Message</div>
|
||||
</div>
|
||||
<div class="forum-body">
|
||||
{% for forum in forums %}
|
||||
{% if forum.category.id == category.id %}
|
||||
<div class="forum-row">
|
||||
<div class="forum-column">
|
||||
{% if unread_topics|get_item:forum.id %}
|
||||
<span class="unread-badge">•</span>
|
||||
<strong><a href="{% url 'topic_list' forum.id %}">{{ forum.name }}</a></strong>
|
||||
{% else %}
|
||||
<a href="{% url 'topic_list' forum.id %}">{{ forum.name }}</a>
|
||||
{% endif %}
|
||||
<br>
|
||||
<span class="forum-description"><small>{{ forum.description|safe }}</small></span>
|
||||
</div>
|
||||
<div class="forum-column">
|
||||
{{ count_topics|get_item:forum.id|default_if_none:'Aucun' }}
|
||||
</div>
|
||||
<div class="forum-column">
|
||||
{% with last_post=last_posts|get_item:forum.id %}
|
||||
{% if last_post %}
|
||||
<strong><a href="{% url 'profile' last_post.author.id %}" class="{{ last_post.author.username_decoration }}">{{ last_post.author.username }}</a></strong> dans <a href="{% url 'post_list' last_post.topic.forum.id last_post.topic.id %}">{{ last_post.topic.title }}</a>
|
||||
<br>
|
||||
<small>{{ last_post.created }}</small></span>
|
||||
{% else %}
|
||||
Aucun message
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
22
templates/components/guestbook_home.html
Executable file
22
templates/components/guestbook_home.html
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
{% extends 'layout.html' %}
|
||||
{% load users_custom_tags %}
|
||||
{% load bbcode_tags %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<h2>Livre d'Or</h2>
|
||||
<div class="guestbook">
|
||||
{% for message in guestbook %}
|
||||
<p>Le {{ message.created }}, <span class="author {{ message.author.username_decoration }}">{{ message.author }}</span> à dit : {{ message.content|bbcode|safe|linebreaksbr }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<h3 id="form">Laisser un message</h3>
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<!-- <script src='https://www.google.com/recaptcha/api.js'></script>
|
||||
<div class="g-recaptcha" style="margin-left:50px" data-sitekey="{{ GOOGLE_PUBLIC_KEY }}"></div> -->
|
||||
<button>Envoyer</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
53
templates/components/horizontal_menu.html
Normal file
53
templates/components/horizontal_menu.html
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<!-- Ajout du bouton burger -->
|
||||
<div class="burger-menu">
|
||||
<button class="burger-icon">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</button>
|
||||
</div>
|
||||
<!-- Menu horizontal existant -->
|
||||
<div class="menu-horizontal">
|
||||
<ul>
|
||||
<li><a href="{% url 'home' %}">Accueil</a></li>
|
||||
<li><a href="{% url 'forum_home' %}">Forum</a></li>
|
||||
<li>
|
||||
<a href="{% url 'portal_games' %}">
|
||||
Portail des jeux
|
||||
{% if request.user.is_staff and pending_quizes_count > 0 %}
|
||||
<span class="badge badge-warning">{{ pending_quizes_count }}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
<li><a href="{% url 'shop_home' %}" class="new-item-menu">Boutique</a></li>
|
||||
<li><a href="{% url 'contribute' %}" class="btn btn-add">Contribuer</a></li>
|
||||
<li><a href="">Technologies</a>
|
||||
<ul class="dropdown">
|
||||
{% for tech in request.posts_tech %}
|
||||
<li><a href="{% url 'view_post' tech.slug %}">{{ tech.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="">Musique</a>
|
||||
<ul>
|
||||
{% for music in request.posts_music %}
|
||||
<li><a href="{% url 'view_post' music.slug %}">{{ music.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="">Films & Series</a>
|
||||
<ul>
|
||||
{% for movies in request.posts_movies %}
|
||||
<li><a href="{% url 'view_post' movies.slug %}">{{ movies.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="">Jeux</a>
|
||||
<ul class="dropdown">
|
||||
{% for games in request.posts_games %}
|
||||
<li><a href="{% url 'view_post' games.slug %}">{{ games.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
49
templates/components/left_menu.html
Normal file
49
templates/components/left_menu.html
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<div class="menu">
|
||||
<h2>Communauté</h2>
|
||||
<ul>
|
||||
<li><a href="{% url 'home' %}">Accueil</a></li>
|
||||
<li><a href="{% url 'forum_home' %}">Forum</a></li>
|
||||
<li>
|
||||
<a href="{% url 'portal_games' %}">Portail des jeux</a>
|
||||
{% if request.user.is_staff and pending_quizes_count > 0 %}
|
||||
<span class="badge badge-warning">{{ pending_quizes_count }}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'shop_home' %}" class="new-item-menu">Boutique</a>
|
||||
</li>
|
||||
<li><a href="{% url 'contribute' %}" class="btn btn-add">Contribuer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<h2>Jeux</h2>
|
||||
<ul>
|
||||
{% for games in request.posts_games %}
|
||||
<li><a href="{% url 'view_post' games.slug %}">{{ games.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<h2>Films & Series</h2>
|
||||
<ul>
|
||||
{% for movies in request.posts_movies %}
|
||||
<li><a href="{% url 'view_post' movies.slug %}">{{ movies.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<h2>Musique</h2>
|
||||
<ul>
|
||||
{% for music in request.posts_music %}
|
||||
<li><a href="{% url 'view_post' music.slug %}">{{ music.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<h2>Technologies</h2>
|
||||
<ul>
|
||||
{% for tech in request.posts_tech %}
|
||||
<li><a href="{% url 'view_post' tech.slug %}">{{ tech.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
69
templates/components/paginator.html
Executable file
69
templates/components/paginator.html
Executable file
|
|
@ -0,0 +1,69 @@
|
|||
{% if is_paginated %}
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
{% if page_obj.number > 1 %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="?page=1" aria-label="First">
|
||||
<span aria-hidden="true">«</span>
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item disabled">
|
||||
<span class="page-link" aria-label="First">
|
||||
<span aria-hidden="true">«</span>
|
||||
</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if page_obj.has_previous %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="?page={{ page_obj.previous_page_number }}" aria-label="Previous">
|
||||
<span aria-hidden="true"><</span>
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item disabled">
|
||||
<span class="page-link" aria-label="Previous">
|
||||
<span aria-hidden="true"><</span>
|
||||
</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% for num in paginator.page_range %}
|
||||
{% if page_obj.number == num %}
|
||||
<li class="page-item active"><span class="page-link">{{ num }}</span></li>
|
||||
{% elif num > page_obj.number|add:'-3' and num < page_obj.number|add:'3' %}
|
||||
<li class="page-item"><a class="page-link" href="?page={{ num }}">{{ num }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if page_obj.has_next %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="?page={{ page_obj.next_page_number }}" aria-label="Next">
|
||||
<span aria-hidden="true">></span>
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item disabled">
|
||||
<span class="page-link" aria-label="Next">
|
||||
<span aria-hidden="true">></span>
|
||||
</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if page_obj.number < paginator.num_pages %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="?page={{ paginator.num_pages }}" aria-label="Last">
|
||||
<span aria-hidden="true">»</span>
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item disabled">
|
||||
<span class="page-link" aria-label="Last">
|
||||
<span aria-hidden="true">»</span>
|
||||
</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
6
templates/components/profile_nav.html
Normal file
6
templates/components/profile_nav.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{% block 'profile-nav' %}
|
||||
<div class="profile-header">
|
||||
<h2>Profil de <span class="{{ user.username_decoration }}">{{ user.username }}</span></h2>
|
||||
<div class="{{ user.border_avatar }}"><img src="/media/{{ user.avatar }}" style="width:150px;" alt="Avatar de {{ user.username }}"></div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
87
templates/components/right_menu.html
Normal file
87
templates/components/right_menu.html
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
{% load bbcode_tags %}
|
||||
|
||||
<div class="menu">
|
||||
<h2>Membre</h2>
|
||||
<ul>
|
||||
<!-- Si le membre est connecté -->
|
||||
{% if request.user.is_authenticated %}
|
||||
<center><div class="{{ request.user.border_avatar }}"><img src="/media/{{ request.user.avatar }}" style="width:150px;" alt="Avatar de {{ request.user.username }}"></div></center>
|
||||
<li>Bonjour <strong><span class="{{ request.user.username_decoration }}" data-text="{{ request.user.username }}">{{ request.user.username }}</span></strong></li>
|
||||
<li><a href="{% url 'profile' %}">Mon Profil</a></li>
|
||||
<li>
|
||||
<a href="{% url 'pm_home' %}">Messagerie privée</a>
|
||||
{% if pending_pm_count > 0 %}
|
||||
<span class="badge badge-warning">{{ pending_pm_count }}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li><a href="{% url 'contributions' %}">Mes contributions</a></li>
|
||||
<li>
|
||||
<form id="logout-form" action="{% url 'logout' %}" method="post" style="display: none;">
|
||||
{% csrf_token %}
|
||||
</form>
|
||||
<a href="#" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">Déconnexion</a>
|
||||
</li>
|
||||
<!-- Si c'est un admin -->
|
||||
{% if request.user.is_staff %}
|
||||
<li>
|
||||
<a href="/admin/posts/post/?active__exact=0">
|
||||
Articles en attente
|
||||
</a>
|
||||
{% if pending_posts_count > 0 %}
|
||||
<span class="badge badge-warning">{{ pending_posts_count }}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li><a href="/admin" target="_blank" class="danger">Administration</a></li>
|
||||
{% endif %}
|
||||
<!-- Si le membre n'est pas connecté -->
|
||||
{% else %}
|
||||
<li>
|
||||
<form action="{% url 'login' %}" method="post" class="incol">
|
||||
{% csrf_token %}
|
||||
<input type="text" name="username" placeholder="Nom d'utilisateur">
|
||||
<input type="password" name="password" placeholder="Mot de passe">
|
||||
<button>Connexion</button>
|
||||
</form>
|
||||
</li>
|
||||
<li><a href="{% url 'register' %}">Inscription</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<h2>Livre d'Or</h2>
|
||||
<ul class="guestbook">
|
||||
{% for message in request.guestbook %}
|
||||
<li><span class="date">[{{ message.created }}]</span> <span class="author {{ message.author.username_decoration }}" data-text="{{ message.author.username }}<">{{ message.author }}</span> : {{ message.content|bbcode|safe|linebreaksbr }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<ul>
|
||||
<li>{{ request.total_guestbook }} messages dans le livre d'or</li>
|
||||
</ul>
|
||||
<center><a href="{% url 'guestbook_home' %}#form" class="btn btn-add">Laisser un message</a></center>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<h2>Stats Site</h2>
|
||||
<ul>
|
||||
<li>Membres : {{ request.total_users }}</li>
|
||||
<li>Dernier inscrit : <a href="{% url 'profile' request.last_user.id %}">{{ request.last_user }}</a></li>
|
||||
<li>Visiteurs : {{ request.visitor_count }}</li>
|
||||
<li>Visites totales : {{ request.total_visitor_count }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<h2>Stats Forum</h2>
|
||||
<ul>
|
||||
<li>Messages : {{ request.total_posts }}</li>
|
||||
<li>Sujets : {{ request.total_topics }}</li>
|
||||
{% if request.last_topic %}
|
||||
<li>Dernier Sujet créer : <a href="{% url 'post_list' request.last_topic.forum.id request.last_topic.id %}">{{ request.last_topic.title }}</a></li>
|
||||
{% else %}
|
||||
<li>Dernier Sujet créer : Aucun</li>
|
||||
{% endif %}
|
||||
{% if request.last_post %}
|
||||
<li>Dernier Message : <a href="{% url 'post_list' request.last_post.topic.forum.id request.last_post.topic.id %}">{{ request.last_post.topic.title }}</a></li>
|
||||
{% else %}
|
||||
<li>Dernier Message : Aucun</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue