8 Commits
Author SHA1 Message Date
Sathvik Ponangi 9219d3e8b3 Fixes #17 - the append-prepend text mixup 2015-04-08 18:57:27 +05:30
Sathvik P 8e0350e609 Styling+++ 2013-05-20 13:41:08 +05:30
Sathvik P 39af32fb43 Styling++ 2013-05-20 13:40:44 +05:30
Sathvik P 7021349db3 Styling+ 2013-05-20 13:39:17 +05:30
Sathvik P f238818030 Centered tryit 2013-05-20 13:37:40 +05:30
Sathvik P 871e48a311 Added unstyled demo 2013-05-20 13:36:10 +05:30
Sathvik P 8c355b05f3 Merge branch 'gh-pages' of github.com:DoersGuild/jQuery.print into gh-pages 2013-05-20 13:35:18 +05:30
Sathvik Ponangi 1a8c072f7d Create gh-pages branch via GitHub 2013-05-20 00:56:13 -07:00
17 changed files with 992 additions and 259 deletions
-2
View File
@@ -1,2 +0,0 @@
bower_components
node_modules
+8 -22
View File
@@ -18,15 +18,13 @@ or
You can submit the options object like:
$("#myElementId").print({
globalStyles: true,
mediaPrint: false,
stylesheet: null,
noPrintSelector: ".no-print",
iframe: true,
append: null,
prepend: null,
manuallyCopyFormValues: true,
deferred: $.Deferred()
addGlobalStyles : true,
stylesheet : null,
rejectWindow : true,
noPrintSelector : ".no-print",
iframe : true,
append : null,
prepend : null
});
Currently this plugin supports the following options:
@@ -67,18 +65,6 @@ Currently this plugin supports the following options:
- Acceptable-Values: Any valid `jQuery-selector` or HTML-text
- Function: Adds custom HTML before (prepend) or after (append) the selected content
####manuallyCopyFormValues
- Default: `true`
- Acceptable-Values: Boolean
- Function: Should it copy user-updated form input values onto the printed markup (this is done by manually iterating over each form element)
####deferred
- Default: `$.Deferred()`
- Acceptable-Values: Any valid `jQuery.Deferred` object
- Function: A jQuery.Deferred object that is resolved once the print function is called
## Tested with
### jQuery
@@ -93,7 +79,7 @@ Currently this plugin supports the following options:
[CC-BY](http://creativecommons.org/licenses/by/3.0/).
## Demo
[jQuery.print/demo](http://doersguild.github.io/jQuery.print/demo/)
[jsFiddle](http://jsfiddle.net/5V24U/27/)
---------------------------------------
Like our [work](http://doersguild.com)? [Get in touch!](mailto:mail@doersguild.com)
-26
View File
@@ -1,26 +0,0 @@
{
"name": "jQuery.print",
"main": "jQuery.print.js",
"version": "1.3.0",
"homepage": "https://doersguild.github.io/jQuery.print/",
"authors": [
"Sathvik P <sathvik@doersguild.com>"
],
"description": "Easy to use, Element Printing Plugin for jQuery, for printing specific parts of a page",
"keywords": [
"print",
"element printing",
"jquery print"
],
"dependencies": {
"jquery": ">=1.7.2"
},
"license": "CC-BY",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
+104 -80
View File
@@ -11,102 +11,126 @@
<title>jQuery.Print</title>
<meta name="description" content="jQuery.print is a plugin for printing specific parts of a page">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="css/normalize.min.css">
<link href='https://fonts.googleapis.com/css?family=Chivo:900' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="../stylesheets/stylesheet.css" media="screen" />
<link rel="stylesheet" type="text/css" href="../stylesheets/pygment_trac.css" media="screen" />
<style type='text/css'>
.a {
background: black;
color: white;
}
.b {
color: #aaa;
}
.a {
background: black;
color: white;
}
.b {
color: #aaa;
}
</style>
<!--[if lt IE 9]>
<script src="js/vendor/html5-3.6-respond-1.1.0.min.js"></script>
<![endif]-->
</head>
<body>
<!--[if lt IE 9]>
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
<![endif]-->
<h3><a href="https://github.com/DoersGuild/jQuery.print" id="view-on-github" class="btn"><span>View jQuery.print on GitHub</span></a></h3>
<div id="content_holder">
<div id="ele1" class="a">
<h3>Element 1</h3>
<p>
Some random text.
<input type="text" value="Dummy input text" />
</p>
<button class="print-link no-print" onclick="jQuery('#ele1').print()">
Print this (jQuery('#ele1').print())
</button>
<div id="container">
<div class="inner">
<div id="content_holder">
<div id="ele1" class="a">
<h3>Element 1</h3>
<p>
Some random text.
</p>
<button class="print-link no-print" onclick="jQuery('#ele1').print()">
Print this
</button>
</div>
<div id="ele2" class="b">
<h3>Element 2</h3>
<p>
Some other random text.
</p>
<button class="print-link no-print">
Print this
</button>
</div>
<div id="ele3" class="a">
<h3>Element 3</h3>
<p class="no-print">
Some more random text.
</p>
<button class="print-link" onclick="jQuery.print('#ele3')">
Print this
</button>
</div>
<div id="ele4" class="b">
<h3 class='avoid-this'>Element 4</h3>
<p>
Some really random text.
</p>
<button class="print-link avoid-this">
Print this
</button>
</div>
<br/>
<button class="print-link" onclick="jQuery.print()">
Print page
</button>
</div>
</div>
<div id="ele2" class="b">
<h3>Element 2</h3>
<p>
Some other random text.
</p>
<button class="print-link no-print">
Print this ($.print("#ele2")) and skip the button
</button>
</div>
<div id="ele3" class="a">
<h3>Element 3</h3>
<p class="no-print">
Some more random text that is not to be printed.
</p>
<button class="print-link" onclick="jQuery.print('#ele3')">
Print this (jQuery.print('#ele3'))
</button>
</div>
<div id="ele4" class="b">
<h3 class='avoid-this'>Element 4</h3>
<p>
Some really random text.
</p>
<button class="print-link avoid-this">
Print this in a new window, without this button and the title
</button>
</div>
<br/>
<button class="print-link" onclick="jQuery.print()">
Print page
</button>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
window.jQuery || document.write('<script src="js/vendor/jquery-1.9.1.min.js"><\/script>')
window.jQuery || document.write('<script src="js/vendor/jquery-1.9.1.min.js"><\/script>')
</script>
<script src="../jQuery.print.js"></script>
<script type='text/javascript'>
//<![CDATA[
$(function() {
$("#ele2").find('.print-link').on('click', function() {
//Print ele2 with default options
$.print("#ele2");
});
$("#ele4").find('button').on('click', function() {
//Print ele4 with custom options
$("#ele4").print({
//Use Global styles
globalStyles : false,
//Add link with attrbute media=print
mediaPrint : false,
//Custom stylesheet
stylesheet : "http://fonts.googleapis.com/css?family=Inconsolata",
//Print in a hidden iframe
iframe : false,
//Don't print this
noPrintSelector : ".avoid-this",
//Add this on top
append : "Hello World!!!<br/>",
//Add this at bottom
prepend : "<br/>Buh Bye!"
});
});
// Fork https://github.com/sathvikp/jQuery.print for the full list of options
});
//]]>
//<![CDATA[
$(function() {
$("#ele2").find('.print-link').on('click', function() {
//Print ele2 with default options
$.print("#ele2");
});
$("#ele4").find('button').on('click', function() {
//Print ele4 with custom options
$("#ele4").print({
//Use Global styles
globalStyles : false,
//Add link with attrbute media=print
mediaPrint : false,
//Custom stylesheet
stylesheet : "http://fonts.googleapis.com/css?family=Inconsolata",
//Print in a hidden iframe
iframe : false,
//Don't print this
noPrintSelector : ".avoid-this",
//Add this at top
prepend : "Hello World!!!<br/>",
//Add this on bottom
append : "<br/>Buh Bye!"
});
});
// Fork https://github.com/doersguild/jQuery.print for the full list of options
});
//]]>
</script>
</body>
</html>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

+152
View File
@@ -0,0 +1,152 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link href='https://fonts.googleapis.com/css?family=Chivo:900' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen" />
<link rel="stylesheet" type="text/css" href="stylesheets/pygment_trac.css" media="screen" />
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print" />
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<title>jQuery.print by DoersGuild</title>
</head>
<body>
<div id="container">
<div class="inner">
<header>
<h1>jQuery.print</h1>
<h2>Easy to use, Element Printing Plugin for jQuery</h2>
</header>
<section id="downloads" class="clearfix">
<a href="https://github.com/DoersGuild/jQuery.print/zipball/master" id="download-zip" class="button"><span>Download .zip</span></a>
<a href="https://github.com/DoersGuild/jQuery.print/tarball/master" id="download-tar-gz" class="button"><span>Download .tar.gz</span></a>
<a href="https://github.com/DoersGuild/jQuery.print" id="view-on-github" class="button"><span>View on GitHub</span></a>
</section>
<br/>
<section class="clearfix" style="text-align: center;">
<a href="./demo" class="button"><span>Try it first</span></a>
</section>
<hr>
<section id="main_content">
<h1>jQuery Print Plugin</h1>
<p>jQuery.print is a plugin for printing specific parts of a page</p>
<h2>Usage</h2>
<p>Include it in your HTML after importing jQuery, like:
</p>
<p>Use it like:</p>
<pre><code>$("#myElementId").print(/*options*/);
</code></pre>
<p>or</p>
<pre><code>$.print("#myElementId" /*, options*/);
</code></pre>
<p>You can submit the options object like:</p>
<pre><code>$("#myElementId").print({
addGlobalStyles : true,
stylesheet : null,
rejectWindow : true,
noPrintSelector : ".no-print",
iframe : true,
append : null,
prepend : null
});
</code></pre>
<p>Currently this plugin supports the following options:</p>
<h4>globalStyles</h4>
<ul>
<li>Default: <code>true</code><br>
</li>
<li>Acceptable-Values: Boolean<br>
</li>
<li>Function: Whether or not the styles from the parent document should be included</li>
</ul><h4>mediaPrint</h4>
<ul>
<li>Default: <code>false</code><br>
</li>
<li>Acceptable-Values: Boolean<br>
</li>
<li>Function: Whether or not link tags with media='print' should be included; Over-riden by the <code>globalStyles</code> option</li>
</ul><h4>stylesheet</h4>
<ul>
<li>Default: <code>null</code>
</li>
<li>Acceptable-Values: URL-string</li>
<li>Function: URL of an external stylesheet to be included</li>
</ul><h4>noPrintSelector</h4>
<ul>
<li>Default: <code>".no-print"</code>
</li>
<li>Acceptable-Values: Any valid <code>jQuery-selector</code>
</li>
<li>Function: A selector for the items that are to be excluded from printing</li>
</ul><h4>iframe</h4>
<ul>
<li>Default: <code>true</code>, creates a hidden iframe if no-vaild iframe selector is passed</li>
<li>Acceptable-Values: Any valid <code>jQuery-selector</code> or Boolean</li>
<li>Function: Whether to print from an iframe instead of a pop-up window; can take the <code>jQuery-selector</code> of an existing iframe as value</li>
</ul><h4>append/prepend</h4>
<ul>
<li>Default: <code>null</code>
</li>
<li>Acceptable-Values: Any valid <code>jQuery-selector</code> or HTML-text</li>
<li>Function: Adds custom HTML before (prepend) or after (append) the selected content</li>
</ul><h2>Tested with</h2>
<h3>jQuery</h3>
<ul>
<li>
<a href="http://jquery.com/">jQuery</a> v. 1.7.2</li>
<li>
<a href="http://jquery.com/">jQuery</a> v. 1.9.1</li>
</ul><h3>Browsers</h3>
<ul>
<li>Google Chrome - v 20, 26</li>
<li>Internet Explorer - v 10</li>
</ul><h2>License</h2>
<p><a href="http://creativecommons.org/licenses/by/3.0/">CC-BY</a>.</p>
<h2>Demo</h2>
<p><a href="http://jsfiddle.net/5V24U/27/">jsFiddle</a></p>
<hr><p>Like our <a href="http://doersguild.com">work</a>? <a href="mailto:mail@doersguild.com">Get in touch!</a></p>
</section>
<footer>
jQuery.print is maintained by <a href="https://github.com/DoersGuild">DoersGuild</a><br>
This page was generated by <a href="http://pages.github.com">GitHub Pages</a>. Tactile theme by <a href="http://twitter.com/jasonlong">Jason Long</a>.
</footer>
</div>
</div>
</body>
</html>
+60 -129
View File
@@ -1,69 +1,40 @@
/* @license
* jQuery.print, version 1.3.0
/* jQuery.print, version 1.0.3
* (c) Sathvik Ponangi, Doers' Guild
* Licence: CC-By (http://creativecommons.org/licenses/by/3.0/)
*--------------------------------------------------------------------------*/
(function ($) {
"use strict";
(function($) {"use strict";
// A nice closure for our definitions
function getjQueryObject(string) {
// Make string a vaild jQuery thing
var jqObj = $("");
try {
jqObj = $(string)
.clone();
} catch (e) {
jqObj = $("<span />")
.html(string);
jqObj = $(string).clone();
} catch(e) {
jqObj = $("<span />").html(string);
}
return jqObj;
}
function printFrame(frameWindow) {
// Print the selected window/iframe
var def = $.Deferred();
try {
setTimeout(function () {
// Fix for IE : Allow it to render the iframe
frameWindow.focus();
try {
// Fix for IE11 - printng the whole page instead of the iframe content
if (!frameWindow.document.execCommand('print', false, null)) {
// document.execCommand returns false if it failed -http://stackoverflow.com/a/21336448/937891
frameWindow.print();
}
} catch (e) {
frameWindow.print();
}
frameWindow.close();
deferred.resolve();
}, 250);
} catch (err) {
def.reject(err);
}
return def;
}
function printContentInNewWindow(content) {
// Open a new window and print selected content
var w = window.open();
w.document.write(content);
w.document.close();
return printFrame(w);
}
function isNode(o) {
/* http://stackoverflow.com/a/384380/937891 */
return !!(typeof Node === "object" ? o instanceof Node : o && typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName === "string");
return !!( typeof Node === "object" ? o instanceof Node : o && typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName === "string");
}
$.print = $.fn.print = function () {
$.print = $.fn.print = function() {
// Print a given set of elements
var options, $this, self = this;
// console.log("Printing", this, arguments);
if (self instanceof $) {
if ( self instanceof $) {
// Get the node if it is a jQuery object
self = self.get(0);
}
if (isNode(self)) {
// If `this` is a HTML element, i.e. for
// $(selector).print()
@@ -89,20 +60,20 @@
$this = $("html");
}
}
// Default options
var defaults = {
globalStyles: true,
mediaPrint: false,
stylesheet: null,
noPrintSelector: ".no-print",
iframe: true,
append: null,
prepend: null,
manuallyCopyFormValues: true,
deferred: $.Deferred()
globalStyles : true,
mediaPrint : false,
stylesheet : null,
noPrintSelector : ".no-print",
iframe : true,
append : null,
prepend : null
};
// Merge with user-options
options = $.extend({}, defaults, (options || {}));
var $styles = $("");
if (options.globalStyles) {
// Apply the stlyes from the current sheet to the printed page
@@ -115,48 +86,25 @@
// Add a custom stylesheet if given
$styles = $.merge($styles, $('<link rel="stylesheet" href="' + options.stylesheet + '">'));
}
// Create a copy of the element to print
var copy = $this.clone();
// Wrap it in a span to get the HTML markup string
copy = $("<span/>")
.append(copy);
copy = $("<span/>").append(copy);
// Remove unwanted elements
copy.find(options.noPrintSelector)
.remove();
copy.find(options.noPrintSelector).remove();
// Add in the styles
copy.append($styles.clone());
// Appedned content
copy.append(getjQueryObject(options.append));
// Prepended content
copy.prepend(getjQueryObject(options.prepend));
if (options.manuallyCopyFormValues) {
// Manually copy form values into the HTML for printing user-modified input fields
// http://stackoverflow.com/a/26707753
copy.find("input, select, textarea")
.each(function () {
var $field = $(this);
if ($field.is("[type='radio']") || $field.is("[type='checkbox']")) {
if ($field.prop("checked")) {
$field.attr("checked", "checked");
}
} else if ($field.is("select")) {
$field.find(":selected")
.attr("selected", "selected");
} else {
$field.attr("value", $field.val());
}
});
}
// Get the HTML markup string
var content = copy.html();
// Notify with generated markup & cloned elements - useful for logging, etc
try {
options.deferred.notify('generated_markup', content, copy);
} catch (err) {
console.warn('Error notifying deferred', err);
}
// Destroy the copy
copy.remove();
var w, wdoc;
if (options.iframe) {
// Use an iframe for printing
try {
@@ -164,67 +112,50 @@
var iframeCount = $iframe.length;
if (iframeCount === 0) {
// Create a new iFrame if none is given
$iframe = $('<iframe height="0" width="0" border="0" wmode="Opaque"/>')
.prependTo('body')
.css({
"position": "absolute",
"top": -999,
"left": -999
});
$iframe = $('<iframe height="0" width="0" border="0" wmode="Opaque"/>').prependTo('body').css({
"position" : "absolute",
"top" : -999,
"left" : -999
});
}
var w, wdoc;
w = $iframe.get(0);
w = w.contentWindow || w.contentDocument || w;
wdoc = w.document || w.contentDocument || w;
wdoc.open();
wdoc.write(content);
wdoc.close();
printFrame(w)
.done(function () {
// Success
setTimeout(function () {
// Wait for IE
if (iframeCount === 0) {
// Destroy the iframe if created here
$iframe.remove();
}
}, 100);
})
.fail(function () {
// Use the pop-up method if iframe fails for some reason
console.error("Failed to print from iframe", e.stack, e.message);
printContentInNewWindow(content);
})
.always(function () {
try {
options.deferred.resolve();
} catch (err) {
console.warn('Error notifying deferred', err);
setTimeout(function() {
// Fix for IE : Allow it to render the iframe
w.focus();
w.print();
setTimeout(function() {
// Fix for IE
if (iframeCount === 0) {
// Destroy the iframe if created here
$iframe.remove();
}
});
}, 100);
}, 250);
} catch (e) {
// Use the pop-up method if iframe fails for some reason
console.error("Failed to print from iframe", e.stack, e.message);
printContentInNewWindow(content)
.always(function () {
try {
options.deferred.resolve();
} catch (err) {
console.warn('Error notifying deferred', err);
}
});
w = window.open();
w.document.write(content);
w.document.close();
w.focus();
w.print();
w.close();
}
} else {
// Use a new window for printing
printContentInNewWindow(content)
.always(function () {
try {
options.deferred.resolve();
} catch (err) {
console.warn('Error notifying deferred', err);
}
});
w = window.open();
w.document.write(content);
w.document.close();
w.focus();
w.print();
w.close();
}
return this;
};
})(jQuery);
})(jQuery);
+1
View File
@@ -0,0 +1 @@
console.log('This would be the main JS file.');
+1
View File
@@ -0,0 +1 @@
{"name":"jQuery.print","tagline":"Easy to use, Element Printing Plugin for jQuery","body":"# jQuery Print Plugin\r\n\r\njQuery.print is a plugin for printing specific parts of a page\r\n\r\n## Usage\r\n\r\nInclude it in your HTML after importing jQuery, like:\r\n\t<script type=\"text/JavaScript\" src=\"path/to/jquery.print.js\" />\r\n\t\r\nUse it like:\r\n\r\n\t$(\"#myElementId\").print(/*options*/);\r\n\t\r\nor\r\n\r\n\t$.print(\"#myElementId\" /*, options*/);\r\n\t\r\nYou can submit the options object like:\r\n\r\n\t$(\"#myElementId\").print({\r\n\t\taddGlobalStyles : true,\r\n\t\tstylesheet : null,\r\n\t\trejectWindow : true,\r\n\t\tnoPrintSelector : \".no-print\",\r\n\t\tiframe : true,\r\n\t\tappend : null,\r\n\t\tprepend : null\r\n\t});\r\n\t\r\nCurrently this plugin supports the following options:\r\n\r\n####globalStyles\r\n\r\n - Default: `true` \r\n - Acceptable-Values: Boolean \r\n - Function: Whether or not the styles from the parent document should be included\r\n\r\n####mediaPrint\r\n\r\n - Default: `false` \r\n - Acceptable-Values: Boolean \r\n - Function: Whether or not link tags with media='print' should be included; Over-riden by the `globalStyles` option\r\n\r\n####stylesheet\r\n\r\n - Default: `null`\r\n - Acceptable-Values: URL-string\r\n - Function: URL of an external stylesheet to be included\r\n\r\n####noPrintSelector\r\n\r\n - Default: `\".no-print\"`\r\n - Acceptable-Values: Any valid `jQuery-selector`\r\n - Function: A selector for the items that are to be excluded from printing\r\n\r\n####iframe\r\n\r\n - Default: `true`, creates a hidden iframe if no-vaild iframe selector is passed\r\n - Acceptable-Values: Any valid `jQuery-selector` or Boolean\r\n - Function: Whether to print from an iframe instead of a pop-up window; can take the `jQuery-selector` of an existing iframe as value\r\n\r\n####append/prepend\r\n\r\n - Default: `null`\r\n - Acceptable-Values: Any valid `jQuery-selector` or HTML-text\r\n - Function: Adds custom HTML before (prepend) or after (append) the selected content\r\n\r\n## Tested with\r\n\r\n### jQuery\r\n* [jQuery](http://jquery.com/) v. 1.7.2\r\n* [jQuery](http://jquery.com/) v. 1.9.1\r\n\r\n### Browsers\r\n* Google Chrome - v 20, 26\r\n* Internet Explorer - v 10\r\n\r\n## License\r\n[CC-BY](http://creativecommons.org/licenses/by/3.0/).\r\n\r\n## Demo\r\n[jsFiddle](http://jsfiddle.net/5V24U/27/)\r\n\r\n---------------------------------------\r\nLike our [work](http://doersguild.com)? [Get in touch!](mailto:mail@doersguild.com)\r\n","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}
+226
View File
@@ -0,0 +1,226 @@
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
body {
font-size: 13px;
line-height: 1.5;
font-family: 'Helvetica Neue', Helvetica, Arial, serif;
color: #000;
}
a {
color: #d5000d;
font-weight: bold;
}
header {
padding-top: 35px;
padding-bottom: 10px;
}
header h1 {
font-weight: bold;
letter-spacing: -1px;
font-size: 48px;
color: #303030;
line-height: 1.2;
}
header h2 {
letter-spacing: -1px;
font-size: 24px;
color: #aaa;
font-weight: normal;
line-height: 1.3;
}
#downloads {
display: none;
}
#main_content {
padding-top: 20px;
}
code, pre {
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal;
color: #222;
margin-bottom: 30px;
font-size: 12px;
}
code {
padding: 0 3px;
}
pre {
border: solid 1px #ddd;
padding: 20px;
overflow: auto;
}
pre code {
padding: 0;
}
ul, ol, dl {
margin-bottom: 20px;
}
/* COMMON STYLES */
table {
width: 100%;
border: 1px solid #ebebeb;
}
th {
font-weight: 500;
}
td {
border: 1px solid #ebebeb;
text-align: center;
font-weight: 300;
}
form {
background: #f2f2f2;
padding: 20px;
}
/* GENERAL ELEMENT TYPE STYLES */
h1 {
font-size: 2.8em;
}
h2 {
font-size: 22px;
font-weight: bold;
color: #303030;
margin-bottom: 8px;
}
h3 {
color: #d5000d;
font-size: 18px;
font-weight: bold;
margin-bottom: 8px;
}
h4 {
font-size: 16px;
color: #303030;
font-weight: bold;
}
h5 {
font-size: 1em;
color: #303030;
}
h6 {
font-size: .8em;
color: #303030;
}
p {
font-weight: 300;
margin-bottom: 20px;
}
a {
text-decoration: none;
}
p a {
font-weight: 400;
}
blockquote {
font-size: 1.6em;
border-left: 10px solid #e9e9e9;
margin-bottom: 20px;
padding: 0 0 0 30px;
}
ul li {
list-style: disc inside;
padding-left: 20px;
}
ol li {
list-style: decimal inside;
padding-left: 3px;
}
dl dd {
font-style: italic;
font-weight: 100;
}
footer {
margin-top: 40px;
padding-top: 20px;
padding-bottom: 30px;
font-size: 13px;
color: #aaa;
}
footer a {
color: #666;
}
/* MISC */
.clearfix:after {
clear: both;
content: '.';
display: block;
visibility: hidden;
height: 0;
}
.clearfix {display: inline-block;}
* html .clearfix {height: 1%;}
.clearfix {display: block;}
+69
View File
@@ -0,0 +1,69 @@
.highlight { background: #ffffff; }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #999999 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold; } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { font-weight: bold } /* Keyword.Constant */
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
.highlight .kn { font-weight: bold } /* Keyword.Namespace */
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #009999 } /* Literal.Number */
.highlight .s { color: #d14 } /* Literal.String */
.highlight .na { color: #008080 } /* Name.Attribute */
.highlight .nb { color: #0086B3 } /* Name.Builtin */
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
.highlight .no { color: #008080 } /* Name.Constant */
.highlight .ni { color: #800080 } /* Name.Entity */
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
.highlight .nn { color: #555555 } /* Name.Namespace */
.highlight .nt { color: #000080 } /* Name.Tag */
.highlight .nv { color: #008080 } /* Name.Variable */
.highlight .ow { font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #009999 } /* Literal.Number.Float */
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
.highlight .sc { color: #d14 } /* Literal.String.Char */
.highlight .sd { color: #d14 } /* Literal.String.Doc */
.highlight .s2 { color: #d14 } /* Literal.String.Double */
.highlight .se { color: #d14 } /* Literal.String.Escape */
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
.highlight .si { color: #d14 } /* Literal.String.Interpol */
.highlight .sx { color: #d14 } /* Literal.String.Other */
.highlight .sr { color: #009926 } /* Literal.String.Regex */
.highlight .s1 { color: #d14 } /* Literal.String.Single */
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #008080 } /* Name.Variable.Class */
.highlight .vg { color: #008080 } /* Name.Variable.Global */
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
.type-csharp .highlight .k { color: #0000FF }
.type-csharp .highlight .kt { color: #0000FF }
.type-csharp .highlight .nf { color: #000000; font-weight: normal }
.type-csharp .highlight .nc { color: #2B91AF }
.type-csharp .highlight .nn { color: #000000 }
.type-csharp .highlight .s { color: #A31515 }
.type-csharp .highlight .sc { color: #A31515 }
+371
View File
@@ -0,0 +1,371 @@
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/* LAYOUT STYLES */
body {
font-size: 1em;
line-height: 1.5;
background: #e7e7e7 url(../images/body-bg.png) 0 0 repeat;
font-family: 'Helvetica Neue', Helvetica, Arial, serif;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
color: #6d6d6d;
}
a {
color: #d5000d;
}
a:hover {
color: #c5000c;
}
header {
padding-top: 35px;
padding-bottom: 25px;
}
header h1 {
font-family: 'Chivo', 'Helvetica Neue', Helvetica, Arial, serif; font-weight: 900;
letter-spacing: -1px;
font-size: 48px;
color: #303030;
line-height: 1.2;
}
header h2 {
letter-spacing: -1px;
font-size: 24px;
color: #aaa;
font-weight: normal;
line-height: 1.3;
}
#container {
background: transparent url(../images/highlight-bg.jpg) 50% 0 no-repeat;
min-height: 595px;
}
.inner {
width: 620px;
margin: 0 auto;
}
#container .inner img {
max-width: 100%;
}
#downloads {
margin-bottom: 40px;
}
a.button {
-moz-border-radius: 30px;
-webkit-border-radius: 30px;
border-radius: 30px;
border-top: solid 1px #cbcbcb;
border-left: solid 1px #b7b7b7;
border-right: solid 1px #b7b7b7;
border-bottom: solid 1px #b3b3b3;
color: #303030;
line-height: 25px;
font-weight: bold;
font-size: 15px;
padding: 12px 8px 12px 8px;
display: block;
float: left;
width: 179px;
margin-right: 14px;
background: #fdfdfd; /* Old browsers */
background: -moz-linear-gradient(top, #fdfdfd 0%, #f2f2f2 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fdfdfd), color-stop(100%,#f2f2f2)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* IE10+ */
background: linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fdfdfd', endColorstr='#f2f2f2',GradientType=0 ); /* IE6-9 */
-webkit-box-shadow: 10px 10px 5px #888;
-moz-box-shadow: 10px 10px 5px #888;
box-shadow: 0px 1px 5px #e8e8e8;
}
a.button:hover {
border-top: solid 1px #b7b7b7;
border-left: solid 1px #b3b3b3;
border-right: solid 1px #b3b3b3;
border-bottom: solid 1px #b3b3b3;
background: #fafafa; /* Old browsers */
background: -moz-linear-gradient(top, #fdfdfd 0%, #f6f6f6 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fdfdfd), color-stop(100%,#f6f6f6)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #fdfdfd 0%,#f6f6f6 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #fdfdfd 0%,#f6f6f6 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #fdfdfd 0%,#f6f6f6 100%); /* IE10+ */
background: linear-gradient(top, #fdfdfd 0%,#f6f6f6, 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fdfdfd', endColorstr='#f6f6f6',GradientType=0 ); /* IE6-9 */
}
a.button span {
padding-left: 50px;
display: block;
height: 23px;
}
#download-zip span {
background: transparent url(../images/zip-icon.png) 12px 50% no-repeat;
}
#download-tar-gz span {
background: transparent url(../images/tar-gz-icon.png) 12px 50% no-repeat;
}
#view-on-github span {
background: transparent url(../images/octocat-icon.png) 12px 50% no-repeat;
}
#view-on-github {
margin-right: 0;
}
code, pre {
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal;
color: #222;
margin-bottom: 30px;
font-size: 14px;
}
code {
background-color: #f2f2f2;
border: solid 1px #ddd;
padding: 0 3px;
}
pre {
padding: 20px;
background: #303030;
color: #f2f2f2;
text-shadow: none;
overflow: auto;
}
pre code {
color: #f2f2f2;
background-color: #303030;
border: none;
padding: 0;
}
ul, ol, dl {
margin-bottom: 20px;
}
/* COMMON STYLES */
hr {
height: 1px;
line-height: 1px;
margin-top: 1em;
padding-bottom: 1em;
border: none;
background: transparent url('../images/hr.png') 50% 0 no-repeat;
}
strong {
font-weight: bold;
}
em {
font-style: italic;
}
table {
width: 100%;
border: 1px solid #ebebeb;
}
th {
font-weight: 500;
}
td {
border: 1px solid #ebebeb;
text-align: center;
font-weight: 300;
}
form {
background: #f2f2f2;
padding: 20px;
}
/* GENERAL ELEMENT TYPE STYLES */
h1 {
font-size: 32px;
}
h2 {
font-size: 22px;
font-weight: bold;
color: #303030;
margin-bottom: 8px;
}
h3 {
color: #d5000d;
font-size: 18px;
font-weight: bold;
margin-bottom: 8px;
}
h4 {
font-size: 16px;
color: #303030;
font-weight: bold;
}
h5 {
font-size: 1em;
color: #303030;
}
h6 {
font-size: .8em;
color: #303030;
}
p {
font-weight: 300;
margin-bottom: 20px;
}
a {
text-decoration: none;
}
p a {
font-weight: 400;
}
blockquote {
font-size: 1.6em;
border-left: 10px solid #e9e9e9;
margin-bottom: 20px;
padding: 0 0 0 30px;
}
ul li {
list-style: disc inside;
padding-left: 20px;
}
ol li {
list-style: decimal inside;
padding-left: 3px;
}
dl dt {
color: #303030;
}
footer {
background: transparent url('../images/hr.png') 0 0 no-repeat;
margin-top: 40px;
padding-top: 20px;
padding-bottom: 30px;
font-size: 13px;
color: #aaa;
}
footer a {
color: #666;
}
footer a:hover {
color: #444;
}
/* MISC */
.clearfix:after {
clear: both;
content: '.';
display: block;
visibility: hidden;
height: 0;
}
.clearfix {display: inline-block;}
* html .clearfix {height: 1%;}
.clearfix {display: block;}
/* #Media Queries
================================================== */
/* Smaller than standard 960 (devices and browsers) */
@media only screen and (max-width: 959px) {}
/* Tablet Portrait size to standard 960 (devices and browsers) */
@media only screen and (min-width: 768px) and (max-width: 959px) {}
/* All Mobile Sizes (devices and browser) */
@media only screen and (max-width: 767px) {
header {
padding-top: 10px;
padding-bottom: 10px;
}
#downloads {
margin-bottom: 25px;
}
#download-zip, #download-tar-gz {
display: none;
}
.inner {
width: 94%;
margin: 0 auto;
}
}
/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
@media only screen and (min-width: 480px) and (max-width: 767px) {}
/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
@media only screen and (max-width: 479px) {}