diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2020-03-03 14:56:32 -0500 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2020-03-19 17:43:55 -0400 |
commit | 68ad23321910c19c2e0f1387536417177fc414e4 (patch) | |
tree | c6baf387063d486cc62a8266b6de9b555e3fb45a | |
parent | 4a53238c5a95193f26012e464e07094c32cbda99 (diff) | |
download | patchfoo-68ad23321910c19c2e0f1387536417177fc414e4.tar.gz patchfoo-68ad23321910c19c2e0f1387536417177fc414e4.zip |
print view: no message horizontal border
-rw-r--r-- | lib/serve.js | 4 | ||||
-rw-r--r-- | static/styles.css | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/serve.js b/lib/serve.js index 39c1138..0fef358 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -395,6 +395,7 @@ Serve.prototype.handle = function () { this.useOoo = this.query.ooo != null ? Boolean(this.query.ooo) : this.app.useOoo if (this.query.printView != null) { + this.printView = true this.noNav = true this.noFooter = true this.noComposer = true @@ -1717,6 +1718,7 @@ Serve.prototype.ifModified = function (lastMod) { } Serve.prototype.wrapMessages = function () { + var self = this return u.hyperwrap(function (content, cb) { cb(null, h('table.ssb-msgs', content)) }) @@ -1916,7 +1918,7 @@ Serve.prototype.wrapPage = function (title, searchQ) { h('style', styles()), h('link', {rel: 'stylesheet', href: render.toUrl('/highlight/foundation.css')}) ), - h('body', + h('body' + (self.printView ? '.print-view' : ''), self.noNav ? '' : h('nav.nav-bar', h('form', {action: render.toUrl('/search'), method: 'get'}, self.app.navLinks.map(function (link, i) { diff --git a/static/styles.css b/static/styles.css index e182ae5..3ffdddc 100644 --- a/static/styles.css +++ b/static/styles.css @@ -154,6 +154,14 @@ pre { padding: .5ex; } +.print-view .msg-row:first-child .msg-left, +.print-view .msg-row:first-child .msg-main, +.print-view .msg-row:first-child .msg-right, +.print-view .ssb-msgs { + border-top: 0; + border-bottom: 0; +} + .msg-content { padding: 0 .5ex .5ex .5ex; } |