gallery.less 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. .gallery{
  2. display: flex;
  3. overflow: hidden;
  4. width: 100%;
  5. padding-bottom: 56.25%;
  6. position: relative;
  7. margin-bottom: 86px;
  8. img{
  9. width: 100%;
  10. position: absolute;
  11. }
  12. .splide__list{
  13. height: 60px;
  14. }
  15. .splide__slide {
  16. opacity: 0.6;
  17. transition: .3s;
  18. overflow: hidden;
  19. }
  20. .splide__slide.is-active {
  21. opacity: 1;
  22. }
  23. }
  24. @keyframes galleryButtonAnimation {
  25. 0%{
  26. transform: scale(1,1);
  27. }
  28. 50%{
  29. transform: scale(1.3,1.3);
  30. }
  31. 100%{
  32. transform: scale(1.2,1.2);
  33. }
  34. }
  35. .gallery-wrapper{
  36. position: relative;
  37. transition: 0.2s;
  38. margin-left: auto;
  39. margin-right: auto;
  40. min-height:340px;
  41. width:90%;
  42. padding-bottom: 18px;
  43. .fullscreenButton{
  44. position:absolute;
  45. top:20px;
  46. right: 20px;
  47. display: block;
  48. width: 28px;
  49. height: 28px;
  50. background-image: url("/img/fullscreen.svg");
  51. background-size: contain;
  52. transition: 0.2s;
  53. filter: brightness(24%);
  54. opacity: 45%;
  55. &:hover{
  56. transform: scale(1.2,1.2);
  57. animation: galleryButtonAnimation 0.3s ease-in-out;
  58. }
  59. }
  60. &.fullscreen{
  61. .gallery{
  62. height: 150px;
  63. }
  64. position: fixed;
  65. top: 0px;
  66. left: 0px;
  67. width: 100%;
  68. height: 100%;
  69. max-width: 100% !important;
  70. z-index: 9999999999;
  71. background: #000000d4;
  72. display: flex;
  73. flex-direction: column;
  74. justify-items: center;
  75. .gallery-view{
  76. width: 100%;
  77. height: calc(100% - 150px);
  78. display: flex;
  79. justify-content: center;
  80. flex-grow: 1;
  81. .splide__slide{
  82. padding-bottom: 0;
  83. height: 100%;
  84. img{
  85. position: relative;
  86. width: auto !important;
  87. height: auto !important;
  88. }
  89. }
  90. }
  91. .fullscreenButton{
  92. background-image: url("/img/close.svg");
  93. filter: invert(1);
  94. opacity: 1;
  95. }
  96. }
  97. }
  98. .splide{
  99. &.gallery-view{
  100. margin-bottom: 8px;
  101. .splide__slide{
  102. padding-bottom: 56.25%;
  103. height: 0;
  104. overflow: hidden;
  105. display: flex;
  106. justify-content: center;
  107. .image-capture{
  108. display: block;
  109. position: absolute;
  110. width: 100%;
  111. text-align: center;
  112. bottom: 0;
  113. background: #00000078;
  114. color: white;
  115. z-index: 1;
  116. padding: 5px 20px;
  117. font: 14px/16px "Golos Text",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Ubuntu,Arial,sans-serif;
  118. }
  119. img{
  120. position: absolute;
  121. max-width: 100%;
  122. max-height: 100%;
  123. width: auto !important;
  124. margin: auto;
  125. top: 0;
  126. bottom: 0;
  127. }
  128. }
  129. }
  130. }