add image viewer

This commit is contained in:
liuboaibc 2020-08-17 11:20:05 +08:00
parent cf82c1166b
commit 82f8bf2dec
7 changed files with 41 additions and 4 deletions

View File

@ -1,5 +1,5 @@
---
title: "docs"
title: "Documentation"
css: "scss/docs.scss"
LinkTitle: "Documentation"

View File

@ -231,9 +231,20 @@
})
}
getFileContributors()
bindClickMenu()
bindClickSecondMenu()
var useViewer = function() {
var viewer = new Viewer(document.querySelector('.md-body'), {
url: 'src'
})
}
var __main = function() {
getFileContributors()
bindClickMenu()
bindClickSecondMenu()
useViewer()
}
__main()
</script>
{{ end }}

View File

@ -47,6 +47,11 @@
</section>
{{ partial "footer.html" $context }}
<script src='{{ "js/aside.js" | relURL }}'></script>
<script>
var viewer = new Viewer(document.querySelector('.md-body'), {
url: 'src'
})
</script>
</body>
</html>

View File

@ -1,6 +1,7 @@
<link rel="stylesheet" href="/fonts/Roboto/stylesheet.css">
<link rel="stylesheet" href="/fonts/ProximaNova/stylesheet.css">
<link rel="stylesheet" href="/css/jquery.modal.min.css">
<link rel="stylesheet" href="/css/viewer.min.css">
{{ $common := resources.Get "scss/common.scss" | toCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $common.RelPermalink }}">

View File

@ -15,4 +15,5 @@
{{- partial "css.html" . -}}
<script src='{{ "js/jquery-3.5.0.min.js" | relURL }}'></script>
<script src='{{ "js/viewer.min.js" | relURL }}'></script>
<script src='{{ "js/jquery.modal.min.js" | relURL }}'></script>

9
static/css/viewer.min.css vendored Normal file

File diff suppressed because one or more lines are too long

10
static/js/viewer.min.js vendored Normal file

File diff suppressed because one or more lines are too long