diff options
-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; } |