Skip to content

Commit

Permalink
Open photo when clicking on it
Browse files Browse the repository at this point in the history
  • Loading branch information
creekorful committed Aug 8, 2021
1 parent 9918703 commit 72dc1ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions res/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
outline: 2px solid #000;
}

#photos img:hover {
cursor: pointer;
}

@media (max-width: 1400px) {
#photos img {
width: 25%;
Expand Down
2 changes: 1 addition & 1 deletion res/index.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<body>
<section id="photos">
{{ range .Photos }}
<img src="{{ .ThumbnailPath }}" title="{{ .Title }}">
<img src="{{ .ThumbnailPath }}" title="{{ .Title }}" onclick="window.open('{{ .ImgPath }}', '_blank')">
{{ end }}
</section>
</body>
Expand Down

0 comments on commit 72dc1ee

Please sign in to comment.