src/web:
filter:
add Files functions to build `predicate.File` and `queryMap`
files api and no script page:
use `predicate.File` and `filter.Files` to query file
web:
scripts:
load:
add `fetchPriority = "high"` to gallery thumbnail images
add `alt = "spoiler"` for gallery sensitive image mask
process pages:
add document title status
fix preview image will mask original image when img tag has not src attribute in safari
add `go convert` button for upscayl page
styles/process pages:
fix `user-select: none`
templates/process pages:
add `title` tags
add `go convert` button for upscayl page
60 lines
2.1 KiB
Cheetah
60 lines
2.1 KiB
Cheetah
{{ define "upscayl" }}
|
|
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="file"
|
|
id="{{ .File.ID }}"
|
|
thumbed="{{ .File.Thumbed }}"
|
|
source_url="{{ .File.SourceURL }}"
|
|
raw_ext="{{ .File.RawExt }}"
|
|
ext="{{ .File.Ext }}"
|
|
size_str="{{ .File.SizeStr }}"
|
|
width="{{ .File.Width }}"
|
|
height="{{ .File.Height }}"
|
|
aspect_ratio="{{ .File.AspectRatio }}"
|
|
elongation_ratio="{{ .File.ElongationRatio }}"
|
|
>
|
|
{{ "base" | .RenderStyle }}
|
|
{{ "convert" | .RenderStyle }}
|
|
{{ "base" | .RenderScript }}
|
|
{{ "upscayl" | .RenderScript }}
|
|
<title>upscayl - trpic</title>
|
|
</head>
|
|
<body>
|
|
<noscript>
|
|
<p>当前未启用 JavaScript</p>
|
|
<p>您无法在不使用 JavaScript 的情况下访问 upscayl 页面</p>
|
|
</noscript>
|
|
<div id="preview">
|
|
<div id="preview-header">
|
|
<div id="convert-action">
|
|
<select id="model-selector">
|
|
<option>select model</option>
|
|
{{ range .Models }}<option id="{{.}}" value="{{ . }}">{{ . }}</option>{{ end }}
|
|
</select>
|
|
<button id="upscayl-button">upscayl</button>
|
|
<button id="upload-button" style="display: none;">upload</button>
|
|
<button id="go-convert-button" style="display: none;">go convert</button>
|
|
</div>
|
|
<div id="preview-info">
|
|
<button id="remove-button" style="display: none;">remove tokens</button>
|
|
<button id="background-button">black</button>
|
|
<button id="pixelated-button">pixelated</button>
|
|
<button id="reset-button">reset</button>
|
|
<p id="original-size">{{ .RawSizeStr }}</p>
|
|
<p id="dimensions">{{ .File.Width }}*{{ .File.Height }}px</p>
|
|
</div>
|
|
</div>
|
|
<div id="preview-view">
|
|
<div id="image-wrapper">
|
|
<img id="preview-img">
|
|
<img id="original-img" style="z-index: -1">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
{{ end }}
|