From 9469018fc66d2bf206764615ddeb6234f80c2467 Mon Sep 17 00:00:00 2001 From: eneller Date: Wed, 19 Mar 2025 18:57:29 +0100 Subject: [PATCH] feat: html tweaks --- src/core/views.py | 3 ++- src/epub2go_web/static/styles.css | 26 +++++++++++++++++++++++++- src/epub2go_web/templates/index.html | 16 ++++++++-------- 3 files changed, 35 insertions(+), 10 deletions(-) diff --git a/src/core/views.py b/src/core/views.py index ec267eb..1e915c2 100644 --- a/src/core/views.py +++ b/src/core/views.py @@ -18,6 +18,7 @@ gbnetloc = urlparse(allbooks_url).netloc def index(request: HttpRequest): context = { 'title': 'epub2go', + 'http_host': request.META['HTTP_HOST'], 'books': books, 'book_count': len(books), } @@ -42,7 +43,7 @@ def validateUrl(param)->bool : return False -@shared_task +#@shared_task def getEpub(param): # TODO validate / sanitize input # TODO check for existing file and age diff --git a/src/epub2go_web/static/styles.css b/src/epub2go_web/static/styles.css index 40318b6..931a321 100644 --- a/src/epub2go_web/static/styles.css +++ b/src/epub2go_web/static/styles.css @@ -13,6 +13,19 @@ h1,h2,h3{ } /* custom styles here */ +:root{ + --white:#faf0e673; +} +body{ + background-color: var(--white) +} +header{ + text-align: center; + justify-content: center; +} +.searchbar{ + width: fit-content; +} tr:nth-child(even){ background-color: #EEEEEE; } @@ -20,11 +33,22 @@ tr:hover{ background-color: #DDDDDD; transition: all 2ms; } -.table-icon{ +.inline-icon{ vertical-align: middle; height: 1em; } .header-icon{ vertical-align: middle; height: 1em; + padding: .5em; +} +a:hover, a:any-link{ + text-decoration: none; + color: inherit; +} +.table-link{ + display: block; + width: 100%; + height: 100%; + padding: 3px; } \ No newline at end of file diff --git a/src/epub2go_web/templates/index.html b/src/epub2go_web/templates/index.html index 8ecb037..f1c3088 100644 --- a/src/epub2go_web/templates/index.html +++ b/src/epub2go_web/templates/index.html @@ -11,21 +11,21 @@

{{ title }}

-

Im Moment finden sich hier {{ book_count }} Bücher.

- + Bookmarklet GitHub
-
- + +
+

Im Moment finden sich hier {{ book_count }} Bücher.

- + @@ -38,12 +38,12 @@ {% for item in books %}
- - Open Link + + Open Link - + {{ item.title }}