Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

461 строка
8.1 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. @media(max-width: 767px) {
  220. margin-top: 24px;
  221. }
  222. }
  223. }
  224. &[data-infinite-scroll="true"] {
  225. .button-wrapper .btn {
  226. position: absolute;
  227. visibility: hidden;
  228. }
  229. }
  230. }
  231. .gallery-popup {
  232. position: fixed;
  233. top: 0;
  234. left: 0;
  235. width: 100%;
  236. height: calc(var(--viewport-height, 1vh) * 100);
  237. background-color: rgba(#0F1C28, 0.95);
  238. color: var(--swatches-neutrals-white);
  239. z-index: 100;
  240. @include hide;
  241. &.open {
  242. @include show;
  243. }
  244. .slide {
  245. &::before {
  246. content: '';
  247. position: absolute;
  248. width: 60px;
  249. height: 60px;
  250. top: 50%;
  251. left: 50%;
  252. margin: -30px;
  253. background-image: url('../../assets/img/preload.svg');
  254. background-size: 60px;
  255. filter: saturate(0) brightness(100);
  256. }
  257. }
  258. .image-box {
  259. position: relative;
  260. display: block;
  261. opacity: 1;
  262. max-width: 90%;
  263. transition: 0.3s ease;
  264. img {
  265. max-height: calc(var(--viewport-height, 1vh) * 74);
  266. @media(min-width: 1000px) {
  267. max-width: calc(100vw - 200px);
  268. }
  269. }
  270. .copyright {
  271. @include copyright;
  272. }
  273. }
  274. .text-box {
  275. color: var(--swatches-neutrals-white);
  276. font-size: 18px;
  277. display: flex;
  278. flex-direction: column;
  279. margin: 20px 20px -10px;
  280. .copyright {
  281. order: 1;
  282. font-size: 14px;
  283. font-style: italic;
  284. }
  285. @media(max-width: 767px) {
  286. font-size: 16px;
  287. }
  288. }
  289. .controls {
  290. .prev, .next {
  291. position: absolute;
  292. top: 50%;
  293. right: 0;
  294. display: block;
  295. width: 50px;
  296. height: 50px;
  297. font-size: 0;
  298. line-height: 0;
  299. text-align: center;
  300. padding: 10px 0;
  301. margin: -25px 15px;
  302. border: 0;
  303. background-color: transparent;
  304. color: var(--swatches-neutrals-white);
  305. cursor: pointer;
  306. &:before {
  307. @include icon-pfeil-rechts;
  308. font-family: "Icons", sans-serif;
  309. font-size: 30px;
  310. line-height: 1;
  311. }
  312. @media(max-width: 999px) {
  313. display: none;
  314. }
  315. }
  316. .prev {
  317. left: 0;
  318. transform: rotate(180deg);
  319. }
  320. .tabs {
  321. display: none;
  322. }
  323. .count {
  324. position: absolute;
  325. top: 25px;
  326. left: 50%;
  327. width: 120px;
  328. margin-left: -60px;
  329. text-align: center;
  330. font-size: 18px;
  331. span {
  332. margin: 0 5px;
  333. }
  334. }
  335. }
  336. .slide {
  337. position: relative;
  338. display: flex;
  339. flex-direction: column;
  340. justify-content: center;
  341. align-items: center;
  342. text-align: center;
  343. height: calc(var(--viewport-height, 1vh) * 100);
  344. transition: 0.4s linear;
  345. opacity: 1;
  346. &.preload .image-box {
  347. opacity: 0;
  348. }
  349. }
  350. .closer, .download {
  351. position: absolute;
  352. top: 0;
  353. width: 50px;
  354. height: 50px;
  355. font-size: 30px;
  356. line-height: 1;
  357. padding: 10px 0;
  358. color: var(--swatches-neutrals-white);
  359. background-color: transparent;
  360. margin: 15px;
  361. border: 0;
  362. cursor: pointer;
  363. z-index: 1;
  364. &:before {
  365. font-family: "Icons", sans-serif;
  366. }
  367. }
  368. .closer {
  369. right: 0;
  370. &::before {
  371. @include icon-schliessen;
  372. }
  373. }
  374. .download {
  375. left: 0;
  376. text-decoration: none;
  377. text-align: center;
  378. &::before {
  379. @include icon-download;
  380. }
  381. }
  382. a, button {
  383. @include focus-visible;
  384. }
  385. }
  386. .teaser, .slider {
  387. .gallery[data-type="first-image"] .image:before {
  388. padding-top: 66.6666%;
  389. }
  390. }