Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 18639
1
/*
2
Put this file in /static/css/hugo-easy-gallery.css
3
Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/
4
*/
5
6
7
/*
8
Grid Layout Styles
9
*/
10
.gallery {
11
overflow: hidden;
12
margin: 10px;
13
max-width: 100%;/*768px;*/
14
}
15
.gallery .box {
16
float: left;
17
position: relative;
18
/* Default: 1 tile wide */
19
width: 100%;
20
padding-bottom: 100%;
21
}
22
@media only screen and (min-width : 365px) {
23
/* Tablet view: 2 tiles */
24
.gallery .box {
25
width: 50%;
26
padding-bottom: 50%;
27
}
28
}
29
@media only screen and (min-width : 480px) {
30
/* Small desktop / ipad view: 3 tiles */
31
.gallery .box {
32
width: 33.3%;
33
padding-bottom: 33.3%; /* */
34
}
35
}
36
@media only screen and (min-width : 9999px) {
37
/* Medium desktop: 4 tiles */
38
.box {
39
width: 25%;
40
padding-bottom: 25%;
41
}
42
}
43
44
/*
45
Transition styles
46
*/
47
.gallery.hover-transition figure,
48
.gallery.hover-effect-zoom .img,
49
.gallery:not(.caption-effect-appear) figcaption,
50
.fancy-figure:not(.caption-effect-appear) figcaption {
51
-webkit-transition: all 0.3s ease-in-out;
52
-moz-transition: all 0.3s ease-in-out;
53
-o-transition: all 0.3s ease-in-out;
54
transition: all 0.3s ease-in-out;
55
}
56
/*
57
figure styles
58
*/
59
figure {
60
position:relative; /* purely to allow absolution positioning of figcaption */
61
overflow: hidden;
62
}
63
.gallery figure {
64
position: absolute;
65
left: 5px;
66
right: 5px;
67
top: 5px;
68
bottom: 5px;
69
}
70
.gallery.hover-effect-grow figure:hover {
71
transform: scale(1.05);
72
}
73
.gallery.hover-effect-shrink figure:hover {
74
transform: scale(0.95);
75
}
76
.gallery.hover-effect-slidedown figure:hover {
77
transform: translateY(5px);
78
}
79
.gallery.hover-effect-slideup figure:hover {
80
transform: translateY(-5px);
81
}
82
83
/*
84
img / a styles
85
*/
86
87
.gallery .img {
88
position: absolute;
89
left: 0;
90
right: 0;
91
top: 0;
92
bottom: 0;
93
background-size: cover;
94
background-position: 50% 50%;
95
background-repeat: no-repeat;
96
}
97
.gallery.hover-effect-zoom figure:hover .img {
98
transform: scale(1.05);
99
}
100
.gallery img {
101
display: none; /* only show the img if not inside a gallery */
102
}
103
figure a {
104
position: absolute;
105
left: 0;
106
right: 0;
107
top: 0;
108
bottom: 0;
109
}
110
111
/*
112
figcaption styles
113
*/
114
.gallery figcaption,
115
.fancy-figure figcaption {
116
position: absolute;
117
bottom: 0;
118
left: 0;
119
right: 0;
120
background: #000;
121
color: #fff;
122
text-align: center;
123
font-size: 75%; /* change this if you want bigger text */
124
background: rgba(100, 255, 100, 0.8);
125
opacity: 1;
126
cursor: pointer;
127
}
128
.gallery.caption-position-none figcaption,
129
.fancy-figure.caption-position-none figcaption {
130
display: none;
131
}
132
.gallery.caption-position-center figcaption,
133
.fancy-figure.caption-position-center figcaption {
134
top: 0;
135
padding: 40% 5px;
136
}
137
.gallery.caption-position-bottom figcaption,
138
.fancy-figure.caption-position-bottom figcaption {
139
padding: 5px;
140
}
141
.gallery.caption-effect-fade figure:not(:hover) figcaption,
142
.gallery.caption-effect-appear figure:not(:hover) figcaption,
143
.fancy-figure.caption-effect-fade figure:not(:hover) figcaption,
144
.fancy-figure.caption-effect-appear figure:not(:hover) figcaption {
145
background: rgba(0, 0, 0, 0);
146
opacity: 0;
147
}
148
.gallery.caption-effect-slide.caption-position-bottom figure:not(:hover) figcaption,
149
.fancy-figure.caption-effect-slide.caption-position-bottom figure:not(:hover) figcaption {
150
margin-bottom: -100%;
151
}
152
.gallery.caption-effect-slide.caption-position-center figure:not(:hover) figcaption,
153
.fancy-figure.caption-effect-slide.caption-position-center figure:not(:hover) figcaption {
154
top: 100%;
155
}
156
figcaption p {
157
margin: auto; /* override style in theme */
158
}
159
160