mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-04 03:56:24 -07:00
use QR file input when posting, improve front page formatting
This commit is contained in:
parent
4ec04d799b
commit
4fa467933b
10 changed files with 101 additions and 96 deletions
|
@ -11,7 +11,7 @@
|
|||
var webroot = "{{.config.SiteWebfolder}}"
|
||||
</script>
|
||||
<script type="text/javascript" src="{{.config.SiteWebfolder}}javascript/gochan.js"></script>
|
||||
<script type="text/javascript" src="{{.config.SiteWebfolder}}javascript/manage.js"></script>
|
||||
<script type="text/javascript" src="{{.config.SiteWebfolder}}javascript/manage.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="{{.config.SiteWebfolder}}css/global.css" />
|
||||
<link id="theme" rel="stylesheet" href="{{.config.SiteWebfolder}}css/{{.config.DefaultStyle}}" />
|
||||
|
@ -26,73 +26,83 @@
|
|||
<span id="site-slogan">{{.config.SiteSlogan}}</span>
|
||||
</div>
|
||||
<div id="main">
|
||||
<ul id="tab-bar">
|
||||
<li id="current-tab" class="tab">
|
||||
<a href="#">News</a>
|
||||
</li>
|
||||
<li class="tab">
|
||||
<a href="#boards">Boards</a>
|
||||
</li>
|
||||
<li class="tab">
|
||||
<a href="#rules">Rules</a>
|
||||
</li>
|
||||
<li class="tab">
|
||||
<a href="#faq">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
<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="section-body">
|
||||
{{$page.Message}}
|
||||
</div>
|
||||
</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}}
|
||||
<table style="width:100%" cellspacing="10">
|
||||
<colgroup>
|
||||
<col id="sections" />
|
||||
<col id="recent" />
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<ul id="tab-bar">
|
||||
<li id="current-tab" class="tab">
|
||||
<a href="#">News</a>
|
||||
</li>
|
||||
<li class="tab">
|
||||
<a href="#boards">Boards</a>
|
||||
</li>
|
||||
<li class="tab">
|
||||
<a href="#rules">Rules</a>
|
||||
</li>
|
||||
<li class="tab">
|
||||
<a href="#faq">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</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>
|
||||
<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>
|
||||
<div class="section-body">
|
||||
{{$page.Message}}
|
||||
</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>
|
||||
<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/{{getThreadThumbnail $post.Filename}}" alt="post thumbnail"/></a>{{end}}
|
||||
{{truncateMessage $post.Message 225 12}}
|
||||
</div>
|
||||
</div>{{end}}{{end}}
|
||||
</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="section-body">
|
||||
{{$page.Message}}
|
||||
</div>
|
||||
</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>
|
||||
</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>
|
||||
<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>
|
||||
<div class="section-body">
|
||||
{{$page.Message}}
|
||||
</div>
|
||||
</div>{{end}}{{end}}
|
||||
</div>
|
||||
</td>
|
||||
{{if gt .config.MaxRecentPosts 0}}<td>
|
||||
<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="{{$.config.SiteWebfolder}}{{$post.BoardName}}/src/{{$post.Filename}}" target="_blank"><img src="{{$.config.SiteWebfolder}}{{$post.BoardName}}/thumb/{{getThreadThumbnail $post.Filename}}" alt="post thumbnail"/></a>{{end}}
|
||||
{{truncateMessage $post.Message 225 12}}
|
||||
</div>
|
||||
</div>{{end}}{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{{template "global_footer.html" .}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue