Sign out
This commit is contained in:
parent
45d4867cb3
commit
b6235fb76c
12 changed files with 578 additions and 336 deletions
|
|
@ -8,7 +8,15 @@
|
|||
</head>
|
||||
|
||||
<body>
|
||||
<div class="header-container"><h1><a href="/">~~ Recettes de cuisine ~~</a></h1><div><a href="/signinform" >Sign in</a> / <a href="/signup">Sign Up</a></div></div>
|
||||
<div class="header-container">
|
||||
<h1><a href="/">~~ Recettes de cuisine ~~</a></h1>
|
||||
{% match user %}
|
||||
{% when Some with (user) %}
|
||||
<div>{{ user.email }} / <a href="/signout" />Sign out</a></div>
|
||||
{% when None %}
|
||||
<div><a href="/signin" >Sign in</a> / <a href="/signup">Sign up</a></div>
|
||||
{% endmatch %}
|
||||
</div>
|
||||
<div class="main-container">
|
||||
{% block main_container %}{% endblock %}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<div class="list">
|
||||
<ul>
|
||||
{% for (id, title) in recipes %}
|
||||
<li><a href="/recipe/view/{{ id }}">{{ title|escape }}</a></li>
|
||||
<li><a href="/recipe/view/{{ id }}">{{ title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -4,12 +4,13 @@
|
|||
<div class="content">
|
||||
<form action="/signin" method="post">
|
||||
<label for="email_field">Email address</label>
|
||||
<input id="email_field" type="text" name="email" autocapitalize="none" autocomplete="email" autofocus="autofocus" />
|
||||
<input id="email_field" type="text" name="email" value="{{ email }}" autocapitalize="none" autocomplete="email" autofocus="autofocus" />
|
||||
|
||||
<label for="password_field">Password</label>
|
||||
<input id="password_field" type="password" name="password" autocomplete="current-password" />
|
||||
|
||||
<input type="submit" name="commit" value="Sign in" />
|
||||
</form>
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,14 @@
|
|||
|
||||
{% block content %}
|
||||
|
||||
{{ current_recipe.title }}
|
||||
<h2 class="recipe-title" >{{ current_recipe.title }}</h2>
|
||||
|
||||
{% match current_recipe.description %}
|
||||
{% when Some with (description) %}
|
||||
<div class="recipe-description" >
|
||||
{{ description|markdown }}
|
||||
</div>
|
||||
{% when None %}
|
||||
{% endmatch %}
|
||||
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue