working base site setup with gatekeeping working

This commit is contained in:
2026-08-03 12:43:33 -05:00
parent 97cbacec8e
commit 1054c7123d
37 changed files with 1146 additions and 58 deletions
@@ -1,30 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Packs Site - Restricted{% endblock %}</title>
{% load static %}
<link rel="stylesheet" href="{% static 'css/style.css' %}">
<link rel="icon" type="image/png" href="{% static 'Logo.png' %}">
</head>
<body>
<main class="gate-main">
<div class="gate-card">
<img src="{% static 'Logo.png' %}" alt="Packs" height="64">
<h1>Restricted Access</h1>
<p>This site is private. Enter the master password to continue.</p>
{% if error %}
<p class="gate-error">{{ error }}</p>
{% endif %}
<form method="post" action="{% url 'landing:gate' %}">
{% csrf_token %}
<input type="password" name="password" placeholder="Master password" autofocus required>
<button type="submit">Enter</button>
</form>
</div>
</main>
</body>
</html>
@@ -1,8 +0,0 @@
{% extends 'base.html' %}
{% block title %}Home - Packs{% endblock %}
{% block content %}
<h1>Welcome</h1>
<p>Pack library and download area will live here.</p>
{% endblock %}
+2 -2
View File
@@ -33,7 +33,7 @@ def gate(request):
if hmac.compare_digest(submitted, master):
request.session['authorized'] = True
request.session.pop('lock_until', None)
return redirect('home')
return redirect('landing:home')
else:
_start_lockout(request)
return render(request, 'landing/gate.html', {
@@ -41,7 +41,7 @@ def gate(request):
})
if request.session.get('authorized'):
return redirect('home')
return redirect('landing:home')
return render(request, 'landing/gate.html')