basic login page

This commit is contained in:
Corban-Lee Jones 2024-07-31 16:01:44 +01:00
parent bb33a346f6
commit e548e02390
6 changed files with 53 additions and 99 deletions

30
apps/static/css/base.css Normal file
View File

@ -0,0 +1,30 @@
:root {
--discord-blurple: #5865F2;
}
:root,
[data-bs-theme="light"] {
}
[data-bs-theme="dark"] {
}
.btn-discord {
--bs-btn-color: #fff;
--bs-btn-bg: var(--discord-blurple);
--bs-btn-border-color: var(--discord-blurple);
--bs-btn-hover-color: #fff;
--bs-btn-hover-bg: #505CD6;
--bs-btn-hover-border-color: #4954C9;
--bs-btn-focus-shadow-rgb: 49, 132, 253;
--bs-btn-active-color: #fff;
--bs-btn-active-bg: #434DBB;
--bs-btn-active-border-color: #434DBB;
--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
--bs-btn-disabled-color: #fff;
--bs-btn-disabled-bg: var(--discord-blurple);
--bs-btn-disabled-border-color: var(--discord-blurple);
}

View File

@ -1,24 +1,30 @@
{% extends "layouts/base-authentication.html" %}
{% extends "layouts/base.html" %}
{% load static %}
{% block title %} Sign IN {% endblock title %}
{% block title %} - Login {% endblock title %}
<!-- Specific CSS goes HERE -->
{% block stylesheets %}{% endblock stylesheets %}
{% block content %}
<div class="peers ai-s fxw-nw h-100vh">
<div class="bg-body-tertiary d-n@sm- peer peer-greed h-100 pos-r bgr-n bgpX-c bgpY-c bgsz-cv" style=""> <!-- background-image: url('{% static "/images/bg.jpg" %}') -->
<div class="pos-a centerXY">
<div class="bgc-white bdrs-50p pos-r" style="width: 120px; height: 120px;">
<img class="pos-a centerXY" src="{% static '/images/pyrss_logo.webp' %}" alt="PYRSS Logo">
<div class="container-lg px-0 h-100">
<div class="d-flex flex-nowrap h-100 border-start border-end position-relative">
<div class="modal d-block position-absolute">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content rounded-1">
<div class="modal-header border-bottom-0">
<h5 class="modal-title">
<span>Continue with Discord</span>
</h5>
</div>
<div class="modal-footer border-top-0">
<a href="{% url 'auth:discord-login' %}" class="btn btn-discord">Login with Discord</a>
</div>
</div>
</div>
</div>
</div>
<div class="col-12 col-md-4 peer pX-40 pY-80 h-100 bgc-white scrollable pos-r" style="min-width: 320px;">
<h4 class="fw-300 c-grey-900 mB-40">PYRSS - Login</h4>
<a href="{% url 'auth:discord-login' %}" class="btn btn-secondary btn-color">Login with Discord</a>
</div>
</div>
{% endblock content %}

View File

@ -21,6 +21,7 @@
<i class="bi bi-sun"></i>
</a>
</li>
{% if request.user.is_authenticated %}
<li class="nav-item">
<div class="dropdown">
<button type="button" class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
@ -30,9 +31,9 @@
<ul class="dropdown-menu">
<li><h6 class="dropdown-header">@{{ request.user.username }}</h6></li>
<li>
<a href="#" class="dropdown-item">
<button type="button" class="dropdown-item" onclick="location.href = 'https://onesquareminesweeper.com/'">
<i class="bi bi-question"></i><span class="ms-2">Help</span>
</a>
</button>
</li>
<li>
{% comment %}<!-- Logout only accepts POST requests -->{% endcomment %}
@ -54,6 +55,7 @@
</ul>
</div>
</li>
{% endif %}
</ul>
</div>
</div>

View File

@ -1,49 +0,0 @@
<!DOCTYPE html>
{% load static %}
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>
Django Adminator - {% block title %}{% endblock %} | AppSeed
</title>
<link type="text/css" rel="stylesheet" href="{% static '/css/bootstrap.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/colours.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/datepicker.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/fontawesome.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/themify-icons.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/scrollbar.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/adminator.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/jquery.dataTables.min.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/select2.min.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/index.css' %}" />
<!-- Specific Page CSS goes HERE -->
{% block stylesheets %}{% endblock stylesheets %}
</head>
<body class="app">
<div id='loader' class="bg-body">
<div class="spinner"></div>
</div>
<script>
window.addEventListener('load', function load() {
const loader = document.getElementById('loader');
setTimeout(function() {
loader.classList.add('fadeOut');
}, 300);
});
</script>
{% block content %}{% endblock content %}
<!-- Specific Page JS goes HERE -->
{% block javascripts %}{% endblock javascripts %}
</body>
</html>

View File

@ -1,36 +0,0 @@
<!DOCTYPE html>
{% load static %}
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>
Django Adminator - {% block title %}{% endblock %} | AppSeed
</title>
<link type="text/css" rel="stylesheet" href="{% static '/css/bootstrap.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/colours.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/datepicker.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/fontawesome.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/themify-icons.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/scrollbar.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/adminator.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/jquery.dataTables.min.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/select2.min.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/index.css' %}" />
<!-- Specific Page CSS goes HERE -->
{% block stylesheets %}{% endblock stylesheets %}
</head>
<body class="app">
{% block content %}{% endblock content %}
<!-- Specific Page JS goes HERE -->
{% block javascripts %}{% endblock javascripts %}
</body>
</html>

View File

@ -20,6 +20,7 @@
<link type="text/css" rel="stylesheet" href="{% static '/css/bootstrap.css' %}" />
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<link type="text/css" rel="stylesheet" href="{% static '/css/base.css' %}">
<link type="text/css" rel="stylesheet" href="{% static '/css/colours.css' %}" />
<link type="text/css" rel="stylesheet" href="{% static '/css/toasts.css' %}" />
<link type="text/css" rel="stylesheet" href="https://cdn.datatables.net/2.0.5/css/dataTables.dataTables.css">