From 069a4030562da409fce22ba7bfcbd5c6c80dc93c Mon Sep 17 00:00:00 2001 From: ccd0 Date: Fri, 1 Apr 2016 11:10:04 -0700 Subject: [PATCH] md2016-specific CSS fixes. --- src/General/Main.coffee | 7 ++++++- src/css/md2016.css | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 src/css/md2016.css diff --git a/src/General/Main.coffee b/src/General/Main.coffee index a1076ad7c..05642722d 100644 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -195,6 +195,11 @@ Main = Main.setClass() setClass: -> + if (md2016 = $ 'link[rel="stylesheet"][href^="//s.4cdn.org/css/md2016."]', d.head) + md2016.removeAttribute 'media' + if getComputedStyle(d.body).backgroundColor is 'rgb(245, 245, 245)' # not blocked + $.addClass doc, 'md2016' + if g.VIEW is 'catalog' $.addClass doc, $.id('base-css').href.match(/catalog_(\w+)/)[1].replace('_new', '').replace /_+/g, '-' return @@ -385,7 +390,7 @@ Main = $.ready -> cb() if Main.isThisPageLegit() - css: `<%= importCSS('font-awesome', 'style', 'yotsuba', 'yotsuba-b', 'futaba', 'burichan', 'tomorrow', 'photon', 'supports') %>` + css: `<%= importCSS('font-awesome', 'style', 'yotsuba', 'yotsuba-b', 'futaba', 'burichan', 'tomorrow', 'photon', 'md2016', 'supports') %>` cssWWW: `<%= importCSS('www') %>` diff --git a/src/css/md2016.css b/src/css/md2016.css new file mode 100644 index 000000000..7394fa739 --- /dev/null +++ b/src/css/md2016.css @@ -0,0 +1,15 @@ +/* Adapted from https://s.4cdn.org/css/md2016.651.css */ +:root.md2016 .page-num { + color: #999; +} +:root.md2016 .summary { + border-radius: 0 0 2px 2px; + background-color: #f5f5f5; + width: 80%; + display: block; + margin: -1px auto 0 auto; + box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12); + border-top: 1px solid rgba(0,0,0,0.1); + text-indent:10px; + padding:10px 0; +}