Add API
This commit is contained in:
@ -1,120 +0,0 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" data-bs-theme="dark">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="description"
|
||||
content="{% block description %}
|
||||
Subscribe to TTVDrop for the latest Twitch drops.
|
||||
{% endblock description %}">
|
||||
<meta name="keywords"
|
||||
content="{% block keywords %}
|
||||
Twitch, Drops, TTVDrop, Twitch Drops, Twitch Drops Tracker
|
||||
{% endblock keywords %}">
|
||||
<meta name="author" content="TheLovinator">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
{% block title %}
|
||||
<title>Twitch drops</title>
|
||||
{% endblock title %}
|
||||
<style>
|
||||
html {
|
||||
max-width: 88ch;
|
||||
padding: calc(1vmin + 0.5rem);
|
||||
margin-inline: auto;
|
||||
font-size: clamp(1em, 0.909em + 0.45vmin, 1.25em);
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
||||
Helvetica, Arial, sans-serif;
|
||||
color-scheme: light dark;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.search {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 1rem;
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
||||
.leftright {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.left {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.right {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
height: 10rem;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.messages {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.success {
|
||||
color: green;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
{% if messages %}
|
||||
<ul class="messages">
|
||||
{% for message in messages %}
|
||||
<li {% if message.tags %}class="{{ message.tags }}"{% endif %}>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<span class="title">
|
||||
<h1>
|
||||
<a href="{% url 'core:index' %}">TTVDrop</a>
|
||||
</h1>
|
||||
</span>
|
||||
<nav>
|
||||
<small>
|
||||
<div class="leftright">
|
||||
<div class="left">Hello.</div>
|
||||
<div class="right">
|
||||
<a href="/api/v1/docs">API</a> |
|
||||
<a href="https://github.com/TheLovinator1/twitch-online-notifier">GitHub</a> |
|
||||
<a href="https://github.com/sponsors/TheLovinator1">Donate</a>
|
||||
{% if not user.is_authenticated %}| <a href=''>Login</a>{% endif %}
|
||||
{% if user.is_authenticated %}| <a href=''>{{ user.username }}</a>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</small>
|
||||
</nav>
|
||||
<hr />
|
||||
<main>
|
||||
{% block content %}<!-- default content -->{% endblock %}
|
||||
</main>
|
||||
<hr />
|
||||
<footer>
|
||||
<small>
|
||||
<div class="leftright">
|
||||
<div class="left">TheLovinator#9276 on Discord</div>
|
||||
<div class="right">No rights reserved.</div>
|
||||
</div>
|
||||
</small>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
@ -93,13 +93,35 @@
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Django messages framework */
|
||||
.messages {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
/* Make error messages red and success messages green */
|
||||
.error {
|
||||
color: red;
|
||||
}
|
||||
.success {
|
||||
color: green;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
{% if messages %}
|
||||
<ul class="messages">
|
||||
{% for message in messages %}
|
||||
<li {% if message.tags %}class="{{ message.tags }}"{% endif %}>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<h1 class="logo">Twitch Drops</h1>
|
||||
<div class="navbar">
|
||||
<a href="">API</a> |
|
||||
<a href="https://github.com/sponsors/TheLovinator1">Donate</a>
|
||||
<a href='{% url "api-1.0.0:openapi-view" %}'>API</a> |
|
||||
<a href="https://github.com/sponsors/TheLovinator1">Donate</a> |
|
||||
TheLovinator#9276
|
||||
</div>
|
||||
{% for organization, org_data in orgs_data.items %}
|
||||
<ul>
|
||||
|
@ -1,11 +1,12 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from django.urls import URLPattern, path
|
||||
from django.urls import URLPattern, URLResolver, path
|
||||
|
||||
from . import views
|
||||
|
||||
app_name: str = "core"
|
||||
|
||||
urlpatterns: list[URLPattern] = [
|
||||
|
||||
urlpatterns: list[URLPattern | URLResolver] = [
|
||||
path(route="", view=views.index, name="index"),
|
||||
]
|
||||
|
Reference in New Issue
Block a user