Fetch the repository succeeded.
<!-- 画廊 -->
{{- $url := .Get 2 -}}
{{- $md5Hash := md5 $url -}}
{{- $md5Short := substr $md5Hash 0 8 -}}
<link href="https://cdn.bootcdn.net/ajax/libs/justifiedGallery/3.8.1/css/justifiedGallery.min.css" rel="stylesheet">
<div id="{{- $md5Short -}}">
</div>
<script type="text/javascript" src="https://cdn.ftls.xyz/static/whispers/assets/js/view-image.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/justifiedGallery/3.8.1/js/jquery.justifiedGallery.min.js"></script>
<script>
fetch("{{ $url }}")
.then(response => response.text())
.then(text => {
text.trim().split('\n').forEach((imageUrl) => {
const anchor = document.createElement("a");
anchor.href = imageUrl;
anchor.classList.add("gallery-img");
const img = document.createElement("img");
img.src = imageUrl + `${imageUrl.includes("?") ? "" : "?image_process=quality,Q_10"}`; // 略缩图 - 使用 CDN 的图像处理
img.alt = "";
img.loading = "lazy";
anchor.appendChild(img);
document.getElementById("{{- $md5Short -}}").appendChild(anchor);
});
$("#{{- $md5Short -}}").justifiedGallery({
rowHeight: {{ .Get 0 | default 200 }},
});
if({{- .Get 1 | default false -}} == true) {
window.ViewImage && ViewImage.init('.gallery-img');
}
});
</script>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。