gallery.less 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. .fullscreenButton{
  39. position:absolute;
  40. top:20px;
  41. right: 20px;
  42. display: block;
  43. width: 28px;
  44. height: 28px;
  45. background-image: url("/img/fullscreen.svg");
  46. background-size: contain;
  47. transition: 0.2s;
  48. filter: brightness(24%);
  49. opacity: 45%;
  50. &:hover{
  51. transform: scale(1.2,1.2);
  52. animation: galleryButtonAnimation 0.3s ease-in-out;
  53. }
  54. }
  55. &.fullscreen{
  56. .gallery{
  57. height: 150px;
  58. }
  59. position: fixed;
  60. top: 0px;
  61. left: 0px;
  62. width: 100%;
  63. height: 100%;
  64. max-width: 100% !important;
  65. z-index: 9999999999;
  66. background: #000000d4;
  67. display: flex;
  68. flex-direction: column;
  69. justify-items: center;
  70. .gallery-view{
  71. width: 100%;
  72. height: calc(100% - 150px);
  73. display: flex;
  74. justify-content: center;
  75. flex-grow: 1;
  76. .splide__slide{
  77. padding-bottom: 0;
  78. height: 100%;
  79. img{
  80. position: relative;
  81. width: auto !important;
  82. height: auto !important;
  83. }
  84. }
  85. }
  86. .fullscreenButton{
  87. background-image: url("/img/close.svg");
  88. filter: invert(1);
  89. opacity: 1;
  90. }
  91. }
  92. }
  93. .splide{
  94. &.gallery-view{
  95. margin-bottom: 8px;
  96. .splide__slide{
  97. padding-bottom: 56.25%;
  98. height: 0;
  99. overflow: hidden;
  100. display: flex;
  101. justify-content: center;
  102. .image-capture{
  103. display: block;
  104. position: absolute;
  105. width: 100%;
  106. text-align: center;
  107. bottom: 0;
  108. background: #00000078;
  109. color: white;
  110. z-index: 1;
  111. padding: 5px 20px;
  112. font: 14px/16px "Golos Text",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Ubuntu,Arial,sans-serif;
  113. }
  114. img{
  115. position: absolute;
  116. max-width: 100%;
  117. max-height: 100%;
  118. width: auto !important;
  119. margin: auto;
  120. top: 0;
  121. bottom: 0;
  122. }
  123. }
  124. }
  125. }