Compare commits
3 commits
b044315f0b
...
c154404c6f
| Author | SHA1 | Date | |
|---|---|---|---|
| c154404c6f | |||
| 1daec3cc71 | |||
| 0c71abe72c |
6 changed files with 114 additions and 24 deletions
|
|
@ -1,5 +1,7 @@
|
|||
@import "tailwindcss";
|
||||
@plugin "../daisyui.mjs";
|
||||
@plugin "../daisyui.mjs" {
|
||||
themes: aqua --default;
|
||||
}
|
||||
|
||||
html, body { height: 100%; margin: 0; }
|
||||
.map-container { height: 100vh; width: 100%; }
|
||||
.map-container { height: calc(100vh - 4rem); width: 100%; }
|
||||
|
|
|
|||
20
templates/account/auth_layout.html.twig
Normal file
20
templates/account/auth_layout.html.twig
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block navbar %}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="min-h-screen flex">
|
||||
<div class="hidden lg:flex lg:w-1/2 bg-neutral flex-col items-center justify-center gap-6 p-12">
|
||||
<span class="text-5xl font-bold text-neutral-content tracking-tight">Rater</span>
|
||||
<p class="text-neutral-content/70 text-lg text-center max-w-xs">
|
||||
Rate and discover restaurants near you.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="w-full lg:w-1/2 flex items-center justify-center p-8">
|
||||
<div class="w-full max-w-sm">
|
||||
{% block form %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
@ -1,23 +1,49 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
{% extends 'account/auth_layout.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Log in</h1>
|
||||
{% block title %}Log in — Rater{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h1 class="text-2xl font-bold mb-6">Welcome back</h1>
|
||||
|
||||
{% if error %}
|
||||
<div>{{ error.messageKey|trans(error.messageData, 'security') }}</div>
|
||||
<div role="alert" class="alert alert-error mb-4">
|
||||
<span>{{ error.messageKey|trans(error.messageData, 'security') }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post">
|
||||
<label for="email">Email</label>
|
||||
<input type="email" id="email" name="_username" value="{{ last_username }}">
|
||||
<form method="post" class="flex flex-col gap-4">
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">Email</legend>
|
||||
<input
|
||||
type="email"
|
||||
id="email"
|
||||
name="_username"
|
||||
value="{{ last_username }}"
|
||||
class="input w-full"
|
||||
placeholder="you@example.com"
|
||||
autocomplete="email"
|
||||
>
|
||||
</fieldset>
|
||||
|
||||
<label for="password">Password</label>
|
||||
<input type="password" id="password" name="_password">
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">Password</legend>
|
||||
<input
|
||||
type="password"
|
||||
id="password"
|
||||
name="_password"
|
||||
class="input w-full"
|
||||
placeholder="••••••••"
|
||||
autocomplete="current-password"
|
||||
>
|
||||
</fieldset>
|
||||
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
|
||||
|
||||
<button type="submit">Log in</button>
|
||||
<button type="submit" class="btn btn-primary w-full mt-2">Log in</button>
|
||||
</form>
|
||||
|
||||
<p>No account yet? <a href="{{ path('app_register') }}">Register</a></p>
|
||||
<p class="text-sm text-center mt-6 text-base-content/60">
|
||||
No account yet?
|
||||
<a href="{{ path('app_register') }}" class="link link-primary">Register</a>
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,38 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Rater Login</title>
|
||||
</head>
|
||||
<body>
|
||||
body
|
||||
{{ form(form) }}
|
||||
</body>
|
||||
</html>
|
||||
{% extends 'account/auth_layout.html.twig' %}
|
||||
|
||||
{% block title %}Register — Rater{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h1 class="text-2xl font-bold mb-6">Create an account</h1>
|
||||
|
||||
{{ form_start(form, {attr: {class: 'flex flex-col gap-4'}}) }}
|
||||
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">Email</legend>
|
||||
{{ form_widget(form.email, {attr: {class: 'input w-full', placeholder: 'you@example.com', autocomplete: 'email'}}) }}
|
||||
{{ form_errors(form.email) }}
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">Password</legend>
|
||||
{{ form_widget(form.password, {attr: {class: 'input w-full', placeholder: '••••••••', autocomplete: 'new-password'}}) }}
|
||||
{{ form_errors(form.password) }}
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">Confirm password</legend>
|
||||
{{ form_widget(form.password_again, {attr: {class: 'input w-full', placeholder: '••••••••', autocomplete: 'new-password'}}) }}
|
||||
{{ form_errors(form.password_again) }}
|
||||
</fieldset>
|
||||
|
||||
{{ form_widget(form._token) }}
|
||||
|
||||
{{ form_widget(form.register, {attr: {class: 'btn btn-primary w-full mt-2'}}) }}
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
<p class="text-sm text-center mt-6 text-base-content/60">
|
||||
Already have an account?
|
||||
<a href="{{ path('app_login') }}" class="link link-primary">Log in</a>
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,22 @@
|
|||
<script src="https://cdn.jsdelivr.net/npm/frankenphp-hot-reload/+esm" type="module"></script>
|
||||
{% endif %}
|
||||
</head>
|
||||
<body>
|
||||
<body class="flex flex-col min-h-screen">
|
||||
{% block navbar %}
|
||||
<nav class="navbar bg-base-100 text-base-content shrink-0">
|
||||
<div class="flex-1">
|
||||
<a href="{{ path('app_index_index') }}" class="btn btn-ghost text-xl font-bold">Rater</a>
|
||||
</div>
|
||||
<div class="flex-none gap-2">
|
||||
{% if app.user %}
|
||||
<span class="text-sm opacity-75 hidden sm:inline">{{ app.user.userIdentifier }}</span>
|
||||
<a href="{{ path('app_logout') }}" class="btn btn-ghost btn-sm">Log out</a>
|
||||
{% else %}
|
||||
<a href="{{ path('app_login') }}" class="btn btn-ghost btn-sm">Log in</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
{% block body %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Rater</h1>
|
||||
<div {{ stimulus_controller('map') }} class="map-container"></div>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue