Merge branch 'feature-fancybox' into dev

This commit is contained in:
FarseaSH 2021-09-01 21:34:33 +08:00
commit 5689f4355b
4 changed files with 10 additions and 4 deletions

View file

@ -9,4 +9,7 @@
$(this).attr("red", true);
}
});
</script>
</script>
<!-- fancybox -->
<script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.js"></script>

View file

@ -31,5 +31,8 @@
<!-- the Moments style css file -->
<link rel="stylesheet" type="text/css" href="{{.Site.BaseURL}}/css/style.css">
<!-- fancybox css (js in the end before the body closing tag) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css"/>
<!-- website title -->
<title>{{ .Site.Params.title }}</title>

View file

@ -13,11 +13,11 @@
{{range $num,$a := .pic_set}}
{{if eq $num 0 }}
<div class="carousel-item active">
<img src="{{$a}}" class="d-block w-100 pic-in-set" alt="{{add $num 1}}">
<img src="{{$a}}" class="d-block w-100 pic-in-set" alt="{{add $num 1}}" data-fancybox="gallery">
</div>
{{else}}
<div class="carousel-item">
<img src="{{$a}}" class="d-block w-100 pic-in-set" alt="{{add $num 1}}">
<img src="{{$a}}" class="d-block w-100 pic-in-set" alt="{{add $num 1}}" data-fancybox="gallery">
</div>
{{end}}
{{end}}

View file

@ -53,7 +53,7 @@
<!-- 图片 -->
{{ with .Params.pic }}
<img src="{{ . }}" class="img-fluid pic1" alt="Responsive image"></img>
<img src="{{ . }}" class="img-fluid pic1" alt="Responsive image" data-fancybox="gallery"></img>
{{ end }}
<!-- 图片集 -->