Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| components:carousel:glass [2026/07/07 12:57] – ayush | components:carousel:glass [2026/09/16 02:59] (current) – ayush | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| < | < | ||
| - | < | + | |
| - | <link rel=" | + | <link rel=" |
| - | <link rel=" | + | <link |
| + | | ||
| + | | ||
| + | /> | ||
| - | | + | |
| - | :root { | + | :root { |
| - | --swiper-pagination-color: | + | /* Swiper */ |
| - | --swiper-pagination-bullet-inactive-color: | + | |
| - | --swiper-pagination-bullet-inactive-opacity: | + | --swiper-pagination-bullet-inactive-color: |
| + | --swiper-pagination-bullet-inactive-opacity: | ||
| - | | + | /* Carousel */ |
| - | --c-max-h: | + | |
| - | --c-radius: 8px; | + | --c-max-h: 650px; |
| + | --c-radius: 8px; | ||
| - | | + | /* Caption */ |
| - | --cap-shrink-buffer: | + | |
| - | --cap-min-w: | + | --cap-shrink-buffer: |
| - | --cap-margin: | + | --cap-min-w: |
| - | --cap-bottom: | + | --cap-margin: |
| - | --cap-pad-v: | + | --cap-bottom: |
| - | --cap-pad-h: | + | --cap-pad-v: |
| - | --cap-radius: | + | --cap-pad-h: |
| - | --cap-dur: | + | --cap-radius: |
| - | --cap-ease: | + | --cap-dur: 0.55s; |
| - | --cap-enter-y: | + | --cap-ease: ease; |
| + | --cap-enter-y: | ||
| - | | + | |
| - | --glass-tint: 255 255 255; | + | |
| - | --glass-a1: | + | |
| - | --glass-a2: | + | |
| - | --glass-blur: | + | --glass-blur: 20px; |
| - | --glass-sat: 160%; | + | --glass-sat: 160%; |
| + | --glass-border-alpha: | ||
| + | --glass-rim-alpha: | ||
| + | --glass-glow-alpha: 0.18; | ||
| + | --glass-depth-alpha: 0.12; | ||
| + | --glass-shadow-y: 8px; | ||
| + | --glass-shadow-blur: | ||
| + | --glass-shadow-alpha: 0.38; | ||
| - | | + | |
| - | --glass-border-alpha: | + | --nav-glass-tint: 0 0 0; |
| - | --glass-rim-alpha: | + | --nav-glass-blur: |
| - | --glass-glow-alpha: | + | --nav-glass-sat: |
| - | --glass-depth-alpha: 0.12; | + | --nav-fill-default: |
| - | --glass-shadow-y: 8px; | + | --nav-fill-hover: |
| - | --glass-shadow-blur: 32px; | + | --nav-fill-active: |
| - | --glass-shadow-alpha: 0.38; | + | --nav-border-alpha: |
| + | --nav-rim-alpha: 0.32; | ||
| + | --nav-glow-alpha: | ||
| + | --nav-shadow: | ||
| + | 0 2px 14px rgb(0 0 0 / 0.5), 0 1px 3px rgb(0 0 0 / 0.28); | ||
| + | --nav-shadow-hover: | ||
| + | 0 4px 22px rgb(0 0 0 / 0.62), 0 2px 6px rgb(0 0 0 / 0.32); | ||
| + | --nav-size: clamp(36px, 5vw, 44px); | ||
| + | | ||
| + | --nav-stroke: 2; | ||
| + | | ||
| + | --nav-hover-scale: | ||
| + | --nav-press-scale: | ||
| + | --nav-dur: 0.3s; | ||
| + | --nav-ease: cubic-bezier(0.34, | ||
| + | --nav-press-dur: 0.1s; | ||
| - | | + | |
| - | --nav-glass-tint: 0 0 0; | + | --accent: #007bff; |
| - | --nav-glass-blur: | + | --accent-hover: |
| - | --nav-glass-sat: | + | |
| - | --nav-fill-default: | + | |
| - | --nav-fill-hover: | + | |
| - | --nav-fill-active: | + | |
| - | --nav-border-alpha: | + | |
| - | --nav-rim-alpha: | + | |
| - | --nav-glow-alpha: | + | |
| - | --nav-shadow: | + | |
| - | --nav-shadow-hover: | + | |
| - | --nav-size: | + | |
| - | --nav-icon: | + | |
| - | --nav-stroke: | + | |
| - | --nav-offset: | + | |
| - | --nav-hover-scale: | + | |
| - | --nav-press-scale: | + | |
| - | --nav-dur: | + | |
| - | --nav-ease: | + | |
| - | --nav-press-dur: | + | |
| - | | + | /* Typography */ |
| - | --accent-hover: #0056b3; | + | |
| + | --t-body: clamp(0.75rem, | ||
| + | --t-btn: clamp(0.75rem, | ||
| + | } | ||
| - | | + | /* Carousel */ |
| - | --t-body: | + | .carousel-wrapper { |
| - | | + | display: flex; |
| - | } | + | |
| + | width: 100%; | ||
| + | } | ||
| - | | + | |
| - | | + | width: 100%; |
| - | | + | max-width: var(--c-max-w); |
| - | width: 100%; | + | |
| - | } | + | |
| + | overscroll-behavior: | ||
| + | background: #e8e8e8; | ||
| + | box-shadow: 0 10px 25px rgb(0 0 0 / 0.12); | ||
| + | transition: box-shadow 0.3s ease; | ||
| - | .swiper | + | &: |
| - | | + | box-shadow: 0 16px 40px rgb(0 0 0 / 0.18); |
| - | max-width: var(--c-max-w); | + | } |
| - | border-radius: | + | } |
| - | overflow: hidden; | + | |
| - | overscroll-behavior: | + | |
| - | background: #e8e8e8; | + | |
| - | | + | |
| - | | + | |
| - | &:hover { box-shadow: 0 16px 40px rgb(0 0 0 / .18); } | + | .swiper-slide { |
| - | } | + | position: relative; |
| + | overflow: hidden; | ||
| + | height: clamp(300px, 55vw, var(--c-max-h)); | ||
| + | } | ||
| - | | + | |
| - | | + | |
| - | | + | width: 100%; |
| - | height: | + | height: |
| - | } | + | object-fit: cover; |
| + | } | ||
| - | .swiper-slide img { | + | /* Caption scrim */ |
| - | width: 100%; | + | |
| - | height: 100%; | + | |
| - | object-fit: cover; | + | |
| - | display: block; | + | |
| - | } | + | |
| - | /* gradient scrim for caption legibility */ | + | |
| - | | + | content: ""; |
| - | content: ""; | + | position: absolute; |
| - | position: absolute; | + | inset: auto 0 0; |
| - | inset: auto 0 0; | + | height: 55%; |
| - | height: 55%; | + | background: linear-gradient( |
| - | background: linear-gradient(to top, rgb(0 0 0 / .72), transparent); | + | |
| - | pointer-events: | + | |
| - | z-index: 1; | + | |
| - | } | + | |
| + | pointer-events: | ||
| + | z-index: 1; | ||
| + | } | ||
| - | | + | /* Caption */ |
| - | position: absolute; | + | |
| - | bottom: var(--cap-bottom); | + | position: absolute; |
| - | left: 50%; | + | bottom: var(--cap-bottom); |
| - | min-width: var(--cap-min-w); | + | left: 50%; |
| - | width: fit-content; | + | min-width: var(--cap-min-w); |
| - | max-width: min(var(--cap-max-w), | + | width: fit-content; |
| - | padding: var(--cap-pad-v) var(--cap-pad-h); | + | max-width: min( |
| - | border-radius: | + | |
| - | background: linear-gradient( | + | |
| - | 140deg, | + | |
| - | rgb(var(--glass-tint) / var(--glass-a1)) 0%, | + | padding: var(--cap-pad-v) var(--cap-pad-h); |
| - | rgb(var(--glass-tint) / var(--glass-a2)) 100% | + | border-radius: |
| - | ); | + | |
| - | backdrop-filter: | + | |
| - | -webkit-backdrop-filter: | + | |
| - | border: 1px solid rgb(255 255 255 / var(--glass-border-alpha)); | + | |
| - | border-top-color: | + | |
| - | box-shadow: | + | |
| - | 0 var(--glass-shadow-y) var(--glass-shadow-blur) rgb(0 0 0 / var(--glass-shadow-alpha)), | + | |
| - | inset 0 1px 0 rgb(255 255 255 / var(--glass-glow-alpha)), | + | |
| - | inset 0 -1px 0 rgb(0 | + | |
| - | color: #fff; | + | |
| - | text-align: center; | + | |
| - | text-rendering: | + | |
| - | transform: translateX(-50%) translateY(var(--cap-enter-y)); | + | |
| - | opacity: 0; | + | |
| - | transition: opacity var(--cap-dur) var(--cap-ease), | + | |
| - | transform var(--cap-dur) var(--cap-ease); | + | |
| - | z-index: 2; | + | |
| - | & h3 { | + | background: linear-gradient( |
| - | margin: 0 0 4px; | + | |
| - | | + | rgb(var(--glass-tint) / var(--glass-a1)) |
| - | font-weight: 700; | + | |
| - | letter-spacing: | + | ); |
| - | line-height: 1.2; | + | |
| - | padding-bottom: 4px; | + | |
| - | border-bottom: 1px solid rgb(255 255 255 / .25); | + | |
| - | | + | |
| - | } | + | |
| - | & p { | + | backdrop-filter: blur(var(--glass-blur)) |
| - | margin: 0 0 10px; | + | |
| - | font-size: var(--t-body); | + | |
| - | font-weight: 500; | + | |
| - | line-height: 1.5; | + | |
| - | text-wrap: balance; | + | |
| - | } | + | |
| - | & .slide-btn { | + | |
| - | display: inline-block; | + | |
| - | padding: .4em 1.2em; | + | |
| - | border-radius: 999px; | + | |
| - | background: var(--accent); | + | |
| - | | + | |
| - | font-size: | + | |
| - | font-weight: | + | |
| - | text-decoration: | + | |
| - | box-shadow: 0 3px 8px rgb(0 0 0 / .28); | + | |
| - | transition: background .22s ease, transform .22s ease, box-shadow .22s ease; | + | |
| - | &:hover { | + | border: 1px solid rgb(255 255 255 / var(--glass-border-alpha)); |
| - | background: var(--accent-hover); | + | |
| - | transform: translateY(-2px); | + | |
| - | box-shadow: 0 6px 16px rgb(0 0 0 / .38); | + | |
| - | } | + | |
| - | } | + | |
| - | } | + | |
| - | .swiper-slide-active .slide-caption { | + | border-top-color: rgb(255 255 255 / var(--glass-rim-alpha)); |
| - | opacity: 1; | + | |
| - | transform: translateX(-50%) translateY(0); | + | |
| - | } | + | |
| - | /* nav: typed @property lets the gradient fill animate between states */ | + | box-shadow: |
| - | | + | 0 var(--glass-shadow-y) var(--glass-shadow-blur) |
| - | | + | rgb(0 0 0 / var(--glass-shadow-alpha)), |
| - | | + | inset 0 1px 0 rgb(255 255 255 / var(--glass-glow-alpha)), |
| - | | + | inset 0 -1px 0 rgb(0 0 0 / var(--glass-depth-alpha)); |
| - | } | + | |
| - | .carousel-nav { | + | |
| - | -webkit-appearance: | + | text-align: center; |
| - | appearance: none; | + | text-rendering: optimizeLegibility; |
| - | -webkit-tap-highlight-color: | + | |
| - | user-select: none; | + | |
| - | -webkit-user-select: | + | |
| - | touch-action: | + | |
| - | outline: none; | + | |
| - | border: none; | + | |
| - | padding: 0; | + | |
| - | margin: 0; | + | |
| - | position: absolute; | + | |
| - | top: 50%; | + | |
| - | z-index: 10; | + | |
| - | display: flex; | + | |
| - | | + | |
| - | | + | |
| - | flex-shrink: | + | |
| - | cursor: pointer; | + | |
| - | width: var(--nav-size); | + | |
| - | height: var(--nav-size); | + | |
| - | border-radius: | + | |
| - | --nav-fill-a: | + | |
| - | background: linear-gradient( | + | |
| - | 135deg, | + | |
| - | rgb(var(--nav-glass-tint) / var(--nav-fill-a)) 0%, | + | |
| - | rgb(var(--nav-glass-tint) / max(0, calc(var(--nav-fill-a) - 0.20))) 100% | + | |
| - | ); | + | |
| - | backdrop-filter: | + | |
| - | -webkit-backdrop-filter: | + | |
| - | border: 1px solid rgb(255 255 255 / var(--nav-border-alpha)); | + | |
| - | border-top-color: | + | |
| - | box-shadow: var(--nav-shadow), | + | |
| - | color: #fff; | + | |
| - | transform: translateY(-50%); | + | |
| - | transition: --nav-fill-a .18s ease, box-shadow .18s ease, | + | |
| - | transform var(--nav-dur) var(--nav-ease); | + | |
| - | } | + | |
| - | .carousel-nav: | + | transform: translateX(-50%) translateY(var(--cap-enter-y)); |
| - | .carousel-nav--prev { left: | + | opacity: 0; |
| - | .carousel-nav--next { right: var(--nav-offset); | + | |
| - | .carousel-nav:hover { | + | transition: |
| - | | + | |
| - | box-shadow: | + | transform |
| - | transform: translateY(-50%) scale(var(--nav-hover-scale)); | + | |
| - | color: #fff; | + | |
| - | } | + | |
| - | .carousel-nav:active { | + | z-index: 2; |
| - | --nav-fill-a: | + | } |
| - | color: #fff; | + | |
| - | transform: translateY(-50%) scale(var(--nav-press-scale)); | + | |
| - | transition-duration: | + | |
| - | transition-timing-function: | + | |
| - | } | + | |
| - | | + | /* Scoped caption typography */ |
| - | | + | # |
| + | margin: 0 0 4px; | ||
| + | | ||
| + | border-bottom: 1px solid rgb(255 255 255 / 0.25); | ||
| - | .carousel-nav.swiper-button-disabled { opacity: .4; cursor: not-allowed; pointer-events: none; } | + | font-size: var(--t-title); |
| + | font-weight: 700; | ||
| + | line-height: 1.2; | ||
| + | letter-spacing: 0.5px; | ||
| - | .carousel-nav svg { | + | text-wrap: balance; |
| - | stroke: currentColor; | + | } |
| - | width: var(--nav-icon); | + | |
| - | height: var(--nav-icon); | + | |
| - | stroke-width: | + | |
| - | flex-shrink: | + | |
| - | shape-rendering: | + | |
| - | filter: drop-shadow(0 1px 3px rgb(0 0 0 / .5)); | + | |
| - | } | + | |
| - | | + | # |
| - | | + | |
| - | &:hover { transform: scale(1.25); | + | |
| - | } | + | |
| - | @media | + | font-size: var(--t-body); |
| - | | + | font-weight: 500; |
| - | | + | line-height: 1.5; |
| - | | + | |
| - | .swiper-pagination-bullet { transition: none; } | + | |
| - | } | + | |
| - | </ | + | |
| - | </ | + | |
| - | < | + | text-wrap: balance; |
| - | <div class=" | + | } |
| - | < | + | |
| - | <div class=" | + | |
| - | <div class=" | + | |
| - | <button class=" | + | #prom-swiper .slide-caption .slide-btn { |
| - | < | + | |
| - | | + | |
| - | | + | |
| - | < | + | |
| - | </ | + | |
| - | </ | + | |
| - | <button class=" | + | background: var(--accent); |
| - | < | + | color: #fff; |
| - | | + | |
| - | | + | |
| - | <path d=" | + | |
| - | </ | + | |
| - | </ | + | |
| - | </ | + | |
| - | </ | + | |
| - | <script type=" | + | font-size: var(--t-btn); |
| - | | + | |
| + | line-height: normal; | ||
| - | const BASE = ' | + | text-decoration: none; |
| - | const slides = [ | + | box-shadow: 0 3px 8px rgb(0 0 0 / 0.28); |
| - | { | + | |
| - | src: ' | + | |
| - | alt: ' | + | |
| - | title: ' | + | |
| - | desc: 'From 17 to 21 March, the PrePEP conference offered 84 oral presentations including 9 invited keynotes, as well as a poster session on 18 March.', | + | |
| - | cta: { href: ' | + | |
| - | }, | + | |
| - | { | + | |
| - | src: BASE + ' | + | |
| - | alt: ' | + | |
| - | title: 'PROM All-Hands Meeting 2024', | + | |
| - | desc: 'The PROM All-Hands Meeting 2024 took place in Leipzig on July 24-26 2024.', | + | |
| - | }, | + | |
| - | { | + | |
| - | src: BASE + ' | + | |
| - | alt: ' | + | |
| - | title: ' | + | |
| - | desc: 'In the PROM sub-project CORSIPP, scientists from the University of Leipzig are exploring the orographically influenced riming of snow particles, the associated secondary ice production and its effects on precipitation rates.', | + | |
| - | cta: { href: ' | + | |
| - | }, | + | |
| - | { | + | |
| - | src: BASE + ' | + | |
| - | alt: ' | + | |
| - | title: 'SPP PROM All-Hands Meeting', | + | |
| - | desc: 'The last PROM all-hands meeting took place in Kiel on 17-19 July 2023.', | + | |
| - | }, | + | |
| - | { | + | |
| - | src: BASE + ' | + | |
| - | alt: ' | + | |
| - | title: ' | + | |
| - | desc: ' | + | |
| - | }, | + | |
| - | { | + | |
| - | src: BASE + ' | + | |
| - | alt: ' | + | |
| - | title: ' | + | |
| - | desc: 'First TRIPEx-pol measurement campaign combining triple-frequency radar, Doppler spectra, and polarimetry took place in winter 2018/19 in Jülich close to Cologne.', | + | |
| - | }, | + | |
| - | { | + | |
| - | src: BASE + ' | + | |
| - | alt: ' | + | |
| - | title: ' | + | |
| - | desc: 'In addition to the dominant hydrometeor type, polarimetry allows to derive hydrometeor partitioning ratios, defined as the relative mass contribution of a specific hydrometeor type.', | + | |
| - | }, | + | |
| - | { | + | |
| - | src: BASE + ' | + | |
| - | alt: ' | + | |
| - | title: ' | + | |
| - | desc: ' | + | |
| - | }, | + | |
| - | { | + | |
| - | src: BASE + ' | + | |
| - | alt: ' | + | |
| - | title: ' | + | |
| - | desc: ' | + | |
| - | }, | + | |
| - | { | + | |
| - | src: BASE + ' | + | |
| - | alt: ' | + | |
| - | title: ' | + | |
| - | desc: ' | + | |
| - | }, | + | |
| - | { | + | |
| - | src: BASE + ' | + | |
| - | alt: ' | + | |
| - | title: ' | + | |
| - | desc: 'Ice (top) and snow contributions (bottom) to Quasi-Vertical-Profiles of reflectivity derived from BoXPol measurements assuming an exponential distribution.', | + | |
| - | }, | + | |
| - | { | + | |
| - | src: BASE + ' | + | |
| - | alt: ' | + | |
| - | title: ' | + | |
| - | desc: ' | + | |
| - | }, | + | |
| - | { | + | |
| - | src: BASE + ' | + | |
| - | alt: ' | + | |
| - | title: ' | + | |
| - | desc: ' | + | |
| - | }, | + | |
| - | { | + | |
| - | src: BASE + ' | + | |
| - | alt: ' | + | |
| - | title: ' | + | |
| - | desc: ' | + | |
| - | }, | + | |
| - | ]; | + | |
| - | | + | transition: |
| + | background 0.22s ease, | ||
| + | transform 0.22s ease, | ||
| + | box-shadow 0.22s ease; | ||
| + | } | ||
| + | |||
| + | # | ||
| + | background: var(--accent-hover); | ||
| + | color: #fff; | ||
| + | transform: translateY(-2px); | ||
| + | box-shadow: 0 6px 16px rgb(0 0 0 / 0.38); | ||
| + | } | ||
| + | |||
| + | .swiper-slide-active .slide-caption { | ||
| + | opacity: 1; | ||
| + | transform: translateX(-50%) translateY(0); | ||
| + | } | ||
| + | |||
| + | /* Navigation */ | ||
| + | @property --nav-fill-a { | ||
| + | syntax: "< | ||
| + | inherits: false; | ||
| + | initial-value: | ||
| + | } | ||
| + | |||
| + | .carousel-nav { | ||
| + | -webkit-appearance: | ||
| + | appearance: none; | ||
| + | -webkit-tap-highlight-color: | ||
| + | |||
| + | user-select: | ||
| + | -webkit-user-select: | ||
| + | touch-action: | ||
| + | |||
| + | outline: none; | ||
| + | border: none; | ||
| + | padding: 0; | ||
| + | margin: 0; | ||
| + | |||
| + | position: absolute; | ||
| + | top: 50%; | ||
| + | z-index: 10; | ||
| + | |||
| + | display: flex; | ||
| + | align-items: | ||
| + | justify-content: | ||
| + | flex-shrink: | ||
| + | |||
| + | cursor: pointer; | ||
| + | |||
| + | width: var(--nav-size); | ||
| + | height: var(--nav-size); | ||
| + | border-radius: | ||
| + | |||
| + | --nav-fill-a: | ||
| + | |||
| + | background: linear-gradient( | ||
| + | 135deg, | ||
| + | rgb(var(--nav-glass-tint) / var(--nav-fill-a)) 0%, | ||
| + | rgb( | ||
| + | var(--nav-glass-tint) / | ||
| + | max(0, calc(var(--nav-fill-a) - 0.2)) | ||
| + | ) | ||
| + | 100% | ||
| + | ); | ||
| + | |||
| + | backdrop-filter: | ||
| + | saturate(var(--nav-glass-sat)); | ||
| + | |||
| + | -webkit-backdrop-filter: | ||
| + | saturate(var(--nav-glass-sat)); | ||
| + | |||
| + | border: 1px solid rgb(255 255 255 / var(--nav-border-alpha)); | ||
| + | |||
| + | border-top-color: | ||
| + | |||
| + | box-shadow: | ||
| + | var(--nav-shadow), | ||
| + | inset 0 1px 0 rgb(255 255 255 / var(--nav-glow-alpha)); | ||
| + | |||
| + | color: #fff; | ||
| + | |||
| + | transform: translateY(-50%); | ||
| + | |||
| + | transition: | ||
| + | --nav-fill-a 0.18s ease, | ||
| + | box-shadow 0.18s ease, | ||
| + | transform var(--nav-dur) var(--nav-ease); | ||
| + | } | ||
| + | |||
| + | .carousel-nav:: | ||
| + | border: 0; | ||
| + | padding: 0; | ||
| + | } | ||
| + | |||
| + | .carousel-nav--prev { | ||
| + | left: var(--nav-offset); | ||
| + | } | ||
| + | |||
| + | .carousel-nav--next { | ||
| + | right: var(--nav-offset); | ||
| + | } | ||
| + | |||
| + | .carousel-nav: | ||
| + | --nav-fill-a: | ||
| + | |||
| + | box-shadow: | ||
| + | var(--nav-shadow-hover), | ||
| + | inset 0 1px 0 rgb(255 255 255 / var(--nav-glow-alpha)); | ||
| + | |||
| + | color: #fff; | ||
| + | |||
| + | transform: translateY(-50%) scale(var(--nav-hover-scale)); | ||
| + | } | ||
| + | |||
| + | .carousel-nav: | ||
| + | --nav-fill-a: | ||
| + | |||
| + | color: #fff; | ||
| + | |||
| + | transform: translateY(-50%) scale(var(--nav-press-scale)); | ||
| + | |||
| + | transition-duration: | ||
| + | transition-timing-function: | ||
| + | } | ||
| + | |||
| + | .carousel-nav: | ||
| + | outline: 0; | ||
| + | } | ||
| + | |||
| + | .carousel-nav: | ||
| + | outline: 2px solid rgb(255 255 255 / 0.75); | ||
| + | outline-offset: | ||
| + | } | ||
| + | |||
| + | .carousel-nav.swiper-button-disabled { | ||
| + | opacity: 0.4; | ||
| + | cursor: not-allowed; | ||
| + | pointer-events: | ||
| + | } | ||
| + | |||
| + | .carousel-nav svg { | ||
| + | width: var(--nav-icon); | ||
| + | height: var(--nav-icon); | ||
| + | |||
| + | flex-shrink: | ||
| + | |||
| + | stroke: currentColor; | ||
| + | stroke-width: | ||
| + | |||
| + | shape-rendering: | ||
| + | |||
| + | filter: drop-shadow(0 1px 3px rgb(0 0 0 / 0.5)); | ||
| + | } | ||
| + | |||
| + | /* Pagination */ | ||
| + | .swiper-pagination-bullet { | ||
| + | transition: transform 0.2s ease; | ||
| + | |||
| + | &:hover { | ||
| + | transform: scale(1.25); | ||
| + | } | ||
| + | } | ||
| + | |||
| + | /* Reduced motion */ | ||
| + | @media (prefers-reduced-motion: | ||
| + | .slide-caption, | ||
| + | .swiper-slide-active .slide-caption, | ||
| + | .carousel-nav, | ||
| + | .swiper-pagination-bullet { | ||
| + | transition: none; | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | |||
| + | < | ||
| + | class=" | ||
| + | aria-label=" | ||
| + | > | ||
| + | <svg | ||
| + | xmlns=" | ||
| + | viewBox=" | ||
| + | fill=" | ||
| + | stroke=" | ||
| + | stroke-linecap=" | ||
| + | stroke-linejoin=" | ||
| + | aria-hidden=" | ||
| + | > | ||
| + | <path d=" | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | class=" | ||
| + | aria-label=" | ||
| + | > | ||
| + | <svg | ||
| + | xmlns=" | ||
| + | viewBox=" | ||
| + | fill=" | ||
| + | stroke=" | ||
| + | stroke-linecap=" | ||
| + | stroke-linejoin=" | ||
| + | aria-hidden=" | ||
| + | > | ||
| + | <path d=" | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <script type=" | ||
| + | import Swiper from " | ||
| + | |||
| + | const BASE = | ||
| + | " | ||
| + | |||
| + | const slides = [ | ||
| + | { | ||
| + | src: " | ||
| + | alt: " | ||
| + | title: " | ||
| + | desc: "From 17 to 21 March, the PrePEP conference offered 84 oral presentations including 9 invited keynotes, as well as a poster session on 18 March.", | ||
| + | cta: { | ||
| + | href: " | ||
| + | text: "More Information", | ||
| + | }, | ||
| + | }, | ||
| + | { | ||
| + | src: BASE + " | ||
| + | alt: "PROM All-Hands Meeting 2024", | ||
| + | title: "PROM All-Hands Meeting 2024", | ||
| + | desc: "The PROM All-Hands Meeting 2024 took place in Leipzig on July 24-26 2024.", | ||
| + | }, | ||
| + | { | ||
| + | src: BASE + " | ||
| + | alt: " | ||
| + | title: " | ||
| + | desc: "In the PROM sub-project CORSIPP, scientists from the University of Leipzig are exploring the orographically influenced riming of snow particles, the associated secondary ice production and its effects on precipitation rates.", | ||
| + | cta: { | ||
| + | href: " | ||
| + | text: "More Information", | ||
| + | }, | ||
| + | }, | ||
| + | { | ||
| + | src: BASE + " | ||
| + | alt: "SPP PROM All-Hands Meeting", | ||
| + | title: "SPP PROM All-Hands Meeting", | ||
| + | desc: "The last PROM all-hands meeting took place in Kiel on 17-19 July 2023.", | ||
| + | }, | ||
| + | { | ||
| + | src: BASE + " | ||
| + | alt: " | ||
| + | title: " | ||
| + | desc: " | ||
| + | }, | ||
| + | { | ||
| + | src: BASE + " | ||
| + | alt: " | ||
| + | title: " | ||
| + | desc: "First TRIPEx-pol measurement campaign combining triple-frequency radar, Doppler spectra, and polarimetry took place in winter 2018/19 in Jülich close to Cologne.", | ||
| + | }, | ||
| + | { | ||
| + | src: BASE + " | ||
| + | alt: " | ||
| + | title: " | ||
| + | desc: "In addition to the dominant hydrometeor type, polarimetry allows to derive hydrometeor partitioning ratios, defined as the relative mass contribution of a specific hydrometeor type.", | ||
| + | }, | ||
| + | { | ||
| + | src: BASE + " | ||
| + | alt: " | ||
| + | title: " | ||
| + | desc: " | ||
| + | }, | ||
| + | { | ||
| + | src: BASE + " | ||
| + | alt: " | ||
| + | title: " | ||
| + | desc: " | ||
| + | }, | ||
| + | { | ||
| + | src: BASE + " | ||
| + | alt: " | ||
| + | title: " | ||
| + | desc: " | ||
| + | }, | ||
| + | { | ||
| + | src: BASE + " | ||
| + | alt: " | ||
| + | title: " | ||
| + | desc: "Ice (top) and snow contributions (bottom) to Quasi-Vertical-Profiles of reflectivity derived from BoXPol measurements assuming an exponential distribution.", | ||
| + | }, | ||
| + | { | ||
| + | src: BASE + " | ||
| + | alt: " | ||
| + | title: " | ||
| + | desc: " | ||
| + | }, | ||
| + | { | ||
| + | src: BASE + " | ||
| + | alt: " | ||
| + | title: " | ||
| + | desc: " | ||
| + | }, | ||
| + | { | ||
| + | src: BASE + " | ||
| + | alt: " | ||
| + | title: " | ||
| + | desc: " | ||
| + | }, | ||
| + | ]; | ||
| + | |||
| + | | ||
| <div class=" | <div class=" | ||
| - | <img src=" | + | <img src=" |
| <div class=" | <div class=" | ||
| < | < | ||
| < | < | ||
| - | ${cta ? `<a class=" | + | ${cta ? `<a class=" |
| </ | </ | ||
| </ | </ | ||
| - | | + | |
| - | slides.map(renderSlide).join('' | + | slides.map(renderSlide).join("" |
| - | | + | |
| - | document.querySelectorAll('.carousel-nav').forEach(btn => | + | document |
| - | btn.addEventListener('mousedown', e => e.preventDefault()) | + | |
| - | ); | + | |
| + | btn.addEventListener("mousedown", (e) => | ||
| + | | ||
| + | | ||
| + | ); | ||
| - | | + | |
| - | function fitCaptionsToBalancedText() { | + | function fitCaptionsToBalancedText() { |
| - | const captions = [...document.querySelectorAll('.slide-caption')]; | + | const captions = [ |
| - | if (!captions.length) return; | + | |
| + | | ||
| + | if (!captions.length) return; | ||
| - | | + | |
| - | void document.body.getBoundingClientRect(); | + | void document.body.getBoundingClientRect(); |
| - | | + | |
| - | let maxLines = 0; | + | let maxLines = 0; |
| - | caption.querySelectorAll('h3, p').forEach(el => { | + | caption.querySelectorAll("h3, p").forEach((el) => { |
| - | const lh = parseFloat(getComputedStyle(el).lineHeight); | + | const lh = parseFloat(getComputedStyle(el).lineHeight); |
| - | if (!lh) return; | + | if (!lh) return; |
| - | const lines = Math.round(el.getBoundingClientRect().height / lh); | + | const lines = Math.round( |
| - | if (lines > maxLines) maxLines = lines; | + | |
| - | }); | + | |
| - | return { caption, maxLines }; | + | if (lines > maxLines) maxLines = lines; |
| - | }); | + | }); |
| + | return { caption, maxLines }; | ||
| + | }); | ||
| - | | + | |
| - | ' | + | |
| - | )]; | + | " |
| - | textEls.forEach(el => (el.style.whiteSpace = 'nowrap')); | + | ), |
| - | void document.body.getBoundingClientRect(); | + | |
| + | textEls.forEach((el) => (el.style.whiteSpace = "nowrap")); | ||
| + | void document.body.getBoundingClientRect(); | ||
| - | | + | |
| - | d.maxContent = 0; | + | d.maxContent = 0; |
| - | d.caption.querySelectorAll('h3, p').forEach(el => { | + | d.caption.querySelectorAll("h3, p").forEach((el) => { |
| - | if (el.scrollWidth > d.maxContent) d.maxContent = el.scrollWidth; | + | if (el.scrollWidth > d.maxContent) |
| - | }); | + | |
| - | const btn = d.caption.querySelector('.slide-btn'); | + | }); |
| - | d.btnW = btn ? btn.getBoundingClientRect().width : 0; | + | const btn = d.caption.querySelector(".slide-btn"); |
| - | }); | + | d.btnW = btn ? btn.getBoundingClientRect().width : 0; |
| + | }); | ||
| - | | + | |
| - | | + | |
| - | if (maxLines <= 1 || !maxContent) return; | + | if (maxLines <= 1 || !maxContent) return; |
| - | const cs = getComputedStyle(caption); | + | const cs = getComputedStyle(caption); |
| - | const buffer | + | const buffer = |
| - | const padH = parseFloat(cs.paddingLeft) + parseFloat(cs.paddingRight); | + | |
| - | const contentW = Math.max(maxContent / maxLines + buffer, btnW); | + | |
| - | caption.style.width = `${Math.ceil(contentW + padH)}px`; | + | |
| - | }); | + | const padH = |
| - | } | + | |
| + | | ||
| + | const contentW = Math.max( | ||
| + | | ||
| + | | ||
| + | | ||
| + | caption.style.width = `${Math.ceil(contentW + padH)}px`; | ||
| + | }); | ||
| + | } | ||
| - | | + | |
| + | "(prefers-reduced-motion: | ||
| + | | ||
| - | | + | |
| - | loop: | + | loop: true, |
| - | speed: | + | speed: reducedMotion ? 1 : 700, |
| - | grabCursor: true, | + | grabCursor: true, |
| - | effect: | + | effect: |
| - | fadeEffect: { crossFade: true }, | + | fadeEffect: { crossFade: true }, |
| - | | + | |
| - | delay: | + | delay: 20000, |
| - | disableOnInteraction: | + | disableOnInteraction: |
| - | pauseOnMouseEnter: | + | pauseOnMouseEnter: |
| - | }, | + | }, |
| - | | + | |
| - | el: '.swiper-pagination', | + | el: ".swiper-pagination", |
| - | clickable: | + | clickable: true, |
| - | dynamicBullets: | + | dynamicBullets: |
| - | }, | + | }, |
| - | | + | |
| - | prevEl: | + | prevEl: |
| - | nextEl: | + | nextEl: |
| - | }, | + | }, |
| - | | + | |
| - | | + | |
| - | prevSlideMessage: | + | prevSlideMessage: |
| - | nextSlideMessage: | + | nextSlideMessage: |
| - | paginationBulletMessage: | + | paginationBulletMessage: |
| - | }, | + | }, |
| - | }); | + | }); |
| - | | + | |
| - | | + | |
| - | window.addEventListener('resize', () => { | + | window.addEventListener("resize", () => { |
| - | clearTimeout(resizeTimer); | + | clearTimeout(resizeTimer); |
| - | resizeTimer = setTimeout(fitCaptionsToBalancedText, | + | resizeTimer = setTimeout(fitCaptionsToBalancedText, |
| - | }); | + | }); |
| - | | + | |
| - | const imgs = [...document.querySelectorAll('# | + | const imgs = [ |
| - | const setWC = v => imgs.forEach(img => (img.style.willChange = v)); | + | |
| - | swiper.on('slideChangeTransitionStart', () => setWC('opacity')); | + | |
| - | swiper.on('slideChangeTransitionEnd', | + | const setWC = (v) => |
| + | | ||
| + | swiper.on("slideChangeTransitionStart", () => setWC("opacity")); | ||
| + | swiper.on("slideChangeTransitionEnd", () => setWC("auto")); | ||
| - | | + | |
| - | new IntersectionObserver( | + | new IntersectionObserver( |
| - | ([entry]) => entry.isIntersecting | + | ([entry]) => |
| - | ? swiper.autoplay.start() | + | |
| - | : swiper.autoplay.stop(), | + | ? swiper.autoplay.start() |
| - | { threshold: 0.2 } | + | : swiper.autoplay.stop(), |
| - | ).observe(document.getElementById('prom-swiper')); | + | { threshold: 0.2 }, |
| - | </ | + | ).observe(document.getElementById("prom-swiper")); |
| - | </ | + | </ |
| + | </ | ||
| </ | </ | ||
| + | |||