From 5d8569480b702644db7a11f23d3e3d0fbdd500f7 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Fri, 9 Sep 2016 15:12:20 -0700 Subject: [PATCH] Separate print and web styles for course guides --- .../teacher-course-solution-view.sass | 64 ++++++++++++------- .../teacher-course-solution-view.jade | 14 ++++ 2 files changed, 55 insertions(+), 23 deletions(-) diff --git a/app/styles/teachers/teacher-course-solution-view.sass b/app/styles/teachers/teacher-course-solution-view.sass index 592477f8a..7d6d01647 100644 --- a/app/styles/teachers/teacher-course-solution-view.sass +++ b/app/styles/teachers/teacher-course-solution-view.sass @@ -1,31 +1,49 @@ #teacher-course-solution-view + .print + text-align: center + .btn a + color: white - background-color: white - color: black - font-family: sans-serif - margin: 0px - padding: 24px - - hr - display: block - border-style: inset - border-width: 1px - - h1, h2, h3, h4, h5 + #site-content-area + background-color: white color: black font-family: sans-serif - font-variant: normal - margin: 20px 0px + margin: 0px + padding: 24px - h4 - color: gray + hr + display: block + border-style: inset + border-width: 1px - img - display: block - margin: auto + h1, h2, h3, h4, h5 + color: black + font-family: sans-serif + font-variant: normal + margin: 20px 0px - p - margin: 16px 0px + h4 + color: gray - .page-break-before - page-break-before: always + img + display: block + margin: auto + + p + margin: 16px 0px + + .page-break-before + page-break-before: always + + @media screen + max-width: 900px + background-color: #f8f8f8 + border-radius: 10px + border: 1px solid #ddd + padding: 40px 100px + font-size: 0.85em + margin: 20px auto + + @media print + #main-nav, #teacher-dashboard-nav, #footer, #final-footer, .do-not-print + display: none diff --git a/app/templates/teachers/teacher-course-solution-view.jade b/app/templates/teachers/teacher-course-solution-view.jade index 3ae7dd0d5..195bf9b6d 100644 --- a/app/templates/teachers/teacher-course-solution-view.jade +++ b/app/templates/teachers/teacher-course-solution-view.jade @@ -1,3 +1,17 @@ +extends /templates/base-flat + +block page_nav + include ../courses/teacher-dashboard-nav.jade + .do-not-print.container + span.backlink + a(href='/teachers/courses') + |< Back to Course Guides + .print + .btn.btn-md.btn-navy + a(href='javascript:window.print()') + span.glyphicon.glyphicon-print   + |Print this guide + block content if !me.isTeacher() && !me.isAdmin()