Initial Commit
This commit is contained in:
95
core/templates/core/base.html
Normal file
95
core/templates/core/base.html
Normal file
@@ -0,0 +1,95 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<!-- ✅ Viewport: prevent weird zoom/scaling on iOS -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
|
||||
|
||||
<!-- iOS WebApp & theme tweaks -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="theme-color" content="#0b0d16" />
|
||||
|
||||
<title>{% block title %}Benny Portal{% endblock %}</title>
|
||||
|
||||
<!-- ✅ Tailwind -->
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
|
||||
<!-- ✅ Your custom styles -->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='app.css') }}" />
|
||||
|
||||
<style>
|
||||
/* Fix Safari overscroll bounce & height issues */
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow-x: hidden;
|
||||
background-color: #0b0d16;
|
||||
}
|
||||
|
||||
header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 50;
|
||||
padding-top: env(safe-area-inset-top, constant(safe-area-inset-top, 0));
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
|
||||
|
||||
main {
|
||||
padding-bottom: 4rem; /* avoids cutoff on iPhone bottom bar */
|
||||
}
|
||||
|
||||
/* Optional: mobile tweaks */
|
||||
nav a {
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
nav a:hover {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="bg-neutral-950 text-neutral-100 antialiased">
|
||||
|
||||
<header class="border-b border-white/10 bg-black/60 backdrop-blur">
|
||||
<div class="max-w-7xl mx-auto px-4 py-3 flex items-center gap-4">
|
||||
<a class="font-bold text-lg" href="/">Benny’s Portal</a>
|
||||
<nav class="text-sm flex gap-3 overflow-x-auto whitespace-nowrap">
|
||||
<a href="/board/">Intercom</a>
|
||||
<a href="/quotes/">Quotes</a>
|
||||
<a href="/publish/">Publish Once</a>
|
||||
<a href="/memos/">Memos</a>
|
||||
</nav>
|
||||
<div class="ml-auto flex items-center gap-3">
|
||||
{% if session.uid %}
|
||||
<form method="post" action="{{ url_for('auth.logout') }}">
|
||||
<button class="px-3 py-1.5 rounded-lg border border-white/20">Logout</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<a class="px-3 py-1.5 rounded-lg bg-accent text-black font-semibold" href="{{ url_for('auth.login') }}">Login</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="max-w-7xl mx-auto px-4 py-8">
|
||||
{% with msgs = get_flashed_messages(with_categories=true) %}
|
||||
{% for cat, m in msgs %}
|
||||
<div class="mb-4 rounded border px-3 py-2 {{ 'border-emerald-400 bg-emerald-500/10' if cat=='ok' else 'border-red-400 bg-red-500/10' }}">
|
||||
{{ m }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
22
core/templates/core/home.html
Normal file
22
core/templates/core/home.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{% extends 'core/base.html' %}
|
||||
{% block title %}Home — Portal{% endblock %}
|
||||
{% block content %}
|
||||
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
<a href="/board/" class="card glass p-6 block">
|
||||
<h2 class="font-semibold text-lg">Discord Intercom</h2>
|
||||
<p class="text-white/70 text-sm">Read the channel, post (admins), status updates.</p>
|
||||
</a>
|
||||
<a href="/quotes/" class="card glass p-6 block">
|
||||
<h2 class="font-semibold text-lg">Quotes</h2>
|
||||
<p class="text-white/70 text-sm">Public estimator + admin review.</p>
|
||||
</a>
|
||||
<a href="/publish/" class="card glass p-6 block">
|
||||
<h2 class="font-semibold text-lg">Publish Once</h2>
|
||||
<p class="text-white/70 text-sm">Compose once, copy everywhere.</p>
|
||||
</a>
|
||||
<a href="/memos/" class="card glass p-6 block">
|
||||
<h2 class="font-semibold text-lg">Memos & Notes</h2>
|
||||
<p class="text-white/70 text-sm">Personal memos, notes, journal.</p>
|
||||
</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
24
core/templates/core/login.html
Normal file
24
core/templates/core/login.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{% extends 'core/base.html' %}
|
||||
{% block title %}Login — Portal{% endblock %}
|
||||
{% block content %}
|
||||
<section class="max-w-md mx-auto">
|
||||
<div class="card glass p-6">
|
||||
<h1 class="text-2xl font-bold">Sign in</h1>
|
||||
<form method="post" action="{{ url_for('auth.login') }}" class="mt-4 space-y-4">
|
||||
<input type="hidden" name="next" value="{{ next or '/' }}">
|
||||
<div>
|
||||
<label class="text-sm text-white/70">Email or username</label>
|
||||
<input name="username" class="w-full mt-1" required>
|
||||
</div>
|
||||
<div>
|
||||
<label class="text-sm text-white/70">Password</label>
|
||||
<input type="password" name="password" class="w-full mt-1" required>
|
||||
</div>
|
||||
<div class="flex items-center gap-3">
|
||||
<button class="btn bg-accent font-semibold" type="submit">Login</button>
|
||||
<a class="text-sm underline" href="{{ url_for('auth.discord_start') }}">Sign in with Discord</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user