47 lines
2.3 KiB
Cheetah
47 lines
2.3 KiB
Cheetah
{{ define "artworks_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 Artworks | no script mode">
|
|
<meta name="twitter:description" content="trpic gallery - Browse by Artworks | 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 $artIndex, $art := .Artworks }}
|
|
{{ $file := index $art.Edges.Files 0 }}
|
|
{{ $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 gt (len $art.Edges.Files) 1}}<p class="bottom-right">{{len $art.Edges.Files}} pic</p>{{end}}
|
|
</i>
|
|
<div class="imgs">
|
|
<a href="/noscript/artworks/{{$art.ID}}" {{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 }}
|