{%- comment -%} Two or more images displayed side by side (and/or as a swipeable carousel). Usage: {% include embed/image/gallery.html paths='/assets/img/posts/2026/elementarz-kredka-3.png, /assets/img/posts/2026/elementarz-kredka-4.png' %} paths is a comma-separated list of image paths (whitespace/newlines around each entry are trimmed). Pass two, three, or more. Optional params: alts='alt one, alt two' comma-separated alt text, matched to paths by position (leave an entry empty to skip one) gap='8px' gap between the images max_width='80%' width of the row relative to the content column mobile_max_width='..' width used on narrow screens (defaults to max_width) Appearance (all optional, tasteful defaults): radius='10px' corner rounding of each image shadow='0 2px 8px rgba(0,0,0,0.15)' drop shadow around each image (pass shadow='none' to remove it) arrow_bg='rgba(0,0,0,0.45)' carousel arrow background arrow_bg_hover='rgba(0,0,0,0.7)' carousel arrow background on hover arrow_color='#fff' carousel arrow glyph colour arrow_size='2.4rem' diameter of the round carousel arrows counter_bg='rgba(0,0,0,0.55)' counter badge background counter_color='#fff' counter text colour mobile_gallery=true on narrow screens, show one image at a time as a swipeable carousel with left/right arrows instead of shrinking both to fit. DEFAULT true — pass mobile_gallery=false to shrink both to fit instead. swipe=false disable touch swiping (arrows still work); swipe is on by default gallery=true use that carousel on wide (desktop) screens. DEFAULT false. Independent of mobile_gallery: with gallery=true and mobile_gallery false, the carousel shows only on desktop and mobile falls back to the two side-by-side images (the carousel is NOT shown on mobile). Set both to true for a carousel at every width. loop=false make the carousel wrap around endlessly. Default is false: the left arrow is hidden on the first photo and the right arrow is hidden on the last. counter=true hide the "1/2" counter (shown by default) counter_position='bottom-right' where the counter sits (default bottom-right). MUST be quoted (the value contains a hyphen). Options: top-left, top-right, bottom-left, bottom-right show a circular badge; top-center (or top) and bottom-center (or bottom) show a centered pill. e.g. counter_position='bottom-left' enable_zoom_arrows=true disable prev/next arrows in the zoomed (lightbox) view. Enabled by default: the two photos become one lightbox gallery you can arrow through. {%- endcomment -%} {%- assign max_w = include.max_width | default: '85%' -%} {%- assign mobile_w = include.mobile_max_width | default: max_w -%} {%- assign gap = include.gap | default: '8px' -%} {%- assign radius = include.radius | default: '5px' -%} {%- assign shadow = include.shadow | default: '0 2px 8px rgba(0, 0, 0, 0.15)' -%} {%- assign arrow_bg = include.arrow_bg | default: 'rgba(0, 0, 0, 0.45)' -%} {%- assign arrow_bg_hover = include.arrow_bg_hover | default: 'rgba(0, 0, 0, 0.7)' -%} {%- assign arrow_color = include.arrow_color | default: '#fff' -%} {%- assign arrow_size = include.arrow_size | default: '2.2rem' -%} {%- assign counter_bg = include.counter_bg | default: 'rgba(0, 0, 0, 0.55)' -%} {%- assign counter_color = include.counter_color | default: '#fff' -%} {%- assign path_list = include.paths | split: ',' -%} {%- assign alt_list = include.alts | split: ',' -%} {%- assign img_count = path_list | size -%} {%- assign opt_gallery = false -%}{%- if include.gallery -%}{%- assign opt_gallery = true -%}{%- endif -%} {%- assign opt_mobile = true -%}{%- if include.mobile_gallery == false -%}{%- assign opt_mobile = false -%}{%- endif -%} {%- assign is_gallery = false -%}{%- if opt_mobile or opt_gallery -%}{%- assign is_gallery = true -%}{%- endif -%} {%- assign is_loop = false -%}{%- if include.loop == true -%}{%- assign is_loop = true -%}{%- endif -%} {%- assign zoom_arrows = true -%}{%- if include.enable_zoom_arrows == false -%}{%- assign zoom_arrows = false -%}{%- endif -%} {%- assign no_swipe = false -%}{%- if include.swipe == false -%}{%- assign no_swipe = true -%}{%- endif -%} {%- comment -%} A single image is not a gallery: no carousel/arrows/counter, and no multi-image lightbox rebinding — let the theme's default per-image popup handle it. This makes every embed that routes through gallery.html degrade gracefully. {%- endcomment -%} {%- if img_count < 2 -%}{%- assign is_gallery = false -%}{%- assign zoom_arrows = false -%}{%- assign opt_gallery = false -%}{%- assign opt_mobile = false -%}{%- endif -%} {%- comment -%} Where the carousel CSS applies: both flags -> every width; desktop only -> wide screens; otherwise (mobile only, or none) -> narrow screens. When neither flag is set the block is inert (no .ss-gallery class). {%- endcomment -%} {%- if opt_gallery and opt_mobile -%}{%- assign gopen = '' -%}{%- assign gclose = '' -%}{%- elsif opt_gallery -%}{%- assign gopen = '@media all and (min-width: 850px) {' -%}{%- assign gclose = '}' -%}{%- else -%}{%- assign gopen = '@media all and (max-width: 849px) {' -%}{%- assign gclose = '}' -%}{%- endif -%}