frontend tweaks
This commit is contained in:
@@ -12,7 +12,7 @@ import logging
|
|||||||
logger = logging.getLogger(__name__) #TODO configure logging
|
logger = logging.getLogger(__name__) #TODO configure logging
|
||||||
|
|
||||||
converter = GBConvert(downloaddir=settings.MEDIA_ROOT)
|
converter = GBConvert(downloaddir=settings.MEDIA_ROOT)
|
||||||
books = get_all_books()# TODO get from pickle
|
books = sorted(get_all_books(), key= lambda b: b.title)# TODO get from pickle
|
||||||
gbnetloc = urlparse(allbooks_url).netloc
|
gbnetloc = urlparse(allbooks_url).netloc
|
||||||
|
|
||||||
def index(request: HttpRequest):
|
def index(request: HttpRequest):
|
||||||
@@ -21,6 +21,7 @@ def index(request: HttpRequest):
|
|||||||
'http_host': request.META['HTTP_HOST'],
|
'http_host': request.META['HTTP_HOST'],
|
||||||
'books': books,
|
'books': books,
|
||||||
'book_count': len(books),
|
'book_count': len(books),
|
||||||
|
'allbooks_url': allbooks_url,
|
||||||
}
|
}
|
||||||
|
|
||||||
targetParam = request.GET.get('t', None)
|
targetParam = request.GET.get('t', None)
|
||||||
|
|||||||
@@ -5,7 +5,11 @@
|
|||||||
--fg:#444;
|
--fg:#444;
|
||||||
--fg-deemph: #777;
|
--fg-deemph: #777;
|
||||||
}
|
}
|
||||||
|
html{
|
||||||
|
font-family: serif;
|
||||||
|
}
|
||||||
body{
|
body{
|
||||||
|
background-color: var(--bg);
|
||||||
margin:40px auto;
|
margin:40px auto;
|
||||||
max-width:800px;
|
max-width:800px;
|
||||||
line-height:1.4;
|
line-height:1.4;
|
||||||
@@ -18,15 +22,10 @@ h1,h2,h3{
|
|||||||
line-height:1.2;
|
line-height:1.2;
|
||||||
letter-spacing: -2%;
|
letter-spacing: -2%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* custom styles here */
|
|
||||||
body{
|
|
||||||
background-color: var(--bg);
|
|
||||||
font-family: serif;
|
|
||||||
}
|
|
||||||
header{
|
header{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
margin-bottom: 4%;
|
||||||
}
|
}
|
||||||
small{
|
small{
|
||||||
color: var(--fg-deemph);
|
color: var(--fg-deemph);
|
||||||
@@ -35,9 +34,13 @@ small{
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
#searchInput {
|
#searchInput {
|
||||||
|
background-color: var(--bg);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: .2em;
|
padding: .2em;
|
||||||
font-size: larger;
|
font-size: larger;
|
||||||
|
border-radius: 10px;
|
||||||
|
border-color: var(--bg-acc);
|
||||||
|
box-shadow: var(--bg-acc) 2px 2px;
|
||||||
}
|
}
|
||||||
th{
|
th{
|
||||||
text-align: left;
|
text-align: left;
|
||||||
@@ -65,5 +68,5 @@ a:hover, a:any-link{
|
|||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 3px;
|
padding: 1px;
|
||||||
}
|
}
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<input type="search" id="searchInput" placeholder="Suche nach Titel" minlength="3">
|
<input type="search" id="searchInput" placeholder="Suche nach Titel" minlength="3">
|
||||||
</form>
|
</form>
|
||||||
</search>
|
</search>
|
||||||
<small>Im Moment finden sich hier {{ book_count }} Bücher. </small>
|
<small>Im Moment finden sich hier <a href="{{ allbooks_url }}">{{ book_count }} Bücher.</a> </small>
|
||||||
<a href="javascript:void(window.open('http://{{ http_host }}/?t=' + encodeURIComponent(window.location.toString())))" title="Als Lesezeichen speichern"><!--TODO fix domain part as variable-->
|
<a href="javascript:void(window.open('http://{{ http_host }}/?t=' + encodeURIComponent(window.location.toString())))" title="Als Lesezeichen speichern"><!--TODO fix domain part as variable-->
|
||||||
<img src="{% static 'bookmark.svg' %}" alt="Bookmarklet" class="header-icon">
|
<img src="{% static 'bookmark.svg' %}" alt="Bookmarklet" class="header-icon">
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user