8 Commits

Author SHA1 Message Date
Martin Rubli
9ab719213c static: css: Fix image path for resize handle
If the site is deployed to a different root path (e.g. /photos/), the absolute
/images path is broken. Use a relative path instead since the CSS and the images
are both underneath the static directory.
2024-02-15 23:11:52 +01:00
Martin Rubli
023b8a7e50 static: css: Fix map tile offset for maps with Tailwind Typography
Embedding a Leaflet map within a Tailwind Typography-styled <article> leads to a
very subtle (the higher the zoom the subtler) vertical map offset. It is
particularly noticeable in combination with track overlays where tracks and map
are suddenly misaligned.

The root cause is this part of the Tailwind-generated stylesheet:

  .prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)) {
      margin-top: 2em;
      margin-bottom: 2em
  }

It adds a 2em margin to all <img> element and, because Leaflet tiles are images,
that leads to a vertical offset.

The obvious solution is to not embed maps in a <article class="prose">. Another
workaround is to add a "not-prose" class to the map container:

  <div id="map_container" class="not-prose">…</div>

While the above should reliably prevent any other Tailwind shenanigans, forcing
the <img> margin to be zero should work well enough for now.
2023-12-18 23:16:48 +01:00
Martin Rubli
e09725f46e static: css: Apply a quip-maps fix for non-resizable maps
See commit 200335d594893f9a1b405279e53533e5024ee0eb in quip-maps for an
explanation:

  demo: css: Fix attribution moving to bottom when map not resizeable
2023-10-24 22:17:57 +02:00
Martin Rubli
78588d0c2d layouts: map: Allow specifying width/height in the shortcode tag 2023-10-16 21:13:04 +02:00
Martin Rubli
ea709de623 static: css: Fix z-order of maximized maps to be above other maps on the page 2023-10-16 21:13:04 +02:00
Martin Rubli
43597473a0 static: css: Increase backdrop transparency 2023-10-16 21:13:04 +02:00
Martin Rubli
e899c078ee static: css: Remove remnants of an earlier design 2023-10-16 21:13:04 +02:00
Martin Rubli
05e5977ea2 static: Add basic styles requires for quip-maps 2023-10-16 21:13:04 +02:00