You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

463 regels
8.2 KiB

  1. @use '../../_global/styles/mixins' as *;
  2. @use '../../_global/styles/vars' as *;
  3. .gallery {
  4. --gallery-spacing: 8px;
  5. margin: var(--section-margin) 0;
  6. width: 100%;
  7. max-width: 880px;
  8. @media(min-width: 568px) {
  9. &.content-media-right {
  10. max-width: calc(50% - 15px);
  11. float: right;
  12. margin: 18px 0 20px 30px;
  13. @media(max-width: 767px) {
  14. max-width: calc(50% - 10px);
  15. margin: 14px 0 15px 20px;
  16. }
  17. &:first-child {
  18. margin-top: 0;
  19. }
  20. }
  21. &.content-media-left {
  22. max-width: calc(50% - 15px);
  23. float: left;
  24. margin: 18px 30px 20px 0;
  25. @media(max-width: 767px) {
  26. max-width: calc(50% - 10px);
  27. margin: 14px 20px 15px 0;
  28. }
  29. &:first-child {
  30. margin-top: 0;
  31. }
  32. }
  33. }
  34. .gallery-wrapper {
  35. display: flex;
  36. flex-wrap: wrap;
  37. margin: calc(var(--gallery-spacing) / -2);
  38. }
  39. .image {
  40. padding: calc(var(--gallery-spacing) / 2);
  41. flex: 1 1 100%;
  42. transition: 0.3s ease;
  43. transform: translate3d(0, 0, 0) scale(1);
  44. &.loading {
  45. opacity: 0;
  46. transform: translate3d(0, 0, 0) scale(0.9);
  47. }
  48. a {
  49. position: relative;
  50. display: block;
  51. background-color: var(--color-background);
  52. @include focus-visible;
  53. transition: 0.2s ease;
  54. &::before {
  55. content: '';
  56. position: relative;
  57. display: block;
  58. padding-top: 66.666667%;
  59. }
  60. &:after {
  61. content: "";
  62. @include full-size;
  63. opacity: 0;
  64. transition: 0.3s ease;
  65. }
  66. }
  67. img {
  68. position: absolute;
  69. top: 0;
  70. left: 0;
  71. width: 100%;
  72. height: 100%;
  73. object-fit: cover;
  74. }
  75. .copyright {
  76. @include copyright;
  77. opacity: 1 !important;
  78. }
  79. .btn {
  80. background-color: var(--color-button-tertiary-background);
  81. color: var(--color-button-tertiary-text);
  82. &:after {
  83. box-shadow: 0 0 0 var(--button-hover-shadow-size) var(--color-button-tertiary-background);
  84. }
  85. }
  86. }
  87. &[data-type="grid"] {
  88. .image {
  89. flex: 1 1 33.3333%;
  90. max-width: 33.3334%;
  91. @media(max-width: 567px) {
  92. flex: 1 1 50%;
  93. max-width: 50%;
  94. }
  95. }
  96. }
  97. &[data-type="first-image"], &[data-type="sinlge-image"] {
  98. .image a::after {
  99. display: none;
  100. }
  101. .btn {
  102. position: absolute;
  103. top: 0;
  104. right: 0;
  105. margin: 20px;
  106. }
  107. .image {
  108. transform: none;
  109. opacity: 1;
  110. position: relative;
  111. a {
  112. background-image: url('../../assets/img/preload.svg');
  113. background-size: 80px;
  114. background-position: center;
  115. background-repeat: no-repeat;
  116. display: block;
  117. }
  118. + .image {
  119. display: none;
  120. }
  121. }
  122. img {
  123. opacity: 0;
  124. transition: 0.3s ease;
  125. }
  126. &.loaded {
  127. img, .image-description, .image .copyright {
  128. opacity: 1;
  129. }
  130. }
  131. .gallery-wrapper {
  132. padding: 5px;
  133. > .image-description {
  134. font-weight: 400;
  135. font-size: 18px;
  136. line-height: 1.2;
  137. margin-top: 12px;
  138. }
  139. }
  140. img, .copyright, .image-description {
  141. opacity: 0;
  142. transition: 0.4s ease;
  143. }
  144. }
  145. &[data-type="masonry"] {
  146. .gallery-wrapper {
  147. flex-wrap: nowrap;
  148. align-items: flex-start;
  149. }
  150. .column {
  151. flex: 1 1 100%;
  152. }
  153. .image {
  154. a::before {
  155. @include full-size;
  156. padding: 0;
  157. }
  158. img {
  159. transition: 0.3s ease;
  160. opacity: 0;
  161. }
  162. &.loaded img {
  163. opacity: 1;
  164. }
  165. }
  166. }
  167. &[data-type='grid'] {
  168. .image:not(.loading):not(.loaded) {
  169. position: absolute;
  170. opacity: 0;
  171. pointer-events: none;
  172. }
  173. }
  174. &[data-type="masonry"], &[data-type="grid"] {
  175. .image-description {
  176. display: none !important;
  177. }
  178. .image a {
  179. overflow: hidden;
  180. &::after {
  181. @include icon-zoom;
  182. font-family: "Icons", sans-serif;
  183. display: flex;
  184. align-items: center;
  185. justify-content: center;
  186. z-index: 1;
  187. font-size: var(--icon-size);
  188. line-height: 1;
  189. color: var(--swatches-neutrals-white);
  190. opacity: 0;
  191. transition: 0.3s ease;
  192. }
  193. &::before {
  194. background-color: var(--color-text);
  195. opacity: 0;
  196. z-index: 1;
  197. transition: 0.3s ease;
  198. }
  199. img {
  200. transition: 0.3s ease;
  201. }
  202. &:hover, &.focus-visible:focus, &:focus-visible, &.-moz-focusring {
  203. &:before {
  204. opacity: 0.5;
  205. }
  206. &:after {
  207. opacity: 1;
  208. }
  209. img {
  210. transform: translate3d(0, 0, 0) scale(1.04);
  211. }
  212. }
  213. }
  214. }
  215. .button-wrapper {
  216. text-align: center;
  217. .btn {
  218. margin: 40px 0 0;
  219. background-color: var(--color-button-tertiary-background);
  220. color: var(--color-button-tertiary-text);
  221. @media(max-width: 767px) {
  222. margin-top: 24px;
  223. }
  224. }
  225. }
  226. &[data-infinite-scroll="true"] {
  227. .button-wrapper .btn {
  228. position: absolute;
  229. visibility: hidden;
  230. }
  231. }
  232. }
  233. .gallery-popup {
  234. position: fixed;
  235. top: 0;
  236. left: 0;
  237. width: 100%;
  238. height: calc(var(--viewport-height, 1vh) * 100);
  239. background-color: rgba(#0F1C28, 0.95);
  240. color: var(--swatches-neutrals-white);
  241. z-index: 100;
  242. @include hide;
  243. &.open {
  244. @include show;
  245. }
  246. .slide {
  247. &::before {
  248. content: '';
  249. position: absolute;
  250. width: 60px;
  251. height: 60px;
  252. top: 50%;
  253. left: 50%;
  254. margin: -30px;
  255. background-image: url('../../assets/img/preload.svg');
  256. background-size: 60px;
  257. filter: saturate(0) brightness(100);
  258. }
  259. }
  260. .image-box {
  261. position: relative;
  262. display: block;
  263. opacity: 1;
  264. max-width: 90%;
  265. transition: 0.3s ease;
  266. img {
  267. max-height: calc(var(--viewport-height, 1vh) * 74);
  268. @media(min-width: 1000px) {
  269. max-width: calc(100vw - 200px);
  270. }
  271. }
  272. .copyright {
  273. @include copyright;
  274. }
  275. }
  276. .text-box {
  277. color: var(--swatches-neutrals-white);
  278. font-size: 18px;
  279. display: flex;
  280. flex-direction: column;
  281. margin: 20px 20px -10px;
  282. .copyright {
  283. order: 1;
  284. font-size: 14px;
  285. font-style: italic;
  286. }
  287. @media(max-width: 767px) {
  288. font-size: 16px;
  289. }
  290. }
  291. .controls {
  292. .prev, .next {
  293. position: absolute;
  294. top: 50%;
  295. right: 0;
  296. display: block;
  297. width: 50px;
  298. height: 50px;
  299. font-size: 0;
  300. line-height: 0;
  301. text-align: center;
  302. padding: 10px 0;
  303. margin: -25px 15px;
  304. border: 0;
  305. background-color: transparent;
  306. color: var(--swatches-neutrals-white);
  307. cursor: pointer;
  308. &:before {
  309. @include icon-pfeil-rechts;
  310. font-family: "Icons", sans-serif;
  311. font-size: 30px;
  312. line-height: 1;
  313. }
  314. @media(max-width: 999px) {
  315. display: none;
  316. }
  317. }
  318. .prev {
  319. left: 0;
  320. transform: rotate(180deg);
  321. }
  322. .tabs {
  323. display: none;
  324. }
  325. .count {
  326. position: absolute;
  327. top: 25px;
  328. left: 50%;
  329. width: 120px;
  330. margin-left: -60px;
  331. text-align: center;
  332. font-size: 18px;
  333. span {
  334. margin: 0 5px;
  335. }
  336. }
  337. }
  338. .slide {
  339. position: relative;
  340. display: flex;
  341. flex-direction: column;
  342. justify-content: center;
  343. align-items: center;
  344. text-align: center;
  345. height: calc(var(--viewport-height, 1vh) * 100);
  346. transition: 0.4s linear;
  347. opacity: 1;
  348. &.preload .image-box {
  349. opacity: 0;
  350. }
  351. }
  352. .closer, .download {
  353. position: absolute;
  354. top: 0;
  355. width: 50px;
  356. height: 50px;
  357. font-size: 30px;
  358. line-height: 1;
  359. padding: 10px 0;
  360. color: var(--swatches-neutrals-white);
  361. background-color: transparent;
  362. margin: 15px;
  363. border: 0;
  364. cursor: pointer;
  365. z-index: 1;
  366. &:before {
  367. font-family: "Icons", sans-serif;
  368. }
  369. }
  370. .closer {
  371. right: 0;
  372. &::before {
  373. @include icon-schliessen;
  374. }
  375. }
  376. .download {
  377. left: 0;
  378. text-decoration: none;
  379. text-align: center;
  380. &::before {
  381. @include icon-download;
  382. }
  383. }
  384. a, button {
  385. @include focus-visible;
  386. }
  387. }
  388. .teaser, .slider {
  389. .gallery[data-type="first-image"] .image:before {
  390. padding-top: 66.6666%;
  391. }
  392. }