all repos — honk @ 41f42bb40afab3f4fe68b5c32a075a648d001695

my fork of honk

better image viewer
Ted Unangst tedu@tedunangst.com
Tue, 30 Jan 2024 22:30:00 -0500
commit

41f42bb40afab3f4fe68b5c32a075a648d001695

parent

e0ecdc6bfa3d93efd90876c49ee008c8717e9448

3 files changed, 15 insertions(+), 2 deletions(-)

jump to
M views/honk.htmlviews/honk.html

@@ -72,7 +72,7 @@ {{ else }}

{{ if $omitimages }} <p><a href="/d/{{ .XID }}">Image: {{ .Name }}</a>{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} {{ else }} -<a href="/d/{{.XID}}"><img class="donk" src="/d/{{ .XID }}" loading=lazy title="{{ .Desc }}" alt="{{ .Desc }}"></a> +<a class="donklink" href="/d/{{.XID}}"><img class="donk" src="/d/{{ .XID }}" loading=lazy title="{{ .Desc }}" alt="{{ .Desc }}"></a> {{ end }} {{ end }} {{ else }}
M views/honkpage.jsviews/honkpage.js

@@ -273,6 +273,16 @@ var xid = el.getAttribute("data-xid")

el.onclick = pageswitcher("honker", xid) el.classList.remove("honkerlink") } + els = document.getElementsByClassName("donklink") + while (els.length) { + let el = els[0] + el.onclick = function() { + el.children[0].classList.remove("donk") + el.onclick = null + return false + } + el.classList.remove("donklink") + } els = document.querySelectorAll("#honksonpage article button") els.forEach(function(el) {
M views/style.cssviews/style.css

@@ -335,10 +335,13 @@ background: var(--bg-page);

} img, video { max-width: 100%; - max-height: 600px; } .noise img:not(.emu) { display: block; +} +.noise img.donk { + max-height: 400px; + display: inline; } img.emu { height: 2em;