Repository: brooklyn-docs
Updated Branches:
  refs/heads/master ae8b0abb3 -> a9ca11309


Updated scripts & CSS


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/2a70855a
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/2a70855a
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/2a70855a

Branch: refs/heads/master
Commit: 2a70855adc4c8a8194016a4f0dc2803984d72e43
Parents: c87b43f
Author: Duncan Godwin <duncan.god...@cloudsoftcorp.com>
Authored: Thu Mar 3 16:41:32 2016 +0000
Committer: Duncan Godwin <duncan.god...@cloudsoftcorp.com>
Committed: Thu Mar 3 16:41:32 2016 +0000

----------------------------------------------------------------------
 _build/build.sh         |  2 ++
 _build/buildPDF.sh      | 10 +++++++---
 style/css/printable.css |  9 +++++++++
 3 files changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2a70855a/_build/build.sh
----------------------------------------------------------------------
diff --git a/_build/build.sh b/_build/build.sh
index 7b734d5..6bc7d45 100755
--- a/_build/build.sh
+++ b/_build/build.sh
@@ -192,9 +192,11 @@ function build_pdf() {
   
   if [ "$SKIP_PDF_MANUAL" != "true" ]; then
     _build/buildPDF.sh "_site/zoneMergeManual.html" "_pdf/UserManual.pdf" 2>&1 
| tee $PDF_MANUAL_LOG
+    _build/buildPDF.sh "_site/zoneMergeManual.html" 
"_pdf/UserManual_printable.pdf" "./style/css/printable.css" 2>&1 | tee 
$PDF_MANUAL_LOG
   fi
   if [ "$SKIP_PDF_STARTED" != "true" ]; then
     _build/buildPDF.sh "_site/zoneMergeStarted.html" "_pdf/GettingStarted.pdf" 
2>&1 | tee $PDF_STARTED_LOG
+    _build/buildPDF.sh "_site/zoneMergeStarted.html" 
"_pdf/GettingStarted_printable.pdf" "./style/css/printable.css" 2>&1 | tee 
$PDF_STARTED_LOG
   fi
 }
 

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2a70855a/_build/buildPDF.sh
----------------------------------------------------------------------
diff --git a/_build/buildPDF.sh b/_build/buildPDF.sh
index a41ca69..ad9d95a 100755
--- a/_build/buildPDF.sh
+++ b/_build/buildPDF.sh
@@ -7,8 +7,8 @@ if [ ! -x _build/build.sh ] ; then
   exit 1
 fi
 
-if [ "$#" -ne 2 ] ; then
-       echo "Usage: buildPDF.sh <source html> <target PDF>"
+if [ "$#" -lt 2 ] ; then
+       echo "Usage: buildPDF.sh <source html> <target PDF> [user-style-sheet]"
        exit 1
 fi
 
@@ -18,7 +18,11 @@ if ! command -v wkhtmltopdf >/dev/null 2>&1; then
 fi
        
 # run the PDF build with wkhtmltopdf
-wkhtmltopdf --page-size Letter --margin-top 0.75in --margin-right 0.75in 
--margin-bottom 0.75in --margin-left 0.75in --encoding UTF-8 $1 $2
+if [ -z "$3" ] ; then
+       wkhtmltopdf --page-size Letter --margin-top 0.75in --margin-right 
0.75in --margin-bottom 0.75in --margin-left 0.75in --encoding UTF-8 $1 $2
+else
+       wkhtmltopdf --user-style-sheet $3 --page-size Letter --margin-top 
0.75in --margin-right 0.75in --margin-bottom 0.75in --margin-left 0.75in 
--encoding UTF-8 $1 $2
+fi
 if [ $? -eq 1 ] ; then
        echo "Note that ContentNotFoundError is usually because of the invalid 
relational path of a local resource such as an image"
 elif [ $? -eq 0 ] ; then

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2a70855a/style/css/printable.css
----------------------------------------------------------------------
diff --git a/style/css/printable.css b/style/css/printable.css
new file mode 100644
index 0000000..bf992c1
--- /dev/null
+++ b/style/css/printable.css
@@ -0,0 +1,9 @@
+/*
+ * This is a CSS included in the printable version of docs, it's used to mask 
out large images etc
+ */
+.goToTop{
+       display: none; 
+}
+a, a:focus {
+       color: #393939 !important;
+}
\ No newline at end of file

Reply via email to