diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index 8c9339b..47d6364 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -16,8 +16,13 @@ Pip packages ## Site Display -* Pico CSS (Yohn's fork) -* Linux Biolinum (font) +### CSS + +* Pico CSS ([fork](https://github.com/Yohn/PicoCSS)) + +### Fonts + +* Linux Biolinum # On Production Server @@ -34,16 +39,22 @@ Pip packages ## Event list -Python packages +* utils/refresh-events.py + depends on: + * caldav + * vobject -* caldav -* vobject +## image processing + +* utils/crop_image_to_bbox.py + depends on: + * PIL ## Favicon -Linux packages: - -* inkscape -* pngquant -* image-magick +* utils/favicon-from-svg.sh + depends on: + * inkscape + * pngquant + * image-magick diff --git a/content/images/kurzprosa/mockup-aw-phantastische-geschichten-2.png b/content/images/kurzprosa/mockup-aw-phantastische-geschichten-2.png index ac40ddf..1917b90 100644 Binary files a/content/images/kurzprosa/mockup-aw-phantastische-geschichten-2.png and b/content/images/kurzprosa/mockup-aw-phantastische-geschichten-2.png differ diff --git a/content/images/news/news-coffee.jpg b/content/images/neues/motif-coffee.jpg similarity index 100% rename from content/images/news/news-coffee.jpg rename to content/images/neues/motif-coffee.jpg diff --git a/content/images/tr/motif-paragraph-symbol.png b/content/images/tr/motif-paragraph-symbol.png index f39f903..0b46238 100644 Binary files a/content/images/tr/motif-paragraph-symbol.png and b/content/images/tr/motif-paragraph-symbol.png differ diff --git a/content/pages/index.md b/content/pages/index.md index 319a6e0..8c9bc56 100644 --- a/content/pages/index.md +++ b/content/pages/index.md @@ -5,7 +5,7 @@ template: index save_as: index.html url: index_cards: - - pic: images/kurzprosa/cover-aw-phantastische-geschichten-2.jpg + - pic: images/kurzprosa/mockup-aw-phantastische-geschichten-2.png link: werke/ alt: Phantastik, Belletristik, Lyrik & mehr - pic: images/tr/live-microphone-2.jpg @@ -13,7 +13,7 @@ index_cards: credit_link: https://unsplash.com/@matthewjungling link: termine/ alt: Lesungen und Lesereihen - - pic: images/news/news-coffee.jpg + - pic: images/neues/motif-coffee.jpg link: neues/ alt: Neuerscheinungen, Ankündigungen etc. - pic: images/tr/portrait-tr-cutout.png diff --git a/pelicanconf.py b/pelicanconf.py index 8f77ca3..42e047d 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -119,8 +119,9 @@ PLUGINS = ["pelican.plugins.yaml_metadata", "pelican.plugins.image_process", "mi OPTIMIZE_IMAGES_DEV_MODE = True # disable optimization in dev mode # plugin settings for image-process +IMAGE_PROCESS_FORCE = False IMAGE_PROCESS = { - "featured": ["scale_in 550 100% True"], + "featured": ["scale_in 550 850 True"], "card": ["scale_in 350 100% True"] } @@ -132,4 +133,5 @@ IMAGE_PROCESS = { ############################################################################### STYLESHEET_FILES = ("pico.zinc.css", "custom.css") -DEFAULT_METADESC = "Tobias Radloff ist preisgekrönter Schriftsteller von Romanen, Kurzgeschichten und Lyrik auf deutsch und englisch. Zu seinen Genres gehören Fantasy, SF, Krimi, Kinder-/Jugendbuch und mehr. Er organisiert und moderiert die regelmäßigen Lesereihen 'Potsdams andere Welten' und 'Babelsberger Lesesalon'." \ No newline at end of file +DEFAULT_METADESC = "Tobias Radloff ist preisgekrönter Schriftsteller von Romanen, Kurzgeschichten und Lyrik auf deutsch und englisch. Zu seinen Genres gehören Fantasy, SF, Krimi, Kinder-/Jugendbuch und mehr. Er organisiert und moderiert die regelmäßigen Lesereihen 'Potsdams andere Welten' und 'Babelsberger Lesesalon'." + diff --git a/theme/static/css/custom.css b/theme/static/css/custom.css index 51453d8..bd6ace5 100644 --- a/theme/static/css/custom.css +++ b/theme/static/css/custom.css @@ -422,7 +422,7 @@ figcaption { max-height: calc(var(--tr-card-height) * 2); min-width: var(--tr-smallest-width); max-width: 100%; - object-fit: cover; + object-fit: contain; display: block; margin: auto; } diff --git a/utils/crop_image_to_bbox.py b/utils/crop_image_to_bbox.py new file mode 100644 index 0000000..0b1e0d5 --- /dev/null +++ b/utils/crop_image_to_bbox.py @@ -0,0 +1,20 @@ +from PIL import Image +import sys + +# check if filename is present +if len(sys.argv) == 1: + sys.exit("error: no filename spcified") +f = sys.argv[1] + +# open, crop and overwrite image +print(f"cropping file {f} … ", end='') +with Image.open(f) as i: + # do nothing if size and bbox are equivalent + bbox = i.getbbox() + if bbox[0] == 0 and bbox[1] == 0 and bbox[2] == i.size[0] and bbox[3] == i.size[1]: + print("nothing to do") + sys.exit(0) + + i.crop(i.getbbox()).save(f) + +print("successful")