Blame view

public/scss/blocks/_img-viewer.scss 4.47 KB
242debab8   thesolarwind   Первый коммит в п...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
  .img-viewer {
      position: fixed;
      top: 0;
      left: 0;
      z-index: 100;
      display: flex;
      width: 100%;
      height: 100%;
      padding: 0 20px;
      opacity: 0;
      visibility: hidden;
      background: rgba(3, 9, 15, 0.6);
      backdrop-filter: blur(10px);
      transition: .3s;
      overflow-y: auto;
  
      @media (min-width: 1200px) {
          padding: 0 100px;
      }
  
      &.active {
          opacity: 1;
          visibility: visible;
      }
  
  
      &__wrap {
          position: relative;
          max-width: 1010px;
          width: 100%;
          height: 310px;
          margin: auto;
          box-shadow: 0px 4px 32px rgba(14, 56, 94, 0.12);
  
          @media (min-width: 640px) {
              height: 67.5%;
          }
      }
  
      &__close {
          position: absolute;
          top: 0;
          right: 0;
          z-index: 5;
          width: 60px;
          height: 60px;
          display: flex;
          align-items: center;
          justify-content: center;
  
          svg {
              fill: $white;
              transition: .3s;
          }
  
          &:hover {
              svg {
                  @media (min-width: 1200px) {
                      fill: $main;
                  }
              }
          }
      }
  
      &__thumbs {
          position: absolute;
          z-index: 5;
          bottom: 16px;
          left: 20px;
          max-width: 224px;
          width: 100%;
  
          @media (min-width: 640px) {
              left: 0;
              right: 0;
              bottom: 20px;
              margin: 0 auto;
              max-width: 380px;
          }
      }
  
      &__thumbs-swiper {
  
          .swiper-slide {
              height: 46px;
              border-radius: 10px;
              overflow: hidden;
              user-select: none;
              cursor: pointer;
  
              @media (min-width: 640px) {
                  height: 80px;
              }
  
              img {
                  width: 100%;
                  height: 100%;
                  object-fit: cover;
              }
          }
      }
  
      &__slider {
          height: 100%;
  
          .swiper-button-prev,
          .swiper-button-next {
              display: none;
  
              @media (min-width: 1200px) {
                  display: flex;
                  top: 50%;
                  transform: translateY(-50%);
                  width: 40px;
                  height: 40px;
                  border-radius: 10px;
                  border: 1px solid $white;
                  margin: 0;
                  transition: .3s;
              }
  
              &:after {
                  display: none;
              }
  
              svg {
                  stroke: $white;
                  transition: .3s;
              }
  
              &:hover {
                  @media (min-width: 1200px) {
                      background-color: $white;
                  }
  
                  svg {
                      @media (min-width: 1200px) {
                          stroke: $main;
                      }
                  }
              }
          }
  
          .swiper-button-prev {
              left: -70px;
          }
  
          .swiper-button-next {
              svg {
                  transform: rotate(180deg);
              }
  
              right: -70px;
          }
  
      }
  
      &__slider-swiper {
          height: 100%;
          border-radius: 20px;
  
          .swiper-slide {
              position: relative;
              border-radius: 20px;
              overflow: hidden;
              user-select: none;
  
              img {
                  width: 100%;
                  height: 100%;
                  object-fit: cover;
              }
  
              &::before {
                  content: '';
                  position: absolute;
                  top: 0;
                  left: 0;
                  width: 100%;
                  height: 100%;
                  background: rgba(3, 9, 15, 0.3);
              }
          }
      }
  
      &__caption {
          position: absolute;
          top: calc(100% + 12px);
          left: 0;
          right: 0;
          z-index: 5;
          color: $white;
          font-size: 16px;
          line-height: 22px;
          font-weight: 600;
          text-align: center;
          user-select: none;
  
          @media (min-width: 640px) {
              top: 102.3%;
          }
      }
  
      &__sizeoff {
          position: absolute;
          right: 20px;
          bottom: 20px;
          z-index: 1;
          width: 30px;
          height: 30px;
          display: flex;
          align-items: center;
          justify-content: center;
          background-color: #EDF7FF;
          opacity: 0.8;
          border-radius: 5px;
          transition: .3s;
  
          &:hover {
              @media (min-width: 1200px) {
                  opacity: 1;
              }
          }
      }
  }