fix styles

This commit is contained in:
Kostiantyn Stoliarskyi 2023-04-25 09:36:15 +03:00
parent 228270488f
commit 36ae44ad2c
4 changed files with 15 additions and 15 deletions

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@
<!-- styles --> <!-- styles -->
<!-- prettier-ignore --> <!-- prettier-ignore -->
<!-- <link href="{{ url_for('static', filename='css/main.css') }}" rel="stylesheet"/> --> <script src="{{ url_for('static', filename='js/main.js') }}" type="text/javascript"></script>
<script> <script>
// On page load or when changing themes, best to add inline in `head` to avoid FOUC // On page load or when changing themes, best to add inline in `head` to avoid FOUC
if ( if (
@ -84,10 +84,6 @@
{% endblock %} {% endblock %}
<!-- scripts --> <!-- scripts -->
<!-- prettier-ignore -->
<script src="{{ url_for('static', filename='js/flowbite.min.js') }}" defer></script>
<!-- prettier-ignore -->
<script src="{{ url_for('static', filename='js/main.js') }}" type="text/javascript" defer></script>
<!-- prettier-ignore --> <!-- prettier-ignore -->
{% block scripts %} {% block scripts %}
{% endblock %} {% endblock %}

View File

@ -78,7 +78,7 @@ def sub_collection_view(book_id, collection_id):
collection: m.Collection = db.session.get(m.Collection, collection_id) collection: m.Collection = db.session.get(m.Collection, collection_id)
if not collection: if not collection:
log(log.WARNING, "Collection with id [%s] not found", collection_id) log(log.WARNING, "Collection with id [%s] not found", collection_id)
flash("Book not found", "danger") flash("Collection not found", "danger")
return redirect(url_for("book.get_all")) return redirect(url_for("book.get_all"))
if collection.is_leaf: if collection.is_leaf:
return render_template( return render_template(
@ -103,7 +103,7 @@ def about_collection(book_id, collection_id):
collection: m.Collection = db.session.get(m.Collection, collection_id) collection: m.Collection = db.session.get(m.Collection, collection_id)
if not collection: if not collection:
log(log.WARNING, "Collection with id [%s] not found", collection_id) log(log.WARNING, "Collection with id [%s] not found", collection_id)
flash("Book not found", "danger") flash("Collection not found", "danger")
return redirect(url_for("book.get_all")) return redirect(url_for("book.get_all"))
else: else:
return render_template( return render_template(
@ -123,12 +123,12 @@ def about_sub_collection(book_id, collection_id, sub_collection_id):
collection: m.Collection = db.session.get(m.Collection, collection_id) collection: m.Collection = db.session.get(m.Collection, collection_id)
if not collection: if not collection:
log(log.WARNING, "Collection with id [%s] not found", collection_id) log(log.WARNING, "Collection with id [%s] not found", collection_id)
flash("Book not found", "danger") flash("Collection not found", "danger")
return redirect(url_for("book.get_all")) return redirect(url_for("book.get_all"))
sub_collection: m.Collection = db.session.get(m.Collection, collection_id) sub_collection: m.Collection = db.session.get(m.Collection, collection_id)
if not collection: if not collection:
log(log.WARNING, "Sub_collection with id [%s] not found", sub_collection_id) log(log.WARNING, "Sub_collection with id [%s] not found", sub_collection_id)
flash("Book not found", "danger") flash("Sub_collection not found", "danger")
return redirect(url_for("book.get_all")) return redirect(url_for("book.get_all"))
else: else:
@ -150,12 +150,12 @@ def section_view(book_id, collection_id, sub_collection_id):
collection: m.Collection = db.session.get(m.Collection, collection_id) collection: m.Collection = db.session.get(m.Collection, collection_id)
if not collection: if not collection:
log(log.WARNING, "Collection with id [%s] not found", collection_id) log(log.WARNING, "Collection with id [%s] not found", collection_id)
flash("Book not found", "danger") flash("Collection not found", "danger")
return redirect(url_for("book.get_all")) return redirect(url_for("book.get_all"))
sub_collection: m.Collection = db.session.get(m.Collection, sub_collection_id) sub_collection: m.Collection = db.session.get(m.Collection, sub_collection_id)
if not collection: if not collection:
log(log.WARNING, "Sub_collection with id [%s] not found", sub_collection_id) log(log.WARNING, "Sub_collection with id [%s] not found", sub_collection_id)
flash("Book not found", "danger") flash("Sub_collection not found", "danger")
return redirect(url_for("book.get_all")) return redirect(url_for("book.get_all"))
else: else:
return render_template( return render_template(

View File

@ -1,4 +1,6 @@
import './styles.css'; import './styles.css';
import {initBooks} from './books'; import {initBooks} from './books';
document.addEventListener('DOMContentLoaded', () => {
initBooks(); initBooks();
});