mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-24 08:46:24 -07:00
prepend all absolute paths with {{$.config.SiteWebfolder}}
This fixes issues with people who have something aside from "/" as their config.SiteWebFolder setting
This commit is contained in:
parent
171b03a237
commit
e1de5162ac
8 changed files with 95 additions and 115 deletions
|
@ -944,6 +944,7 @@ var manage_functions = map[string]ManageFunction{
|
|||
allSections, _ = getSectionArr("")
|
||||
|
||||
if err := manage_boards_tmpl.Execute(manageBoardsBuffer, map[string]interface{}{
|
||||
"config": config,
|
||||
"board": board,
|
||||
"section_arr": allSections,
|
||||
}); err != nil {
|
||||
|
|
|
@ -52,7 +52,7 @@ func connectToSQLServer() {
|
|||
for _, statement := range initialSQLArr {
|
||||
if statement != "" && statement != "\n" && strings.Index(statement, "--") != 0 {
|
||||
if _, err := db.Exec(statement); err != nil {
|
||||
handleError(0, "failed with error: %s\n", customError(err))
|
||||
handleError(0, "failed: %s\n", customError(err))
|
||||
os.Exit(2)
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ func connectToSQLServer() {
|
|||
if err == sql.ErrNoRows {
|
||||
newInstall = true
|
||||
} else if err != nil {
|
||||
handleError(0, "failed with error: %s\n", customError(err))
|
||||
handleError(0, "failed: %s\n", customError(err))
|
||||
os.Exit(2)
|
||||
}
|
||||
|
||||
|
|
154
templates/front.html
Executable file → Normal file
154
templates/front.html
Executable file → Normal file
|
@ -4,117 +4,97 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<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" src="{{.config.SiteWebfolder}}javascript/jquery-3.3.1.min.js"></script>
|
||||
<script type="text/javascript" src="{{.config.SiteWebfolder}}javascript/msgpack.js"></script>
|
||||
<script type="text/javascript">
|
||||
var styles = [{{range $ii, $style := .config.Styles}}{{if gt $ii 0}}, {{end}}"{{$style}}"{{end}}];
|
||||
var styles = [{{range $ii, $style := .config.Styles}}{{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>
|
||||
|
||||
<script type="text/javascript" src="{{.config.SiteWebfolder}}javascript/gochan.js"></script>
|
||||
<script type="text/javascript" src="{{.config.SiteWebfolder}}javascript/manage.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/css/global/front.css" />
|
||||
{{range $i, $style := .config.Styles}}
|
||||
{{range $i, $style := .config.Styles}}
|
||||
<link rel="{{if not (isStyleDefault $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 := .boards}}
|
||||
<a href="/{{$board.Dir}}/" class="topbar-item">/{{$board.Dir}}/</a>
|
||||
{{end}}
|
||||
<div id="topbar">{{range $i, $board := .boards}}
|
||||
<a href="{{$.config.SiteWebfolder}}{{$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>
|
||||
</div>
|
||||
<div id="main">
|
||||
<div id="tab-bar">
|
||||
<div id="current-tab" class="tab">
|
||||
<a href="#">News</a>
|
||||
<div id="tab-bar">
|
||||
<div id="current-tab" class="tab">
|
||||
<a href="#">News</a>
|
||||
</div>
|
||||
<div class="tab">
|
||||
<a href="#boards">Boards</a>
|
||||
</div>
|
||||
<div class="tab">
|
||||
<a href="#rules">Rules</a>
|
||||
</div>
|
||||
<div class="tab">
|
||||
<a href="#faq">FAQ</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="first-page" class="page">{{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="{{.config.SiteWebfolder}}#first-page{{$ii}}" class="permalink">#</a>
|
||||
</div>
|
||||
<div class="tab">
|
||||
<a href="#boards">Boards</a>
|
||||
<div class="section-body">
|
||||
{{$page.Message}}
|
||||
</div>
|
||||
<div class="tab">
|
||||
<a href="#rules">Rules</a>
|
||||
</div>{{end}}{{end}}
|
||||
</div>
|
||||
<div id="boards-page" class="page">
|
||||
<div class="section-block">
|
||||
<div class="section-title-block">
|
||||
<b>Boards</b>
|
||||
</div>
|
||||
<div class="tab">
|
||||
<a href="#faq">FAQ</a>
|
||||
<div class="section-body">
|
||||
<ul>{{range $_, $board := .boards}}{{if eq $board.Dir $.config.Modboard}}{{else}}
|
||||
<li><b>/{{$board.Dir}}/</b> {{$board.Description}}</li>{{end}}{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="first-page" class="page">
|
||||
{{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>
|
||||
</div>
|
||||
<div class="section-body">
|
||||
{{$page.Message}}
|
||||
</div>
|
||||
</div>
|
||||
<div id="rules-page" class="page">{{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="{{.config.SiteWebfolder}}#first-page{{$ii}}" class="permalink">#</a>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
<div id="boards-page" class="page">
|
||||
<div class="section-block">
|
||||
<div class="section-title-block">
|
||||
<b>Boards</b>
|
||||
</div>
|
||||
<div class="section-body">
|
||||
<ul>
|
||||
{{range $_, $board := .boards}}
|
||||
{{if eq $board.Dir $.config.Modboard}}{{else}}
|
||||
<li><b>/{{$board.Dir}}/</b> {{$board.Description}}</li>{{end}}{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section-body">
|
||||
{{$page.Message}}
|
||||
</div>
|
||||
</div>
|
||||
<div id="rules-page" class="page">
|
||||
{{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>
|
||||
</div>
|
||||
<div class="section-body">
|
||||
{{$page.Message}}
|
||||
</div>
|
||||
</div>{{end}}{{end}}
|
||||
</div>
|
||||
<div id="faq-page" class="page">{{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="{{.config.SiteWebfolder}}#first-page{{$ii}}" class="permalink">#</a>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
<div id="faq-page" class="page">
|
||||
{{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>
|
||||
</div>
|
||||
<div class="section-body">
|
||||
{{$page.Message}}
|
||||
</div>
|
||||
<div class="section-body">
|
||||
{{$page.Message}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{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}}
|
||||
<div class="section-block">
|
||||
<div class="section-title-block">
|
||||
<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 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>{{end}}{{end}}
|
||||
</div>
|
||||
{{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}}<div class="section-block">
|
||||
<div class="section-title-block">
|
||||
<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>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="section-body">
|
||||
{{if ne $post.Filename ""}}<a href="{{$.config.SiteWebfolder}}{{$post.BoardName}}/src/{{$post.Filename}}" target="_blank"><img src="{{$.config.SiteWebfolder}}{{$post.BoardName}}/thumb/{{getThumbnailFilename $post.Filename}}" alt="post thumbnail"/></a>{{end}}
|
||||
{{truncateMessage $post.Message 225 12}}
|
||||
</div>
|
||||
</div>{{end}}{{end}}
|
||||
</div>
|
||||
</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 />
|
||||
|
|
10
templates/img_boardpage.html
Executable file → Normal file
10
templates/img_boardpage.html
Executable file → Normal file
|
@ -12,13 +12,13 @@
|
|||
<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>
|
||||
<div class="file-info">File: <a href="{{$.config.SiteWebfolder}}{{$.board.Dir}}/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}}" alt="{{$.config.SiteWebfolder}}{{$.board.Dir}}/src/{{$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 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)">▼</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="{{$.config.SiteWebfolder}}{{$.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)">▼</a>]</span> <span>[<a href="{{$.config.SiteWebfolder}}{{$.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>
|
||||
|
@ -28,10 +28,10 @@
|
|||
<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 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)">▼</a>]</span></span><br />
|
||||
<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="{{$.config.SiteWebfolder}}{{$.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)">▼</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 />
|
||||
<span class="file-info">File: <a href="{{$.config.SiteWebfolder}}{{$.board.Dir}}/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}}" alt="{{$.config.SiteWebfolder}}{{$.board.Dir}}/src/{{$reply.Filename}}" width="{{$reply.ThumbW}}" height="{{$reply.ThumbH}}" class="upload" /></a>
|
||||
{{else}}
|
||||
<div class="file-deleted-box" style="text-align:center;">File removed</div>
|
||||
|
@ -70,7 +70,7 @@
|
|||
{{else}}Next{{end}}</td></tr>
|
||||
</table>
|
||||
<span id="boardmenu-bottom">
|
||||
[{{range $i, $boardlink := $.boards}}{{if gt $i 0}}/{{end}} <a href="/{{$boardlink.Dir}}/">{{$boardlink.Dir}}</a> {{end}}]
|
||||
[{{range $i, $boardlink := $.boards}}{{if gt $i 0}}/{{end}} <a href="{{$.config.SiteWebfolder}}/{{$boardlink.Dir}}/">{{$boardlink.Dir}}</a> {{end}}]
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<title>/{{$.board.Dir}}/ - {{truncateString $.op.MessageText 20 true}}</title>
|
||||
{{end}}
|
||||
{{else}}<title>/{{.board.Dir}}/ - {{.board.Title}}</title>{{end}}
|
||||
<script type="text/javascript" src="/javascript/jquery-3.3.1.min.js"></script>
|
||||
<script type="text/javascript" src="{{$.config.SiteWebfolder}}/javascript/jquery-3.3.1.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var styles = [{{range $ii, $style := $.config.Styles}}{{if gt $ii 0}}, {{end}}"{{$style}}"{{end}}];
|
||||
var webroot = "{{$.config.SiteWebfolder}}";
|
||||
|
@ -20,16 +20,16 @@
|
|||
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" />
|
||||
<script type="text/javascript" src="{{$.config.SiteWebfolder}}javascript/gochan.js"></script>
|
||||
<script type="text/javascript" src="{{$.config.SiteWebfolder}}javascript/manage.js"></script>
|
||||
<link rel="stylesheet" href="{{$.config.SiteWebfolder}}css/global/img.css" />
|
||||
{{range $_, $style := .config.Styles}}
|
||||
<link rel="{{if not (isStyleDefault $style)}}alternate {{end}}stylesheet" href="/css/{{$style}}/img.css" />{{end}}
|
||||
<link rel="shortcut icon" href="/favicon.png" />
|
||||
<link rel="{{if not (isStyleDefault $style)}}alternate {{end}}stylesheet" href="{{$.config.SiteWebfolder}}css/{{$style}}/img.css" />{{end}}
|
||||
<link rel="shortcut icon" href="{{$.config.SiteWebfolder}}/favicon.png" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="topbar">
|
||||
{{range $i, $board := .boards}}<a href="/{{$board.Dir}}/" class="topbar-item">/{{$board.Dir}}/</a>{{end}}
|
||||
{{range $i, $board := .boards}}<a href="{{$.config.SiteWebfolder}}{{$board.Dir}}/" class="topbar-item">/{{$board.Dir}}/</a>{{end}}
|
||||
</div>
|
||||
<header>
|
||||
<h1>/{{$.board.Dir}}/ - {{$.board.Title}}</h1>
|
||||
|
|
6
templates/img_threadpage.html
Executable file → Normal file
6
templates/img_threadpage.html
Executable file → Normal file
|
@ -25,14 +25,14 @@
|
|||
{{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 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)">▼</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="{{$.config.SiteWebfolder}}{{.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)">▼</a>]</span></span><br />
|
||||
<div class="post-text">{{.op.MessageHTML}}</div>
|
||||
</div>
|
||||
{{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 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)">▼</a>]</span></span><br />
|
||||
<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="{{$.config.SiteWebfolder}}{{$.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)">▼</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 />
|
||||
|
@ -79,4 +79,4 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{{template "global_footer.html" .}}
|
||||
{{template "global_footer.html" .}}
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
<tr><th class="option-column">Option</th><th class="value-column">Value</th></tr>
|
||||
<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}}
|
||||
<option value="none">Select section...</option>{{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>
|
||||
|
@ -14,8 +13,8 @@
|
|||
<tr><td>Description</td><td><input type="text" name="description" value="" /></td></tr>
|
||||
<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 $_, $style := .config.Styles}}<option value="{{$style}}">{{$style}}</option>{{end}}
|
||||
<tr><td>Default style</td><td><select name="defaultstyle" selected="">{{range $_, $style := $.config.Styles}}
|
||||
<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>
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<title>Gochan Manage page</title>
|
||||
<link rel="stylesheet" href="/css/global/manage.css" />
|
||||
<link rel="stylesheet" href="{{.SiteWebfolder}}css/global/manage.css" />
|
||||
{{range $i, $style := .Styles}}
|
||||
<link rel="{{if not (isStyleDefault $style)}}alternate {{end}}stylesheet" href="/css/{{$style}}/manage.css" />{{end}}
|
||||
<link rel="shortcut icon" href="/favicon.png" />
|
||||
<link rel="{{if not (isStyleDefault $style)}}alternate {{end}}stylesheet" href="{{$.SiteWebfolder}}css/{{$style}}/manage.css" />{{end}}
|
||||
<link rel="shortcut icon" href="{{.SiteWebfolder}}favicon.png" />
|
||||
<script type="text/javascript">
|
||||
var styles = [{{range $i, $style := .Styles}}{{if gt $i 0}}, {{end}}"{{$style}}"{{end}}];
|
||||
var styles = [{{range $i, $style := .Styles}}{{if gt $i 0}}, {{end}}"{{$style}}"{{end}}];
|
||||
var webroot = "{{.SiteWebfolder}}"
|
||||
</script>
|
||||
<script type="text/javascript" src="/javascript/jquery-3.3.1.min.js"></script>
|
||||
<script type="text/javascript" src="/javascript/gochan.js"></script>
|
||||
<script type="text/javascript" src="/javascript/manage.js"></script>
|
||||
<script type="text/javascript" src="{{.SiteWebfolder}}javascript/jquery-3.3.1.min.js"></script>
|
||||
<script type="text/javascript" src="{{.SiteWebfolder}}javascript/gochan.js"></script>
|
||||
<script type="text/javascript" src="{{.SiteWebfolder}}javascript/manage.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue