From 22494aadd27c097c1ef207848b05e68ad0a18ecb Mon Sep 17 00:00:00 2001 From: nberting Date: Sun, 10 Jun 2018 11:16:47 +0200 Subject: [PATCH] styling buttons --- app/static/css/style.css | 10 +++++----- app/templates/show_book_detail.html | 18 ++++++++++-------- app/views.py | 2 ++ 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/app/static/css/style.css b/app/static/css/style.css index 2ea3389..a7f6bbf 100755 --- a/app/static/css/style.css +++ b/app/static/css/style.css @@ -385,21 +385,21 @@ box-sizing: border-box; height: 100%; /* Full height */ overflow: auto; /* Enable scroll if needed */ background-color: rgb(0,0,0); /* Fallback color */ - background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ + background-color: rgba(0,0,0,0.5); /* Black w/ opacity */ } /* Modal Content/Box */ .modal-content { - background-color: #fefefe; + background-color: yellow; margin: 15% auto; /* 15% from the top and centered */ - padding: 20px; + padding: 15px; border: 1px solid #888; width: 40%; /* Could be more or less, depending on screen size */ } /* The Close Button */ .close { - color: red; + color: grey; float: right; font-size: 28px; font-weight: bold; @@ -407,7 +407,7 @@ box-sizing: border-box; .close:hover, .close:focus { - color: black; + color: red; text-decoration: none; cursor: pointer; } diff --git a/app/templates/show_book_detail.html b/app/templates/show_book_detail.html index 79252d3..ea6b6b9 100755 --- a/app/templates/show_book_detail.html +++ b/app/templates/show_book_detail.html @@ -21,18 +21,20 @@ {% endfor %}

- - - - +{% if book.file %} + + "{{book.message or 'Happy reading.'}}"
+

>>>> Link to file <<<<

+ +{% else %} +{% endif %} + + + diff --git a/app/views.py b/app/views.py index 199b264..27cb5fa 100755 --- a/app/views.py +++ b/app/views.py @@ -141,12 +141,14 @@ def edit_book_by_id(id): input_authors = user_form.author.data category = user_form.category.data year_published = user_form.year_published.data + message = user_form.message.data if year_published=="": year_published = None book = Book.query.filter_by(id=id).first() book.title = title book.category = category book.year_published = year_published + book.message = message #authors update book.authors.clear()