mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-04 03:56:24 -07:00
HEAVILY simplify template execution
This commit is contained in:
parent
5745428655
commit
ce303c086e
20 changed files with 395 additions and 533 deletions
|
@ -3,12 +3,11 @@
|
|||
<head>
|
||||
<title>Banned</title>
|
||||
<link rel="stylesheet" href="/css/global/front.css" />
|
||||
{{range $i, $style := $config.Styles_img}}
|
||||
<link rel="{{if isStyleNotDefault_img $style}}alternate {{end}}stylesheet" href="/css/{{$style}}/front.css" />{{end}}
|
||||
|
||||
{{range $i, $style := .config.Styles_img}}
|
||||
<link rel="{{if not (isStyleDefault_img $style)}}alternate {{end}}stylesheet" href="/css/{{$style}}/front.css" />{{end}}
|
||||
<script type="text/javascript">
|
||||
var styles = [{{range $i, $style := $config.Styles_img}}{{if gt $i 0}}, {{end}}"{{$style}}"{{end}}];
|
||||
var webroot = "{{$config.SiteWebfolder}}"
|
||||
var styles = [{{range $i, $style := .config.Styles_img}}{{if gt $i 0}}, {{end}}"{{$style}}"{{end}}];
|
||||
var webroot = "{{.config.SiteWebfolder}}"
|
||||
</script>
|
||||
<script type="text/javascript" src="/javascript/jquery-3.3.1.min.js"></script>
|
||||
<script type="text/javascript" src="/javascript/gochan.js"></script>
|
||||
|
@ -16,8 +15,8 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="top-pane">
|
||||
<span id="site-title">{{$config.SiteName}}</span><br />
|
||||
<span id="site-slogan">{{$config.SiteSlogan}}</span>
|
||||
<span id="site-title">{{.config.SiteName}}</span><br />
|
||||
<span id="site-slogan">{{.config.SiteSlogan}}</span>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
@ -27,29 +26,29 @@
|
|||
</div>
|
||||
<div class="section-body" style="padding-top:8px">
|
||||
<div id="ban-info" style="float:left">
|
||||
{{if stringEq $ban.Boards "*"}}
|
||||
{{if eq .ban.Boards "*"}}
|
||||
You are banned from posting on <b>all boards</b> for the following reason:
|
||||
{{else}}
|
||||
You are banned from posting on <b>{{$ban.Boards}}</b> for the following reason:
|
||||
You are banned from posting on <b>{{.ban.Boards}}</b> for the following reason:
|
||||
{{end}}
|
||||
<br /><br />
|
||||
<b>{{$ban.Message}}</b>
|
||||
<b>{{.ban.Message}}</b>
|
||||
<br /><br />
|
||||
{{$expires_timestamp := formatTimestamp $ban.Expires}}
|
||||
{{$appeal_timestamp := formatTimestamp $ban.AppealAt}}
|
||||
{{if stringEq $expires_timestamp "Mon, January 01, 0001 00:00 AM"}}
|
||||
Your ban was placed on {{formatTimestamp $ban.Timestamp}} and will not expire.<br />
|
||||
{{$expires_timestamp := formatTimestamp .ban.Expires}}
|
||||
{{$appeal_timestamp := formatTimestamp .ban.AppealAt}}
|
||||
{{if eq $expires_timestamp "Mon, January 01, 0001 00:00 AM"}}
|
||||
Your ban was placed on {{formatTimestamp .ban.Timestamp}} and will not expire.<br />
|
||||
{{else}}
|
||||
Your ban was placed on {{formatTimestamp $ban.Timestamp}} and will expire on {{formatTimestamp $ban.Expires}}<br />
|
||||
Your ban was placed on {{formatTimestamp .ban.Timestamp}} and will expire on {{$expires_timestamp}}<br />
|
||||
{{end}}
|
||||
<br />
|
||||
{{if stringEq $appeal_timestamp "Mon, January 01, 0001 00:00 AM"}}
|
||||
{{if eq .appeal_timestamp "Mon, January 01, 0001 00:00 AM"}}
|
||||
You may not appeal this ban.
|
||||
{{else}}
|
||||
You may appeal this ban {{formatTimestamp $ban.AppealAt}}
|
||||
You may appeal this ban {{$appeal_timestamp}}
|
||||
{{end}}
|
||||
<br /><br />
|
||||
Your IP address is {{$ban.IP}}.
|
||||
Your IP address is {{.ban.IP}}.
|
||||
</div>
|
||||
<img id="banpage-image" src="/banned.jpg" style="float:right; margin: 4px 8px 8px 4px"/>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue