Files
trpic/web/templates/gallery/files_noscript.tmpl
2026-07-07 01:00:47 +08:00

51 lines
2.5 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 not (eq .Sort "random") }}
{{ if gt .Offset 0 }}<span><a href="{{.PrevURI}}">上一页</a></span>{{ else }}<span>上一页</span>{{ end }}
{{ if not (ge .Viewed .Total) }}<span><a href="{{.NextURI}}">下一页</a></span>{{ else }}<span>下一页</span>{{ end }}
{{ end }}
</header>
<div id="gallery" role="main">
{{range $index, $file := .Files}}
{{ $art := $file.Edges.Artwork}}
{{ $src := printf "/files/%d.%s" $file.ID $file.Ext }}
{{ if $file.Thumbed }}{{ $src = printf "/thumbnails/%d.jpg" $file.ID }}{{ end }}
<div style="width:{{$file.JWidth}}px; flex-grow:{{$file.JWidth}}">
<i class="info" style="padding-bottom:{{$file.JPadding}}%">
{{if gt (len $art.Edges.Socials) 0}}<p class="top-right">{{(index $art.Edges.Socials 0).DisplayName}}</p>{{end}}
{{ if eq $.Sort "size" "size-down" }}
<p class="bottom-right">{{ $file.Ext }} | {{ $file.SizeStr }}</p>
{{ else if eq $.Sort "resolution" "resolution-down" }}
<p class="bottom-right">{{ $file.Width }}x{{ $file.Height }}px</p>
{{ end }}
</i>
<div class="imgs">
<a href="{{printf "/files/%d.%s" $file.ID $file.Ext}}" {{if gt $art.Sensitive 2}}class="sensitive"{{else if gt $art.Sensitive 1}}class="nsfw"{{else}}style="opacity: 0; z-index: 1"{{end}}></a>
<img src="{{$src}}" alt="trpic_artwork_{{$art.ID}}_{{$file.ID}}" loading="lazy" decoding="async" {{if gt $art.Sensitive 1}}style="filter: blur(10px)"{{end}}/>
</div>
</div>
{{end}}
</div>
</body>
</html>
{{ end }}