Initial commit
This commit is contained in:
102
backend/templates/oauth2_provider/base.html
Normal file
102
backend/templates/oauth2_provider/base.html
Normal file
@@ -0,0 +1,102 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>{% block title %}OAuth2 Demo{% endblock %}</title>
|
||||
<style>
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
background: #f0f2f5;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.block-center {
|
||||
background: #fff;
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 4px 32px rgba(0,0,0,.1);
|
||||
padding: 3rem 2.5rem;
|
||||
width: 100%;
|
||||
max-width: 420px;
|
||||
}
|
||||
|
||||
.block-center-heading {
|
||||
font-size: 1.4rem;
|
||||
font-weight: 700;
|
||||
color: #1a1a2e;
|
||||
margin-bottom: 1rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
p { color: #6b7280; font-size: .95rem; margin-bottom: .75rem; }
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
ul li {
|
||||
padding: .5rem .75rem;
|
||||
background: #f9fafb;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 6px;
|
||||
margin-bottom: .375rem;
|
||||
font-size: .9rem;
|
||||
color: #374151;
|
||||
}
|
||||
|
||||
ul li::before { content: "✓ "; color: #4f46e5; font-weight: 700; }
|
||||
|
||||
.controls {
|
||||
display: flex;
|
||||
gap: .75rem;
|
||||
margin-top: 1.25rem;
|
||||
}
|
||||
|
||||
.btn {
|
||||
flex: 1;
|
||||
padding: .75rem;
|
||||
border-radius: 8px;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
border: 1px solid #d1d5db;
|
||||
background: #fff;
|
||||
color: #374151;
|
||||
transition: background .15s;
|
||||
}
|
||||
|
||||
.btn:hover { background: #f9fafb; }
|
||||
|
||||
.btn-primary {
|
||||
background: #4f46e5;
|
||||
border-color: #4f46e5;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-primary:hover { background: #4338ca; border-color: #4338ca; }
|
||||
|
||||
.errorlist {
|
||||
background: #fef2f2;
|
||||
border: 1px solid #fecaca;
|
||||
color: #dc2626;
|
||||
border-radius: 8px;
|
||||
padding: .75rem 1rem;
|
||||
margin-bottom: 1rem;
|
||||
font-size: .875rem;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
h2 { color: #dc2626; margin-bottom: .5rem; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
{% block content %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
133
backend/templates/registration/login.html
Normal file
133
backend/templates/registration/login.html
Normal file
@@ -0,0 +1,133 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Sign in – OAuth2 Demo</title>
|
||||
<style>
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
background: #f0f2f5;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: #fff;
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 4px 32px rgba(0,0,0,.1);
|
||||
padding: 3rem 2.5rem;
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logo { font-size: 3rem; margin-bottom: 1rem; }
|
||||
|
||||
h1 {
|
||||
font-size: 1.75rem;
|
||||
font-weight: 700;
|
||||
color: #1a1a2e;
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
color: #6b7280;
|
||||
font-size: .95rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.errors {
|
||||
background: #fef2f2;
|
||||
border: 1px solid #fecaca;
|
||||
color: #dc2626;
|
||||
border-radius: 8px;
|
||||
padding: .75rem 1rem;
|
||||
margin-bottom: 1.25rem;
|
||||
font-size: .875rem;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.field { margin-bottom: 1rem; text-align: left; }
|
||||
|
||||
label {
|
||||
display: block;
|
||||
font-size: .875rem;
|
||||
font-weight: 500;
|
||||
color: #374151;
|
||||
margin-bottom: .375rem;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="password"] {
|
||||
width: 100%;
|
||||
padding: .65rem .875rem;
|
||||
border: 1px solid #d1d5db;
|
||||
border-radius: 8px;
|
||||
font-size: 1rem;
|
||||
color: #1a1a2e;
|
||||
outline: none;
|
||||
transition: border-color .15s;
|
||||
}
|
||||
|
||||
input:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
|
||||
|
||||
button[type="submit"] {
|
||||
width: 100%;
|
||||
padding: .85rem;
|
||||
background: #4f46e5;
|
||||
color: #fff;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
margin-top: .5rem;
|
||||
transition: background .2s;
|
||||
}
|
||||
|
||||
button[type="submit"]:hover { background: #4338ca; }
|
||||
|
||||
.hint { margin-top: 1.5rem; font-size: .85rem; color: #9ca3af; }
|
||||
.hint strong { color: #6b7280; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="card">
|
||||
<div class="logo">🔐</div>
|
||||
<h1>Sign in</h1>
|
||||
<p class="subtitle">Enter your credentials to authorise the application</p>
|
||||
|
||||
{% if form.errors %}
|
||||
<div class="errors">
|
||||
Invalid username or password. Please try again.
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
|
||||
<div class="field">
|
||||
<label for="id_username">Username</label>
|
||||
<input type="text" id="id_username" name="username"
|
||||
autofocus autocomplete="username" required />
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="id_password">Password</label>
|
||||
<input type="password" id="id_password" name="password"
|
||||
autocomplete="current-password" required />
|
||||
</div>
|
||||
|
||||
<button type="submit">Sign in</button>
|
||||
</form>
|
||||
|
||||
<p class="hint">Demo: <strong>admin</strong> / <strong>admin123</strong></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user