add fancy-box
This commit is contained in:
parent
f8803b75b9
commit
d3b9e6880f
4 changed files with 10 additions and 4 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
|
@ -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}}
|
||||
|
|
|
@ -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 }}
|
||||
|
||||
<!-- 图片集 -->
|
||||
|
|
Loading…
Add table
Reference in a new issue