diff options
author | FChannel <> | 2022-06-05 08:11:00 -0700 |
---|---|---|
committer | FChannel <> | 2022-06-19 12:53:29 -0700 |
commit | 130797fc04e0d322b1348d6796e39c4bfc17e744 (patch) | |
tree | dc74c6b762a7b1878e1e35bb91cd96e4b1423432 | |
parent | a87235f8b978126c0ca9f9eb252f58e6de17622c (diff) |
small index style changes
-rw-r--r-- | route/routes/news.go | 4 | ||||
-rw-r--r-- | views/css/themes/default.css | 12 | ||||
-rw-r--r-- | views/css/themes/gruvbox.css | 192 |
3 files changed, 100 insertions, 108 deletions
diff --git a/route/routes/news.go b/route/routes/news.go index 9d8df66..6917e4b 100644 --- a/route/routes/news.go +++ b/route/routes/news.go @@ -82,6 +82,10 @@ func NewsGetAll(ctx *fiber.Ctx) error { return util.MakeError(err, "NewsGetAll") } + if len(data.NewsItems) == 0 { + return ctx.Redirect("/", http.StatusSeeOther) + } + data.Meta.Description = data.PreferredUsername + " is a federated image board based on ActivityPub. The current version of the code running on the server is still a work-in-progress product, expect a bumpy ride for the time being. Get the server code here: https://git.fchannel.org." data.Meta.Url = data.Board.Actor.Id data.Meta.Title = data.Title diff --git a/views/css/themes/default.css b/views/css/themes/default.css index 529563a..488ba4f 100644 --- a/views/css/themes/default.css +++ b/views/css/themes/default.css @@ -196,7 +196,7 @@ a.reply { #boardGrid { display: grid; grid-auto-columns: 1fr; - border: 4px solid #820404; + border: 4px solid #f0e2d9; background-color: #f9f9e0; } @@ -210,8 +210,6 @@ a.reply { display: inline-grid; text-align: left; padding: 5px; - border-top: 2px solid #820404; - border-left: 2px solid #820404; } /* these may or may not work. my CSS is poor so i just kinda did stuff until it worked. */ @@ -238,10 +236,6 @@ a.reply { float: right; } -#boardlinks { - float: left; -} - #navlinks, #boardlinks { padding: 0; margin: 0; @@ -251,7 +245,3 @@ a.reply { #boardlinks > li { display: inline; } - -#manageboard { - float: right; -} diff --git a/views/css/themes/gruvbox.css b/views/css/themes/gruvbox.css index 8704482..788b2b6 100644 --- a/views/css/themes/gruvbox.css +++ b/views/css/themes/gruvbox.css @@ -1,235 +1,233 @@ a, a:link, a:visited, a:active { - color: #b16286; - text-decoration: none + color: #b16286; + text-decoration: none } a.reply { - color: #cc241d; - text-decoration: 1px underline; + color: #cc241d; + text-decoration: 1px underline; } a:hover.reply { - color: #fb4934; + color: #fb4934; } body { - background: #282828; - color: #ebdbb2; + background: #282828; + color: #ebdbb2; - font-family: monospace, sans-serif; - font-size: 0.9em; + font-family: monospace, sans-serif; + font-size: 0.9em; } .popup-box { - border: 4px solid #928374; - background-color: #3c3836; + border: 4px solid #928374; + background-color: #3c3836; } .box, .box-alt { - background-color: #3c3836; + background-color: #3c3836; } .quote { - color: #98971a; + color: #98971a; } .post { - background-color: #1d2021; + background-color: #1d2021; } :target > div > .post { - background-color: #504945; + background-color: #504945; } .subject { - color: #458588; + color: #458588; } .name { - color: #b8bb26; + color: #b8bb26; } .tripcode { - color: #689d6a; + color: #689d6a; } h1,h2,h3,h4,h5,h6 { - color: #fb4934; - margin-bottom: 0.1em; + color: #fb4934; + margin-bottom: 0.1em; } .replyLink { - color: #83a598; - font-size: 0.8em; + color: #83a598; + font-size: 0.8em; } #newpostbtn { - text-align: center; - margin-top: 80px; + text-align: center; + margin-top: 80px; } input[type="text"] { - -webkit-appearance: none; - -webkit-border-radius: 0; + -webkit-appearance: none; + -webkit-border-radius: 0; } #postForm { - border: 4px solid #928374; - background-color: #3c3836; - margin: auto; + border: 4px solid #928374; + background-color: #3c3836; + margin: auto; } #postForm tr > td:first-child { - background-color: #504945; - padding-left: 0.5em; - padding-right: 0.5em; + background-color: #504945; + padding-left: 0.5em; + padding-right: 0.5em; } #postForm input[type="text"], #postForm textarea, #reply-name, #reply-options, #reply-comment { - background-color: #504945; - color: #ebdbb2; - border: 0; - border-bottom: 2px solid #3c3836; - font-family: monospace, sans-serif; + background-color: #504945; + color: #ebdbb2; + border: 0; + border-bottom: 2px solid #3c3836; + font-family: monospace, sans-serif; - box-sizing: border-box; - -webkit-box-sizing:border-box; - -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-sizing:border-box; + -moz-box-sizing: border-box; } #postForm input[type="text"]:focus, #postForm textarea:focus, #reply-name:focus, #reply-options:focus, #reply-comment:focus { - outline: none; + outline: none; } #reply-comment { - min-width: 300px; - width: 396px; - height: 200px; + min-width: 300px; + width: 396px; + height: 200px; } #reply-name { - width: 75%; - float: left; + width: 75%; + float: left; } #reply-options { - width: 25%; - border-left: 2px solid #3c3836; - float: right; + width: 25%; + border-left: 2px solid #3c3836; + float: right; } #reply-header { - display: inline-block; - width: 100%; - cursor: move; + display: inline-block; + width: 100%; + cursor: move; } #postForm #captcha { - display: block; - width: 100%; + display: block; + width: 100%; } .popup-box { - position: fixed; - min-width: 300px; - width: min-content; - z-index: 9; - display: block; + position: fixed; + min-width: 300px; + width: min-content; + z-index: 9; + display: block; } /* TODO: rename */ .box2 { - border: 4px solid #928374; - background-color: #3c3836; + border: 4px solid #928374; + background-color: #3c3836; } .newsbox { - padding: 25px; - border: 4px solid #928374; - background-color: #3c3836; + padding: 25px; + border: 4px solid #928374; + background-color: #3c3836; } .newsbox h2 { - margin: 0; - padding: 0; + margin: 0; + padding: 0; } .newsbox-news { - text-align: left; - background-color: #504945; - margin-top: 25px; - padding: 25px; + text-align: left; + background-color: #504945; + margin-top: 25px; + padding: 25px; } .newsbox-news p, .newsbox-news h3 { - margin: 0; + margin: 0; } #stopTablePost { - float: right; - display: none; + float: right; + display: none; } #boardGrid { - display: grid; - grid-auto-columns: 1fr; - border: 4px solid #928374; - background-color: #3c3836; + display: grid; + grid-auto-columns: 1fr; + border: 4px solid #928374; + background-color: #3c3836; } #boardGridHeader { - border-bottom: 2px solid #928374; - display: inline-grid; + border-bottom: 2px solid #928374; + display: inline-grid; } .boardGridCell { - white-space: nowrap; - display: inline-grid; - text-align: left; - padding: 5px; - border-top: 2px solid #928374; - border-left: 2px solid #928374; + white-space: nowrap; + display: inline-grid; + text-align: left; + padding: 5px; } /* these may or may not work. my CSS is poor so i just kinda did stuff until it worked. */ .boardGridCell:nth-child(-n+4) { - border-top: none; + border-top: none; } .boardGridCell:nth-child(3n+2) { - border-left: none; + border-left: none; } #threadfooter { - width: 100%; - table-layout: fixed; - border-collapse: collapse; + width: 100%; + table-layout: fixed; + border-collapse: collapse; } #threadfooter td { - padding: 0; - margin: 0; + padding: 0; + margin: 0; } #threadfooter #threadStats { - float: right; + float: right; } #navlinks, #boardlinks { - padding: 0; - margin: 0; + padding: 0; + margin: 0; } #navlinks > li, #boardlinks > li { - display: inline; + display: inline; } hr { - border: 1px solid #928374; + border: 1px solid #928374; } |