feat: complete UI redesign with DaisyUI + Tailwind CSS v4
Design system overhaul using DaisyUI v5 on Tailwind CSS v4: - Custom 'ohmstream' dark theme with orange primary (#FF9F1C), magenta secondary, gold accent matching existing palette - Tailwind CSS-first config (input.css source, style.css built output) - DaisyUI components: navbar, drawer, cards, badges, alerts, tables, progress bars, tabs, toggles, stats, form controls, tooltips - Mobile-first responsive layout with drawer navigation - Eliminated ~500+ lines of embedded CSS across 15+ template files - Removed all inline style spam from admin_panel and settings_section - Preserved all HTMX triggers, Alpine.js state, and Jinja2 logic - Updated auth-ui.js for DaisyUI tab-active class compatibility Build: npm run build:css (minified) / npm run watch:css (dev)
This commit is contained in:
+152
-90
@@ -1,106 +1,148 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<html lang="fr" data-theme="ohmstream">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Connexion - Ohm Stream Downloader</title>
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="auth-container">
|
||||
<h1 class="auth-title"><i class="fa-solid fa-film"></i> Ohm Stream</h1>
|
||||
<div class="min-h-screen flex items-center justify-center bg-base-100">
|
||||
<div class="card w-96 bg-base-200 shadow-2xl">
|
||||
<div class="card-body">
|
||||
<!-- Title -->
|
||||
<h1 class="text-2xl font-bold text-center text-primary">
|
||||
<i class="fa-solid fa-film"></i> Ohm Stream
|
||||
</h1>
|
||||
|
||||
<div class="auth-tabs">
|
||||
<div class="auth-tab active" data-tab="login">Connexion</div>
|
||||
<div class="auth-tab" data-tab="register">Inscription</div>
|
||||
</div>
|
||||
<!-- Tab Toggle -->
|
||||
<div class="tabs tabs-boxed bg-base-300 mb-4" role="tablist">
|
||||
<button class="tab tab-active auth-tab" role="tab" data-tab="login">Connexion</button>
|
||||
<button class="tab auth-tab" role="tab" data-tab="register">Inscription</button>
|
||||
</div>
|
||||
|
||||
<div class="auth-error" id="authError" aria-live="polite"></div>
|
||||
<div class="auth-success" id="authSuccess" aria-live="polite"></div>
|
||||
<!-- Error / Success Alerts -->
|
||||
<div id="authError" class="auth-error alert alert-error hidden mb-2" role="alert" aria-live="polite">
|
||||
<i class="fa-solid fa-circle-exclamation"></i>
|
||||
<span></span>
|
||||
</div>
|
||||
<div id="authSuccess" class="auth-success alert alert-success hidden mb-2" role="status" aria-live="polite">
|
||||
<i class="fa-solid fa-circle-check"></i>
|
||||
<span></span>
|
||||
</div>
|
||||
|
||||
<!-- Login Form -->
|
||||
<form class="auth-form active" id="loginForm">
|
||||
<div class="form-group">
|
||||
<label for="loginUsername">Nom d'utilisateur</label>
|
||||
<input
|
||||
type="text"
|
||||
id="loginUsername"
|
||||
placeholder="Entrez votre nom d'utilisateur"
|
||||
required
|
||||
aria-required="true"
|
||||
aria-describedby="loginUsernameHelp"
|
||||
>
|
||||
<span id="loginUsernameHelp" style="display: none;">Champ obligatoire</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="loginPassword">Mot de passe</label>
|
||||
<input
|
||||
type="password"
|
||||
id="loginPassword"
|
||||
placeholder="Entrez votre mot de passe"
|
||||
required
|
||||
aria-required="true"
|
||||
>
|
||||
</div>
|
||||
<button type="submit" id="loginSubmit" class="btn btn-primary btn-block">Se connecter</button>
|
||||
</form>
|
||||
<!-- Login Form -->
|
||||
<form class="auth-form active" id="loginForm">
|
||||
<div class="form-control mb-3">
|
||||
<label class="label" for="loginUsername">
|
||||
<span class="label-text">Nom d'utilisateur</span>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
id="loginUsername"
|
||||
placeholder="Entrez votre nom d'utilisateur"
|
||||
class="input input-bordered w-full"
|
||||
required
|
||||
aria-required="true"
|
||||
aria-describedby="loginUsernameHelp"
|
||||
>
|
||||
<label class="label hidden" id="loginUsernameHelp">
|
||||
<span class="label-text-alt text-error">Champ obligatoire</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-control mb-3">
|
||||
<label class="label" for="loginPassword">
|
||||
<span class="label-text">Mot de passe</span>
|
||||
</label>
|
||||
<input
|
||||
type="password"
|
||||
id="loginPassword"
|
||||
placeholder="Entrez votre mot de passe"
|
||||
class="input input-bordered w-full"
|
||||
required
|
||||
aria-required="true"
|
||||
>
|
||||
</div>
|
||||
<button type="submit" id="loginSubmit" class="btn btn-primary w-full">Se connecter</button>
|
||||
</form>
|
||||
|
||||
<!-- Register Form -->
|
||||
<form class="auth-form" id="registerForm">
|
||||
<div class="form-group">
|
||||
<label for="registerUsername">Nom d'utilisateur</label>
|
||||
<input
|
||||
type="text"
|
||||
id="registerUsername"
|
||||
placeholder="Choisissez un nom d'utilisateur"
|
||||
minlength="3"
|
||||
required
|
||||
aria-required="true"
|
||||
>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="registerEmail">Email (optionnel)</label>
|
||||
<input
|
||||
type="email"
|
||||
id="registerEmail"
|
||||
placeholder="votre@email.com"
|
||||
>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="registerFullName">Nom complet (optionnel)</label>
|
||||
<input
|
||||
type="text"
|
||||
id="registerFullName"
|
||||
placeholder="Votre nom complet"
|
||||
>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="registerPassword">Mot de passe</label>
|
||||
<input
|
||||
type="password"
|
||||
id="registerPassword"
|
||||
placeholder="Au moins 6 caractères"
|
||||
minlength="6"
|
||||
required
|
||||
aria-required="true"
|
||||
>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="registerPasswordConfirm">Confirmer le mot de passe</label>
|
||||
<input
|
||||
type="password"
|
||||
id="registerPasswordConfirm"
|
||||
placeholder="Confirmez votre mot de passe"
|
||||
minlength="6"
|
||||
required
|
||||
aria-required="true"
|
||||
>
|
||||
</div>
|
||||
<button type="submit" id="registerSubmit" class="btn btn-primary btn-block">S'inscrire</button>
|
||||
</form>
|
||||
<!-- Register Form -->
|
||||
<form class="auth-form hidden" id="registerForm">
|
||||
<div class="form-control mb-3">
|
||||
<label class="label" for="registerUsername">
|
||||
<span class="label-text">Nom d'utilisateur</span>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
id="registerUsername"
|
||||
placeholder="Choisissez un nom d'utilisateur"
|
||||
class="input input-bordered w-full"
|
||||
minlength="3"
|
||||
required
|
||||
aria-required="true"
|
||||
>
|
||||
</div>
|
||||
<div class="form-control mb-3">
|
||||
<label class="label" for="registerEmail">
|
||||
<span class="label-text">Email (optionnel)</span>
|
||||
</label>
|
||||
<input
|
||||
type="email"
|
||||
id="registerEmail"
|
||||
placeholder="votre@email.com"
|
||||
class="input input-bordered w-full"
|
||||
>
|
||||
</div>
|
||||
<div class="form-control mb-3">
|
||||
<label class="label" for="registerFullName">
|
||||
<span class="label-text">Nom complet (optionnel)</span>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
id="registerFullName"
|
||||
placeholder="Votre nom complet"
|
||||
class="input input-bordered w-full"
|
||||
>
|
||||
</div>
|
||||
<div class="form-control mb-3">
|
||||
<label class="label" for="registerPassword">
|
||||
<span class="label-text">Mot de passe</span>
|
||||
</label>
|
||||
<input
|
||||
type="password"
|
||||
id="registerPassword"
|
||||
placeholder="Au moins 6 caractères"
|
||||
class="input input-bordered w-full"
|
||||
minlength="6"
|
||||
required
|
||||
aria-required="true"
|
||||
>
|
||||
</div>
|
||||
<div class="form-control mb-3">
|
||||
<label class="label" for="registerPasswordConfirm">
|
||||
<span class="label-text">Confirmer le mot de passe</span>
|
||||
</label>
|
||||
<input
|
||||
type="password"
|
||||
id="registerPasswordConfirm"
|
||||
placeholder="Confirmez votre mot de passe"
|
||||
class="input input-bordered w-full"
|
||||
minlength="6"
|
||||
required
|
||||
aria-required="true"
|
||||
>
|
||||
</div>
|
||||
<button type="submit" id="registerSubmit" class="btn btn-primary w-full">S'inscrire</button>
|
||||
</form>
|
||||
|
||||
<div style="text-align: center; margin-top: 25px;">
|
||||
<a href="/web" class="btn btn-secondary btn-small">← Retour à l'accueil</a>
|
||||
<!-- Back Link -->
|
||||
<div class="text-center mt-5">
|
||||
<a href="/web" class="btn btn-ghost btn-sm">
|
||||
<i class="fa-solid fa-arrow-left"></i> Retour à l'accueil
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -109,6 +151,26 @@
|
||||
<script src="/static/js/auth-api.js"></script>
|
||||
<script src="/static/js/auth-ui.js"></script>
|
||||
<script>
|
||||
// Patch displayError / displaySuccess to work with DaisyUI alerts
|
||||
(function () {
|
||||
const origDisplayError = window.displayError;
|
||||
const origDisplaySuccess = window.displaySuccess;
|
||||
|
||||
window.displayError = function (id, message) {
|
||||
const el = document.getElementById(id);
|
||||
if (!el) return;
|
||||
el.classList.remove('hidden');
|
||||
el.querySelector('span').textContent = message || '';
|
||||
};
|
||||
|
||||
window.displaySuccess = function (id, message) {
|
||||
const el = document.getElementById(id);
|
||||
if (!el) return;
|
||||
el.classList.remove('hidden');
|
||||
el.querySelector('span').textContent = message || '';
|
||||
};
|
||||
})();
|
||||
|
||||
// Expose setToken from auth.js if available
|
||||
if (typeof window.setToken === 'undefined') {
|
||||
window.setToken = function(token) {
|
||||
|
||||
Reference in New Issue
Block a user