This repository has been archived by the owner on May 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
slider.less
180 lines (149 loc) · 2.93 KB
/
slider.less
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
//
// Slider
// --------------------------------------------------
#slider {
background: darken(#ffffe9, 2%);
border-bottom: 4px double #eedbbb;
margin: -(@gutterWidth + 20px - 6px) -(@gutterWidth) @gutterWidth -(@gutterWidth);
padding: @gutterWidth @gutterWidth @smallGutterWidth;
position: relative;
}
.slides-container {
.clearfix;
}
.flex-viewport {
max-height: 2000px;
.transition(all 1s ease);
}
.loading .flex-viewport {
max-height: 300px;
}
/* Slider content */
.slide {
/* Hide the slides before the JS is loaded to avoid page jumping */
display: none;
-webkit-backface-visibility: hidden;
.thumbnail,
.slider-video {
float: left;
max-width: 100%;
margin: 0 @gutterWidth 2px 2px;
}
.entry-title {
margin-top: 0;
}
}
/* Control navigation */
.flex-control-nav {
list-style: none;
margin: 20px auto 0 -60px;
text-align: center;
li {
display: inline-block;
margin: 0 0 0 7px;
&:first-child {
margin-left: 0;
}
}
}
/* Slider pagination */
.flex-control-paging li {
a {
background: @orangeLight;
text-indent: -9999px;
border-radius: 50%;
cursor: pointer;
display: block;
.square(16px);
.transition(all 150ms ease);
&:hover {
background: @orange;
}
}
.flex-active,
.flex-active:hover {
background: @orangeDark;
cursor: default;
.scale(1.07);
}
}
.flex-pauseplay a {
cursor: pointer;
}
/* Next/prev buttons */
.flex-direction-nav {
list-style: none;
margin: 0; padding: 0;
a {
background-color: @white;
box-shadow: 0 0 7px fade(@black, 30%);
border-radius: 50%;
.square(42px);
margin: 0;
opacity: 0.6;
position: absolute;
top: 200px;
text-indent: -9999px;
.transition(opacity 150ms ease);
&:focus {
background: @orangeLight;
}
&:after {
#font > .alternative(36px, bold);
text-indent: 0;
color: @gray;
position: absolute;
top: -14px;
left: 11px;
z-index: 10;
}
#slider:hover & {
opacity: 1;
}
}
.flex-prev {
left: -21px;
&:after {
content: "\00AB";
}
}
.flex-next {
right: -21px;
&:after {
content: "\00BB";
left: 13px;
}
}
.flex-direction-nav .disabled {
cursor: default;
opacity: 0.3 !important;
filter: alpha(opacity=30);
}
.flex-prev:active,
.flex-next:active {
box-shadow: inset 0 0 5px rgba(0,0,0, 0.3), 0 0 7px rgba(0,0,0, 0.3);
}
}
/* Move the navigation arrows when the screen is smaller */
@media screen and (max-width: 1130px) {
.flex-direction-nav .flex-prev { opacity: 1; left: 10px; }
.flex-direction-nav .flex-next { opacity: 1; right: 10px; }
}
/* Fallback to a border for browsers without box-shadow support */
.no-boxshadow .flex-direction-nav .flex-prev,
.no-boxshadow .flex-direction-nav .flex-next {
border: 2px solid @orangeLight;
&:hover {
border-color: @orangeDark;
}
}
/* No-javaScript fallback */
.no-js .slides-container > .slide {
display: none;
&:first-child {
display: block;
}
}
.no-js .slides-container > .slide:first-child {
display: block;
}