diff --git a/library/app.py b/library/app.py
index 7049399..b47d7e3 100644
--- a/library/app.py
+++ b/library/app.py
@@ -54,6 +54,10 @@ def create_app():
def update():
index_books(APP.config["LIBRARY_FILENAME"], APP.config["IMAGE_FOLDER"])
+ @APP.context_processor
+ def inject_title():
+ return dict(title=APP.config["TITLE"])
+
return APP
diff --git a/library/static/css/dropdown.css b/library/static/css/dropdown.css
index 0692502..5ffd61e 100644
--- a/library/static/css/dropdown.css
+++ b/library/static/css/dropdown.css
@@ -1,26 +1,21 @@
/* Dropdown Button */
/* for sorting on Year, Type, License
*/
+.menu {
+ display:flex;
+ gap: 0.3em;
+ position: relative;
+ margin-left: 1em;
+}
.filter {
display: none;
}
-
.activebtn {
background-color: #62b264;
}
-
-#leftmostbtn{
- margin-left: 1em;
-}
-
.show {
display: block;
}
-.dropdown {
- position: relative;
- display: inline-block;
-}
-
/* Dropdown Content (Hidden by Default) */
.dropdown-content {
display: none;
@@ -41,7 +36,7 @@
text-decoration: none;
display: block;
}
-.dropbtn {
+.dropbtn .dropdown {
margin-top: 1em;
}
/* Change color of dropdown links on hover */
@@ -54,6 +49,30 @@
/* Change the background color of the dropdown button when the dropdown content is shown */
.dropdown:hover .dropbtn {background-color: #3e8e41;}
+#booksearch{
+ background: #f1f1f1;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ border: 3px solid black;
+ font-family: inherit;
+ font-size: 100%;
+ box-shadow: 0.3em 0.35em rgba(0,0,0,0.3);
+}
+
+button {
+ border: 3px solid black;
+ padding: 0.8em;
+ color: black;
+ min-width: auto;
+ background-color: #f1f1f1;
+ font-family: inherit;
+ font-size: 100%;
+ box-shadow: 0.3em 0.35em rgba(0,0,0,0.3);
+ cursor: pointer;
+}
+
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
.dropdown-content button {
font-size: 0.7em;
diff --git a/library/static/css/feather.css b/library/static/css/feather.css
index 8224b6b..d1020fd 100644
--- a/library/static/css/feather.css
+++ b/library/static/css/feather.css
@@ -2,7 +2,7 @@
width: 24px;
height: 24px;
stroke: currentColor;
- stroke-width: 2;
+ stroke-width: 1.5;
stroke-linecap: round;
stroke-linejoin: round;
fill: none;
diff --git a/library/static/css/style.css b/library/static/css/style.css
index fd55017..9584421 100644
--- a/library/static/css/style.css
+++ b/library/static/css/style.css
@@ -1,46 +1,21 @@
+@font-face {
+ font-family: "libreBaskerville";
+ src: url(../fonts/LibreBaskerville-Regular.otf);
+}
+
html, body {
margin: 0;
font-family: "libreBaskerville";
font-style: normal;
}
-body:after {
- font-size: .8em;
- position: fixed;
- width: 100%;
- text-align: center;
-}
-
-
-@font-face {
- font-family: "libreBaskerville";
- src: url(../fonts/LibreBaskerville-Regular.otf);
-}
-
#library {
- line-height: 1.03em;
position: relative;
color: #FFFFFF;
text-shadow: 2px 2px #004225;
- font-size: 3em;
- text-align: center;
- font-family: libreBaskerville;
+ font-size: 1.5em;
mix-blend-mode: difference;
- margin: 1em 0;
-}
-
-#booksearch{
- background: #f1f1f1;
- text-decoration: none;
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- border: 3px solid black;
- padding: 0.8em;
- margin-left: 0.3em;
- font-family: inherit;
- font-size: 100%;
- box-shadow: 0.3em 0.35em rgba(0,0,0,0.3);
+ left: 1em;
}
@supports (-webkit-text-stroke: 1px darkgreen) {
@@ -49,13 +24,10 @@ body:after {
}
}
-.container {
- margin 0 auto;
-}
-
#bookshelf {
max-width: 90%;
margin-top: 3em;
+ margin-left: 1em;
display: block;
columns: 30rem;
gap: 1rem;
@@ -76,52 +48,11 @@ body:after {
}
#publication {
- margin-top: 3em;
-}
-
-#latestevent {
- text-align: center;
- color: #DD4F77;
-}
-
-#upcomingevent {
- text-align: center;
- color: #404d81;
-}
-
-.event {
- margin: 0 1em 1em;
- max-width: calc(90% - 3em);
- min-width: calc(90% - 3em);
margin-top: 3em;
- padding: 6px;
- display: inline-block;
- float: left;
- border: 3px solid black;
- background-color: #f1f1f1;
- border-spacing: 0;
- border-collapse: collapse;
- z-index: 10;
-}
-
-button {
- z-index: 10;
- border: 3px solid black;
- padding: 0.8em;
- margin-left: 0.3em;
- color: black;
- min-width: auto;
- background-color: #f1f1f1;
- font-family: inherit;
- font-size: 100%;
- box-shadow: 0.3em 0.35em rgba(0,0,0,0.3);
- cursor: pointer;
+ margin-left: 1em;
}
-
table {
- margin: 0 1em 1em;
- z-index: 10;
border: 1px solid black;
background-color: #f1f1f1;
border-spacing: 0;
@@ -158,18 +89,9 @@ a:visited { text-decoration: none; }
a:hover { text-decoration: none; }
a:active { text-decoration: none; }
-div#auth_buttons{
- position: absolute;
- top: 0.7em;
- right: 0.7em;
- display:flex;
- gap: 1em;
- flex-direction: row;
- justify-content: center;
- align-items: center;
-}
+
div#login {
- width: 30%;
+ width: 25%;
margin-left: auto;
margin-right: auto;
text-decoration: none;
@@ -180,13 +102,44 @@ input[type=text], input[type=password], input[type=file] {
border: 1px solid #E0B0FF;
}
+input {
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ text-align: right;
+ color: white;
+ padding: 0.8em 2em;
+ border: none;
+ cursor: pointer;
+}
+
+div#auth_buttons{
+ position: absolute;
+ top: 0.7em;
+ right: 0.7em;
+ display:flex;
+ gap: 1em;
+ flex-direction: row;
+
+}
+div#auth_buttons a{
+ font-size: 0.8em;
+ padding: 0.2em;
+}
+.auth {
+ color: white;
+ cursor: pointer;
+ border: 1px solid #404d81;
+ background-color: #fefefe;
+}
+.auth:hover{
+ background-color: #efefef;
+}
+
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
#library {
text-align: left;
max-width: 70%;
}
- .event {
- max-width: 90%;
- margin: 3em 1em 1em 1em;
- }
}
diff --git a/library/static/css/upload.css b/library/static/css/upload.css
index 4ec9c0e..2effefe 100644
--- a/library/static/css/upload.css
+++ b/library/static/css/upload.css
@@ -44,9 +44,7 @@ input[type=submit] {
background-color: #DD4F77;
text-align: right;
color: white;
- padding: 1em 3em;
border: none;
- cursor: pointer;
}
input[type=submit]:hover {
diff --git a/library/templates/base.html b/library/templates/base.html
index 9964092..f22c66d 100644
--- a/library/templates/base.html
+++ b/library/templates/base.html
@@ -15,36 +15,7 @@
-
- {{title}}
+ {{title}}
{% block main %}
{% endblock main %}
diff --git a/library/templates/bookshelf.html b/library/templates/bookshelf.html
new file mode 100644
index 0000000..c1d6fb8
--- /dev/null
+++ b/library/templates/bookshelf.html
@@ -0,0 +1,29 @@
+{% block bookshelf %}
+
+{% for id, pubinfo in publications.items() %}
+
+
+
+ {%if pubinfo["Image"]%}
+
+
+
+ |
+
+ {% endif %}
+
+ Author/Editor: |
+ {{ pubinfo["Author"] }} |
+
+
+ Title: |
+ {{ pubinfo["Title"] }} |
+
+
+
+
+{% endfor%}
+
+
+
+{% endblock bookshelf %}
diff --git a/library/templates/index.html b/library/templates/index.html
index c62bde7..4772fc7 100644
--- a/library/templates/index.html
+++ b/library/templates/index.html
@@ -1,35 +1,7 @@
{% extends "base.html" %}
{% block main %}
-
-
-{% for id, pubinfo in publications.items() %}
-
-
-
- {%if pubinfo["Image"]%}
-
-
-
- |
-
- {% endif %}
-
- Author/Editor: |
- {{ pubinfo["Author"] }} |
-
-
- Title: |
- {{ pubinfo["Title"] }} |
-
-
-
-
-{% endfor%}
-
-
-
-
+{% include 'user_authorization.html' %}
+{% include 'bookshelf.html' %}
{% endblock %}
diff --git a/library/templates/menu.html b/library/templates/menu.html
index 2245d0c..2fa510d 100644
--- a/library/templates/menu.html
+++ b/library/templates/menu.html
@@ -1,15 +1,20 @@
{% block menu %}
-
-
-
-
-
- {% for pubtype in pubtypes %}
-
- {% endfor %}
-
-
-
+
{% endblock menu %}
diff --git a/library/templates/publication.html b/library/templates/publication.html
index 4135c0e..4f6a108 100644
--- a/library/templates/publication.html
+++ b/library/templates/publication.html
@@ -1,8 +1,13 @@
{% extends "base.html" %}
{% block main %}
-
-
-
+{% include 'user_authorization.html' %}
+
- {% endblock %}
+ {% endblock %}
diff --git a/library/templates/user_authorization.html b/library/templates/user_authorization.html
new file mode 100644
index 0000000..49726fa
--- /dev/null
+++ b/library/templates/user_authorization.html
@@ -0,0 +1,31 @@
+{% block auth %}
+
+{% endblock auth %}