diff --git a/Makefile b/Makefile index baeec47..1454b02 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,7 @@ +.PHONY: all screenshots + all: @./make.py + +screenshots: + @./make.py screenshots diff --git a/css/darculized/darculized-all-sites.css b/css/darculized/darculized-all-sites.css index 78ec9ba..f4dbea4 100644 --- a/css/darculized/darculized-all-sites.css +++ b/css/darculized/darculized-all-sites.css @@ -1037,64 +1037,6 @@ div.crp { #fbar { background-color: #2e2e2e !important; } -table { - background-color: #262626 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table, -#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table { - background-color: #e05f27 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) a, -#hnmain > tbody:nth-child(1) > tr:nth-child(1) a { - color: #000 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(2), -#hnmain > tbody:nth-child(1) > tr:nth-child(2) { - background-color: #262626 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(2) { - background-color: #262626 !important; -} -.title a { - color: #909396 !important; -} -.title a:visited { - color: #5e6263 !important; -} -a.storylink { - color: #a6aaab !important; - font-weight: bold; -} -.sitestr { - color: #2f7bde !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(3) > td:nth-child(1) { - background-color: #262626 !important; -} -#hnmain .comhead { - color: #a6aaab !important; -} -#hnmain .c00 { - color: #909396 !important; -} -#hnmain a.hnuser { - color: #b68800 !important; -} -#hnmain span.age a { - color: #5e6263 !important; -} -.cdd { - color: rgba(255,66,56,0.65) !important; -} -.comment i { - color: #5e6263 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(4) { - background-color: #262626 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(4) > td:nth-child(1) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) { - background-color: #e05f27 !important; -} tr.Even { background-color: #2e2e2e !important; } @@ -1263,6 +1205,64 @@ table.wikitable { table.wikitable > * > tr > th { background-color: #2e2e2e !important; } +table { + background-color: #262626 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table, +#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table { + background-color: #e05f27 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) a, +#hnmain > tbody:nth-child(1) > tr:nth-child(1) a { + color: #000 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(2), +#hnmain > tbody:nth-child(1) > tr:nth-child(2) { + background-color: #262626 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(2) { + background-color: #262626 !important; +} +.title a { + color: #909396 !important; +} +.title a:visited { + color: #5e6263 !important; +} +a.storylink { + color: #a6aaab !important; + font-weight: bold; +} +.sitestr { + color: #2f7bde !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(3) > td:nth-child(1) { + background-color: #262626 !important; +} +#hnmain .comhead { + color: #a6aaab !important; +} +#hnmain .c00 { + color: #909396 !important; +} +#hnmain a.hnuser { + color: #b68800 !important; +} +#hnmain span.age a { + color: #5e6263 !important; +} +.cdd { + color: rgba(255,66,56,0.65) !important; +} +.comment i { + color: #5e6263 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(4) { + background-color: #262626 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(4) > td:nth-child(1) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) { + background-color: #e05f27 !important; +} div#page div#header { background-color: #262626 !important; } diff --git a/css/darculized/darculized-disqus.css b/css/darculized/darculized-disqus.com.css similarity index 100% rename from css/darculized/darculized-disqus.css rename to css/darculized/darculized-disqus.com.css diff --git a/css/darculized/darculized-duckduckgo.css b/css/darculized/darculized-duckduckgo.com.css similarity index 100% rename from css/darculized/darculized-duckduckgo.css rename to css/darculized/darculized-duckduckgo.com.css diff --git a/css/darculized/darculized-google.css b/css/darculized/darculized-google.com.css similarity index 100% rename from css/darculized/darculized-google.css rename to css/darculized/darculized-google.com.css diff --git a/css/darculized/darculized-lwn.css b/css/darculized/darculized-lwn.net.css similarity index 100% rename from css/darculized/darculized-lwn.css rename to css/darculized/darculized-lwn.net.css diff --git a/css/darculized/darculized-mediawiki.css b/css/darculized/darculized-mediawiki.org.css similarity index 100% rename from css/darculized/darculized-mediawiki.css rename to css/darculized/darculized-mediawiki.org.css diff --git a/css/darculized/darculized-hackernews.css b/css/darculized/darculized-news.ycombinator.com.css similarity index 100% rename from css/darculized/darculized-hackernews.css rename to css/darculized/darculized-news.ycombinator.com.css diff --git a/css/darculized/darculized-reddit.css b/css/darculized/darculized-reddit.com.css similarity index 100% rename from css/darculized/darculized-reddit.css rename to css/darculized/darculized-reddit.com.css diff --git a/css/darculized/darculized-stackexchange.css b/css/darculized/darculized-stackexchange.com.css similarity index 100% rename from css/darculized/darculized-stackexchange.css rename to css/darculized/darculized-stackexchange.com.css diff --git a/css/gruvbox/gruvbox-all-sites.css b/css/gruvbox/gruvbox-all-sites.css index 4e169f1..dbff740 100644 --- a/css/gruvbox/gruvbox-all-sites.css +++ b/css/gruvbox/gruvbox-all-sites.css @@ -1037,64 +1037,6 @@ div.crp { #fbar { background-color: #3c3836 !important; } -table { - background-color: #282828 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table, -#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table { - background-color: #fb4934 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) a, -#hnmain > tbody:nth-child(1) > tr:nth-child(1) a { - color: #000 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(2), -#hnmain > tbody:nth-child(1) > tr:nth-child(2) { - background-color: #282828 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(2) { - background-color: #282828 !important; -} -.title a { - color: #83a598 !important; -} -.title a:visited { - color: #b8bb26 !important; -} -a.storylink { - color: #8ec07c !important; - font-weight: bold; -} -.sitestr { - color: #458588 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(3) > td:nth-child(1) { - background-color: #282828 !important; -} -#hnmain .comhead { - color: #8ec07c !important; -} -#hnmain .c00 { - color: #83a598 !important; -} -#hnmain a.hnuser { - color: #d79921 !important; -} -#hnmain span.age a { - color: #b8bb26 !important; -} -.cdd { - color: rgba(255,34,23,0.65) !important; -} -.comment i { - color: #b8bb26 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(4) { - background-color: #282828 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(4) > td:nth-child(1) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) { - background-color: #fb4934 !important; -} tr.Even { background-color: #3c3836 !important; } @@ -1263,6 +1205,64 @@ table.wikitable { table.wikitable > * > tr > th { background-color: #3c3836 !important; } +table { + background-color: #282828 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table, +#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table { + background-color: #fb4934 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) a, +#hnmain > tbody:nth-child(1) > tr:nth-child(1) a { + color: #000 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(2), +#hnmain > tbody:nth-child(1) > tr:nth-child(2) { + background-color: #282828 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(2) { + background-color: #282828 !important; +} +.title a { + color: #83a598 !important; +} +.title a:visited { + color: #b8bb26 !important; +} +a.storylink { + color: #8ec07c !important; + font-weight: bold; +} +.sitestr { + color: #458588 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(3) > td:nth-child(1) { + background-color: #282828 !important; +} +#hnmain .comhead { + color: #8ec07c !important; +} +#hnmain .c00 { + color: #83a598 !important; +} +#hnmain a.hnuser { + color: #d79921 !important; +} +#hnmain span.age a { + color: #b8bb26 !important; +} +.cdd { + color: rgba(255,34,23,0.65) !important; +} +.comment i { + color: #b8bb26 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(4) { + background-color: #282828 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(4) > td:nth-child(1) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) { + background-color: #fb4934 !important; +} div#page div#header { background-color: #282828 !important; } diff --git a/css/gruvbox/gruvbox-disqus.css b/css/gruvbox/gruvbox-disqus.com.css similarity index 100% rename from css/gruvbox/gruvbox-disqus.css rename to css/gruvbox/gruvbox-disqus.com.css diff --git a/css/gruvbox/gruvbox-duckduckgo.css b/css/gruvbox/gruvbox-duckduckgo.com.css similarity index 100% rename from css/gruvbox/gruvbox-duckduckgo.css rename to css/gruvbox/gruvbox-duckduckgo.com.css diff --git a/css/gruvbox/gruvbox-google.css b/css/gruvbox/gruvbox-google.com.css similarity index 100% rename from css/gruvbox/gruvbox-google.css rename to css/gruvbox/gruvbox-google.com.css diff --git a/css/gruvbox/gruvbox-lwn.css b/css/gruvbox/gruvbox-lwn.net.css similarity index 100% rename from css/gruvbox/gruvbox-lwn.css rename to css/gruvbox/gruvbox-lwn.net.css diff --git a/css/gruvbox/gruvbox-mediawiki.css b/css/gruvbox/gruvbox-mediawiki.org.css similarity index 100% rename from css/gruvbox/gruvbox-mediawiki.css rename to css/gruvbox/gruvbox-mediawiki.org.css diff --git a/css/gruvbox/gruvbox-hackernews.css b/css/gruvbox/gruvbox-news.ycombinator.com.css similarity index 100% rename from css/gruvbox/gruvbox-hackernews.css rename to css/gruvbox/gruvbox-news.ycombinator.com.css diff --git a/css/gruvbox/gruvbox-reddit.css b/css/gruvbox/gruvbox-reddit.com.css similarity index 100% rename from css/gruvbox/gruvbox-reddit.css rename to css/gruvbox/gruvbox-reddit.com.css diff --git a/css/gruvbox/gruvbox-stackexchange.css b/css/gruvbox/gruvbox-stackexchange.com.css similarity index 100% rename from css/gruvbox/gruvbox-stackexchange.css rename to css/gruvbox/gruvbox-stackexchange.com.css diff --git a/css/solarized-dark/solarized-dark-all-sites.css b/css/solarized-dark/solarized-dark-all-sites.css index 3f2a76b..d4a499f 100644 --- a/css/solarized-dark/solarized-dark-all-sites.css +++ b/css/solarized-dark/solarized-dark-all-sites.css @@ -1037,64 +1037,6 @@ div.crp { #fbar { background-color: #073642 !important; } -table { - background-color: #002b36 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table, -#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table { - background-color: #cb4b16 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) a, -#hnmain > tbody:nth-child(1) > tr:nth-child(1) a { - color: #000 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(2), -#hnmain > tbody:nth-child(1) > tr:nth-child(2) { - background-color: #002b36 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(2) { - background-color: #002b36 !important; -} -.title a { - color: #839496 !important; -} -.title a:visited { - color: #586e75 !important; -} -a.storylink { - color: #93a1a1 !important; - font-weight: bold; -} -.sitestr { - color: #268bd2 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(3) > td:nth-child(1) { - background-color: #002b36 !important; -} -#hnmain .comhead { - color: #93a1a1 !important; -} -#hnmain .c00 { - color: #839496 !important; -} -#hnmain a.hnuser { - color: #b58900 !important; -} -#hnmain span.age a { - color: #586e75 !important; -} -.cdd { - color: rgba(255,54,43,0.65) !important; -} -.comment i { - color: #586e75 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(4) { - background-color: #002b36 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(4) > td:nth-child(1) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) { - background-color: #cb4b16 !important; -} tr.Even { background-color: #073642 !important; } @@ -1263,6 +1205,64 @@ table.wikitable { table.wikitable > * > tr > th { background-color: #073642 !important; } +table { + background-color: #002b36 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table, +#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table { + background-color: #cb4b16 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) a, +#hnmain > tbody:nth-child(1) > tr:nth-child(1) a { + color: #000 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(2), +#hnmain > tbody:nth-child(1) > tr:nth-child(2) { + background-color: #002b36 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(2) { + background-color: #002b36 !important; +} +.title a { + color: #839496 !important; +} +.title a:visited { + color: #586e75 !important; +} +a.storylink { + color: #93a1a1 !important; + font-weight: bold; +} +.sitestr { + color: #268bd2 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(3) > td:nth-child(1) { + background-color: #002b36 !important; +} +#hnmain .comhead { + color: #93a1a1 !important; +} +#hnmain .c00 { + color: #839496 !important; +} +#hnmain a.hnuser { + color: #b58900 !important; +} +#hnmain span.age a { + color: #586e75 !important; +} +.cdd { + color: rgba(255,54,43,0.65) !important; +} +.comment i { + color: #586e75 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(4) { + background-color: #002b36 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(4) > td:nth-child(1) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) { + background-color: #cb4b16 !important; +} div#page div#header { background-color: #002b36 !important; } diff --git a/css/solarized-dark/solarized-dark-disqus.css b/css/solarized-dark/solarized-dark-disqus.com.css similarity index 100% rename from css/solarized-dark/solarized-dark-disqus.css rename to css/solarized-dark/solarized-dark-disqus.com.css diff --git a/css/solarized-dark/solarized-dark-duckduckgo.css b/css/solarized-dark/solarized-dark-duckduckgo.com.css similarity index 100% rename from css/solarized-dark/solarized-dark-duckduckgo.css rename to css/solarized-dark/solarized-dark-duckduckgo.com.css diff --git a/css/solarized-dark/solarized-dark-google.css b/css/solarized-dark/solarized-dark-google.com.css similarity index 100% rename from css/solarized-dark/solarized-dark-google.css rename to css/solarized-dark/solarized-dark-google.com.css diff --git a/css/solarized-dark/solarized-dark-lwn.css b/css/solarized-dark/solarized-dark-lwn.net.css similarity index 100% rename from css/solarized-dark/solarized-dark-lwn.css rename to css/solarized-dark/solarized-dark-lwn.net.css diff --git a/css/solarized-dark/solarized-dark-mediawiki.css b/css/solarized-dark/solarized-dark-mediawiki.org.css similarity index 100% rename from css/solarized-dark/solarized-dark-mediawiki.css rename to css/solarized-dark/solarized-dark-mediawiki.org.css diff --git a/css/solarized-dark/solarized-dark-hackernews.css b/css/solarized-dark/solarized-dark-news.ycombinator.com.css similarity index 100% rename from css/solarized-dark/solarized-dark-hackernews.css rename to css/solarized-dark/solarized-dark-news.ycombinator.com.css diff --git a/css/solarized-dark/solarized-dark-reddit.css b/css/solarized-dark/solarized-dark-reddit.com.css similarity index 100% rename from css/solarized-dark/solarized-dark-reddit.css rename to css/solarized-dark/solarized-dark-reddit.com.css diff --git a/css/solarized-dark/solarized-dark-stackexchange.css b/css/solarized-dark/solarized-dark-stackexchange.com.css similarity index 100% rename from css/solarized-dark/solarized-dark-stackexchange.css rename to css/solarized-dark/solarized-dark-stackexchange.com.css diff --git a/css/solarized-light/solarized-light-all-sites.css b/css/solarized-light/solarized-light-all-sites.css index 1bc5222..0f09c3f 100644 --- a/css/solarized-light/solarized-light-all-sites.css +++ b/css/solarized-light/solarized-light-all-sites.css @@ -1037,64 +1037,6 @@ div.crp { #fbar { background-color: #eee8d5 !important; } -table { - background-color: #fdf6e3 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table, -#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table { - background-color: #cb4b16 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) a, -#hnmain > tbody:nth-child(1) > tr:nth-child(1) a { - color: #000 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(2), -#hnmain > tbody:nth-child(1) > tr:nth-child(2) { - background-color: #fdf6e3 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(2) { - background-color: #fdf6e3 !important; -} -.title a { - color: #657b83 !important; -} -.title a:visited { - color: #93a1a1 !important; -} -a.storylink { - color: #586e75 !important; - font-weight: bold; -} -.sitestr { - color: #268bd2 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(3) > td:nth-child(1) { - background-color: #fdf6e3 !important; -} -#hnmain .comhead { - color: #586e75 !important; -} -#hnmain .c00 { - color: #657b83 !important; -} -#hnmain a.hnuser { - color: #b58900 !important; -} -#hnmain span.age a { - color: #93a1a1 !important; -} -.cdd { - color: rgba(202,0,0,0.65) !important; -} -.comment i { - color: #93a1a1 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(4) { - background-color: #fdf6e3 !important; -} -#hnmain > tbody:nth-child(1) > tr:nth-child(4) > td:nth-child(1) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) { - background-color: #cb4b16 !important; -} tr.Even { background-color: #eee8d5 !important; } @@ -1263,6 +1205,64 @@ table.wikitable { table.wikitable > * > tr > th { background-color: #eee8d5 !important; } +table { + background-color: #fdf6e3 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table, +#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > table { + background-color: #cb4b16 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) a, +#hnmain > tbody:nth-child(1) > tr:nth-child(1) a { + color: #000 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > tbody:nth-child(1) > tr:nth-child(2), +#hnmain > tbody:nth-child(1) > tr:nth-child(2) { + background-color: #fdf6e3 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(2) { + background-color: #fdf6e3 !important; +} +.title a { + color: #657b83 !important; +} +.title a:visited { + color: #93a1a1 !important; +} +a.storylink { + color: #586e75 !important; + font-weight: bold; +} +.sitestr { + color: #268bd2 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(3) > td:nth-child(1) { + background-color: #fdf6e3 !important; +} +#hnmain .comhead { + color: #586e75 !important; +} +#hnmain .c00 { + color: #657b83 !important; +} +#hnmain a.hnuser { + color: #b58900 !important; +} +#hnmain span.age a { + color: #93a1a1 !important; +} +.cdd { + color: rgba(202,0,0,0.65) !important; +} +.comment i { + color: #93a1a1 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(4) { + background-color: #fdf6e3 !important; +} +#hnmain > tbody:nth-child(1) > tr:nth-child(4) > td:nth-child(1) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) { + background-color: #cb4b16 !important; +} div#page div#header { background-color: #fdf6e3 !important; } diff --git a/css/solarized-light/solarized-light-disqus.css b/css/solarized-light/solarized-light-disqus.com.css similarity index 100% rename from css/solarized-light/solarized-light-disqus.css rename to css/solarized-light/solarized-light-disqus.com.css diff --git a/css/solarized-light/solarized-light-duckduckgo.css b/css/solarized-light/solarized-light-duckduckgo.com.css similarity index 100% rename from css/solarized-light/solarized-light-duckduckgo.css rename to css/solarized-light/solarized-light-duckduckgo.com.css diff --git a/css/solarized-light/solarized-light-google.css b/css/solarized-light/solarized-light-google.com.css similarity index 100% rename from css/solarized-light/solarized-light-google.css rename to css/solarized-light/solarized-light-google.com.css diff --git a/css/solarized-light/solarized-light-lwn.css b/css/solarized-light/solarized-light-lwn.net.css similarity index 100% rename from css/solarized-light/solarized-light-lwn.css rename to css/solarized-light/solarized-light-lwn.net.css diff --git a/css/solarized-light/solarized-light-mediawiki.css b/css/solarized-light/solarized-light-mediawiki.org.css similarity index 100% rename from css/solarized-light/solarized-light-mediawiki.css rename to css/solarized-light/solarized-light-mediawiki.org.css diff --git a/css/solarized-light/solarized-light-hackernews.css b/css/solarized-light/solarized-light-news.ycombinator.com.css similarity index 100% rename from css/solarized-light/solarized-light-hackernews.css rename to css/solarized-light/solarized-light-news.ycombinator.com.css diff --git a/css/solarized-light/solarized-light-reddit.css b/css/solarized-light/solarized-light-reddit.com.css similarity index 100% rename from css/solarized-light/solarized-light-reddit.css rename to css/solarized-light/solarized-light-reddit.com.css diff --git a/css/solarized-light/solarized-light-stackexchange.css b/css/solarized-light/solarized-light-stackexchange.com.css similarity index 100% rename from css/solarized-light/solarized-light-stackexchange.css rename to css/solarized-light/solarized-light-stackexchange.com.css diff --git a/make.py b/make.py index fb92f22..a3a31b1 100755 --- a/make.py +++ b/make.py @@ -4,16 +4,21 @@ import os import subprocess +import sys import multiprocessing import functools from collections import namedtuple +from tempfile import mkstemp # * Variables sites_dir="sites" themes_dir = "themes" css_dir = "css" +screenshots_dir="screenshots" + +phantomjs_command = "phantomjs --ssl-protocol=any --ignore-ssl-errors=true screenshot.js".split() common_deps = ["styl/index.styl", "styl/mixins.styl"] @@ -23,6 +28,16 @@ Theme = namedtuple("Theme", ['name', 'styl_path', 'support_files']) # * Functions def main(): + "Update CSS files by default, or update screenshots." + + if len(sys.argv) > 1 and sys.argv[1] == "screenshots": + update_screenshots() + else: + update_css_files() + +# ** CSS + +def update_css_files(): "Build CSS files that need to be built." css_files = list_css(themes(), sites()) @@ -65,6 +80,79 @@ def stylus(css): f.write(result) print(output_file) +# ** Screenshots + +def update_screenshots(): + "Update screenshots." + + css_files = list_css(themes(), sites()) + + # Make directories first to avoid race condition + for css in css_files: + output_dir = os.path.join(screenshots_dir, css.theme.name) + if not os.path.isdir(output_dir): + os.makedirs(output_dir) + + pool = multiprocessing.Pool(multiprocessing.cpu_count()) + pool.map(update_screenshot, css_files) + +def update_screenshot(css): + "Update screenshot for CSS if necessary." + + screenshot_path = screenshot_path_for_css(css) + if mtime(css.path) > mtime(screenshot_path): + save_screenshot(css) + +def screenshot_path_for_css(css): + "Return path of screenshot for CSS." + + return os.path.join(screenshots_dir, css.theme.name, "%s.png" % css.site) + +def save_screenshot(css): + "Save screenshot for CSS." + + # Prepare filename + screenshot_path = screenshot_path_for_css(css) + + # Get URL + url = css_screenshot_url(css) + if not url: + # Screenshot disabled + return False + + # Prepare command + command = list(phantomjs_command) + command.extend([url, screenshot_path, css.path]) + + # Run PhantomJS + subprocess.check_output(command) + + # Compress with pngcrush + _, tempfile_path = mkstemp(suffix=".png") + subprocess.check_output(["pngcrush", screenshot_path, tempfile_path], stderr=subprocess.DEVNULL) + os.replace(tempfile_path, screenshot_path) + + print(screenshot_path) + +def css_screenshot_url(css): + "Return URL for taking screenshots of CSS." + + # Get site URL + site_url_filename = os.path.join(sites_dir, css.site + ".url") + if os.path.exists(site_url_filename): + with open(site_url_filename, "r") as f: + url = f.readlines() + if url: + # Use URL given in .url file + url = url[0].strip() + else: + # Use name of site file (without .styl extension) + url = "http://" + css.site + + return url + +# ** Support + def list_css(themes, sites): "Return list of CSS files for THEMES and SITES." @@ -79,21 +167,30 @@ def themes(): theme_names = [] themes = [] + # Make list of theme directories for d in os.listdir(themes_dir): theme_names.append(d) + # Iterate over theme directories for theme in theme_names: support_files = [] variant_files = [] directory = os.path.join(themes_dir, theme) + # Iterate over files in theme directory for f in os.listdir(directory): path = os.path.join(themes_dir, theme, f) + if f == "colors.styl": + # Support file support_files.append(path) - else: + + elif f.endswith(".styl"): + # Theme file variant_files.append({'variant': without_styl(f), 'path': path}) + # Otherwise, not a relevant file + # Add theme object to list if len(variant_files) == 1: # Only one variant: omit variant name from theme name themes.append(Theme(theme, variant_files[0]['path'], support_files)) @@ -108,7 +205,9 @@ def sites(): "Return list of sites." for path, dirs, files in os.walk(sites_dir): - return [site.replace(".styl", "") for site in files] + return [site.replace(".styl", "") + for site in files + if site.endswith(".styl")] def dependencies(theme, site): "Return list of dependency .styl files for THEME and SITE." @@ -133,6 +232,8 @@ def mtime(path): return 0 def without_styl(s): + """Return string S without ".styl" extension.""" + return s.replace(".styl", "") # * Footer diff --git a/screenshot.js b/screenshot.js new file mode 100644 index 0000000..826abca --- /dev/null +++ b/screenshot.js @@ -0,0 +1,86 @@ +"use strict"; + +// * Variables + +var page = require('webpage').create(), + system = require('system'), + url, output_filename, size, pageWidth, pageHeight; + +pageWidth = 1000; + +// A shorter height would be nice, but with the enormous page headers +// nowadays (e.g. the stupid one inserted by GitHub unless you are +// logged in), you can't see anything! +pageHeight = 1000; + +// ** Args + +url = system.args[1]; +output_filename = system.args[2]; + +// * Functions + +function insert_css (stylesheet) { + // Insert HTML STYLE element with contents of string STYLESHEET. + + var element = document.createElement('style'); + element.type = "text/css"; + element.innerHTML = stylesheet; + + document.getElementsByTagName("head")[0].appendChild(element); +} + +function process_page (status) { + if (status !== 'success') { + console.log('Unable to load the address!'); + phantom.exit(1); + } + else { + // Add stylesheet + page.evaluate(insert_css, stylesheet); + + // Take screenshot + window.setTimeout( + function () { + page.render(output_filename); + phantom.exit(); + }, + 200 + ); + } +} + +// * Main + +// Fix console output from page.evaluate() +page.onConsoleMessage = function (msg) { + console.log("LOG: page.evaluate: " + msg); +}; + +// Log all external requests +// page.onResourceRequested = function (requestData, request) { +// console.log('LOG: LOADING RESOURCE: ', requestData['url']); +// }; + +// ** Check args + +page.viewportSize = { + width: pageWidth, + height: pageHeight +}; +page.clipRect = { + top: 0, + left: 0, + width: pageWidth, + height: pageHeight +}; + +// ** Read CSS file from disk + +var css_file = system.args[3]; +var fs = require("fs"); +var stylesheet = fs.read(css_file); + +// ** Load and render page + +page.open(url, process_page); diff --git a/screenshots/github-dark.png b/screenshots/github-dark.png deleted file mode 100644 index c16c437..0000000 Binary files a/screenshots/github-dark.png and /dev/null differ diff --git a/screenshots/github-light.png b/screenshots/github-light.png deleted file mode 100644 index 6252201..0000000 Binary files a/screenshots/github-light.png and /dev/null differ diff --git a/screenshots/wikipedia-dark.png b/screenshots/wikipedia-dark.png deleted file mode 100644 index 5d17ff8..0000000 Binary files a/screenshots/wikipedia-dark.png and /dev/null differ diff --git a/screenshots/wikipedia-light.png b/screenshots/wikipedia-light.png deleted file mode 100644 index 7865bef..0000000 Binary files a/screenshots/wikipedia-light.png and /dev/null differ diff --git a/sites/all-sites.url b/sites/all-sites.url new file mode 100644 index 0000000..e69de29 diff --git a/sites/disqus.styl b/sites/disqus.com.styl similarity index 100% rename from sites/disqus.styl rename to sites/disqus.com.styl diff --git a/sites/duckduckgo.styl b/sites/duckduckgo.com.styl similarity index 100% rename from sites/duckduckgo.styl rename to sites/duckduckgo.com.styl diff --git a/sites/generic.url b/sites/generic.url new file mode 100644 index 0000000..e69de29 diff --git a/sites/github.url b/sites/github.url new file mode 100644 index 0000000..7214eb7 --- /dev/null +++ b/sites/github.url @@ -0,0 +1 @@ +https://github.com/alphapapa/solarized-everything-css diff --git a/sites/google.styl b/sites/google.com.styl similarity index 100% rename from sites/google.styl rename to sites/google.com.styl diff --git a/sites/lwn.styl b/sites/lwn.net.styl similarity index 100% rename from sites/lwn.styl rename to sites/lwn.net.styl diff --git a/sites/mediawiki.styl b/sites/mediawiki.org.styl similarity index 100% rename from sites/mediawiki.styl rename to sites/mediawiki.org.styl diff --git a/sites/hackernews.styl b/sites/news.ycombinator.com.styl similarity index 100% rename from sites/hackernews.styl rename to sites/news.ycombinator.com.styl diff --git a/sites/reddit.styl b/sites/reddit.com.styl similarity index 100% rename from sites/reddit.styl rename to sites/reddit.com.styl diff --git a/sites/sakai.url b/sites/sakai.url new file mode 100644 index 0000000..e69de29 diff --git a/sites/stackexchange.styl b/sites/stackexchange.com.styl similarity index 100% rename from sites/stackexchange.styl rename to sites/stackexchange.com.styl