Skip to content

Commit

Permalink
Add static test content and styles.
Browse files Browse the repository at this point in the history
  • Loading branch information
flachware authored and inukshuk committed Mar 21, 2019
1 parent efe632a commit 6445a77
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 1 deletion.
28 changes: 28 additions & 0 deletions src/stylesheets/components/_print.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// Print
// --------------------------------------------------

html,
body,
main,
.page {
height: 100%;
}

body {
margin: 0;
}

.page {
display: flex;
justify-content: center;
align-items: center;
page-break-after: always;
}

img {
flex: 0 1 auto;
max-width: 100%;
max-height: 100%;
object-fit: contain;
}
12 changes: 12 additions & 0 deletions src/stylesheets/darwin/print.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
/* stylelint-disable max-empty-lines */

//
// Print window
// --------------------------------------------------

$platform: "darwin";
$theme: "light";


// Components
// --------------------------------------------------

@import "../components/print";
12 changes: 12 additions & 0 deletions src/stylesheets/linux/print.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
/* stylelint-disable max-empty-lines */

//
// Print window
// --------------------------------------------------

$platform: "linux";
$theme: "light";


// Components
// --------------------------------------------------

@import "../components/print";
12 changes: 12 additions & 0 deletions src/stylesheets/win32/print.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
/* stylelint-disable max-empty-lines */

//
// Print window
// --------------------------------------------------

$platform: "win32";
$theme: "dark";


// Components
// --------------------------------------------------

@import "../components/print";
16 changes: 15 additions & 1 deletion src/windows/print.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,18 @@

const { $, html } = require('../dom')

html($('main'), 'Just do it right. Make it perfect and real.')
/* eslint-disable no-multi-str */
html($('main'), '\
<div class="page">\
<img src="../static/images/landscape.png" width="4000" height="2000">\
</div>\
<div class="page">\
<img src="../static/images/portrait.png" width="2000" height="4000">\
</div>\
<div class="page">\
<img src="../static/images/landscape-sm.png" width="400" height="200">\
</div>\
<div class="page">\
<img src="../static/images/portrait-sm.png" width="200" height="400">\
</div>\
')
Binary file added static/images/landscape-sm.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/landscape.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/portrait-sm.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/portrait.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6445a77

Please sign in to comment.