Files
trpic/web/templates/gallery/files_noscript.tmpl
Hubert Chen 2ba6d28697 frontend changes
convert:
    adjust page and image background
upload:
    fix response after success upload
noscript artwork id page:
    adjust info bar margin to padding
noscript artwork and file page:
    fix dark mode image mask
2026-04-26 23:35:45 +08:00

46 lines
2.2 KiB
Cheetah

{{ define "files_noscript" }}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:site_name" content="trpic">
<meta property="og:title" name="twitter:title" content="trpic">
<meta property="og:description" name="description" content="trpic gallery - Browse by Images | no script mode">
<meta name="twitter:description" content="trpic gallery - Browse by Images | no script mode">
<title>trpic</title>
{{ "base" | .RenderStyle }}
{{ "gallery" | .RenderStyle }}
</head>
<body>
<header id="info-box">
{{ "header" | .RenderStyle }}
<span id="title">trpic</span>
<span>浏览进度 <b>({{ .Viewed }}/{{ .Total }})</b></span>
<span>以 <b>{{ .Sort }}</b> 排序</span>
<span>无 JS 模式</span>
{{ if gt .Offset 0 }}<span><a href="?offset={{.PrevOffset}}&limit={{.Limit}}&sort={{.Sort}}{{ if .Tags }}&tags={{.Tags}}{{ end }}">上一页</a></span>{{ else }}<span>上一页</span>{{ end }}
{{ if not (ge .Viewed .Total) }}<span><a href="?offset={{.NextOffset}}&limit={{.Limit}}&sort={{.Sort}}{{ if .Tags }}&tags={{.Tags}}{{ end }}">下一页</a></span>{{ else }}<span>下一页</span>{{ end }}
</header>
<div id="gallery" role="main">
{{range $index, $img := .Files}}
{{ $src := printf "/files/%d.%s" $img.ID $img.Ext }}
{{ if $img.Thumbed }}{{ $src = printf "/thumbnails/%d.jpg" $img.ID }}{{ end }}
<div style="width:{{$img.JWidth}}px; flex-grow:{{$img.JWidth}}">
<a href="{{printf "/files/%d.%s" $img.ID $img.Ext}}">
<i style="padding-bottom:{{$img.JPadding}}%">
{{ if eq $.Sort "size" }}
<span><p>{{ $img.Ext }} | {{ if $img.Thumbed }}☇ {{ end }}{{$img.SizeStr}}</p></span>
{{ else if eq $.Sort "size-down" }}
<span><p>{{ $img.Ext }} | {{ if $img.Thumbed }}☇ {{ end }}{{$img.SizeStr}}</p></span>
{{ end }}
</i>
<img id="imgs" src="{{$src}}" loading="lazy" decoding="async" />
</a>
</div>
{{end}}
</div>
</body>
</html>
{{ end }}