ACCOUNT_LOGOUT_ON_GET = False
ACCOUNT_UNIQUE_EMAIL = False
ACCOUNT_AUTHENTICATED_LOGIN_REDIRECT = True
+LOGIN_REDIRECT_URL = "/"
SOCIALACCOUNT_DISCONNECT_REDIRECT_URL = "/"
{% extends 'base.html' %}
{% block content %}
-{% for video in videos %}
-{{ video.rank }}
-{% endfor %}
+<table id="final-ranks">
+ <tr>
+ <th>Rank 5</th>
+ {% for video in videos %}
+ {% if video.rank == 5 %}
+ <td>
+ <iframe
+ src="https://clips.twitch.tv/embed?clip={{ video.id }}&parent=localhost"
+ height="180"
+ width="320"
+ allowfullscreen>
+ </iframe>
+ </td>
+ {% endif %}
+ {% endfor %}
+ </tr>
+ <tr>
+ <th>Rank 4</th>
+ {% for video in videos %}
+ {% if video.rank == 4 %}
+ <td>
+ <iframe
+ src="https://clips.twitch.tv/embed?clip={{ video.id }}&parent=localhost"
+ height="180"
+ width="320"
+ allowfullscreen>
+ </iframe>
+ </td>
+ {% endif %}
+ {% endfor %}
+ </tr>
+ <tr>
+ <th>Rank 3</th>
+ {% for video in videos %}
+ {% if video.rank == 3 %}
+ <td>
+ <iframe
+ src="https://clips.twitch.tv/embed?clip={{ video.id }}&parent=localhost"
+ height="180"
+ width="320"
+ allowfullscreen>
+ </iframe>
+ </td>
+ {% endif %}
+ {% endfor %}
+ </tr>
+ <tr>
+ <th>Rank 2</th>
+ {% for video in videos %}
+ {% if video.rank == 2 %}
+ <td>
+ <iframe
+ src="https://clips.twitch.tv/embed?clip={{ video.id }}&parent=localhost"
+ height="180"
+ width="320"
+ allowfullscreen>
+ </iframe>
+ </td>
+ {% endif %}
+ {% endfor %}
+ </tr>
+ <tr>
+ <th>Rank 1</th>
+ {% for video in videos %}
+ {% if video.rank == 1 %}
+ <td>
+ <iframe
+ src="https://clips.twitch.tv/embed?clip={{ video.id }}&parent=localhost"
+ height="180"
+ width="320"
+ allowfullscreen>
+ </iframe>
+ </td>
+ {% endif %}
+ {% endfor %}
+ </tr>
+</table>
{% endblock %}
padding: 16px;
text-decoration: none;
display: block;
-
}
+button.btn:active {
+ background-color: #222;
+ color: #eee;
+}
a.btn {
background-color: #ddd;
color: black;
}
+a:active.btn {
+ background-color: #222;
+ color: #eee;
+}
+
.btn-bot {
position: absolute;
background-color: #EEEEEE;
}
+
+.rank-btn:active {
+ background-color: #111111;
+ color: #DDD;
+}
+
<body>
<div class="sidenav">
<a class="btn" href="{% url 'index' %}">Home</a>
- {% if user.is_authenticated %}
+ {% if user.is_superuser %}
<a class="btn" href="{% url 'show' 1 %}">Rank</a>
{% endif %}
{% if user.is_superuser %}
<a class="btn" href="{% url 'admin:index' %}">Admin</a>
{% endif %}
+ {% if user.is_superuser %}
+ <a class="btn" href="{% url 'final' %}">Results</a>
+ {% endif %}
{% if user.is_authenticated %}
<form action="{% url 'account_logout' %}" method="post">
{% csrf_token %}