Skip to content

Commit

Permalink
fix: photography
Browse files Browse the repository at this point in the history
  • Loading branch information
lh1me committed Oct 8, 2021
1 parent dc48781 commit 069eac7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1632321966441
version: 1633679241878
language: cn
aomori_widgets:
- toc
Expand Down
1 change: 0 additions & 1 deletion layout/_partial/page/photography-item.ejs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<div class="photography-item">
<img
class="lazy"
src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2'%3E%3C/svg%3E"
data-src="<%= item.thumbnail || item.photo %>"
data-original="<%= item.photo || item.thumbnail %>"
alt="<%= item.title || config.title || '' %>"
Expand Down
2 changes: 1 addition & 1 deletion source/dist/custom.js

Large diffs are not rendered by default.

19 changes: 12 additions & 7 deletions source/javascripts/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,19 @@ import { addNewClass, removeClass, throttle } from './class-module'
}
const photographyViewer = $('.photography-item')
if (photographyViewer && photographyViewer.length > 0) {
const temp = Object.assign(
{
url(image) {
return image.dataset.original
},
const temp = Object.assign(viewerConfig, {
url(image) {
return image.dataset.original
},
viewerConfig
)
toolbar: {
zoomIn: true,
zoomOut: true,
reset: true,
prev: false,
next: false,
},
navbar: false,
})
photographyViewer.viewer(temp)
}

Expand Down

0 comments on commit 069eac7

Please sign in to comment.