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

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