Commit 0f45f187 authored by berumuron's avatar berumuron
Browse files

Position the "new event" button correctly

parent e89608f3
......@@ -76,6 +76,12 @@ a {
color: var(--secondary-color);
}
a.add::before {
margin-right: .25rem;
content: "+";
}
/* Forms */
form {
max-width: 500px;
......@@ -166,6 +172,8 @@ form button[type="submit"]:focus {
/* Containers */
.container {
position: relative;
max-width: 1200px;
margin-left: auto;
margin-right: auto;
......@@ -176,6 +184,42 @@ form button[type="submit"]:focus {
max-width: 500px;
}
.container .container-title {
margin-bottom: 2rem;
text-align: center;
}
.container .container-title .container-title-action {
display: inline-block;
margin-left: auto;
margin-right: auto;
padding: .5rem 1rem;
color: var(--secondary-color);
text-decoration: none;
background-color: var(--contrast-color);
border: 1px solid var(--secondary-color);
border-radius: .25rem;
transition: all .2s ease-out;
}
.container .container-title .container-title-action:hover,
.container .container-title .container-title-action:focus {
color: var(--contrast-color);
background-color: var(--secondary-color);
}
@media(min-width: 800px) {
.container .container-title .container-title-action {
position: absolute;
top: 0;
right: .5rem;
}
}
/* App header */
.app-header {
margin-bottom: 1rem;
......
......@@ -2,13 +2,15 @@
{% block content %}
<div class="container">
<h1>Évènements</h1>
{% if g.current_user %}
<a href="{{ url_for('events.create') }}">
Nouvel évènement
</a>
{% endif %}
<div class="container-title">
<h1>Temps forts</h1>
{% if g.current_user %}
<a class="container-title-action add" href="{{ url_for('events.create') }}">
Nouvel évènement
</a>
{% endif %}
</div>
{% for group_by_year in events|groupby('date.year')|sort(reverse=True) %}
{% set year = group_by_year.grouper %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment