chore: baseline snapshot before moderation-strictness feature
Repo .git was damaged (refs/ missing, index truncated, object store near-empty). Repaired via git init (rebuilt refs), stale index preserved as .git/index.corrupt-20260910.bak, then full worktree committed as a rollback baseline.
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
{{template "base/header" .}}
|
||||
<!--<link rel="stylesheet" href="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/uikit/3.3.3/css/uikit.min.css">-->
|
||||
<!-- 头像直连 R2:crossorigin 让 favicon 也以 CORS 模式请求,确保浏览器缓存的响应都带 ACAO;
|
||||
?v=2 击穿历史上被「无 ACAO 响应」污染的缓存条目 -->
|
||||
<link rel="shortcut icon"
|
||||
href="{{.PageUser.Avatar}}?v=2" crossorigin="anonymous"/>
|
||||
<link rel="apple-touch-icon"
|
||||
href="{{.PageUser.Avatar}}?v=2" crossorigin="anonymous"/>
|
||||
<link rel="icon" sizes="192x192"
|
||||
href="{{.PageUser.Avatar}}?v=2" crossorigin="anonymous">
|
||||
<div class="uk-card uk-card-default uk-text-center">
|
||||
<div class="uk-flex uk-flex-center uk-flex-middle uk-background-cover uk-light" style="min-height: 260px;" data-src="{{ .PageUser.Background }}" uk-img>
|
||||
<div class="uk-card-body">
|
||||
<img class="uk-border-circle uk-box-shadow-large" src="{{ if .PageUser.Avatar }}{{ .PageUser.Avatar }}?v=2{{ else }}{{ .DefaultAvatar }}{{ end }}" crossorigin="anonymous" style="width: 100px; height: 100px; max-width: 100%; max-height: 100%;">
|
||||
<h3 id="usernamecolor">{{ .PageUser.Name }}</h3>
|
||||
<p id="introcolor">{{ .PageUser.Intro }}</p>
|
||||
<div class="icon-container">
|
||||
{{ if and .PageUser.Acfunlink (ne .PageUser.Acfunlink "none") }}
|
||||
<a href="https://{{.PageUser.Acfunlink}}" target="_blank">
|
||||
<img src="https://r2.337845818.best/tamabox/icon/social/ailicili.png" alt="acfunlink" class="icon">
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if and .PageUser.Bililink (ne .PageUser.Bililink "none") }}
|
||||
<a href="https://{{.PageUser.Bililink}}" target="_blank">
|
||||
<img src="https://r2.337845818.best/tamabox/icon/social/bili.png" alt="bililink" class="icon">
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if and .PageUser.Weibolink (ne .PageUser.Weibolink "none") }}
|
||||
<a href="https://{{.PageUser.Weibolink}}" target="_blank">
|
||||
<img src="https://r2.337845818.best/tamabox/icon/social/weibo.png" alt="weibolink" class="icon">
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if and .PageUser.Xiaohongshulink (ne .PageUser.Xiaohongshulink "none") }}
|
||||
<a href="https://{{.PageUser.Xiaohongshulink}}" target="_blank">
|
||||
<img src="https://r2.337845818.best/tamabox/icon/social/xiaohongshu.png" alt="xiaohongshulink" class="icon">
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if and .PageUser.Bloglink (ne .PageUser.Bloglink "none") }}
|
||||
<a href="https://{{.PageUser.Bloglink}}" target="_blank">
|
||||
<img src="https://r2.337845818.best/tamabox/icon/social/blog.png" alt="bloglink" class="icon">
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById("usernamecolor").style.color = {{.PageUser.Usernamecolor}};
|
||||
document.getElementById("introcolor").style.color = {{.PageUser.Introcolor}};
|
||||
</script>
|
||||
<div>
|
||||
<div class="uk-card uk-card-default uk-card-small uk-card-body">
|
||||
{{ if .CanAsk }}
|
||||
<!-- jQuery 按需加载(同步,保证下方内联二维码初始化就绪) -->
|
||||
<script src="https://cdnjs.snrat.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
|
||||
<script src='https://r2.337845818.best/tamabox/cdn/js/remake/easy.qrcode.min.js' type="text/javascript" charset="utf-8"></script>
|
||||
<center><div id="boxqrimg"></div></center>
|
||||
<script type="text/javascript">
|
||||
var options = {
|
||||
text: window.location.href,
|
||||
width: 200,
|
||||
height: 200,
|
||||
// 与 Profile 编辑器保持一致:仅当启用自定义前景色时,才把 Qrcodebackcolor 作为前景色;
|
||||
// 否则强制黑色 #000000,避免未勾选却显示自定义前景色、与 Profile 预览不一致。
|
||||
colorDark: ({{.PageUser.UseCustomQRColor}} ? "{{.PageUser.Qrcodebackcolor}}" : "#000000") || "#000000",
|
||||
colorLight: "{{.PageUser.Qrcodecolor}}" || "#FFFFFF",
|
||||
dotScale: parseFloat("{{.PageUser.Dotscale}}") || 0.4,
|
||||
dotScaleTiming: parseFloat("{{.PageUser.Dotscale}}") || 0.4,
|
||||
dotScaleA: parseFloat("{{.PageUser.Dotscale}}") || 0.4,
|
||||
correctLevel: QRCode.CorrectLevel.H,
|
||||
logo: (function () {
|
||||
// ?v=2:击穿曾被无 ACAO 响应污染的浏览器缓存条目;仅对 http(s) 绝对地址追加
|
||||
var a = "{{.PageUser.Avatar}}" || "{{.DefaultAvatar}}";
|
||||
return a ? (a.indexOf("http") === 0 ? a + "?v=2" : a) : undefined;
|
||||
})(),
|
||||
logoWidth: 60,
|
||||
logoHeight: 60,
|
||||
logoBackgroundTransparent: true,
|
||||
// 直连 R2 等跨域图片须以 CORS 模式加载,canvas 才不被污染、可正常导出
|
||||
crossOrigin: 'anonymous',
|
||||
backgroundImage: ("{{.PageUser.BackgroundImage}}" ? "{{.PageUser.BackgroundImage}}" : undefined),
|
||||
backgroundImageAlpha: parseFloat("{{.PageUser.Backgroundimagealpha}}") || 0.8,
|
||||
autoColor: false,
|
||||
PO: "{{.PageUser.Qrcodepdpcolor}}" || "#000000",
|
||||
PI: "{{.PageUser.Qrcodepdpcolor}}" || "#000000",
|
||||
AO: '',
|
||||
AI: '',
|
||||
timing: "{{.PageUser.Qrcodepdpcolor}}" || "#000000"
|
||||
};
|
||||
// 降级渲染:头像(logo)/ 背景图加载慢/失败时先出基础码,探针成功后再升级带 logo 版
|
||||
window.tbRenderQR(document.getElementById("boxqrimg"), function () { return options; });
|
||||
</script>
|
||||
|
||||
<p class="uk-text-center uk-text-small">扫码向@{{ .PageUser.Name }}提问<br>{{ if .RegisterOnlyAsk }}{{t .LangCode "ask.registerOnly"}}{{ else }}{{t .LangCode "ask.anonymous"}}{{ end }}</p>
|
||||
{{ end }}
|
||||
{{template "base/alert" .}}
|
||||
{{template "question/new-question-template" .}}
|
||||
|
||||
<hr class="uk-divider-icon">
|
||||
{{ if ne (len .PageQuestions) 0 }}
|
||||
<p class="uk-text-left uk-text-muted uk-text-small">@{{ .PageUser.Name }} 以前回答过的问题 ({{ .AnsweredCount }})</p>
|
||||
{{ template "question/history-template" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
Reference in New Issue
Block a user