Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

450 lignes
7.7 KiB

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