4chan-x/css/themeoptions.css
2013-04-14 22:06:50 -07:00

140 lines
3.6 KiB
CSS

css += (if Style.lightTheme then """
.prettyprint {
background-color: #e7e7e7;
border: 1px solid #dcdcdc;
}
.com {
color: #dd0000;
}
.str,
.atv {
color: #7fa61b;
}
.pun {
color: #61663a;
}
.tag {
color: #117743;
}
.kwd {
color: #5a6F9e;
}
.typ,
.atn {
color: #9474bd;
}
.lit {
color: #368c72;
}\n
""" else """
.prettyprint {
background-color: rgba(0,0,0,.1);
border: 1px solid rgba(0,0,0,0.5);
}
.tag {
color: #96562c;
}
.pun {
color: #5b6f2a;
}
.com {
color: #a34443;
}
.str,
.atv {
color: #8ba446;
}
.kwd {
color: #987d3e;
}
.typ,
.atn {
color: #897399;
}
.lit {
color: #558773;
}\n
""")
if _conf["Alternate Post Colors"]
css += """
.replyContainer:not(.hidden):nth-of-type(2n+1) .post {
background-image: #{agent}linear-gradient(#{if Style.lightTheme then "rgba(0,0,0,0.05), rgba(0,0,0,0.05)" else "rgba(255,255,255,0.02), rgba(255,255,255,0.02)"});
}\n
"""
if _conf["Color Reply Headings"]
css += """
.postInfo {
background: #{if (replyHeading = new Style.color Style.colorToHex theme["Reply Background"]) then "rgba(" + (replyHeading.shiftRGB -12, false) + ",0.8)" else "rgba(0,0,0,0.1)"};
border-bottom: 1px solid #{theme["Reply Border"]}
}\n"""
if _conf["Color File Info"]
css += """
.file {
background: #{if (fileHeading = new Style.color Style.colorToHex theme["Reply Background"]) then "rgba(" + (fileHeading.shiftRGB -8, false) + ",0.8)" else "rgba(0,0,0,0.1)"};
border-bottom: 1px solid #{theme["Reply Border"]}
}\n
"""
if _conf["OP Background"]
css += """
.op.post {
background: #{theme["Reply Background"]};
border: 1px solid #{theme["Reply Border"]};
}
.op.post:target
.op.post.highlight {
background: #{theme["Highlighted Reply Background"]};
border: 1px solid #{theme["Highlighted Reply Border"]};
}\n
"""
if _conf["4chan SS Sidebar"]
background = new Style.color Style.colorToHex theme["Reply Background"]
css += """
body::before {
z-index: -1;
background: none repeat scroll 0% 0% rgba(#{background.shiftRGB -18}, 0.8);
border-#{Style.sidebarLocation[1]}: 2px solid #{backgroundC};
box-shadow:
#{if _conf["Sidebar Location"] is "right" then "inset" else ""} 1px 0 0 #{theme["Thread Wrapper Border"]},
#{if _conf["Sidebar Location"] is "left" then "inset" else ""} -1px 0 0 #{theme["Thread Wrapper Border"]};
}\n
"""
css += {
text: """
a.useremail[href*="sage"]:last-of-type::#{_conf["Sage Highlight Position"]},
a.useremail[href*="Sage"]:last-of-type::#{_conf["Sage Highlight Position"]},
a.useremail[href*="SAGE"]:last-of-type::#{_conf["Sage Highlight Position"]} {
content: " (sage) ";
color: #{theme["Sage"]};
}\n
"""
image: """
a.useremail[href*="sage"]:last-of-type::#{_conf["Sage Highlight Position"]},
a.useremail[href*="Sage"]:last-of-type::#{_conf["Sage Highlight Position"]},
a.useremail[href*="SAGE"]:last-of-type::#{_conf["Sage Highlight Position"]} {
content: url("data:image/png;base64,<%= grunt.file.read("img/emoji/sage.png", {encoding: "base64"}) %>");
vertical-align: top;
margin-#{if _conf["Sage Highlight Position"] is "before" then "right" else "left"}: #{parseInt _conf['Emoji Spacing']}px;
}\n
"""
none: ""
}[_conf["Sage Highlighting"]]
if _conf["Announcements"] is "slideout"
css += """
#globalMessage {
background: #{theme["Dialog Background"]};
border: 1px solid #{theme["Dialog Border"]};
}\n
"""
if _conf["Post Form Decorations"]
css += """
#qr {
border-color: #{theme["Buttons Border"]};
background: #{backgroundC};
box-shadow: #{if _conf['Quote Shadows'] then "5px 5px 5px #{theme['Shadow Color']}" else ""};
}\n
"""