Welcome to mirror list, hosted at ThFree Co, Russian Federation.

hugo-easy-gallery.css « css « static - github.com/2-REC/hugo-myportfolio-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d78dfec854168b088b061544f8f01b20a5389efc (plain)
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
/*
Put this file in /static/css/hugo-easy-gallery.css
Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/
*/


/*
Grid Layout Styles
*/
.gallery {
    overflow: hidden;
    margin: 10px;
    max-width: 768px;
}
.gallery .box {
    float: left;
    position: relative;
    /* Default: 1 tile wide */
    width: 100%;
    padding-bottom: 100%; 
}
@media only screen and (min-width : 365px) {
    /* Tablet view: 2 tiles */
    .gallery .box {
        width: 50%;
        padding-bottom: 50%;
    }
}
@media only screen and (min-width : 480px) {
    /* Small desktop / ipad view: 3 tiles */
    .gallery .box {
        width: 33.3%;
        padding-bottom: 33.3%; /*  */
    }
}
@media only screen and (min-width : 9999px) {
   /* Medium desktop: 4 tiles */
   .box {
      width: 25%;
      padding-bottom: 25%;
   }
}

/*
Transition styles
*/
.gallery.hover-transition figure,
.gallery.hover-effect-zoom .img, 
.gallery:not(.caption-effect-appear) figcaption,
.fancy-figure:not(.caption-effect-appear) figcaption {
    -webkit-transition: all 0.3s ease-in-out;
    -moz-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
}
/*
figure styles
*/
figure {
    position:relative; /* purely to allow absolution positioning of figcaption */
    overflow: hidden;
}
.gallery figure {
    position: absolute;
    left: 5px;
    right: 5px;
    top: 5px;
    bottom: 5px;
}
.gallery.hover-effect-grow figure:hover {
    transform: scale(1.05);
}
.gallery.hover-effect-shrink figure:hover {
    transform: scale(0.95);
}
.gallery.hover-effect-slidedown figure:hover {
    transform: translateY(5px);
}
.gallery.hover-effect-slideup figure:hover {
    transform: translateY(-5px);
}

/*
img / a styles
*/

.gallery .img {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
}
.gallery.hover-effect-zoom figure:hover .img {
    transform: scale(1.05);
}
.gallery img {
    display: none; /* only show the img if not inside a gallery */
}
figure a {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
}

/*
figcaption styles
*/
.gallery figcaption,
.fancy-figure figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000;
    color: #FFF;
    text-align: center;
    font-size: 75%; /* change this if you want bigger text */
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
    cursor: pointer;
}
.gallery.caption-position-none figcaption,
.fancy-figure.caption-position-none figcaption  {
    display: none;
}
.gallery.caption-position-center figcaption,
.fancy-figure.caption-position-center figcaption {
    top: 0;
    padding: 40% 5px;
}
.gallery.caption-position-bottom figcaption,
.fancy-figure.caption-position-bottom figcaption {
    padding: 5px;
}
.gallery.caption-effect-fade figure:not(:hover) figcaption,
.gallery.caption-effect-appear figure:not(:hover) figcaption,
.fancy-figure.caption-effect-fade figure:not(:hover) figcaption,
.fancy-figure.caption-effect-appear figure:not(:hover) figcaption {
    background: rgba(0, 0, 0, 0);
    opacity: 0;
}
.gallery.caption-effect-slide.caption-position-bottom figure:not(:hover) figcaption,
.fancy-figure.caption-effect-slide.caption-position-bottom figure:not(:hover) figcaption {
    margin-bottom: -100%;
}
.gallery.caption-effect-slide.caption-position-center figure:not(:hover) figcaption,
.fancy-figure.caption-effect-slide.caption-position-center figure:not(:hover) figcaption  {
    top: 100%;
}
figcaption p {
    margin: auto; /* override style in theme */
}