WIP
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
{% load socialaccount %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@ -17,9 +18,13 @@
|
||||
--border-color: #333;
|
||||
--button-background: #6441a5;
|
||||
--button-hover-background: #503682;
|
||||
--button-shadow: rgba(0, 0, 0, 0.2);
|
||||
--button-padding: 0.5rem 1rem;
|
||||
--button-margin: 0.5rem 0;
|
||||
--button-radius: 0.5rem;
|
||||
--button-font-size: 0.875rem;
|
||||
}
|
||||
|
||||
/* Set some good defaults for the page */
|
||||
html {
|
||||
max-width: 88ch;
|
||||
padding: calc(1vmin + 0.5rem);
|
||||
@ -30,76 +35,67 @@
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
/* Don't underline links and remove the blue/purple color */
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* Add a gray background for the game name header */
|
||||
/* This header also contains the button to subscribe to the game */
|
||||
|
||||
header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between; /* So the button is on the right, and the game name is on the left */
|
||||
padding: 10px 30px;
|
||||
background: var(--header-background);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
/* Remove dot in front of list items */
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Add a border around each game to separate them */
|
||||
|
||||
.game {
|
||||
margin-bottom: 1rem;
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
/* Move images away from the border */
|
||||
|
||||
img {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
/* Button to subscribe to a game */
|
||||
/* For example: Subscribe to Rocket League */
|
||||
|
||||
button {
|
||||
background-color: var(--button-background);
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 5px;
|
||||
padding: var(--button-padding);
|
||||
margin: var(--button-margin);
|
||||
border-radius: var(--button-radius);
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
/* Make button darker when hovered */
|
||||
button:hover {
|
||||
background-color: var(--button-hover-background);
|
||||
transition: background-color 0.3s ease, box-shadow 0.3s ease;
|
||||
font-size: var(--button-font-size);
|
||||
box-shadow: 0 2px 4px var(--button-shadow);
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: var(--button-hover-background);
|
||||
box-shadow: 0 3px 6px var(--button-shadow);
|
||||
}
|
||||
|
||||
/* Navbar at the top of the page */
|
||||
.navbar {
|
||||
margin-bottom: 1rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Make the logo bigger and bolder and center it */
|
||||
.logo {
|
||||
text-align: center;
|
||||
font-size: 2.5rem;
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Django messages framework */
|
||||
|
||||
.messages {
|
||||
list-style-type: none;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
/* Make error messages red and success messages green */
|
||||
.error {
|
||||
color: red;
|
||||
}
|
||||
@ -121,19 +117,34 @@
|
||||
<div class="navbar">
|
||||
<a href='{% url "api-1.0.0:openapi-view" %}'>API</a> |
|
||||
<a href="https://github.com/sponsors/TheLovinator1">Donate</a> |
|
||||
TheLovinator#9276
|
||||
TheLovinator#9276 |
|
||||
{% if user.is_authenticated %}
|
||||
<a href='{% url "account_logout" %}'>Logout</a>
|
||||
{% else %}
|
||||
<a href='{% provider_login_url "twitch" %}'>Login</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% for organization, org_data in orgs_data.items %}
|
||||
<ul>
|
||||
{% for game, game_data in org_data.games.items %}
|
||||
<li class="game">
|
||||
<header>
|
||||
<img src="{{ game.image_url }}"
|
||||
alt="{{ game.display_name }}"
|
||||
height="100"
|
||||
width="100"
|
||||
loading="lazy">
|
||||
<h2>
|
||||
<a href="https://www.twitch.tv/directory/category/{{ game.slug }}">{{ game.display_name }}</a>
|
||||
</h2>
|
||||
<form action="" method="post">
|
||||
<form action='{% url "core:subscription_create" %}' method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="game_id" value="{{ game.id }}">
|
||||
<select name="discord_webhook">
|
||||
{% for discord_setting in discord_settings %}
|
||||
<option value="{{ discord_setting.id }}">{{ discord_setting.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button type="submit">Subscribe to {{ game.display_name }}</button>
|
||||
</form>
|
||||
<form action='{% url "core:test" %}' method="post">
|
||||
@ -150,7 +161,8 @@
|
||||
<img src="{{ drop_benefit.image_asset_url }}"
|
||||
alt="{{ drop_benefit.name }}"
|
||||
height="100"
|
||||
width="100">
|
||||
width="100"
|
||||
loading="lazy">
|
||||
<a href="{{ drop_benefit.details_url }}">{{ drop_benefit.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
Reference in New Issue
Block a user