Gallery improvements
This commit is contained in:
parent
67ebe754fe
commit
73c7943092
|
@ -871,11 +871,28 @@ textarea {
|
||||||
|
|
||||||
/* Gallery */
|
/* Gallery */
|
||||||
.gallery {
|
.gallery {
|
||||||
|
position: relative;
|
||||||
|
left: -5px;
|
||||||
|
top: -5px;
|
||||||
|
width: calc(100% + 10px);
|
||||||
.box {
|
.box {
|
||||||
|
margin: 5px;
|
||||||
float: left;
|
float: left;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 50%;
|
width: calc(100% - 10px);
|
||||||
padding-bottom: 50%;
|
padding-bottom: 100%;
|
||||||
|
@media screen and (min-width: 500px) {
|
||||||
|
width: calc(50% - 10px);
|
||||||
|
padding-bottom: 50%;
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 750px) {
|
||||||
|
width: calc(33.3% - 10px);
|
||||||
|
padding-bottom: 33.3%;
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 1000px) {
|
||||||
|
width: calc(25% - 10px);
|
||||||
|
padding-bottom: 25%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.img {
|
.img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -898,10 +915,12 @@ textarea {
|
||||||
background: rgba(0, 0, 0, 0.5);
|
background: rgba(0, 0, 0, 0.5);
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
padding: 5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
p {
|
p {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
font-size: .75rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
figure {
|
figure {
|
||||||
|
|
|
@ -24,7 +24,8 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||||
var options = {
|
var options = {
|
||||||
index: index,
|
index: index,
|
||||||
bgOpacity: 0.8,
|
bgOpacity: 0.8,
|
||||||
showHideOpacity: true
|
showHideOpacity: true,
|
||||||
|
shareEl: false
|
||||||
};
|
};
|
||||||
new PhotoSwipe($pswp, PhotoSwipeUI_Default, items, options).init();
|
new PhotoSwipe($pswp, PhotoSwipeUI_Default, items, options).init();
|
||||||
}, false);
|
}, false);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{ $src := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
|
{{ $src := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
|
||||||
{{ $thumb := $src.Fill "600x600" }}
|
{{ $thumb := $src.Fill "500x500" }}
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
|
<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
|
||||||
<div class="img"{{ if .Parent }} style="background-image: url('{{ $thumb.RelPermalink }}');"{{ end }}>
|
<div class="img"{{ if .Parent }} style="background-image: url('{{ $thumb.RelPermalink }}');"{{ end }}>
|
||||||
|
|
Reference in New Issue