add basic home button

This commit is contained in:
Chris Arderne 2024-04-03 13:26:56 +01:00
parent 458576a141
commit ec8afde6b2
1 changed files with 17 additions and 13 deletions

View File

@ -20,21 +20,22 @@ nav {
nav > a { nav > a {
color: black; color: black;
margin-right: 20px; margin: 0 20px;
} }
.search { .search {
margin: 20px auto; margin: auto auto;
width: 50%; width: 50%;
display: flex; display: flex;
flex: 1; flex: 1;
justify-content: center;
} }
.search > input { form > input {
padding-left: 4px; padding-left: 4px;
} }
.search > * { form > * {
height: 32px; height: 32px;
background-color: white; background-color: white;
border-radius: 0; border-radius: 0;
@ -45,11 +46,11 @@ nav > a {
vertical-align: top; vertical-align: top;
} }
.search > span { form > span {
margin-left: -5px; margin-left: -5px;
} }
.search button { button {
border: none; border: none;
padding: 0; padding: 0;
margin: 0; margin: 0;
@ -62,11 +63,11 @@ nav > a {
padding: 0 20px; padding: 0 20px;
} }
.body a { a {
color: black; color: black;
} }
.body img { img {
width: 150px; width: 150px;
height: 250px; height: 250px;
object-fit: cover; object-fit: cover;
@ -93,16 +94,19 @@ nav > a {
<div> <div>
{% if current_user.is_authenticated or g.allow_anonymous %} {% if current_user.is_authenticated or g.allow_anonymous %}
<nav> <nav>
<form role="search" action="{{url_for('basic.index')}}" method="GET"> <a href="/basic">
<div class="search"> <span>{{_('Home')}}</span>
</a>
<div class="search">
<form role="search" action="{{url_for('basic.index')}}" method="GET">
<input type="text" id="query" name="query" placeholder="{{_('Search Library')}}" value="{{searchterm}}"> <input type="text" id="query" name="query" placeholder="{{_('Search Library')}}" value="{{searchterm}}">
<span> <span>
<button type="submit" id="query_submit">{{_('Search')}}</button> <button type="submit" id="query_submit">{{_('Search')}}</button>
</span> </span>
</div> </form>
</form> </div>
{% if not current_user.is_anonymous %} {% if not current_user.is_anonymous %}
<a id="logout" href="{{url_for('web.logout')}}"> <a href="{{url_for('web.logout')}}">
<span>{{_('Logout')}}</span> <span>{{_('Logout')}}</span>
</a> </a>
{% endif %} {% endif %}