增加图片点击放大;优化标题导航效果

This commit is contained in:
2023-06-29 18:06:51 +08:00
parent f567fffbfa
commit 72a6cce5e3
9 changed files with 10077 additions and 2 deletions

View File

@@ -10,9 +10,12 @@
{include file='common/_require'/}
<link rel="stylesheet" href="/static/lib/heti/heti.min.css">
<link rel="stylesheet" href="/static/lib/prismjs/prism.css">
<link rel="stylesheet" href="/static/lib/viewer-1.1.0/viewer.min.css">
<script src="/static/lib/prismjs/prism.js"></script>
<script src="/static/lib/clipboard/clipboard.js"></script>
<script src="/static/lib/heti/heti-addon.min.js"></script>
<script src="/static/lib/viewer-1.1.0/viewer.min.js"></script>
<script src="/static/lib/jquery-viewer-1.0.1/jquery-viewer.min.js"></script>
<style>
.share {
@@ -61,6 +64,10 @@
.post-item .content {
margin-top: 5px;
}
.ul-content img {
cursor: pointer;
}
</style>
</head>
@@ -212,6 +219,9 @@
</div>
<div class="share-tips-options" style="display: none;">
<div class="text" data-clipboard-text="{$post.share_text}">分享文案</div>
</div>
<div class="layui-hide-md" id="is-md-show">
</div>
<script>
const heti = new Heti('.heti');
@@ -299,6 +309,9 @@
clipboard.on('success', function (e) {
layer.msg('复制成功')
});
$('.ul-content').viewer({});;
</script>
<!-- 处理左侧子导航 -->
@@ -339,13 +352,19 @@
});
</script>
{if !$Request.isMobile }
<script>
var titleTopRange = $('.nav-left-list').outerHeight() + $('.logo').outerHeight() + 30
$(window).scroll(function () {
if ($('#is-md-show').is(':visible')) {
// 当屏幕不是md时不要固定标题导航
return;
}
var st = $(window).scrollTop();
if (st > titleTopRange) {
@@ -357,7 +376,7 @@
}
});
</script>
{/if}
</body>
</html>