Skip to content

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

Closed
@Tomasz-Kluczkowski

Description

@Tomasz-Kluczkowski

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions