diff --git a/the_works/__init__.py b/the_works/__init__.py index f03e660..4c714d2 100644 --- a/the_works/__init__.py +++ b/the_works/__init__.py @@ -19,7 +19,7 @@ def create_app(): init_db(app) # register blueprints - from the_works.views import home, text, werk, verlag, sprache, textform, werksform, genre, pseudonym, reihe, herausgeber, veroeffentlichung + from the_works.views import home, text, werk, verlag, sprache, textform, werksform, genre, pseudonym, reihe, herausgeber, veroeffentlichung, titelbild app.register_blueprint(home.bp) app.register_blueprint(text.bp) app.register_blueprint(werk.bp) @@ -32,6 +32,7 @@ def create_app(): app.register_blueprint(reihe.bp) app.register_blueprint(herausgeber.bp) app.register_blueprint(veroeffentlichung.bp) + app.register_blueprint(titelbild.bp) ### DEBUG toolbar = DebugToolbarExtension(app) diff --git a/the_works/static/the_works.css b/the_works/static/the_works.css index 64b90bb..07f4fcd 100644 --- a/the_works/static/the_works.css +++ b/the_works/static/the_works.css @@ -177,3 +177,38 @@ form:not([novalidate]) input:user-valid[type="search"] { max-width: 400px; } +#titelbild-pic { + width: 128px; + height: 128px; + border: var(--pico-border-width) solid var(--pico-table-border-color); + text-align: center; + + img { + object-fit: contain; + height: 128px; + } +} + + +#titelbild-placeholder { + width: fit-content; + margin: auto; + + svg { + height: 128px; + } +} + +#titelbild-controls { + margin-top: var(--pico-form-element-spacing-vertical); +} + +#titelbild-delete { + padding: calc(var(--pico-form-element-spacing-vertical) * .5) var(--pico-form-element-spacing-horizontal); + margin-bottom: var(--pico-form-element-spacing-vertical); +} + +.display-none { + display: none; +} + diff --git a/the_works/templates/views/werk_detail.html b/the_works/templates/views/werk_detail.html index 5f76c91..3ea1fbd 100644 --- a/the_works/templates/views/werk_detail.html +++ b/the_works/templates/views/werk_detail.html @@ -21,11 +21,14 @@ Werk bearbeiten {% endblock heading %} {% block content %} + +{% include "_icons.svg" %} +