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

Remove unnecessary important tags from stylesheets

Also add option to only install CSS files
This commit is contained in:
Eggbertx 2021-12-29 11:31:27 -08:00
parent 73c4a06ceb
commit 2a3822fa28
29 changed files with 154 additions and 139 deletions

View file

@ -189,20 +189,29 @@ def docker(option = "guestdb", attached = False):
if status != 0:
print("Failed starting a docker container, exited with status code", status)
def install(prefix = "/usr", document_root = "/srv/gochan", js_only = False):
def install(prefix = "/usr", document_root = "/srv/gochan", js_only = False, css_only = False):
if gcos == "windows" or gcos == "darwin":
print("Installation is not currently supported for Windows and macOS, use the respective directory created by running `python build.py release`")
exit(1)
done = False
if js_only:
print("Installing gochan JavaScript files")
js_install_dir = path.join(document_root, "js")
if not path.exists(path.join(document_root, "js")):
if not path.exists(js_install_dir):
fs_action("mkdir", js_install_dir)
else:
fs_action("copy", "html/js/gochan.js", path.join(js_install_dir, "gochan.js"))
fs_action("copy", "html/js/maps", path.join(js_install_dir, "maps"))
fs_action("copy", "html/js/gochan.js", path.join(js_install_dir, "gochan.js"))
fs_action("copy", "html/js/maps", path.join(js_install_dir, "maps"))
done = True
if css_only:
print("Installing gochan CSS files")
css_install_dir = path.join(document_root, "css")
fs_action("copy", "html/css", css_install_dir)
done = True
if done:
print("done.")
return
fs_action("mkdir", "/etc/gochan")
fs_action("mkdir", path.join(prefix, "/share/gochan"))
fs_action("mkdir", document_root)
@ -333,6 +342,10 @@ if __name__ == "__main__":
action = "store_true",
help = "only install JavaScript (useful for frontend development)",
)
parser.add_argument("--css",
action = "store_true",
help = "only install CSS"
)
parser.add_argument("--prefix",
default = "/usr",
help = "install gochan to this directory and its subdirectories",
@ -342,7 +355,7 @@ if __name__ == "__main__":
help = "install files in ./html/ to this directory to be requested by a browser"
)
args = parser.parse_args()
install(args.prefix, args.documentroot, args.js)
install(args.prefix, args.documentroot, args.js, args.css)
elif action == "js":
parser.add_argument("--minify", action = "store_true", help = "create a minified gochan.js")
parser.add_argument("--watch", action = "store_true", help = "automatically rebuild when you change a file (keeps running)")

View file

@ -5,8 +5,8 @@ div.section-title-block {
}
div.front-intro {
border-radius: 0px !important;
border-width: 1px !important;
border-radius: 0px;
border-width: 1px;
}
div.section-body {
@ -26,7 +26,7 @@ div#report-delbox select,
div#report-delbox textarea,
div#report-delbox input[type=file]::file-selector-button,
div#report-delbox input[type=file]::-webkit-file-upload-button {
background: #282A2E !important;
background: #282A2E;
border: 1px double #07371F;
color: #ACACAC;
}
@ -88,5 +88,5 @@ div#topbar a:visited div#threadlinks-top {
}
table#pages, table#pages * {
border: none !important;
border: none;
}

View file

@ -1,5 +1,5 @@
h1#board-title {
font-family: serif !important;
font-family: serif;
font-size: 24pt;
color: #AF0A0F;
}
@ -44,7 +44,7 @@ div.inlinepostprev {
}
.tab {
background-color: #dfdffe;
background: #dfdffe;
border: 1px solid #9295a4;
}
@ -54,7 +54,7 @@ div.inlinepostprev {
}
#current-tab, div.section-title-block {
background-color: #bfc6e7;
background: #bfc6e7;
}
.loginbox input {
@ -62,7 +62,7 @@ div.inlinepostprev {
}
.manage-header {
background-color: #EEF2FF;
background: #EEF2FF;
border-radius: 8px;
}
@ -119,8 +119,8 @@ div#topbar,
.dropdown-button,
.dropdown-menu,
.dropdown-menu a {
background-color: #000A89;
color: #EEF2FF !important;
background: #000A89;
color: #EEF2FF;
}
div#footer {

View file

@ -1,5 +1,5 @@
body {
background-color: #CCC;
background: #CCC;
font-family: monospace, sans-serif;
font-size: 80%;
}
@ -66,7 +66,7 @@ span.subject {
}
table#pages, table#pages * {
border: none !important;
border: none;
}
div.section-title-block {

View file

@ -1,5 +1,5 @@
body {
background-color: #1E1E1E;
background: #1E1E1E;
font-family: sans-serif;
color: #999;
font-size: 80%;
@ -11,7 +11,7 @@ a {
}
div#topbar {
background-color: #666;
background: #666;
border-bottom: 1px solid #999;
}
div#topbar a {
@ -24,13 +24,13 @@ header {
input:not(div#qrbuttons input),
textarea {
background-color: #333;
background: #333;
border: 1px solid #666;
color: #CCC;
}
th.postblock {
background-color: #282A2E;
background: #282A2E;
border: 1px solid #888;
border-radius: 5px;
text-align: left;
@ -44,7 +44,7 @@ div.reply,
div.postprev,
div.inlinepostprev,
select.post-actions {
background-color: #333;
background: #333;
border: 1px solid #555;
border-radius: 5px;
}
@ -66,5 +66,5 @@ span.subject {
}
table#pages, table#pages * {
border: none !important;
border: none;
}

View file

@ -110,7 +110,7 @@ table#pages td {
}
.spoiler {
background-color: #000;
background: #000;
color: #000;
}
@ -325,7 +325,7 @@ input.config-text {
}
.lightbox {
background-color: #CDCDCD;
background: #CDCDCD;
border: 1px solid #000;
bottom: 5%;
color: #000;
@ -347,7 +347,7 @@ input.config-text {
.lightbox-bg {
background-attachment: fixed;
background-color: #333;
background: #333;
height: 100%;
left: 0;
opacity: 0.5;
@ -358,7 +358,7 @@ input.config-text {
}
.lightbox-footer {
background-color: #CDCDCD;
background: #CDCDCD;
bottom: 5%;
clear: both;
left: 16px;
@ -376,11 +376,12 @@ input.config-text {
.lightbox-x {
color: #000 !important;
float: right;
z-index: 90002;
font-size: 32px;
font-weight: 700;
}
.lightbox-x:hover {
color: #555 !important;
color: #555;
}
.lightbox a {
@ -392,7 +393,7 @@ input.config-text {
.lightbox input[type=password],
.lightbox input[type=file],
.lightbox textarea {
background-color: #FFF;
background: #FFF;
border: 1px solid #000;
color: #000;
}
@ -402,18 +403,18 @@ input.config-text {
height: 300px;
margin-left: 0px;
clear: both;
background-color: #FFF;
background: #FFF;
color: #000;
}
.lightbox div.section-body {
background-color: #A0A0A0;
background: #A0A0A0;
}
.lightbox div.section-title-block {
border: 1px solid #000;
border-radius: 0px;
background-color: #777;
background: #777;
-webkit-filter: drop-shadow(0px 0px 0px #000);
filter: drop-shadow(0px 0px 0px #000);
}
@ -424,24 +425,24 @@ div#qr-box {
-webkit-box-sizing: border-box;
box-sizing: border-box;
min-width: 300px;
background-color: lightgray;
background: lightgray;
border: 1px solid #000;
display: table;
}
div#qr-box input[type=text], div#qr-box textarea {
display: table-cell;
min-width: 300px;
background-color: #FFF !important;
color: #000 !important;
background: #FFF;
color: #000;
width: 100%;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
div#qr-box input[type=file] {
background-color: lightgray !important;
border: none !important;
color: #000 !important;
background: lightgray;
border: none;
color: #000;
width: auto;
}
div#qr-box label {
@ -452,7 +453,7 @@ div#qr-box textarea {
}
div#qr-title {
background-color: #000;
background: #000;
min-width: 100%;
height: 22px;
color: #FFF;
@ -479,7 +480,7 @@ table#qr-postbox input[type=text] {
width: 100%;
}
table#qr-postbox textarea {
background-color: #FFF !important;
background: #FFF;
color: #000;
}

View file

@ -2,7 +2,7 @@ div.reply,
div.postprev,
div.inlinepostprev,
th.postblock {
background-color: #ddd;
background: #ddd;
border: 1px solid #ccc;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
@ -15,7 +15,7 @@ span.subject {
}
div.section-title-block {
background-color: #ccc;
background: #ccc;
}
div.section-block {
@ -23,12 +23,12 @@ div.section-block {
-ms-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
background-color: #FCFCFC;
background: #FCFCFC;
border: 1px solid #D7D7D7;
}
body {
background-color: #eee;
background: #eee;
font: 15px "Trebuchet MS", Trebuchet, sans-serif;
}
@ -37,7 +37,7 @@ a {
}
div#topbar, div.dropdown-menu {
background-color: #000;
background: #000;
opacity: 0.8;
padding: 2px;
}

View file

@ -1,23 +1,23 @@
.dropdown-button:hover {
background-color: #404040;
background: #404040;
}
.section-body {
background-color: #606060;
background: #606060;
}
.section-title-block {
background-color: #202020;
background: #202020;
border-radius: 4px 4px 0px 0px;
}
.tab {
background-color: #404040 !important;
background: #404040;
border: 1px solid #363942;
}
#current-tab {
background-color: #363942 !important;
background: #363942;
}
div#recent-posts-header {
@ -28,7 +28,7 @@ div#recent-posts-header {
}
.postblock {
background-color: #363942;
background: #363942;
font-weight: 700;
}
@ -37,18 +37,18 @@ div#recent-posts-header {
}
.manage-header {
background-color: #202020;
background: #202020;
-webkit-filter: drop-shadow(4px 4px 4px #101010);
filter: drop-shadow(4px 4px 4px #101010);
border-radius: 8px;
}
.dropdown-button:hover {
background-color: #404040;
background: #404040;
}
.dropdown-menu {
background-color: #202020;
background: #202020;
-webkit-filter: drop-shadow(2px 2px 3px #101010);
filter: drop-shadow(2px 2px 3px #101010);
z-index: 0;
@ -65,12 +65,12 @@ img.thumbnail {
}
.reply, .inlinepostprev, .postprev {
background-color: #25272D;
background: #25272D;
border: 1px solid #8C94AB;
}
.postblock {
background-color: #25272D;
background: #25272D;
font-weight: 700;
}
@ -80,7 +80,7 @@ img.thumbnail {
}
.postername a {
color: #ffcc00 !important;
color: #ffcc00;
text-decoration: underline;
}
@ -96,7 +96,7 @@ input:not([type=submit]):not([type=button]),
textarea,
select#changepage,
select.post-actions {
background-color: #25272D;
background: #25272D;
border: 1px solid #8C94AB;
color: #FFF;
}
@ -106,7 +106,7 @@ select.post-actions {
}
body {
background-color: #363942;
background: #363942;
background-image: url(res/pipes_bg.png);
color: #d8d0b9;
font: 12pt sans-serif;
@ -128,7 +128,7 @@ a:hover {
}
a.topbar-item:hover {
background-color: #404040;
background: #404040;
}
div#footer, div#footer * {
@ -136,11 +136,11 @@ div#footer, div#footer * {
}
div#topbar {
background-color: #202020;
background: #202020;
-webkit-filter: drop-shadow(0px 4px 2px #101010);
filter: drop-shadow(0px 4px 2px #101010);
z-index: 9001;
}
div#topbar li:hover {
background-color: #404040;
background: #404040;
}

View file

@ -40,13 +40,13 @@ hr {
}
select.post-actions {
background-color: #F0E0D6;
background: #F0E0D6;
border-bottom: 1px solid #D9BFB7;
border-right: 1px solid #D9BFB7;
}
div.reply, table#pages, div.postprev {
background-color: #F0E0D6;
background: #F0E0D6;
border-left: 0px;
border-top: 0px;
border-bottom: 1px solid #D9BFB7;
@ -58,11 +58,11 @@ div.post-text a {
}
table#pages * {
border: none !important;
border: none;
}
div.section-title-block {
background-color: #fca;
background: #fca;
color: #800;
}
@ -72,7 +72,7 @@ div#topbar {
}
th.postblock {
background-color: #EA8;
background: #EA8;
border: 1px solid #800;
}

View file

@ -40,13 +40,13 @@ hr {
}
select.post-actions {
background-color: #D6DAF0;
background: #D6DAF0;
border-bottom: 1px solid #B7C5D9;
border-right: 1px solid #B7C5D9;
}
div.reply, table#pages, div.postprev {
background-color: #D6DAF0;
background: #D6DAF0;
border-left: 0px;
border-top: 0px;
border-bottom: 1px solid #B7C5D9;
@ -58,11 +58,11 @@ div.post-text a {
}
table#pages * {
border: none !important;
border: none;
}
div.section-title-block {
background-color: #98E;
background: #98E;
color: #000;
}
@ -72,7 +72,7 @@ div#topbar {
}
th.postblock {
background-color: #98E;
background: #98E;
border: 1px solid #000;
}

View file

@ -54,12 +54,12 @@
height: 0;
}
select.post-actions {
background-color: $replybg;
background: $replybg;
border-bottom: 1px solid $borderbotright;
border-right: 1px solid $borderbotright;
}
div.reply, table#pages, div.postprev {
background-color: $replybg;
background: $replybg;
border-left: 0px;
border-top: 0px;
border-bottom: 1px solid $borderbotright;
@ -69,10 +69,10 @@
color: $postlinkcol;
}
table#pages * {
border: none!important;
border: none;
}
div.section-title-block {
background-color: $sectiontitlebg;
background: $sectiontitlebg;
color: $sectiontitlecol;
}
@ -81,7 +81,7 @@
border-bottom: 1px solid $topbarborder;
}
th.postblock {
background-color: $postblockbg;
background: $postblockbg;
border: 1px solid $postblockborder;
}
span.postername, span.postername a {

View file

@ -37,5 +37,5 @@ div#threadlinks-top {
}
table#pages, table#pages * {
border: none!important;
border: none;
}

View file

@ -7,8 +7,8 @@ div.section-title-block {
}
div.front-intro {
border-radius: 0px!important;
border-width: 1px!important;
border-radius: 0px;
border-width: 1px;
}
div.section-body {

View file

@ -1,7 +1,7 @@
@import 'colors';
%formstyle {
background: $inputbg!important;
background: $inputbg;
border: 1px double $inputborder;
color: $color;
}

View file

@ -58,8 +58,8 @@ div#topbar,
.dropdown-button,
.dropdown-menu,
.dropdown-menu a {
background-color:#000A89;
color:$bgcol!important;
background:#000A89;
color:$bgcol;
}
div#footer {

View file

@ -9,7 +9,7 @@
}
.tab {
background-color: #dfdffe;
background: #dfdffe;
border: 1px solid #9295a4;
}
@ -19,5 +19,5 @@
}
#current-tab, div.section-title-block {
background-color: #bfc6e7;
background: #bfc6e7;
}

View file

@ -2,7 +2,7 @@
@import '../global/colors';
h1#board-title {
font-family: serif!important;
font-family: serif;
font-size: 24pt;
color: $headercol;
}

View file

@ -6,6 +6,6 @@
}
.manage-header {
background-color: $bgcol;
background: $bgcol;
border-radius: 8px;
}

View file

@ -2,7 +2,7 @@
@import './util';
body {
background-color: $bgcol;
background: $bgcol;
font-family: monospace, sans-serif;
font-size: 80%;
}
@ -69,7 +69,7 @@ span.subject {
}
table#pages, table#pages * {
border: none!important;
border: none;
}
div.section-title-block {

View file

@ -1,7 +1,7 @@
@import 'dark/colors';
body {
background-color: $bgcol;
background: $bgcol;
font-family: $font-family;
color: $color;
font-size: 80%;
@ -13,7 +13,7 @@ a {
}
div#topbar {
background-color: $topbarbg;
background: $topbarbg;
border-bottom: 1px solid $color;
a {
text-shadow: black 1px 1px 1px, black -1px -1px 1px, black -1px 1px 1px, black 1px -1px 1px;
@ -27,13 +27,13 @@ header {
// input:not([type=submit]):not([type=button]),
input:not(div#qrbuttons input),
textarea {
background-color: $inputbg;
background: $inputbg;
border: 1px solid $topbarbg;
color: $linkcol;
}
th.postblock {
background-color: $blockcol;
background: $blockcol;
border: 1px solid $blockborder;
border-radius: 5px;
text-align: left;
@ -47,7 +47,7 @@ div.reply,
div.postprev,
div.inlinepostprev,
select.post-actions {
background-color: $inputbg;
background: $inputbg;
border: 1px solid $replyborder;
border-radius: 5px;
}
@ -69,5 +69,5 @@ span.subject {
}
table#pages, table#pages * {
border: none!important;
border: none;
}

View file

@ -110,7 +110,7 @@ table#pages td {
}
.spoiler {
background-color:#000;
background:#000;
color:#000;
}

View file

@ -1,7 +1,7 @@
@import '../util';
.lightbox {
background-color:#CDCDCD;
background:#CDCDCD;
border:1px solid #000;
bottom:5%;
color:#000;
@ -23,7 +23,7 @@
.lightbox-bg {
background-attachment:fixed;
background-color:#333;
background:#333;
height:100%;
left:0;
opacity:0.5;
@ -34,7 +34,7 @@
}
.lightbox-footer {
background-color:#CDCDCD;
background:#CDCDCD;
bottom:5%;
clear:both;
left:16px;
@ -51,12 +51,13 @@
.lightbox-x {
color: #000!important;
float:right;
z-index:90002;
float: right;
font-size: 32px;
font-weight: 700;
}
.lightbox-x:hover {
color:#555!important;
color:#555;
}
.lightbox a {
@ -68,7 +69,7 @@
.lightbox input[type=password],
.lightbox input[type=file],
.lightbox textarea {
background-color:#FFF;
background:#FFF;
border:1px solid #000;
color:#000;
}
@ -78,18 +79,18 @@
height:300px;
margin-left: 0px;
clear: both;
background-color: #FFF;
background: #FFF;
color: #000;
}
.lightbox div.section-body {
background-color: #A0A0A0;
background: #A0A0A0;
}
.lightbox div.section-title-block {
border: 1px solid #000;
border-radius: 0px;
background-color: #777;
// box-shadow: 0px 0px 0px 0px #000000!important;
background: #777;
// box-shadow: 0px 0px 0px 0px #000000;
@include shadow-filter(0px 0px 0px #000);
}

View file

@ -5,22 +5,22 @@ div#qr-box {
padding:1px;
@include box-sizing(border-box);
min-width: 300px;
background-color:lightgray;
background:lightgray;
border: 1px solid #000;
display: table;
input[type=text],textarea {
display: table-cell;
min-width:300px;
background-color: #FFF!important;
color: #000!important;
background: #FFF;
color: #000;
width:100%;
@include box-sizing(border-box);
}
input[type=file] {
background-color: lightgray!important;
border: none!important;
color: #000!important;
background: lightgray;
border: none;
color: #000;
width: auto;
}
label {
@ -32,7 +32,7 @@ div#qr-box {
}
div#qr-title {
background-color: #000;
background: #000;
min-width: 100%;
height: 22px;
color: #FFF;
@ -58,7 +58,7 @@ table#qr-postbox {
width:100%
}
textarea {
background-color: #FFF!important;
background: #FFF;
color: #000;
}
}

View file

@ -3,7 +3,7 @@
@import 'util';
body {
background-color: $bgcol;
background: $bgcol;
font: 15px $font;
}
@ -12,7 +12,7 @@ a {
}
div#topbar, div.dropdown-menu {
background-color: #000;
background: #000;
opacity: 0.8;
padding: 2px;
}

View file

@ -5,7 +5,7 @@ div.reply,
div.postprev,
div.inlinepostprev,
th.postblock {
background-color: $replycol;
background: $replycol;
border: 1px solid $replyborder;
@include border-radius(5px);
}
@ -15,11 +15,11 @@ span.subject {
}
div.section-title-block {
background-color: $replyborder;
background: $replyborder;
}
div.section-block {
@include border-radius(5px);
background-color: $sectionbg;
background: $sectionbg;
border: 1px solid $sectionborder;
}

View file

@ -9,7 +9,7 @@
}
body {
background-color: $bgcol;
background: $bgcol;
background-image: url(res/pipes_bg.png);
color: #d8d0b9;
font: $font;
@ -31,7 +31,7 @@ a:hover {
}
a.topbar-item:hover {
background-color: $bglight;
background: $bglight;
}
div#footer, div#footer * {
@ -39,12 +39,12 @@ div#footer, div#footer * {
}
div#topbar {
background-color: $topbarcol;
background: $topbarcol;
// @include box-shadow(0px 2px 2px 3px $shadowcol);
@include shadow-filter(0px 4px 2px $shadowcol);
z-index: 9001;
li:hover {
background-color: $bglight;
background: $bglight;
}
}

View file

@ -2,25 +2,25 @@
@import '../util';
.dropdown-button:hover {
background-color: $bglight;
background: $bglight;
}
.section-body {
background-color: #606060;
background: #606060;
}
.section-title-block {
background-color: $topbarcol;
background: $topbarcol;
border-radius: 4px 4px 0px 0px;
}
.tab {
background-color: $bglight!important;
background: $bglight;
border: 1px solid $bgcol;
}
#current-tab {
background-color: $bgcol!important;
background: $bgcol;
}
div#recent-posts-header {
@ -31,6 +31,6 @@ div#recent-posts-header {
}
.postblock {
background-color: $bgcol;
background: $bgcol;
font-weight: 700;
}

View file

@ -2,11 +2,11 @@
@import '../util';
.dropdown-button:hover {
background-color: $bglight;
background: $bglight;
}
.dropdown-menu {
background-color: $topbarcol;
background: $topbarcol;
// @include box-shadow(2px 2px 2px 3px $shadowcol);
@include shadow-filter(2px 2px 3px $shadowcol);
z-index: 0;
@ -23,12 +23,12 @@ img.thumbnail {
}
.reply, .inlinepostprev, .postprev {
background-color: #25272D;
background: #25272D;
border: 1px solid #8C94AB;
}
.postblock {
background-color: #25272D;
background: #25272D;
font-weight: 700;
}
@ -38,7 +38,7 @@ img.thumbnail {
}
.postername a {
color: #ffcc00 !important;
color: #ffcc00;
text-decoration: underline;
}
@ -54,7 +54,7 @@ input:not([type=submit]):not([type=button]),
textarea,
select#changepage,
select.post-actions {
background-color: #25272D;
background: #25272D;
border: 1px solid #8C94AB;
color: #FFF;
}

View file

@ -6,7 +6,7 @@
}
.manage-header {
background-color: $topbarcol;
background: $topbarcol;
// @include box-shadow(2px 2px 3px 4px $shadowcol);
@include shadow-filter(4px 4px 4px $shadowcol);
border-radius: 8px;