feat(ui): use same Oxicloud theme for magic-link page

This commit is contained in:
Edouard Vanbelle
2026-06-03 15:58:09 +02:00
parent c9bda7cbda
commit d678d3e31a
4 changed files with 104 additions and 50 deletions
@@ -2,22 +2,46 @@
<html lang="{{ locale_code }}"> <html lang="{{ locale_code }}">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="color-scheme" content="light dark">
<title>OxiCloud</title> <title>OxiCloud</title>
<link rel="icon" type="image/svg+xml" href="/logo/logo-plain.svg">
<script src="/js/core/theme-init.js"></script>
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/views/auth.css">
<style> <style>
body { font-family: system-ui, sans-serif; max-width: 520px; margin: 6em auto; /* Cross-browser prompt is the one magic-link page that needs a
padding: 0 1em; color: #333; line-height: 1.5; } "warning" callout that auth.css doesn't ship. Inline because the
h1 { font-size: 1.4em; } shape is unique to this surface — keep the styling local rather
.btn { display: inline-block; padding: .7em 1.4em; background: #2563eb; color: #fff; than adding tokens that no other page reuses. */
border-radius: 6px; text-decoration: none; font-weight: 600; margin-top: 1em; } .magic-note {
.btn:hover { background: #1d4ed8; } background: var(--color-warning-bg-light);
.note { background: #fef3c7; border-left: 3px solid #f59e0b; border-left: 3px solid var(--color-warning-text-amber);
padding: .75em 1em; margin: 1.5em 0; border-radius: 4px; font-size: .95em; } color: var(--color-text);
padding: 0.75em 1em;
margin: 1.5em 0;
border-radius: 8px;
font-size: 0.95em;
text-align: left;
}
</style> </style>
</head> </head>
<body> <body>
<h1>{{ title }}</h1> <div class="auth-container">
<p>{{ body }}</p> <div class="auth-panel">
<p class="note">{{ warning }}</p> <div class="auth-logo">
<p><a class="btn" href="{{ confirm_url }}">{{ continue_label }}</a></p> <div class="auth-logo-icon">
<svg viewBox="0 0 500 500">
<path d="M345 310c32 0 58-26 58-58s-26-58-58-58c-6.2 0-12 0.9-17.5 2.7C318 166 289 143 255 143c-34.3 0-63.1 22.6-73 53.7C176.9 195.7 171 195 165 195c-32 0-58 26-58 58s26 58 58 58h180z" fill="#fff"/>
</svg>
</div>
<div class="auth-logo-text">OxiCloud</div>
</div>
<h2 class="auth-title">{{ title }}</h2>
<p class="auth-subtitle">{{ body }}</p>
<p class="magic-note">{{ warning }}</p>
<a class="auth-button" href="{{ confirm_url }}" role="button">{{ continue_label }}</a>
</div>
</div>
</body> </body>
</html> </html>
+26 -20
View File
@@ -2,28 +2,34 @@
<html lang="{{ locale_code }}"> <html lang="{{ locale_code }}">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="color-scheme" content="light dark">
<title>OxiCloud</title> <title>OxiCloud</title>
<style> <link rel="icon" type="image/svg+xml" href="/logo/logo-plain.svg">
body { font-family: system-ui, sans-serif; max-width: 560px; margin: 6em auto; <script src="/js/core/theme-init.js"></script>
padding: 0 1em; color: #333; line-height: 1.5; } <link rel="stylesheet" href="/css/main.css">
h1 { font-size: 1.4em; } <link rel="stylesheet" href="/css/views/auth.css">
.btn { display: inline-block; padding: .7em 1.4em; background: #2563eb; color: #fff;
border-radius: 6px; text-decoration: none; font-weight: 600; margin-top: .4em;
border: 0; cursor: pointer; font-size: 1em; }
.btn:hover { background: #1d4ed8; }
.muted { color: #666; font-size: .9em; margin-top: 2em; }
</style>
</head> </head>
<body> <body>
<h1>{{ title }}</h1> <div class="auth-container">
{%- if let Some(offer) = resend %} <div class="auth-panel">
<p>{{ body }}</p> <div class="auth-logo">
<form method="post" action="{{ offer.action_url }}"> <div class="auth-logo-icon">
<button type="submit" class="btn">{{ offer.button_label }}</button> <svg viewBox="0 0 500 500">
</form> <path d="M345 310c32 0 58-26 58-58s-26-58-58-58c-6.2 0-12 0.9-17.5 2.7C318 166 289 143 255 143c-34.3 0-63.1 22.6-73 53.7C176.9 195.7 171 195 165 195c-32 0-58 26-58 58s26 58 58 58h180z" fill="#fff"/>
{%- else %} </svg>
<p>{{ body }}</p> </div>
{%- endif %} <div class="auth-logo-text">OxiCloud</div>
<p class="muted"><a href="/">{{ return_link }}</a></p> </div>
<h2 class="auth-title">{{ title }}</h2>
<p class="auth-subtitle">{{ body }}</p>
{%- if let Some(offer) = resend %}
<form method="post" action="{{ offer.action_url }}" class="auth-form">
<button type="submit" class="auth-button">{{ offer.button_label }}</button>
</form>
{%- endif %}
<p class="auth-subtitle"><a href="/">{{ return_link }}</a></p>
</div>
</div>
</body> </body>
</html> </html>
+21 -9
View File
@@ -2,17 +2,29 @@
<html lang="{{ locale_code }}"> <html lang="{{ locale_code }}">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="color-scheme" content="light dark">
<title>OxiCloud</title> <title>OxiCloud</title>
<style> <link rel="icon" type="image/svg+xml" href="/logo/logo-plain.svg">
body { font-family: system-ui, sans-serif; max-width: 640px; margin: 6em auto; <script src="/js/core/theme-init.js"></script>
padding: 0 1em; color: #333; } <link rel="stylesheet" href="/css/main.css">
h1 { font-size: 1.4em; } <link rel="stylesheet" href="/css/views/auth.css">
p { line-height: 1.5; }
</style>
</head> </head>
<body> <body>
<h1>{{ title }}</h1> <div class="auth-container">
<p>{{ body }}</p> <div class="auth-panel">
<p><a href="/">{{ return_link }}</a></p> <div class="auth-logo">
<div class="auth-logo-icon">
<svg viewBox="0 0 500 500">
<path d="M345 310c32 0 58-26 58-58s-26-58-58-58c-6.2 0-12 0.9-17.5 2.7C318 166 289 143 255 143c-34.3 0-63.1 22.6-73 53.7C176.9 195.7 171 195 165 195c-32 0-58 26-58 58s26 58 58 58h180z" fill="#fff"/>
</svg>
</div>
<div class="auth-logo-text">OxiCloud</div>
</div>
<h2 class="auth-title">{{ title }}</h2>
<p class="auth-subtitle">{{ body }}</p>
<p class="auth-subtitle"><a href="/">{{ return_link }}</a></p>
</div>
</div>
</body> </body>
</html> </html>
@@ -2,17 +2,29 @@
<html lang="{{ locale_code }}"> <html lang="{{ locale_code }}">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="color-scheme" content="light dark">
<title>OxiCloud</title> <title>OxiCloud</title>
<style> <link rel="icon" type="image/svg+xml" href="/logo/logo-plain.svg">
body { font-family: system-ui, sans-serif; max-width: 560px; margin: 6em auto; <script src="/js/core/theme-init.js"></script>
padding: 0 1em; color: #333; line-height: 1.5; } <link rel="stylesheet" href="/css/main.css">
h1 { font-size: 1.4em; } <link rel="stylesheet" href="/css/views/auth.css">
.muted { color: #666; font-size: .9em; margin-top: 2em; }
</style>
</head> </head>
<body> <body>
<h1>{{ title }}</h1> <div class="auth-container">
<p>{{ body }}</p> <div class="auth-panel">
<p class="muted"><a href="/">{{ return_link }}</a></p> <div class="auth-logo">
<div class="auth-logo-icon">
<svg viewBox="0 0 500 500">
<path d="M345 310c32 0 58-26 58-58s-26-58-58-58c-6.2 0-12 0.9-17.5 2.7C318 166 289 143 255 143c-34.3 0-63.1 22.6-73 53.7C176.9 195.7 171 195 165 195c-32 0-58 26-58 58s26 58 58 58h180z" fill="#fff"/>
</svg>
</div>
<div class="auth-logo-text">OxiCloud</div>
</div>
<h2 class="auth-title">{{ title }}</h2>
<p class="auth-subtitle">{{ body }}</p>
<p class="auth-subtitle"><a href="/">{{ return_link }}</a></p>
</div>
</div>
</body> </body>
</html> </html>