1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-04 08:06:23 -07:00

HEAVILY simplify template execution

This commit is contained in:
Joshua Merrell 2018-04-06 01:03:57 -07:00
parent 5745428655
commit ce303c086e
20 changed files with 395 additions and 533 deletions

View file

@ -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>

View file

@ -2,31 +2,30 @@
<html>
<head>
<meta charset="UTF-8">
<title>{{$config.SiteName}}</title>
<title>{{.config.SiteName}}</title>
<script type="text/javascript" src="/javascript/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="/javascript/msgpack.js"></script>
<script type="text/javascript">
var styles = [{{range $ii, $style := $config.Styles_img}}{{if gt $ii 0}}, {{end}}"{{$style}}"{{end}}];
var webroot = "{{$config.SiteWebfolder}}"
var styles = [{{range $ii, $style := .config.Styles_img}}{{if gt $ii 0}}, {{end}}"{{$style}}"{{end}}];
var webroot = "{{.config.SiteWebfolder}}"
</script>
<script type="text/javascript" src="/javascript/gochan.js"></script>
<script type="text/javascript" src="/javascript/manage.js"></script>
<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}}
<link rel="shortcut icon" href="/favicon.png">
</head>
<body>
<div id="topbar">
{{range $i, $board := $board_arr.Data}}
{{range $i, $board := .boards}}
<a href="/{{$board.Dir}}/" class="topbar-item">/{{$board.Dir}}/</a>
{{end}}
</div>
<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>
<div id="main">
<div id="tab-bar">
@ -43,11 +42,9 @@
<a href="#faq">FAQ</a>
</div>
</div>
<div id="first-page" class="page">
{{range $ii, $page := $page_arr.Data}}
{{if intEq $page.Page 0}}
{{range $ii, $page := .page_arr}}
{{if eq $page.Page 0}}
<div class="section-block">
<div class="section-title-block" id="first-page0">
<b>{{$page.Subject}}</b> by <a href="mailto:{{$page.Email}}" >{{$page.Poster}}</a><a href="/#first-page{{$ii}}" class="permalink">#</a>
@ -59,7 +56,6 @@
{{end}}
{{end}}
</div>
<div id="boards-page" class="page">
<div class="section-block">
<div class="section-title-block">
@ -67,19 +63,16 @@
</div>
<div class="section-body">
<ul>
{{range $i, $board := $board_arr.Data}}
{{if stringEq $board.Dir $config.Modboard}}{{else}}
<li><b>/{{$board.Dir}}/</b> {{$board.Description}}</li>
{{end}}
{{end}}
{{range $_, $board := .boards}}
{{if eq $board.Dir $.config.Modboard}}{{else}}
<li><b>/{{$board.Dir}}/</b> {{$board.Description}}</li>{{end}}{{end}}
</ul>
</div>
</div>
</div>
<div id="rules-page" class="page">
{{range $ii, $page := $page_arr.Data}}
{{if intEq $page.Page 1}}
{{range $ii, $page := .page_arr}}
{{if eq $page.Page 1}}
<div class="section-block">
<div class="section-title-block" id="first-page0">
<b>{{$page.Subject}}</b> by <a href="mailto:{{$page.Email}}" >{{$page.Poster}}</a><a href="/#first-page{{$ii}}" class="permalink">#</a>
@ -91,10 +84,9 @@
{{end}}
{{end}}
</div>
<div id="faq-page" class="page">
{{range $ii, $page := $page_arr.Data}}
{{if intEq $page.Page 2}}
{{range $ii, $page := .page_arr.Data}}
{{if eq $page.Page 2}}
<div class="section-block">
<div class="section-title-block" id="first-page0">
<b>{{$page.Subject}}</b> by <a href="mailto:{{$page.Email}}" >{{$page.Poster}}</a><a href="/#first-page{{$ii}}" class="permalink">#</a>
@ -106,16 +98,16 @@
{{end}}
{{end}}
</div>
{{if gt $config.MaxRecentPosts 0}}
{{if gt .config.MaxRecentPosts 0}}
<div id="recent-posts">
<div id="recent-posts-header" class="section-title-block"><b>Recent Posts</b></div>
{{range $i, $post := $recent_posts_arr.Data}}
{{range $i, $post := $.recent_posts}}
<div class="section-block">
<div class="section-title-block">
<span class="section-title"><a href="{{$post.BoardName}}/res/{{if intEq $post.ParentID 0}}{{intToString $post.PostID}}.html{{else}}{{intToString $post.ParentID}}.html#{{intToString $post.PostID}}{{end}}">/{{$post.BoardName}}/</a></span> - {{$appended := stringAppend $post.Name $post.Tripcode}}{{if stringEq $appended ""}}<b>Anonymous</b>{{else}}<b>{{$post.Name}}</b>{{if stringNeq $post.Tripcode ""}}!{{$post.Tripcode}}{{end}}{{end}}
<span class="section-title"><a href="{{$post.BoardName}}/res/{{if eq $post.ParentID 0}}{{intToString $post.PostID}}.html{{else}}{{intToString $post.ParentID}}.html#{{intToString $post.PostID}}{{end}}">/{{$post.BoardName}}/</a></span> - {{$appended := stringAppend $post.Name $post.Tripcode}}{{if eq $appended ""}}<b>Anonymous</b>{{else}}<b>{{$post.Name}}</b>{{if ne $post.Tripcode ""}}!{{$post.Tripcode}}{{end}}{{end}}
</div>
<div class="section-body">
{{if stringNeq $post.Filename ""}}<a href="{{$post.BoardName}}/src/{{$post.Filename}}" target="_blank"><img src="{{$post.BoardName}}/thumb/{{getThumbnailFilename $post.Filename}}" alt="post thumbnail"/></a>{{end}}
{{if ne $post.Filename ""}}<a href="{{$post.BoardName}}/src/{{$post.Filename}}" target="_blank"><img src="{{$post.BoardName}}/thumb/{{getThumbnailFilename $post.Filename}}" alt="post thumbnail"/></a>{{end}}
{{truncateMessage $post.Message 225 12}}
</div>
</div>
@ -124,8 +116,8 @@
{{end}}
</div>
<div id="footer">
<a href="{{$config.SiteWebfolder}}">Home</a> | <a href="{{$config.SiteWebfolder}}#boards">Boards</a> | <a href="{{$config.SiteWebfolder}}#rules">Rules</a> | <a href="{{$config.SiteWebfolder}}#faq">FAQ</a><br />
Powered by <a href="http://github.com/eggbertx/gochan">Gochan {{$config.Version}}</a><br />
<a href="{{.config.SiteWebfolder}}">Home</a> | <a href="{{.config.SiteWebfolder}}#boards">Boards</a> | <a href="{{.config.SiteWebfolder}}#rules">Rules</a> | <a href="{{.config.SiteWebfolder}}#faq">FAQ</a><br />
Powered by <a href="http://github.com/eggbertx/gochan">Gochan {{.config.Version}}</a><br />
</div>
</body>
</html>

View file

@ -1,6 +1,6 @@
<div id="footer">
<a href="{{$config.SiteWebfolder}}">Home</a> | <a href="{{$config.SiteWebfolder}}#boards">Boards</a> | <a href="{{$config.SiteWebfolder}}#rules">Rules</a> | <a href="{{$config.SiteWebfolder}}#faq">FAQ</a><br />
Powered by <a href="http://github.com/eggbertx/gochan/">Gochan {{$config.Version}}</a><br />
<div id="footer">
<a href="{{.SiteWebfolder}}">Home</a> | <a href="{{.SiteWebfolder}}#boards">Boards</a> | <a href="{{.SiteWebfolder}}#rules">Rules</a> | <a href="{{.SiteWebfolder}}#faq">FAQ</a><br />
Powered by <a href="http://github.com/eggbertx/gochan/">Gochan {{.Version}}</a><br />
</div>
</body>
</html>

View file

@ -1,37 +1,24 @@
{{template "img_header.html" .}}
<div id="right-sidelinks">
<a href="{{$config.SiteWebfolder}}{{$board.Dir}}/catalog.html">Board catalog</a><br />
</div>
<div id="postbox-area">
<form name="postform" action="/post" method="POST" enctype="multipart/form-data">
<input type="hidden" name="threadid" value="0" />
<input type="hidden" name="boardid" value="{{$board.ID}}" />
<input type="text" name="username" style="display:none" />
<table id="postbox-static">
<tr><th class="postblock">Name</th><td><input type="text" id="postname" name="postname" maxlength="50" size="28" {{/* value="Name" onFocus="if(this.value=='Name') {this,value= ''}" onBlur="if(this.value == '') {this.value = 'Name'}"*/}}/></td></tr>
<tr><th class="postblock">Email</th><td><input type="text" id="postemail" name="postemail" maxlength="50" size="28" /></td></tr>
<tr><th class="postblock">Subject</th><td><input type="text" name="postsubject" maxlength="100" size="35" /><input type="submit" value="Post"/></td></tr>
<tr><th class="postblock">Message</th><td><textarea rows="4" cols="48" name="postmsg" id="postmsg"></textarea></td></tr>
<tr><th class="postblock">File</th><td><input name="imagefile" type="file"><input type="checkbox" id="spoiler" name="spoiler"/><label for="spoiler">Spoiler</label></td></tr>
<tr><th class="postblock">Password</th><td><input type="password" id="postpassword" name="postpassword" size="14" /> (for post/file deletion)</td></tr>
</table>
</form>
<a href="{{.config.SiteWebfolder}}{{.board.Dir}}/catalog.html">Board catalog</a><br />
</div>
{{template "postbox.html" .}}
<hr />
<div id="content">
<form action="/util" method="POST" id="main-form">
{{range $t, $thread := $thread_arr}}
{{range $t, $thread := .threads}}
{{$op := $thread.OP}}
<div class="thread">
<div class="op-post" id="op{{$op.ID}}">
{{if stringNeq $op.Filename ""}}
{{if stringNeq $op.Filename "deleted"}}
{{if ne $op.Filename ""}}
{{if ne $op.Filename "deleted"}}
<div class="file-info">File: <a href="src/{{$op.Filename}}" target="_blank">{{$op.Filename}}</a> - ({{formatFilesize $op.Filesize}} , {{$op.ImageW}}x{{$op.ImageH}}, {{$op.FilenameOriginal}})</div>
<a class="upload-container" href="{{$config.SiteWebfolder}}{{$board.Dir}}/src/{{$op.Filename}}"><img src="{{$config.SiteWebfolder}}{{$board.Dir}}/thumb/{{imageToThumbnailPath $op.Filename}}" width="{{$op.ThumbW}}" height="{{$op.ThumbH}}" class="upload" /></a>
<a class="upload-container" href="{{$.config.SiteWebfolder}}{{$.board.Dir}}/src/{{$op.Filename}}"><img src="{{$.config.SiteWebfolder}}{{$.board.Dir}}/thumb/{{imageToThumbnailPath $op.Filename}}" width="{{$op.ThumbW}}" height="{{$op.ThumbH}}" class="upload" /></a>
{{else}}
<div class="file-deleted-box" style="text-align:center;">File removed</div>
{{end}}
{{end}}
<input type="checkbox" id="check{{$op.ID}}" name="check{{$op.ID}}" /><label class="post-info" for="check{{$op.ID}}"> <span class="subject">{{$op.Subject}}</span> <span class="postername">{{if stringNeq $op.Email ""}}<a href="mailto:{{$op.Email}}">{{end}}{{if stringNeq $op.Name ""}}{{$op.Name}}{{else}}{{if stringEq $op.Tripcode ""}}{{$board.Anonymous}}{{end}}{{end}}{{if stringNeq $op.Email ""}}</a>{{end}}</span>{{if stringNeq $op.Tripcode ""}}<span class="tripcode">!{{$op.Tripcode}}</span>{{end}} {{formatTimestamp $op.Timestamp}} </label><a href="/{{$board.Dir}}/res/{{$op.ID}}.html#{{$op.ID}}">No.</a> <a href="javascript:quote({{$op.ID}})" class="backlink-click">{{$op.ID}}</a> <span class="post-links"> <span class="thread-ddown">[<a href="javascript:void(0)">&#9660;</a>]</span> <span>[<a href="/{{$board.Dir}}/res/{{$op.ID}}.html">View</a>]</span></span><br />
<input type="checkbox" id="check{{$op.ID}}" name="check{{$op.ID}}" /><label class="post-info" for="check{{$op.ID}}"> <span class="subject">{{$op.Subject}}</span> <span class="postername">{{if ne $op.Email ""}}<a href="mailto:{{$op.Email}}">{{end}}{{if ne $op.Name ""}}{{$op.Name}}{{else}}{{if eq $op.Tripcode ""}}{{$.board.Anonymous}}{{end}}{{end}}{{if ne $op.Email ""}}</a>{{end}}</span>{{if ne $op.Tripcode ""}}<span class="tripcode">!{{$op.Tripcode}}</span>{{end}} {{formatTimestamp $op.Timestamp}} </label><a href="/{{$.board.Dir}}/res/{{$op.ID}}.html#{{$op.ID}}">No.</a> <a href="javascript:quote({{$op.ID}})" class="backlink-click">{{$op.ID}}</a> <span class="post-links"> <span class="thread-ddown">[<a href="javascript:void(0)">&#9660;</a>]</span> <span>[<a href="/{{$.board.Dir}}/res/{{$op.ID}}.html">View</a>]</span></span><br />
<div class="post-text">{{truncateMessage $op.MessageHTML 2222 18}}</div>
{{if gt $thread.NumReplies 3}}
<b>{{subtract $thread.NumReplies 3}} post{{if gt $thread.NumReplies 4}}s{{end}} omitted</b>
@ -41,11 +28,11 @@
<div class="reply-container" id="replycontainer{{$reply.ID}}">
<a class="anchor" id="{{$reply.ID}}"></a>
<div class="reply" id="reply{{$reply.ID}}">
<input type="checkbox" id="check{{$reply.ID}}" name="check{{$reply.ID}}" /> <label class="post-info" for="check{{$reply.ID}}"> <span class="subject">{{$reply.Subject}}</span> <span class="postername">{{if stringNeq $reply.Email ""}}<a href="mailto:{{$reply.Email}}">{{end}}{{if stringNeq $reply.Name ""}}{{$reply.Name}}{{else}}{{if stringEq $reply.Tripcode ""}}{{$board.Anonymous}}{{end}}{{end}}{{if stringNeq $reply.Email ""}}</a>{{end}}</span>{{if stringNeq $reply.Tripcode ""}}<span class="tripcode">!{{$reply.Tripcode}}</span>{{end}} {{formatTimestamp $reply.Timestamp}} </label><a href="/{{$board.Dir}}/res/{{$op.ID}}.html#{{$reply.ID}}">No.</a> <a href="javascript:quote({{$reply.ID}})" class="backlink-click">{{$reply.ID}}</a> <span class="post-links"><span class="thread-ddown">[<a href="javascript:void(0)">&#9660;</a>]</span></span><br />
{{if stringNeq $reply.Filename ""}}
{{if stringNeq $reply.Filename "deleted"}}
<input type="checkbox" id="check{{$reply.ID}}" name="check{{$reply.ID}}" /> <label class="post-info" for="check{{$reply.ID}}"> <span class="subject">{{$reply.Subject}}</span> <span class="postername">{{if ne $reply.Email ""}}<a href="mailto:{{$reply.Email}}">{{end}}{{if ne $reply.Name ""}}{{$reply.Name}}{{else}}{{if eq $reply.Tripcode ""}}{{.board.Anonymous}}{{end}}{{end}}{{if eq $reply.Email ""}}</a>{{end}}</span>{{if ne $reply.Tripcode ""}}<span class="tripcode">!{{$reply.Tripcode}}</span>{{end}} {{formatTimestamp $reply.Timestamp}} </label><a href="/{{$.board.Dir}}/res/{{$op.ID}}.html#{{$reply.ID}}">No.</a> <a href="javascript:quote({{$reply.ID}})" class="backlink-click">{{$reply.ID}}</a> <span class="post-links"><span class="thread-ddown">[<a href="javascript:void(0)">&#9660;</a>]</span></span><br />
{{if ne $reply.Filename ""}}
{{if ne $reply.Filename "deleted"}}
<span class="file-info">File: <a href="src/{{$reply.Filename}}" target="_blank">{{$reply.Filename}}</a> - ({{formatFilesize $reply.Filesize}} , {{$reply.ImageW}}x{{$reply.ImageH}}, {{$reply.FilenameOriginal}})</span><br />
<a class="upload-container" href="{{$config.SiteWebfolder}}{{$board.Dir}}/src/{{$reply.Filename}}"><img src="{{$config.SiteWebfolder}}{{$board.Dir}}/thumb/{{imageToThumbnailPath $reply.Filename}}" width="{{$reply.ThumbW}}" height="{{$reply.ThumbH}}" class="upload" /></a>
<a class="upload-container" href="{{$.config.SiteWebfolder}}{{$.board.Dir}}/src/{{$reply.Filename}}"><img src="{{$.config.SiteWebfolder}}{{$.board.Dir}}/thumb/{{imageToThumbnailPath $reply.Filename}}" width="{{$reply.ThumbW}}" height="{{$reply.ThumbH}}" class="upload" /></a>
{{else}}
<div class="file-deleted-box" style="text-align:center;">File removed</div>
{{end}}{{end}}
@ -56,7 +43,8 @@
<hr />{{end}}
<div id="right-bottom-content">
<div id="report-delbox">
<input type="hidden" name="board" value="{{$board.Dir}}" />
<input type="hidden" name="board" value="{{.board.Dir}}" />
<input type="hidden" name="boardid" value="{{.board.ID}}" />
<label>[<input type="checkbox" name="fileonly"/>File only]</label> <input type="password" size="10" name="password" id="delete-password" /> <input type="submit" name="delete_btn" value="Delete" onclick="return confirm('Are you sure you want to delete these posts?')" /><br />
Reason: <input type="text" size="10" name="reason" id="reason" /> <input type="submit" name="report_btn" value="Report" /><br />
Edit post <input type="submit" name="edit_btn" value="Edit" />
@ -65,25 +53,25 @@
</form>
<div id="left-bottom-content">
<table id="pages">
<tr><td>{{if gt $board.CurrentPage 1}}
<form method="GET" action="{{$config.SiteWebfolder}}{{$board.Dir}}/{{subtract $board.CurrentPage 1}}.html">
<tr><td>{{if gt .board.CurrentPage 2}}
<form method="GET" action="{{.config.SiteWebfolder}}{{.board.Dir}}/{{subtract .board.CurrentPage 1}}.html">
<input type="submit" value="Previous" />
</form>
{{else if intEq $board.CurrentPage 1}}
<form method="GET" action="{{$config.SiteWebfolder}}{{$board.Dir}}/">
{{else if intEq .board.CurrentPage 2}}
<form method="GET" action="{{.config.SiteWebfolder}}{{.board.Dir}}/board.html">
<input type="submit" value="Previous" />
</form>
{{else}}Previous{{end}}</td>
<td>[<a href="{{$config.SiteWebfolder}}{{$board.Dir}}/">Index</a>]{{range $i,$_ := makeLoop $board.NumPages}} [{{if eq $i $board.CurrentPage}}<b>{{end}}<a href="{{$config.SiteWebfolder}}{{$board.Dir}}/{{add $i 1}}.html">{{add $i 1}}</a>{{if eq $i $board.CurrentPage}}</b>{{end}}]{{end}}</td>
<td>{{if lt $board.CurrentPage $board.NumPages}}
<form method="GET" action="{{$config.SiteWebfolder}}{{$board.Dir}}/{{add $board.CurrentPage 1}}.html">
<td>{{range $_,$i := makeLoop .board.NumPages 1}} [{{if eq $i $.board.CurrentPage}}<b>{{end}}<a href="{{$.config.SiteWebfolder}}{{$.board.Dir}}/{{if intEq $i 1}}board{{else}}{{$i}}{{end}}.html">{{$i}}</a>{{if eq $i $.board.CurrentPage}}</b>{{end}}]{{end}}</td>
<td>{{if lt .board.CurrentPage .board.NumPages}}
<form method="GET" action="{{.config.SiteWebfolder}}{{.board.Dir}}/{{add .board.CurrentPage 1}}.html">
<input type="submit" value="Next" />
</form>
{{else}}Next{{end}}</td></tr>
</table>
<span id="boardmenu-bottom">
[{{range $i, $boardlink := $board_arr}} {{if gt $i 0}}/{{end}} <a href="/{{$boardlink.Dir}}/">{{$boardlink.Dir}}</a> {{end}}]
[{{range $i, $boardlink := $.boards}}{{if gt $i 0}}/{{end}} <a href="/{{$boardlink.Dir}}/">{{$boardlink.Dir}}</a> {{end}}]
</span>
</div>
</div>
</div>
{{template "global_footer.html" .}}

View file

@ -2,36 +2,37 @@
<html>
<head>
<meta charset="UTF-8">
{{if stringNeq $op.Subject ""}}
<title>/{{$board.Dir}}/ - {{truncateString $op.Subject 20 true}}</title>
{{else}}{{if stringNeq $op.MessageHTML ""}}
<title>/{{$board.Dir}}/ - {{truncateString $op.MessageText 20 true}}</title>
{{end}}{{end}}
<title>/{{$board.Dir}}/ - {{$board.Title}}</title>
{{with .op.Subject}}
{{if ne .op.Subject ""}}
<title>/{{.board.Dir}}/ - {{truncateString .op.Subject 20 true}}</title>
{{else if ne .op.MessageHTML ""}}
<title>/{{.board.Dir}}/ - {{truncateString .op.MessageText 20 true}}</title>
{{end}}
{{else}}<title>/{{.board.Dir}}/ - {{.board.Title}}</title>{{end}}
<title>/{{.board.Dir}}/ - {{.board.Title}}</title>
<script type="text/javascript" src="/javascript/jquery-3.3.1.min.js"></script>
<script type="text/javascript">
var styles = [{{range $ii, $style := $config.Styles_img}}{{if gt $ii 0}}, {{end}}"{{$style}}"{{end}}];
var webroot = "{{$config.SiteWebfolder}}";
var styles = [{{range $ii, $style := $.config.Styles_img}}{{if gt $ii 0}}, {{end}}"{{$style}}"{{end}}];
var webroot = "{{$.config.SiteWebfolder}}";
var thread_type = "thread";
function changePage(sel) {
window.location = webroot+"test/res/{{$op.ID}}p"+sel.value+".html";
window.location = webroot+"{{$.board.Dir}}/res/{{$.op.ID}}p"+sel.value+".html";
}
</script>
<script type="text/javascript" src="/javascript/gochan.js"></script>
<script type="text/javascript" src="/javascript/manage.js"></script>
<link rel="stylesheet" href="/css/global/img.css" />
{{range $i, $style := $config.Styles_img}}
<link rel="{{if isStyleNotDefault_img $style}}alternate {{end}}stylesheet" href="/css/{{$style}}/img.css" />{{end}}
{{range $_, $style := .config.Styles_img}}
<link rel="{{if not (isStyleDefault_img $style)}}alternate {{end}}stylesheet" href="/css/{{$style}}/img.css" />{{end}}
<link rel="shortcut icon" href="/favicon.png" />
</head>
<body>
<div id="topbar">
{{range $i, $board := $board_arr}}
<a href="/{{$board.Dir}}/" class="topbar-item">/{{$board.Dir}}/</a>
{{end}}
{{range $i, $board := .boards}}<a href="/{{$board.Dir}}/" class="topbar-item">/{{$board.Dir}}/</a>{{end}}
</div>
<header>
<h1>/{{$board.Dir}}/ - {{$board.Title}}</h1>
<div id="board-subtitle">{{$board.Subtitle}}</div>
<h1>/{{$.board.Dir}}/ - {{$.board.Title}}</h1>
<div id="board-subtitle">{{$.board.Subtitle}}</div>
</header>
<hr />

View file

@ -1,5 +1,6 @@
{{template "img_header.html" .}}
<div id="threadlinks-top">
<a href="{{$config.SiteWebfolder}}{{$board.Dir}}/board.html" >Return</a><br />
<a href="{{$.config.SiteWebfolder}}{{$.board.Dir}}/board.html" >Return</a><br />
<select id="changepage" onchange="changePage(this)">
<option value="">Select page...</option>
<option value="1">Page 1</option>
@ -7,62 +8,47 @@
<option value="3">Page 3</option>
<option value="4">Page 4</option>
</select>
{{/*}}<a href="{{$op.ID}}-100.html">First 100 posts</a><br />
<a href="{{$op.ID}}+50.html">Last 50 posts</a><br />{{*/}}
</div>
<div id="right-sidelinks">
<a href="{{$config.SiteWebfolder}}{{$board.Dir}}/catalog.html">Board catalog</a><br />
</div>
<div id="postbox-area">
<form name="postform" action="/post" method="POST" enctype="multipart/form-data">
<input type="hidden" name="threadid" value="{{$op.ID}}" />
<input type="hidden" name="boardid" value="{{$op.BoardID}}" />
<input type="text" name="username" style="display:none" />
<table id="postbox-static">
<tr><th class="postblock">Name</th><td><input type="text" id="postname" name="postname" maxlength="50" size="28" {{/* value="Name" onFocus="if(this.value=='Name') {this,value= ''}" onBlur="if(this.value == '') {this.value = 'Name'}"*/}}/></td></tr>
<tr><th class="postblock">Email</th><td><input type="text" id="postemail" name="postemail" maxlength="50" size="28" /></td></tr>
<tr><th class="postblock">Subject</th><td><input type="text" name="postsubject" maxlength="100" size="35" /><input type="submit" value="Post"/></td></tr>
<tr><th class="postblock">Message</th><td><textarea rows="4" cols="48" name="postmsg" id="postmsg"></textarea></td></tr>
<tr><th class="postblock">File</th><td><input name="imagefile" type="file"><input type="checkbox" id="spoiler" name="spoiler"/><label for="spoiler">Spoiler</label></td></tr>
<tr><th class="postblock">Password</th><td><input type="password" id="postpassword" name="postpassword" size="14" /> (for post/file deletion)</td></tr>
</table>
</form>
<a href="{{$.config.SiteWebfolder}}{{$.board.Dir}}/catalog.html">Board catalog</a><br />
</div>
{{template "postbox.html" .}}
<hr />
<div id="content">
<form action="/util" method="POST" id="main-form">
<div class="thread" id="{{$op.ID}}">
<div class="op-post" id="op{{$op.ID}}">
{{if stringNeq $op.Filename ""}}
{{if stringNeq $op.Filename "deleted"}}
<div class="file-info">File: <a href="../src/{{$op.Filename}}" target="_blank">{{$op.Filename}}</a> - ({{formatFilesize $op.Filesize}} , {{$op.ImageW}}x{{$op.ImageH}}, {{$op.FilenameOriginal}})</div>
<a class="upload-container" href="{{$config.SiteWebfolder}}{{$board.Dir}}/src/{{$op.Filename}}"><img src="{{$config.SiteWebfolder}}{{$board.Dir}}/thumb/{{imageToThumbnailPath $op.Filename}}" width="{{$op.ThumbW}}" height="{{$op.ThumbH}}" class="upload" /></a>
<div class="thread" id="{{$.op.ID}}">
<div class="op-post" id="op{{.op.ID}}">
{{if ne $.op.Filename ""}}
{{if ne $.op.Filename "deleted"}}
<div class="file-info">File: <a href="../src/{{.op.Filename}}" target="_blank">{{.op.Filename}}</a> - ({{formatFilesize .op.Filesize}} , {{.op.ImageW}}x{{.op.ImageH}}, {{.op.FilenameOriginal}})</div>
<a class="upload-container" href="{{.config.SiteWebfolder}}{{.board.Dir}}/src/{{.op.Filename}}"><img src="{{.config.SiteWebfolder}}{{.board.Dir}}/thumb/{{imageToThumbnailPath .op.Filename}}" width="{{.op.ThumbW}}" height="{{.op.ThumbH}}" class="upload" /></a>
{{else}}
<div class="file-deleted-box" style="text-align:center;">File removed</div>
{{end}}{{end}}
<input type="checkbox" id="check{{$op.ID}}" name="check{{$op.ID}}" /><label class="post-info" for="check{{$op.ID}}"> <span class="subject">{{$op.Subject}}</span> <span class="postername">{{if stringNeq $op.Email ""}}<a href="mailto:{{$op.Email}}">{{end}}{{if stringNeq $op.Name ""}}{{$op.Name}}{{else}}{{if stringEq $op.Tripcode ""}}{{$board.Anonymous}}{{end}}{{end}}{{if stringNeq $op.Email ""}}</a>{{end}}</span>{{if stringNeq $op.Tripcode ""}}<span class="tripcode">!{{$op.Tripcode}}</span>{{end}} {{formatTimestamp $op.Timestamp}} </label><a href="/{{$board.Dir}}/res/{{$op.ID}}.html#{{$op.ID}}">No.</a> <a href="javascript:quote({{$op.ID}})" class="backlink-click">{{$op.ID}}</a> <span class="post-links"> <span class="thread-ddown">[<a href="javascript:void(0)">&#9660;</a>]</span></span><br />
<div class="post-text">{{$op.MessageHTML}}</div>
<input type="checkbox" id="check{{.op.ID}}" name="check{{.op.ID}}" /><label class="post-info" for="check{{.op.ID}}"> <span class="subject">{{.op.Subject}}</span> <span class="postername">{{if ne .op.Email ""}}<a href="mailto:{{.op.Email}}">{{end}}{{if ne .op.Name ""}}{{.op.Name}}{{else}}{{if eq .op.Tripcode ""}}{{.board.Anonymous}}{{end}}{{end}}{{if ne .op.Email ""}}</a>{{end}}</span>{{if ne .op.Tripcode ""}}<span class="tripcode">!{{.op.Tripcode}}</span>{{end}} {{formatTimestamp .op.Timestamp}} </label><a href="/{{.board.Dir}}/res/{{.op.ID}}.html#{{.op.ID}}">No.</a> <a href="javascript:quote({{.op.ID}})" class="backlink-click">{{.op.ID}}</a> <span class="post-links"> <span class="thread-ddown">[<a href="javascript:void(0)">&#9660;</a>]</span></span><br />
<div class="post-text">{{.op.MessageHTML}}</div>
</div>
{{range $reply_num,$reply := $post_arr}}{{if gt $reply_num 0}}
{{range $reply_num,$reply := .posts}}
<div class="reply-container" id="replycontainer{{$reply.ID}}">
<a class="anchor" id="{{$reply.ID}}"></a>
<div class="reply" id="reply{{$reply.ID}}">
<input type="checkbox" id="check{{$reply.ID}}" name="check{{$reply.ID}}" /> <label class="post-info" for="check{{$reply.ID}}"> <span class="subject">{{$reply.Subject}}</span> <span class="postername">{{if stringNeq $reply.Email ""}}<a href="mailto:{{$reply.Email}}">{{end}}{{if stringNeq $reply.Name ""}}{{$reply.Name}}{{else}}{{if stringEq $reply.Tripcode ""}}{{$board.Anonymous}}{{end}}{{end}}{{if stringNeq $reply.Email ""}}</a>{{end}}</span>{{if stringNeq $reply.Tripcode ""}}<span class="tripcode">!{{$reply.Tripcode}}</span>{{end}} {{formatTimestamp $reply.Timestamp}} </label><a href="/{{$board.Dir}}/res/{{$op.ID}}.html#{{$reply.ID}}">No.</a> <a href="javascript:quote({{$reply.ID}})" class="backlink-click">{{$reply.ID}}</a> <span class="post-links"><span class="thread-ddown">[<a href="javascript:void(0)">&#9660;</a>]</span></span><br />
{{if stringNeq $reply.Filename ""}}
{{if stringNeq $reply.Filename "deleted"}}
<input type="checkbox" id="check{{$reply.ID}}" name="check{{$reply.ID}}" /> <label class="post-info" for="check{{$reply.ID}}"> <span class="subject">{{$reply.Subject}}</span> <span class="postername">{{if ne $reply.Email ""}}<a href="mailto:{{$reply.Email}}">{{end}}{{if ne $reply.Name ""}}{{$reply.Name}}{{else}}{{if eq $reply.Tripcode ""}}{{$.board.Anonymous}}{{end}}{{end}}{{if ne $reply.Email ""}}</a>{{end}}</span>{{if ne $reply.Tripcode ""}}<span class="tripcode">!{{$reply.Tripcode}}</span>{{end}} {{formatTimestamp $reply.Timestamp}} </label><a href="/{{$.board.Dir}}/res/{{$.op.ID}}.html#{{$reply.ID}}">No.</a> <a href="javascript:quote({{$reply.ID}})" class="backlink-click">{{$reply.ID}}</a> <span class="post-links"><span class="thread-ddown">[<a href="javascript:void(0)">&#9660;</a>]</span></span><br />
{{if ne $reply.Filename ""}}
{{if ne $reply.Filename "deleted"}}
<span class="file-info">File: <a href="../src/{{$reply.Filename}}" target="_blank">{{$reply.Filename}}</a> - ({{formatFilesize $reply.Filesize}} , {{$reply.ImageW}}x{{$reply.ImageH}}, {{$reply.FilenameOriginal}})</span><br />
<a class="upload-container" href="{{$config.SiteWebfolder}}{{$board.Dir}}/src/{{$reply.Filename}}"><img src="{{$config.SiteWebfolder}}{{$board.Dir}}/thumb/{{imageToThumbnailPath $reply.Filename}}" width="{{$reply.ThumbW}}" height="{{$reply.ThumbH}}" class="upload" /></a>
<a class="upload-container" href="{{$.config.SiteWebfolder}}{{$.board.Dir}}/src/{{$reply.Filename}}"><img src="{{$.config.SiteWebfolder}}{{$.board.Dir}}/thumb/{{imageToThumbnailPath $reply.Filename}}" width="{{$reply.ThumbW}}" height="{{$reply.ThumbH}}" class="upload" /></a>
{{else}}
<div class="file-deleted-box" style="text-align:center;">File removed</div>
{{end}}{{end}}
<div class="post-text">{{$reply.MessageHTML}}</div>
</div>
</div>{{end}}{{end}}
</div>{{end}}
</div>
<hr />
<div id="right-bottom-content">
<div id="report-delbox">
<input type="hidden" name="board" value="{{$board.Dir}}" />
<input type="hidden" name="board" value="{{.board.Dir}}" />
<input type="hidden" name="boardid" value="{{.board.ID}}" />
<label>[<input type="checkbox" name="fileonly"/>File only]</label> <input type="password" size="10" name="password" id="delete-password" /> <input type="submit" name="delete_btn" value="Delete" onclick="return confirm('Are you sure you want to delete these posts?')" /><br />
Reason: <input type="text" size="10" name="reason" id="reason" /> <input type="submit" name="report_btn" value="Report" /><br />
Edit post <input type="submit" name="edit_btn" value="Edit" />
@ -72,22 +58,25 @@
<div id="left-bottom-content">
<table id="pages">
<tr>
<td><a href="{{$config.SiteWebfolder}}{{$board.Dir}}/">Return</a></td>
<td>{{if gt $op.CurrentPage 1}}
<form method="GET" action="{{$config.SiteWebfolder}}{{$board.Dir}}/res/{{$op.ID}}p{{subtract $op.CurrentPage 1}}.html">
<input type="submit" value="Previous" />
</form>
<td><a href="{{.config.SiteWebfolder}}{{.board.Dir}}/">Return</a></td>
<td>{{if gt .op.CurrentPage 1}}
<form method="GET" action="{{.config.SiteWebfolder}}{{.board.Dir}}/res/{{.op.ID}}p{{subtract .op.CurrentPage 1}}.html">
<input type="submit" value="Previous" />
</form>
{{else}}Previous{{end}}
</td>
<td>[<a href="{{$config.SiteWebfolder}}{{$board.Dir}}/res/{{$op.ID}}.html">All</a>]{{range $i,$_ := makeLoop $op.NumPages}} [{{if eq $i (subtract $op.CurrentPage 1)}}<b>{{end}}<a href="{{$config.SiteWebfolder}}{{$board.Dir}}/res/{{$op.ID}}p{{add $i 1}}.html">{{add $i 1}}</a>{{if eq $i (subtract $op.CurrentPage 1)}}</b>{{end}}]{{end}}</td>
<td>{{if lt $op.CurrentPage $op.NumPages}}
<form method="GET" action="{{$config.SiteWebfolder}}{{$board.Dir}}/res/{{$op.ID}}p{{add $op.CurrentPage 1}}.html">
<td>[<a href="{{.config.SiteWebfolder}}{{.board.Dir}}/res/{{.op.ID}}.html">All</a>]
{{range $i,$_ := makeLoop .op.NumPages 0}}
[{{if eq $i (subtract $.op.CurrentPage 1)}}<b>{{end}}<a href="{{$.config.SiteWebfolder}}{{$.board.Dir}}/res/{{$.op.ID}}p{{add $i 1}}.html">{{add $i 1}}</a>{{if eq $i (subtract $.op.CurrentPage 1)}}</b>{{end}}]{{end}}</td>
<td>{{if lt .op.CurrentPage .op.NumPages}}
<form method="GET" action="{{.config.SiteWebfolder}}{{.board.Dir}}/res/{{.op.ID}}p{{add .op.CurrentPage 1}}.html">
<input type="submit" value="Next" />
</form>
{{else}}Next{{end}}</td></tr>
</table>
<span id="boardmenu-bottom">
[{{range $i, $boardlink := $board_arr}} {{if gt $i 0}}/{{end}} <a href="/{{$boardlink.Dir}}/">{{$boardlink.Dir}}</a> {{end}}]
[{{range $i, $boardlink := .boards}} {{if gt $i 0}}/{{end}} <a href="/{{$boardlink.Dir}}/">{{$boardlink.Dir}}</a> {{end}}]
</span>
</div>
</div>
</div>
{{template "global_footer.html" .}}

View file

@ -5,7 +5,7 @@
<tr><td>Directory</td><td><input type="text" name="dir" value="" /></td></tr>
<tr><td>Section</td><td><select name="section" selected="0">
<option value="none">Select section...</option>
{{range $_, $section := $section_arr}}
{{range $_, $section := .section_arr}}
<option value="{{$section.ID}}">{{$section.Name}}</option>{{end}}
</select></td></tr>
<tr><td>Order</td><td><input type="text" name="order" value="0" /></td></tr>
@ -15,19 +15,18 @@
<tr><td>Max image size</td><td><input type="text" name="maximagesize" value="4718592" /></td></tr>
<tr><td>Max pages</td><td><input type="text" name="maxpages" value="11" /></td></tr>
<tr><td>Default style</td><td><select name="defaultstyle" selected="">
{{range $i, $style := $config.Styles_img}}
<option value="{{$style}}">{{$style}}</option>{{end}}
{{range $_, $style := .config.Styles_img}}<option value="{{$style}}">{{$style}}</option>{{end}}
</select></td></tr>
<tr><td>Locked</td><td><input type="checkbox" name="locked" {{if $board.Locked}}checked{{end}}/></td></tr>
<tr><td>Forced anonymity</td><td><input type="checkbox" name="forcedanon" {{if $board.ForcedAnon}}checked{{end}}/></td></tr>
<tr><td>Anonymous name</td><td><input type="text" name="anonymous" value="{{$board.Anonymous}}" /></td></tr>
<tr><td>Max age</td><td><input type="text" name="maxage" value="{{$board.MaxAge}}"/></td></tr>
<tr><td>Bump limit<sup title="After this many posts, the thread will stop being bumped when a new post is made. ">[?]</sup></td><td><input type="text" name="autosageafter" value="{{$board.AutosageAfter}}"/></td></tr>
<tr><td>No images after</td><td><input type="text" name="noimagesafter" value="{{$board.NoImagesAfter}}"/></td></tr>
<tr><td>Max message length</td><td><input type="text" name="maxmessagelength" value="{{$board.MaxMessageLength}}"/></td></tr>
<tr><td>Embeds allowed</td><td><input type="checkbox" name="embedsallowed" {{if $board.EmbedsAllowed}}checked{{end}}/></td></tr>
<tr><td>Redirect to thread<sup title="If checked, posts will redirect to the thread by default without requiring 'noko' in the email">[?]</sup></td><td><input type="checkbox" name="redirecttothread" {{if $board.RedirectToThread}}checked{{end}}/></td></tr>
<tr><td>Require an uploaded file</td><td><input type="checkbox" name="require_file" {{if $board.RequireFile}}checked{{end}}/></td></tr>
<tr><td>Enable catalog</td><td><input type="checkbox" name="enablecatalog" {{if $board.EnableCatalog}}checked{{end}}/></td></tr>
<tr><td>Locked</td><td><input type="checkbox" name="locked" {{if .board.Locked}}checked{{end}}/></td></tr>
<tr><td>Forced anonymity</td><td><input type="checkbox" name="forcedanon" {{if .board.ForcedAnon}}checked{{end}}/></td></tr>
<tr><td>Anonymous name</td><td><input type="text" name="anonymous" value="{{.board.Anonymous}}" /></td></tr>
<tr><td>Max age</td><td><input type="text" name="maxage" value="{{.board.MaxAge}}"/></td></tr>
<tr><td>Bump limit<sup title="After this many posts, the thread will stop being bumped when a new post is made. ">[?]</sup></td><td><input type="text" name="autosageafter" value="{{.board.AutosageAfter}}"/></td></tr>
<tr><td>No images after</td><td><input type="text" name="noimagesafter" value="{{.board.NoImagesAfter}}"/></td></tr>
<tr><td>Max message length</td><td><input type="text" name="maxmessagelength" value="{{.board.MaxMessageLength}}"/></td></tr>
<tr><td>Embeds allowed</td><td><input type="checkbox" name="embedsallowed" {{if .board.EmbedsAllowed}}checked{{end}}/></td></tr>
<tr><td>Redirect to thread<sup title="If checked, posts will redirect to the thread by default without requiring 'noko' in the email">[?]</sup></td><td><input type="checkbox" name="redirecttothread" {{if .board.RedirectToThread}}checked{{end}}/></td></tr>
<tr><td>Require an uploaded file</td><td><input type="checkbox" name="require_file" {{if .board.RequireFile}}checked{{end}}/></td></tr>
<tr><td>Enable catalog</td><td><input type="checkbox" name="enablecatalog" {{if .board.EnableCatalog}}checked{{end}}/></td></tr>
</table>
<input type="submit" /></form>

View file

@ -2,21 +2,21 @@
<form action="/manage?action=config" method="POST">
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr><th>DocumentRoot</th><td><input type="text" value="{{$config.DocumentRoot}}"/></td></tr>
<tr><th>TemplateDir</th><td><input type="text" value="{{$config.TemplateDir}}" /></td></tr>
<tr><th>LogDir</th><td><input type="text" value="{{$config.LogDir}}" /></td></tr>
<tr><th>DocumentRoot</th><td><input type="text" value="{{.config.DocumentRoot}}"/></td></tr>
<tr><th>TemplateDir</th><td><input type="text" value="{{.config.TemplateDir}}" /></td></tr>
<tr><th>LogDir</th><td><input type="text" value="{{.config.LogDir}}" /></td></tr>
<tr><th>Lockdown</th><td><input type="checkbox" {{if $config.Lockdown}}checked{{end}}/></td></tr>
<tr><th>LockdownMessage</th><td><input type="text" value="{{$config.LockdownMessage}}" /></td></tr>
<tr><th>Lockdown</th><td><input type="checkbox" {{if .config.Lockdown}}checked{{end}}/></td></tr>
<tr><th>LockdownMessage</th><td><input type="text" value="{{.config.LockdownMessage}}" /></td></tr>
<tr><th>UseSillytags</th><td><input type="checkbox" /></td></tr>
<tr><th>Modboard</th><td><input type="text" value="{{$config.Modboard}}"></td></tr>
<tr><th>Modboard</th><td><input type="text" value="{{.config.Modboard}}"></td></tr>
<tr><th>SiteName</th><td><input type="text" value="{{$config.SiteName}}" /></td></tr>
<tr><th>SiteSlogan</th><td><input type="text" value="{{$config.SiteSlogan}}" /></td></tr>
<tr><th>SiteHeaderURL</th><td><input type="text" value="{{$config.SiteHeaderURL}}" /></td></tr>
{{/*<tr><th>SiteWebfolder</th><td><input type="text" value="{{$config.SiteWebFolder}}" /></td></tr>*/}}
<tr><th>DomainRegex</th><td><input type="text" value="{{$config.DomainRegex}}" /></td><td>Don't touch this unless you know what you're doing! This could fuck your shit up<br />Default: (https|http)://(.*)/(.*)</td></tr>
<tr><th>SiteName</th><td><input type="text" value="{{.config.SiteName}}" /></td></tr>
<tr><th>SiteSlogan</th><td><input type="text" value="{{.config.SiteSlogan}}" /></td></tr>
<tr><th>SiteHeaderURL</th><td><input type="text" value="{{.config.SiteHeaderURL}}" /></td></tr>
{{/*<tr><th>SiteWebfolder</th><td><input type="text" value="{{.config.SiteWebFolder}}" /></td></tr>*/}}
<tr><th>DomainRegex</th><td><input type="text" value="{{.config.DomainRegex}}" /></td><td>Don't touch this unless you know what you're doing! This could fuck your shit up<br />Default: (https|http)://(.*)/(.*)</td></tr>
</table>
<input type="submit" />
</form>

View file

@ -1,7 +1,7 @@
<title>Gochan Manage page</title>
<link rel="stylesheet" href="/css/global/manage.css" />
{{range $i, $style := .Styles_img}}
<link rel="{{if isStyleNotDefault_img $style}}alternate {{end}}stylesheet" href="/css/{{$style}}/manage.css" />{{end}}
<link rel="{{if not (isStyleDefault_img $style)}}alternate {{end}}stylesheet" href="/css/{{$style}}/manage.css" />{{end}}
<link rel="shortcut icon" href="/favicon.png" />
<script type="text/javascript">
var styles = [{{range $i, $style := .Styles_img}}{{if gt $i 0}}, {{end}}"{{$style}}"{{end}}];