Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

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