Start styling the front page again.

This commit is contained in:
Zixaphir 2013-06-03 03:47:19 -07:00
parent 21f51a9e24
commit 3c4d53cdab
10 changed files with 108 additions and 50 deletions

7
.gitignore vendored
View File

@ -4,12 +4,7 @@ node_modules/
tmp-crx/
tmp-userjs/
tmp-userscript/
<<<<<<< HEAD
builds/4chan-X.zip
Gruntfile.js
builds/4chan-*
=======
builds/4chan-X-Chrome.zip
builds/4chan-X-Opera.nex
Gruntfile.js
>>>>>>> v3
Gruntfile.js

File diff suppressed because one or more lines are too long

View File

@ -4,10 +4,8 @@
// @namespace zixaphir
// @description The most comprehensive 4chan userscript.
// @license MIT; https://github.com/zixaphir/appchan-x/blob/master/LICENSE
// @match *://api.4chan.org/*
// @match *://boards.4chan.org/*
// @match *://images.4chan.org/*
// @match *://sys.4chan.org/*
// @match *://*.4chan.org/*
// @match *://4chan.org/*
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_deleteValue

File diff suppressed because one or more lines are too long

View File

@ -10,7 +10,7 @@
},
"content_scripts": [{
"js": ["script.js"],
"matches": ["*://api.4chan.org/*","*://boards.4chan.org/*","*://images.4chan.org/*","*://sys.4chan.org/*"],
"matches": ["*://*.4chan.org/*","*://4chan.org/*"],
"all_frames": true,
"run_at": "document_start"
}],

File diff suppressed because one or more lines are too long

View File

@ -10,10 +10,8 @@
"buildsPath": "builds/",
"mainBranch": "master",
"matches": [
"*://api.4chan.org/*",
"*://boards.4chan.org/*",
"*://images.4chan.org/*",
"*://sys.4chan.org/*"
"*://*.4chan.org/*",
"*://4chan.org/*"
],
"files": {
"metajs": "appchan-x.meta.js",

View File

@ -11,10 +11,13 @@ Main =
else # string or number
Conf[parent] = obj
return
flatten null, Config
# Unflattened Config.
for db in DataBoards
Conf[db] = boards: {}
# Unflattened Config.
$.extend Conf,
'userThemes': []
'userMascots': []
@ -32,7 +35,6 @@ Main =
pathname = location.pathname.split '/'
g.BOARD = new Board pathname[1]
return if g.BOARD.ID in ['z', 'fk']
g.VIEW =
switch pathname[2]
when 'res'
@ -61,10 +63,18 @@ Main =
if Conf["NSFW/SFW Themes"]
Conf["theme"] = Conf["theme_#{g.TYPE}"]
return if g.BOARD.ID in ['z', 'fk'] then Style.init()
switch location.hostname
when '4chan.org'
g.VIEW = 'home'
Style.init()
return
when 'api.4chan.org'
return
when 'sys.4chan.org'
g.VIEW = 'report'
Style.init()
Report.init()
return
when 'images.4chan.org'

View File

@ -2120,27 +2120,36 @@ article li {
text-align: center;
}
#doc {
margin: 0 auto;
width: 1000px;
<%= sizing %>: border-box;
margin: 10px auto;
width: 1006px;
padding: 2px;
position: relative;
}
.rounded-edges #doc,
.rounded-edges #doc div {
border-radius: 3px;
}
#boards .boxcontent {
vertical-align: top;
text-align: center;
}
#filter-container,
#options-container {
float: right;
position: relative;
top: 4px;
right: 8px;
position: absolute;
}
#optionssmenu {
#filtermenu,
#optionsmenu {
top: 100% !important;
left: 0 !important;
left: auto !important;
right: 0 !important;
}
#boards .column {
<%= sizing %>: border-box;
display: inline-block;
width: 16em;
width: 180px;
text-align: left;
vertical-align: top;
}
@ -2148,6 +2157,7 @@ article li {
.boxcontent ul {
vertical-align: top;
padding: 0;
margin: 0;
}
.right-box .boxcontent ul {
padding: 0 10px;
@ -2156,9 +2166,32 @@ article li {
.boxcontent li {
list-style-type: none;
}
.bd ul {
.boxbar {
position: relative;
}
#doc h3,
.boxbar h2 {
margin: 0;
}
#doc h3 {
text-decoration: none !important;
}
.underline-links #doc h3 {
text-decoration: underline !important;
}
#ft,
.box-outer {
margin: 2px 0 0;
overflow: hidden;
}
#ft,
.boxbar,
.boxcontent {
padding: 0 8px;
}
.yui-module {
position: absolute;
}
.yuimenuitem::before {
content: " [ ] ";
font-family: monospace;
@ -2166,11 +2199,17 @@ article li {
.yuimenuitem-checked::before {
content: " [x] "
}
.yui-g {
overflow: hidden;
}
.yui-u {
display: inline-block;
vertical-align: top;
width: 475px;
margin: 10px;
width: 499px;
float: right;
}
.yui-u.first {
float: left;
}
#recent-images .boxcontent {
text-align: center;

View File

@ -156,10 +156,12 @@ textarea.field:focus {
.has-file #qr-filename-container:focus #qr-extras-container {
background: #{theme["Focused Input Background"]};
}
#ft,
#mouseover,
#post-preview,
#qp .post,
#xupdater,
.box-outer,
.reply.post {
border-width: 1px;
border-style: solid;
@ -178,6 +180,7 @@ textarea.field:focus {
border-style: solid;
border-color: #{theme["Navigation Border"]};
}
#doc,
.board > .thread {
background: #{theme["Thread Wrapper Background"]};
border: 1px solid #{theme["Thread Wrapper Border"]};
@ -393,6 +396,7 @@ a .name {
.alternate-post-colors .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)"});
}
.color-reply-headings .boxbar,
.color-reply-headings .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"]}