1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-09-07 12:46:23 -07:00

Use h1 instead of div for lightbox title, footer element instead of div#footer

This commit is contained in:
Eggbertx 2025-02-18 12:59:20 -08:00
parent 9bdf9d58d9
commit aba2c68221
14 changed files with 34 additions and 34 deletions

View file

@ -71,6 +71,6 @@ div.dropdown-menu a:hover {
background: #0a127b;
}
div#footer {
footer {
font-size: 0.75em;
}

View file

@ -8,7 +8,9 @@
@import 'global/animations';
.increase-line-height {
line-height: 1.5;
header, .post, .reply {
line-height: 1.5;
}
}
header {
@ -85,7 +87,7 @@ div.section-block {
text-align: center;
}
#footer {
footer {
bottom: 0px;
clear: both;
left: 0px;

View file

@ -12,7 +12,6 @@
top:5%;
z-index:9001;
overflow: auto;
// display:hidden;
}
.lightbox * {
@ -45,19 +44,20 @@
}
.lightbox-title {
font-size:42px;
font-weight:700;
// font-size:42px;
// font-weight:700;
text-align:center;
margin-top: 0px;
}
.lightbox-x {
color: #000!important;
float: right;
font-size: 32px;
font-weight: 700;
font-size: inherit;
// font-weight: 700;
}
.lightbox-x:hover {
.lightbox-x:hover,.lightbox-x:active {
color:#555;
}

View file

@ -9,7 +9,7 @@ div#qr-box {
input[type=text],textarea {
display: table-cell;
min-width:300px;
min-width:320px;
background: #FFF;
color: #000;
width:100%;

View file

@ -34,7 +34,7 @@ a.topbar-item:hover {
background: $bglight;
}
div#footer, div#footer * {
footer, footer * {
font-size: 9pt;
}

View file

@ -9,7 +9,7 @@ export function removeLightbox(...customs: any) {
export function showLightBox(title: string, innerHTML: string) {
$(document.body).prepend(
`<div class="lightbox-bg"></div><div class="lightbox"><div class="lightbox-title">${title}<a href="javascript:;" class="lightbox-x">X</a><hr /></div>${innerHTML}</div>`
`<div class="lightbox-bg"></div><div class="lightbox"><h1 class="lightbox-title">${title}<a href="javascript:;" class="lightbox-x">X</a><hr /></h1>${innerHTML}</div>`
);
$("a.lightbox-x, .lightbox-bg").on("click", removeLightbox);
}

View file

@ -154,6 +154,6 @@ div.dropdown-menu a:hover {
background: #0a127b;
}
div#footer {
footer {
font-size: 0.75em;
}

View file

@ -485,19 +485,17 @@ form#login-box input[type=submit] {
}
.lightbox-title {
font-size: 42px;
font-weight: 700;
text-align: center;
margin-top: 0px;
}
.lightbox-x {
color: #000 !important;
float: right;
font-size: 32px;
font-weight: 700;
font-size: inherit;
}
.lightbox-x:hover {
.lightbox-x:hover, .lightbox-x:active {
color: #555;
}
@ -552,7 +550,7 @@ div#qr-box {
}
div#qr-box input[type=text], div#qr-box textarea {
display: table-cell;
min-width: 300px;
min-width: 320px;
background: #FFF;
color: #000;
width: 100%;
@ -663,7 +661,7 @@ img#banpage-image {
transform-origin: top center;
}
}
.increase-line-height {
.increase-line-height header, .increase-line-height .post, .increase-line-height .reply {
line-height: 1.5;
}
@ -738,7 +736,7 @@ div.section-block div.section-body {
text-align: center;
}
#footer {
footer {
bottom: 0px;
clear: both;
left: 0px;

View file

@ -121,7 +121,7 @@ a.topbar-item:hover {
background: #404040;
}
div#footer, div#footer * {
footer, footer * {
font-size: 9pt;
}

View file

@ -25,7 +25,7 @@ func TestBuildJS(t *testing.T) {
}
outDir := t.TempDir()
config.SetVersion("3.11.0")
config.SetVersion("4.0.2")
systemCriticalCfg := config.GetSystemCriticalConfig()
systemCriticalCfg.DocumentRoot = path.Join(outDir, "html")
systemCriticalCfg.TemplateDir = path.Join(testRoot, "templates")
@ -147,7 +147,7 @@ func TestBuildFrontPage(t *testing.T) {
}
t.Run(driver, func(t *testing.T) {
outDir := t.TempDir()
config.SetVersion("3.11.0")
config.SetVersion("4.0.2")
systemCriticalCfg := config.GetSystemCriticalConfig()
systemCriticalCfg.DocumentRoot = path.Join(outDir, "html")
systemCriticalCfg.TemplateDir = path.Join(testRoot, "templates")

View file

@ -7,7 +7,7 @@ const defaultStyle = "test1.css";
const webroot = "/chan";
const serverTZ = 8;
const fileTypes = [];`
expectedMinifiedFront = `<!doctype html><html lang=en><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Gochan</title><link rel=stylesheet href=/chan/css/global.css><link id=theme rel=stylesheet href=/chan/css/test1.css><link rel="shortcut icon" href=/chan/favicon.png><script src=/chan/js/consts.js></script><script src=/chan/js/gochan.js></script><div id=topbar><div class=topbar-section><a href=/chan/ class=topbar-item>home</a></div><div class=topbar-section><a href=/chan/test/ class=topbar-item title="Testing board">/test/</a><a href=/chan/test2/ class=topbar-item title="Testing board 2">/test2/</a></div></div><div id=content><div id=top-pane><h1 id=site-title>Gochan</h1><span id=site-slogan></span></div><br><div id=frontpage><div class=section-block style="margin: 16px 64px 16px 64px;"><div class="section-body front-intro">Welcome to Gochan!</div></div><div class=section-block><div class=section-title-block><b>Boards</b></div><div class=section-body><ul style="float:left; list-style: none"><li style="text-align: center; font-weight: bold"><b><u>Main</u></b><li><a href=/chan/test/ title="Board for testing description">/test/</a> — Testing board<li><a href=/chan/test2/ title="Board for testing description 2">/test2/</a> — Testing board 2</ul></div></div><div class=section-block><div class=section-title-block><b>Recent Posts</b></div><div class=section-body><div id=recent-posts><div class=recent-post><a href=/chan/test/res/1.html#1 class=front-reply target=_blank><img src=/chan/test/thumb alt="post thumbnail"></a><br><br><a href=/chan/test/>/test/</a><hr>message_raw</div><div class=recent-post><a href=/chan/test/res/1.html#2 class=front-reply target=_blank><img src=/chan/test/thumb alt="post thumbnail"></a><br><br><a href=/chan/test/>/test/</a><hr>message_raw</div></div></div></div></div><div id=footer>Powered by <a href=http://github.com/gochan-org/gochan/>Gochan 3.11</a><br></div></div>`
expectedMinifiedFront = `<!doctype html><html lang=en><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Gochan</title><link rel=stylesheet href=/chan/css/global.css><link id=theme rel=stylesheet href=/chan/css/test1.css><link rel="shortcut icon" href=/chan/favicon.png><script src=/chan/js/consts.js></script><script src=/chan/js/gochan.js></script><div id=topbar><div class=topbar-section><a href=/chan/ class=topbar-item>home</a></div><div class=topbar-section><a href=/chan/test/ class=topbar-item title="Testing board">/test/</a><a href=/chan/test2/ class=topbar-item title="Testing board 2">/test2/</a></div></div><div id=content><div id=top-pane><h1 id=site-title>Gochan</h1><span id=site-slogan></span></div><br><div id=frontpage><div class=section-block style="margin: 16px 64px 16px 64px;"><div class="section-body front-intro">Welcome to Gochan!</div></div><div class=section-block><div class=section-title-block><b>Boards</b></div><div class=section-body><ul style="float:left; list-style: none"><li style="text-align: center; font-weight: bold"><b><u>Main</u></b><li><a href=/chan/test/ title="Board for testing description">/test/</a> — Testing board<li><a href=/chan/test2/ title="Board for testing description 2">/test2/</a> — Testing board 2</ul></div></div><div class=section-block><div class=section-title-block><b>Recent Posts</b></div><div class=section-body><div id=recent-posts><div class=recent-post><a href=/chan/test/res/1.html#1 class=front-reply target=_blank><img src=/chan/test/thumb alt="post thumbnail"></a><br><br><a href=/chan/test/>/test/</a><hr>message_raw</div><div class=recent-post><a href=/chan/test/res/1.html#2 class=front-reply target=_blank><img src=/chan/test/thumb alt="post thumbnail"></a><br><br><a href=/chan/test/>/test/</a><hr>message_raw</div></div></div></div></div><footer>Powered by <a href=http://github.com/gochan-org/gochan/>Gochan 4.0.2</a><br></footer></div>`
expectedUnminifiedFront = `<!DOCTYPE html>
<html lang="en">
<head>
@ -73,9 +73,9 @@ const fileTypes = [];`
</div>
</div>
</div>
<div id="footer">
Powered by <a href="http://github.com/gochan-org/gochan/">Gochan 3.11</a><br />
</div>
<footer>
Powered by <a href="http://github.com/gochan-org/gochan/">Gochan 4.0.2</a><br />
</footer>
</div>
</body>
</html>

View file

@ -36,7 +36,7 @@ const (
`<textarea rows="4"cols="48"name="appealmsg"id="postmsg"placeholder="Appeal message"></textarea>` +
`<input type="submit"name="doappeal"value="Submit"/><br/></form>`
footer = `<div id="footer">Powered by<a href="http://github.com/gochan-org/gochan/">Gochan 4.0</a><br /></div></div></body></html>`
footer = `<footer>Powered by<a href="http://github.com/gochan-org/gochan/">Gochan 4.0</a><br /></footer></div></body></html>`
)
var (
@ -165,7 +165,7 @@ var (
},
},
expectedOutput: normalBanHeader +
`You are banned from posting on<span class="ban-boards">all boards</span>for the following reason:<p class="reason">ban message goes here</p>Your ban was placed on<time datetime="0001-01-01T00:00:00Z"class="ban-timestamp">Mon,January 01,0001 12:00:00 AM</time> and will expire on <time class="ban-timestamp" datetime="0001-01-01T00:00:00Z">Mon, January 01, 0001 12:00:00 AM</time>.<br/>Your IP address is<span class="ban-ip">192.168.56.1</span>.<br /><br/>You may appeal this ban:<br/><form id="appeal-form"action="/post"method="POST"><input type="hidden"name="board"value=""><input type="hidden"name="banid"value="0"><textarea rows="4"cols="48"name="appealmsg"id="postmsg"placeholder="Appeal message"></textarea><input type="submit"name="doappeal"value="Submit"/><br/></form></div></div></div><div id="footer">Powered by<a href="http://github.com/gochan-org/gochan/">Gochan 4.0</a><br /></div></div></body></html>`,
`You are banned from posting on<span class="ban-boards">all boards</span>for the following reason:<p class="reason">ban message goes here</p>Your ban was placed on<time datetime="0001-01-01T00:00:00Z"class="ban-timestamp">Mon,January 01,0001 12:00:00 AM</time> and will expire on <time class="ban-timestamp" datetime="0001-01-01T00:00:00Z">Mon, January 01, 0001 12:00:00 AM</time>.<br/>Your IP address is<span class="ban-ip">192.168.56.1</span>.<br /><br/>You may appeal this ban:<br/><form id="appeal-form"action="/post"method="POST"><input type="hidden"name="board"value=""><input type="hidden"name="banid"value="0"><textarea rows="4"cols="48"name="appealmsg"id="postmsg"placeholder="Appeal message"></textarea><input type="submit"name="doappeal"value="Submit"/><br/></form></div></div></div><footer>Powered by<a href="http://github.com/gochan-org/gochan/">Gochan 4.0</a><br /></footer></div></body></html>`,
},
{
desc: "unappealable temporary ban",

View file

@ -24,9 +24,9 @@
<script src="https://js.hcaptcha.com/1/api.js" async defer></script>
<input type="submit" value="Post">
</form>
<div id="footer">
<footer>
Powered by <a href="http://github.com/gochan-org/gochan/">Gochan {{version}}</a><br />
</div>
</footer>
</div>
</body>
</html>

View file

@ -1,6 +1,6 @@
<div id="footer">
<footer>
Powered by <a href="http://github.com/gochan-org/gochan/">Gochan {{version}}</a><br />
</div>
</footer>
</div>
</body>
</html>