summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Template/layout.php1
-rw-r--r--assets/css/print.min.css1
-rw-r--r--assets/sass/_global_print.sass18
-rw-r--r--assets/sass/app.sass2
-rw-r--r--assets/sass/app_print.sass1
-rw-r--r--gulpfile.js11
6 files changed, 31 insertions, 3 deletions
diff --git a/app/Template/layout.php b/app/Template/layout.php
index 241b99df..23ae4530 100644
--- a/app/Template/layout.php
+++ b/app/Template/layout.php
@@ -15,6 +15,7 @@
<?= $this->asset->colorCss() ?>
<?= $this->asset->css('assets/css/vendor.min.css') ?>
<?= $this->asset->css('assets/css/app.min.css') ?>
+ <?= $this->asset->css('assets/css/print.min.css', true, 'print') ?>
<?= $this->asset->customCss() ?>
<?php if (! isset($not_editable)): ?>
diff --git a/assets/css/print.min.css b/assets/css/print.min.css
new file mode 100644
index 00000000..c8b9dcc1
--- /dev/null
+++ b/assets/css/print.min.css
@@ -0,0 +1 @@
+@page{orientation:landscape;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3)}#board-container{overflow-x:initial !important}.board-task-list{min-height:0 !important}.task-board{page-break-inside:avoid}.menu-inline,.project-header,.page-header,.menus-container,.sidebar,.alert,.alert-info,.dropdown>ul{display:none}
diff --git a/assets/sass/_global_print.sass b/assets/sass/_global_print.sass
new file mode 100644
index 00000000..ba5afc35
--- /dev/null
+++ b/assets/sass/_global_print.sass
@@ -0,0 +1,18 @@
+@import variables
+@import mixins
+
+@page
+ orientation: landscape
+ -webkit-transform: rotate(-90deg)
+ -moz-transform: rotate(-90deg)
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3)
+
+#board-container
+ overflow-x: initial !important
+.board-task-list
+ min-height: 0 !important
+.task-board
+ page-break-inside: avoid
+/*Hide menu*/
+.menu-inline, .project-header, .page-header, .menus-container, .sidebar, .alert, .alert-info, .dropdown > ul
+ display: none \ No newline at end of file
diff --git a/assets/sass/app.sass b/assets/sass/app.sass
index 7a58ac77..b4cd10a8 100644
--- a/assets/sass/app.sass
+++ b/assets/sass/app.sass
@@ -51,4 +51,4 @@
@import panel
@import activity_stream
@import user_mentions
-@import image_slideshow
+@import image_slideshow \ No newline at end of file
diff --git a/assets/sass/app_print.sass b/assets/sass/app_print.sass
new file mode 100644
index 00000000..396a21cd
--- /dev/null
+++ b/assets/sass/app_print.sass
@@ -0,0 +1 @@
+@import global_print
diff --git a/gulpfile.js b/gulpfile.js
index 987a61a4..9820ad0c 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -88,10 +88,17 @@ gulp.task('js', function() {
});
gulp.task('css', function() {
- gulp.src('assets/sass/*.sass')
+ gulp.src(['assets/sass/*.sass','!assets/sass/*_print.sass'])
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
.pipe(concat('app.min.css'))
.pipe(gulp.dest(dist.css));
});
-gulp.task('default', ['bower', 'vendor', 'js', 'css']);
+gulp.task('css:print', function() {
+ gulp.src('assets/sass/*_print.sass')
+ .pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
+ .pipe(concat('print.min.css'))
+ .pipe(gulp.dest(dist.css));
+});
+
+gulp.task('default', ['bower', 'vendor', 'js', 'css', 'css:print']);