1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-03 19:56:22 -07:00

use QR file input when posting, improve front page formatting

This commit is contained in:
user.email 2018-12-04 15:38:19 -08:00
parent 4ec04d799b
commit 4fa467933b
10 changed files with 101 additions and 96 deletions

View file

@ -219,13 +219,6 @@ div.inlinepostprev {
padding: 4px 8px 4px 8px; padding: 4px 8px 4px 8px;
} }
div.page {
float: left;
width: 75%;
margin-left: 8px;
overflow-y: hidden;
}
div.section-block { div.section-block {
margin-bottom: 8px; margin-bottom: 8px;
} }
@ -259,10 +252,13 @@ div#top-pane span#site-title {
font-size: 50px; font-size: 50px;
} }
col#recent {
width: 22%;
}
#tab-bar { #tab-bar {
margin-bottom: 0px;
margin-top: 2px;
margin-left: -24px; margin-left: -24px;
display: inline;
} }
#tab-bar .tab { #tab-bar .tab {
display: inline; display: inline;
@ -270,13 +266,10 @@ div#top-pane span#site-title {
} }
div#recent-posts { div#recent-posts {
width: 22%;
float: right;
margin-right: 8px; margin-right: 8px;
display: inline-block; display: inline-block;
} }
div#recent-posts img { div#recent-posts img {
float: left;
padding-right: 8px; padding-right: 8px;
} }
div#recent-posts div.section-body { div#recent-posts div.section-body {
@ -429,9 +422,9 @@ input.config-text {
div#qr-box { div#qr-box {
padding: 1px; padding: 1px;
box-sizing: border-box;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box;
min-width: 300px; min-width: 300px;
background-color: lightgray; background-color: lightgray;
border: 1px solid #000; border: 1px solid #000;
@ -443,9 +436,9 @@ div#qr-box input[type=text], div#qr-box textarea {
background-color: #FFF !important; background-color: #FFF !important;
color: #000 !important; color: #000 !important;
width: 100%; width: 100%;
box-sizing: border-box;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box;
} }
div#qr-box input[type=file] { div#qr-box input[type=file] {
background-color: lightgray !important; background-color: lightgray !important;

View file

@ -130,6 +130,7 @@ form#postform input[type=text], form#postform input[type=password], form#postfor
} }
body { body {
background-color: #363942;
background-image: url(res/pipes_bg.png); background-image: url(res/pipes_bg.png);
color: #d8d0b9; color: #d8d0b9;
font: 12pt sans-serif; font: 12pt sans-serif;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 946 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -504,7 +504,7 @@ function initSettings() {
function initQR(pageThread) { function initQR(pageThread) {
var $qrbuttons = $jq("<div />").prop("id", "qrbuttons") var $qrbuttons = $jq("<div />").prop("id", "qrbuttons")
.append( .append(
"<input type=\"file\" id=\"imagefile\" style=\"display: none;\" />" + "<input type=\"file\" id=\"imagefile\" name=\"imagefile\" style=\"display: none;\" />" +
"<input name=\"imagefilebtn\" type=\"button\" onclick=\"document.getElementById('imagefile').click();\" value=\"Browse...\">" + "<input name=\"imagefilebtn\" type=\"button\" onclick=\"document.getElementById('imagefile').click();\" value=\"Browse...\">" +
"<input type=\"submit\" value=\"Post\" style=\"float:right;\"/>" "<input type=\"submit\" value=\"Post\" style=\"float:right;\"/>"
) )

View file

@ -6,7 +6,14 @@
} }
@mixin box-sizing($sizing) { @mixin box-sizing($sizing) {
box-sizing: $sizing;
-moz-box-sizing: $sizing; -moz-box-sizing: $sizing;
-webkit-box-sizing: $sizing; -webkit-box-sizing: $sizing;
box-sizing: $sizing;
}
@mixin border-radius($properties...) {
-moz-border-radius: $properties;
-ms-border-radius: $properties;
-webkit-border-radius: $properties;
border-radius: $properties;
} }

View file

@ -1,10 +1,3 @@
div.page {
float: left;
width: 75%;
margin-left: 8px;
overflow-y: hidden;
}
div.section-block { div.section-block {
margin-bottom: 8px; margin-bottom: 8px;
div.section-title-block { div.section-title-block {
@ -39,10 +32,13 @@ div#top-pane {
} }
} }
col#recent {
width:22%;
}
#tab-bar { #tab-bar {
margin-bottom: 0px;
margin-top: 2px;
margin-left: -24px; margin-left: -24px;
display: inline;
.tab { .tab {
display: inline; display: inline;
padding: 0px 8px 0px 8px; padding: 0px 8px 0px 8px;
@ -50,12 +46,9 @@ div#top-pane {
} }
div#recent-posts { div#recent-posts {
width:22%;
float: right;
margin-right: 8px; margin-right: 8px;
display: inline-block; display: inline-block;
img { img {
float: left;
padding-right: 8px; padding-right: 8px;
} }
div.section-body { div.section-body {

View file

@ -9,6 +9,7 @@
} }
body { body {
background-color: #363942;
background-image: url(res/pipes_bg.png); background-image: url(res/pipes_bg.png);
color: #d8d0b9; color: #d8d0b9;
font: $font; font: $font;

View file

@ -11,7 +11,7 @@
var webroot = "{{.config.SiteWebfolder}}" var webroot = "{{.config.SiteWebfolder}}"
</script> </script>
<script type="text/javascript" src="{{.config.SiteWebfolder}}javascript/gochan.js"></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 rel="stylesheet" href="{{.config.SiteWebfolder}}css/global.css" />
<link id="theme" rel="stylesheet" href="{{.config.SiteWebfolder}}css/{{.config.DefaultStyle}}" /> <link id="theme" rel="stylesheet" href="{{.config.SiteWebfolder}}css/{{.config.DefaultStyle}}" />
@ -26,73 +26,83 @@
<span id="site-slogan">{{.config.SiteSlogan}}</span> <span id="site-slogan">{{.config.SiteSlogan}}</span>
</div> </div>
<div id="main"> <div id="main">
<ul id="tab-bar"> <table style="width:100%" cellspacing="10">
<li id="current-tab" class="tab"> <colgroup>
<a href="#">News</a> <col id="sections" />
</li> <col id="recent" />
<li class="tab"> </colgroup>
<a href="#boards">Boards</a> <tr>
</li> <td valign="top">
<li class="tab"> <ul id="tab-bar">
<a href="#rules">Rules</a> <li id="current-tab" class="tab">
</li> <a href="#">News</a>
<li class="tab"> </li>
<a href="#faq">FAQ</a> <li class="tab">
</li> <a href="#boards">Boards</a>
</ul> </li>
<div id="first-page" class="page">{{range $ii, $page := .page_arr}}{{if eq $page.Page 0}} <li class="tab">
<div class="section-block"> <a href="#rules">Rules</a>
<div class="section-title-block" id="first-page0"> </li>
<b>{{$page.Subject}}</b> by <a href="mailto:{{$page.Email}}" >{{$page.Poster}}</a><a href="{{.config.SiteWebfolder}}#first-page{{$ii}}" class="permalink">#</a> <li class="tab">
</div> <a href="#faq">FAQ</a>
<div class="section-body"> </li>
{{$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> </ul>
</div> <div id="first-page" class="page">{{range $ii, $page := .page_arr}}{{if eq $page.Page 0}}
</div> <div class="section-block">
</div> <div class="section-title-block" id="first-page0">
<div id="rules-page" class="page">{{range $ii, $page := .page_arr}}{{if eq $page.Page 1}} <b>{{$page.Subject}}</b> by <a href="mailto:{{$page.Email}}" >{{$page.Poster}}</a><a href="{{.config.SiteWebfolder}}#first-page{{$ii}}" class="permalink">#</a>
<div class="section-block"> </div>
<div class="section-title-block" id="first-page0"> <div class="section-body">
<b>{{$page.Subject}}</b> by <a href="mailto:{{$page.Email}}" >{{$page.Poster}}</a><a href="{{.config.SiteWebfolder}}#first-page{{$ii}}" class="permalink">#</a> {{$page.Message}}
</div> </div>
<div class="section-body"> </div>{{end}}{{end}}
{{$page.Message}} </div>
</div> <div id="boards-page" class="page">
</div>{{end}}{{end}} <div class="section-block">
</div> <div class="section-title-block">
<div id="faq-page" class="page">{{range $ii, $page := .page_arr.Data}}{{if eq $page.Page 2}} <b>Boards</b>
<div class="section-block"> </div>
<div class="section-title-block" id="first-page0"> <div class="section-body">
<b>{{$page.Subject}}</b> by <a href="mailto:{{$page.Email}}" >{{$page.Poster}}</a><a href="{{.config.SiteWebfolder}}#first-page{{$ii}}" class="permalink">#</a> <ul>{{range $_, $board := .boards}}{{if eq $board.Dir $.config.Modboard}}{{else}}
</div> <li><b>/{{$board.Dir}}/</b> {{$board.Description}}</li>{{end}}{{end}}
<div class="section-body"> </ul>
{{$page.Message}} </div>
</div> </div>
</div>{{end}}{{end}} </div>
</div> <div id="rules-page" class="page">{{range $ii, $page := .page_arr}}{{if eq $page.Page 1}}
{{if gt .config.MaxRecentPosts 0}}<div id="recent-posts"> <div class="section-block">
<div id="recent-posts-header" class="section-title-block"><b>Recent Posts</b></div> <div class="section-title-block" id="first-page0">
{{range $i, $post := $.recent_posts}}<div class="section-block"> <b>{{$page.Subject}}</b> by <a href="mailto:{{$page.Email}}" >{{$page.Poster}}</a><a href="{{.config.SiteWebfolder}}#first-page{{$ii}}" class="permalink">#</a>
<div class="section-title-block"> </div>
<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 class="section-body">
</div> {{$page.Message}}
<div class="section-body"> </div>
{{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}} </div>{{end}}{{end}}
{{truncateMessage $post.Message 225 12}} </div>
</div> <div id="faq-page" class="page">{{range $ii, $page := .page_arr.Data}}{{if eq $page.Page 2}}
</div>{{end}}{{end}} <div class="section-block">
</div> <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> </div>
{{template "global_footer.html" .}} {{template "global_footer.html" .}}