From c1f813d70c764cdc9321f9adea7425ee1537f135 Mon Sep 17 00:00:00 2001 From: eneller Date: Thu, 20 Mar 2025 20:53:19 +0100 Subject: [PATCH] frontend tweaks --- src/core/views.py | 3 ++- src/epub2go_web/static/styles.css | 17 ++++++++++------- src/epub2go_web/templates/index.html | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/core/views.py b/src/core/views.py index d2944ac..8f46acc 100644 --- a/src/core/views.py +++ b/src/core/views.py @@ -12,7 +12,7 @@ import logging logger = logging.getLogger(__name__) #TODO configure logging 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 def index(request: HttpRequest): @@ -21,6 +21,7 @@ def index(request: HttpRequest): 'http_host': request.META['HTTP_HOST'], 'books': books, 'book_count': len(books), + 'allbooks_url': allbooks_url, } targetParam = request.GET.get('t', None) diff --git a/src/epub2go_web/static/styles.css b/src/epub2go_web/static/styles.css index 8fd7dc7..6bdb468 100644 --- a/src/epub2go_web/static/styles.css +++ b/src/epub2go_web/static/styles.css @@ -5,7 +5,11 @@ --fg:#444; --fg-deemph: #777; } +html{ + font-family: serif; +} body{ + background-color: var(--bg); margin:40px auto; max-width:800px; line-height:1.4; @@ -18,15 +22,10 @@ h1,h2,h3{ line-height:1.2; letter-spacing: -2%; } - -/* custom styles here */ -body{ - background-color: var(--bg); - font-family: serif; -} header{ text-align: center; justify-content: center; + margin-bottom: 4%; } small{ color: var(--fg-deemph); @@ -35,9 +34,13 @@ small{ width: 100%; } #searchInput { + background-color: var(--bg); width: 100%; padding: .2em; font-size: larger; + border-radius: 10px; + border-color: var(--bg-acc); + box-shadow: var(--bg-acc) 2px 2px; } th{ text-align: left; @@ -65,5 +68,5 @@ a:hover, a:any-link{ display: block; width: 100%; height: 100%; - padding: 3px; + padding: 1px; } \ No newline at end of file diff --git a/src/epub2go_web/templates/index.html b/src/epub2go_web/templates/index.html index c22ea34..0d2a7d7 100644 --- a/src/epub2go_web/templates/index.html +++ b/src/epub2go_web/templates/index.html @@ -18,7 +18,7 @@ - Im Moment finden sich hier {{ book_count }} Bücher. + Im Moment finden sich hier {{ book_count }} Bücher. Bookmarklet