forked from crabbly/Print.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
614 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.idea/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,45 @@ | ||
# printJS | ||
A tiny javascript library to help printing from the web. | ||
|
||
For documentation and examples please visit: [printjs.crabbly.com](http://printjs.crabbly.com) | ||
|
||
|
||
##Contributing to Print.js | ||
|
||
Contributions to Print.js are welcome and encouraged. | ||
|
||
|
||
#####Using issues | ||
|
||
The [issue tracker](https://github.com/crabbly/Print.js/issues) is the preferred channel for reporting bugs, requesting new features and submitting pull requests. | ||
|
||
Keep in mind that we would like to keep this a lightweight library. | ||
|
||
Please do not use issues for support requests. For help using Print.js, please ask questions on Stack Overflow and use the tag `printjs`. | ||
|
||
|
||
#####Reporting bugs | ||
|
||
Well structured, detailed bug reports are hugely valuable for the project. | ||
|
||
- Check the issue search to see if it has already been reported | ||
- Isolate the problem to a simple test case | ||
- Provide a demonstration of the problem on [JS Bin](http://jsbin.com), [JSFiddle](http://jsfiddle.net) or similar | ||
|
||
Please provide any additional details associated with the bug, if it's browser or screen density specific, or only happens with a certain configuration or data. | ||
|
||
|
||
#####Pull requests | ||
|
||
Clear, concise pull requests are excellent at continuing the project's community driven growth. | ||
|
||
- Please create an issue first: | ||
- For bugs, we can discuss the fixing approach | ||
- For enhancements, we can discuss if it is within the project scope and avoid duplicate effort | ||
- Tabs for indentation, not spaces please | ||
- Please make your commits in logical sections with clear commit messages | ||
|
||
|
||
##License | ||
|
||
Print.js is available under the [MIT license](https://github.com/crabbly/Print.js/blob/master/LICENSE.md). |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
var gulp = require('gulp'), | ||
uglify = require('gulp-uglify'), | ||
rename = require('gulp-rename'), | ||
cleanCSS = require('gulp-clean-css'); | ||
|
||
gulp.task('js', function() { | ||
return gulp.src('src/print.js') | ||
.pipe(uglify()) | ||
.pipe(rename('print.min.js')) | ||
.pipe(gulp.dest('dist/')); | ||
}); | ||
|
||
|
||
gulp.task('css', function() { | ||
return gulp.src('src/print.css') | ||
.pipe(cleanCSS({compatibility: 'ie8'})) | ||
.pipe(rename('print.min.css')) | ||
.pipe(gulp.dest('dist')); | ||
}); | ||
|
||
gulp.task('default', ['js', 'css']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "print.js", | ||
"homepage": "http://printjs.crabbly.com", | ||
"description": "A tiny javascript library to help printing from the web.", | ||
"version": "1.0.0", | ||
"main": "Print.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/crabbly/Print.js" | ||
}, | ||
"license": "MIT", | ||
"dependences": {}, | ||
"devDependencies": { | ||
"gulp": "3.9.x", | ||
"gulp-uglify": "~1.5.x", | ||
"gulp-rename": "1.2.x", | ||
"gulp-clean-css": "2.0.x" | ||
}, | ||
"spm": { | ||
"main": "Print.js" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
* Print.js | ||
* http://printJS.crabbly.com | ||
* Version: 1.0.0 | ||
* | ||
* Copyright 2016 Rodrigo Vieira (@crabbly) | ||
* Released under the MIT license | ||
* https://github.com/crabbly/print.js/LICENSE.md | ||
*/ | ||
|
||
/* === Print Modal === */ | ||
|
||
.printModal { | ||
font-family:sans-serif; | ||
display:flex; | ||
text-align:center; | ||
font-weight:300; | ||
font-size:30px; | ||
left:0; | ||
top:0; | ||
position:absolute; | ||
color: #0460B5; | ||
width: 100%; | ||
height: 100%; | ||
background-color:rgba(255, 255, 255, 0.91); | ||
} | ||
|
||
/* === Print Modal Spinner */ | ||
.printSpinner { | ||
margin-top: 3px; | ||
margin-left: -40px; | ||
position: absolute; | ||
display: inline-block; | ||
width: 25px; | ||
height: 25px; | ||
border: 2px solid #0460B5; | ||
border-radius: 50%; | ||
animation: spin 0.75s infinite linear; | ||
} | ||
.printSpinner::before, .printSpinner::after { | ||
left: -2px; | ||
top: -2px; | ||
display: none; | ||
position: absolute; | ||
content: ''; | ||
width: inherit; | ||
height: inherit; | ||
border: inherit; | ||
border-radius: inherit; | ||
} | ||
|
||
.printSpinner, .printSpinner::before, .printSpinner::after { | ||
display: inline-block; | ||
border-color: transparent; | ||
border-top-color: #0460B5; | ||
animation-duration: 1.2s; | ||
} | ||
.printSpinner::before { | ||
transform: rotate(120deg); | ||
} | ||
.printSpinner::after { | ||
transform: rotate(240deg); | ||
} | ||
|
||
/* Keyframes for the animation */ | ||
@keyframes spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} |
Oops, something went wrong.