From e979f775a7f16706242c67fa17fe47b75b894711 Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Fri, 13 Mar 2015 15:26:55 +1100 Subject: [PATCH] add basic print styles, prep for 0.7 fix #211 --- demo-site/app/app.rb | 2 +- pages/articles/usage-instructions.slim.md | 10 +- templates/_print.scss | 110 +++++++++++++++++++--- templates/components/base/base.scss | 2 +- 4 files changed, 105 insertions(+), 19 deletions(-) diff --git a/demo-site/app/app.rb b/demo-site/app/app.rb index 6dbf9247..7f42bec1 100644 --- a/demo-site/app/app.rb +++ b/demo-site/app/app.rb @@ -77,7 +77,7 @@ class App < Sinatra::Base get '/' do @components = settings.components @layouts = settings.layouts - @ver = "v0.6" + @ver = "v0.7" slim :index end diff --git a/pages/articles/usage-instructions.slim.md b/pages/articles/usage-instructions.slim.md index 6234ec41..23ae3f8c 100644 --- a/pages/articles/usage-instructions.slim.md +++ b/pages/articles/usage-instructions.slim.md @@ -25,8 +25,8 @@ section ==syntax_highlight :html erb: - - + + section p The first provides a universal polyfill for styling on HTML5 semantic elements such as header, nav and section We use these elements as selectors in the design system stylesheet. @@ -44,8 +44,8 @@ section (any page title) - - + + @@ -62,7 +62,7 @@ section section - p: em Please note that in the example above, v0.6 refers to a specific version of the design system and may not be the current version! Please refer to the homepage. + p: em Please note that in the example above, v0.7 refers to a specific version of the design system and may not be the current version! Please refer to the homepage. hr diff --git a/templates/_print.scss b/templates/_print.scss index 3b9b96fa..59c3e8bf 100644 --- a/templates/_print.scss +++ b/templates/_print.scss @@ -1,21 +1,107 @@ // Print - $black: #000000; +$gray: #aaaaaa; $white: #ffffff; -@mixin defaultfont { - font-family: Arial, Helvetica, sans-serif !important; + +@mixin defaults { + background-color: $white; + font-size: 11pt; + font-weight: 400; + line-height: 1.2; } @media print { - body { - @include defaultfont; + body .uomcontent { + @include defaults(); color: $black !important; - background: $white !important; - font-size: 11pt; - line-height: 1.2; - } - body>header, - body>footer { - display: none !important; + font-family: Arial, Helvetica, sans-serif; + + * { + @include defaults(); + } + + .page-header-tools, + .page-footer, + [role="sitemap"], + [role="navigation"], + .sitemap-label { + display: none; + } + + .page-header { + position: static !important; + + header { + border: 0 none; + box-shadow: 0 0 0 0; + height: auto; + + a.page-header-logo { + display: none; + } + } + + .page-header-navigation { + display: block; + height: auto; + padding-left: 20px; + padding-top: 10px; + text-align: left; + + .page-local-history { + color: $gray; + + a { + color: $gray; + } + } + } + } + + .page-inner { + padding-top: 0; + } + + [role="main"] { + hr, + ul.jump-navigation { + display: none; + } + + a[href^="http"]:after { + content: " (" attr(href) ") "; + color: $gray; + display: inline-block; + font-size: 90%; + padding-left: 5px; + text-decoration: none; + } + + h1, + h2, + h3, + p { + color: $black; + } + + header, + section, + pre, + footer, + footer.contrib { + border: 0 none; + margin: 0; + padding: 0 0 1em; + text-align: left; + } + + pre, + code { + border: 0 none; + font-family: 'Courier New', Courier, fixed !important; + overflow: visible; + white-space: pre-wrap; + } + } } } diff --git a/templates/components/base/base.scss b/templates/components/base/base.scss index fb369d7a..e61743f1 100644 --- a/templates/components/base/base.scss +++ b/templates/components/base/base.scss @@ -9,4 +9,4 @@ @import 'layout'; @import 'courses'; @import 'profile'; -@import 'timetable'; \ No newline at end of file +@import 'timetable';