python-sprints / python-sprints.github.io

Python Sprints website
https://python-sprints.github.io/
12 stars 55 forks source link

Make responsive background images for events chapters section (portrait) and globally #90

Closed Tomasz-Kluczkowski closed 6 years ago

Tomasz-Kluczkowski commented 6 years ago

The background for the events - chapters (abstract background with some nodes linked by lines) is currently only designed for landscape view and gets stretched too much in portrait mode making the image look low quality. Find a way to detect orientation and screen size and adjust image source for the background image. We can have several media queries (what there already is in css) but a more elegant way would be better.

There is a javascript code for that already but it kept downloading the files twice - once on page load and then when the javascript code was using that image as the source for the background. This script detects that an image with a specific css class is being loaded and instead sticks that image as a background image on a div with a specific css class. See if this script can be improved - look for it in static/js/snippets.js

Tomasz-Kluczkowski commented 6 years ago

Closed as no background image is used any more (white background).