From 4a51708b842be8e89926b23a8f3868a7fd0f6ed8 Mon Sep 17 00:00:00 2001 From: stefanorigano Date: Mon, 12 Oct 2015 12:39:26 +0200 Subject: [PATCH] [ADD] Print Stylesheet --- _extensions/odoo/static/print.less | 58 +++++++++++++++++++++++++ _extensions/odoo/static/style.css | 68 +++++++++++++++++++++++++++++- _extensions/odoo/static/style.less | 3 +- 3 files changed, 127 insertions(+), 2 deletions(-) create mode 100644 _extensions/odoo/static/print.less diff --git a/_extensions/odoo/static/print.less b/_extensions/odoo/static/print.less new file mode 100644 index 000000000..3e7dfc8f3 --- /dev/null +++ b/_extensions/odoo/static/print.less @@ -0,0 +1,58 @@ + +@media print { + body { + + header, footer{ + display: none; + } + .fadeInUp, .fadeIn{ + .opacity(1)!important; + .animation(none); + } + + #main_navbar{ + position: relative; + display: block; + height: 100px!important; + #main-back { + display: none; + } + #main_title{ + position: relative; + transform: none; + } + .navbar-main{ + display: none!important; + } + } + + main{ + .opacity(1); + .animation(none); + aside{ + display:none; + } + article{ + h1, .h1 { + font-size: 2em; + } + h2, .h2{ + font-size: 1.642857143em; + } + h3, .h3{ + font-size: 1.25em; + } + p, ul, ol, table, blockquote, .alert, .doc-code, .admonition{ + margin-top: inherit; + margin-bottom: inherit; + font-size: inherit; + } + } + } + + .floating_action_container{ + display: none; + } + + } // /body +} \ No newline at end of file diff --git a/_extensions/odoo/static/style.css b/_extensions/odoo/static/style.css index 3ee2040ef..826889902 100644 --- a/_extensions/odoo/static/style.css +++ b/_extensions/odoo/static/style.css @@ -1,5 +1,5 @@ -@import url(https://fonts.googleapis.com/css?family=Lato:300,400,900,300italic,400italic); /*! normalize.css v3.0.2 | MIT License | git.io/normalize */ +@import url(https://fonts.googleapis.com/css?family=Lato:300,400,900,300italic,400italic); html { font-family: sans-serif; -ms-text-size-adjust: 100%; @@ -8720,6 +8720,72 @@ main.has_code_col article.doc-body section { margin: .2em 0; padding: 0; } +@media print { + body header, + body footer { + display: none; + } + body .fadeInUp, + body .fadeIn { + opacity: 1 !important; + filter: alpha(opacity=100) !important; + -webkit-animation: none; + -o-animation: none; + animation: none; + } + body #main_navbar { + position: relative; + display: block; + height: 100px!important; + } + body #main_navbar #main-back { + display: none; + } + body #main_navbar #main_title { + position: relative; + transform: none; + } + body #main_navbar .navbar-main { + display: none!important; + } + body main { + opacity: 1; + filter: alpha(opacity=100); + -webkit-animation: none; + -o-animation: none; + animation: none; + } + body main aside { + display: none; + } + body main article h1, + body main article .h1 { + font-size: 2em; + } + body main article h2, + body main article .h2 { + font-size: 1.642857143em; + } + body main article h3, + body main article .h3 { + font-size: 1.25em; + } + body main article p, + body main article ul, + body main article ol, + body main article table, + body main article blockquote, + body main article .alert, + body main article .doc-code, + body main article .admonition { + margin-top: inherit; + margin-bottom: inherit; + font-size: inherit; + } + body .floating_action_container { + display: none; + } +} html, body { -moz-osx-font-smoothing: grayscale; diff --git a/_extensions/odoo/static/style.less b/_extensions/odoo/static/style.less index d3a9e1c02..07ed6f2bb 100644 --- a/_extensions/odoo/static/style.less +++ b/_extensions/odoo/static/style.less @@ -14,6 +14,8 @@ @import "layout"; +@import "print"; + html, body { @@ -22,7 +24,6 @@ html, body { - // Header // -----------------------------------