├── .eslintrc.json ├── .gitattributes ├── .github └── dependabot.yml ├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── command.js ├── examples ├── Dockerfile ├── assets │ ├── basic.css │ ├── basic.html │ └── custom-margin.css ├── basic-cli-test.sh ├── basic-cli-to-stdout-test.sh ├── example-docker.js ├── example.js └── templates │ └── basic │ ├── .gitattributes │ ├── .gitignore │ ├── .htaccess │ ├── 404.html │ ├── CHANGELOG.md │ ├── CONTRIBUTING.md │ ├── LICENSE.md │ ├── README.md │ ├── apple-touch-icon-114x114-precomposed.png │ ├── apple-touch-icon-144x144-precomposed.png │ ├── apple-touch-icon-57x57-precomposed.png │ ├── apple-touch-icon-72x72-precomposed.png │ ├── apple-touch-icon-precomposed.png │ ├── apple-touch-icon.png │ ├── crossdomain.xml │ ├── css │ ├── main.css │ └── normalize.css │ ├── doc │ ├── TOC.md │ ├── crossdomain.md │ ├── css.md │ ├── extend.md │ ├── faq.md │ ├── html.md │ ├── js.md │ ├── misc.md │ └── usage.md │ ├── favicon.ico │ ├── humans.txt │ ├── img │ ├── .gitignore │ └── big-white-chicken.jpg │ ├── index.html │ ├── js │ ├── main.js │ ├── plugins.js │ └── vendor │ │ ├── jquery-1.9.1.min.js │ │ └── modernizr-2.6.2.min.js │ └── robots.txt ├── lib ├── index.js ├── server.js └── util.js ├── package.json ├── templates ├── highlight.css ├── html5bp │ ├── .gitattributes │ ├── .gitignore │ ├── .htaccess │ ├── 404.html │ ├── CHANGELOG.md │ ├── CONTRIBUTING.md │ ├── LICENSE.md │ ├── README.md │ ├── apple-touch-icon-114x114-precomposed.png │ ├── apple-touch-icon-144x144-precomposed.png │ ├── apple-touch-icon-57x57-precomposed.png │ ├── apple-touch-icon-72x72-precomposed.png │ ├── apple-touch-icon-precomposed.png │ ├── apple-touch-icon.png │ ├── crossdomain.xml │ ├── css │ │ ├── main.css │ │ └── normalize.css │ ├── doc │ │ ├── TOC.md │ │ ├── crossdomain.md │ │ ├── css.md │ │ ├── extend.md │ │ ├── faq.md │ │ ├── html.md │ │ ├── js.md │ │ ├── misc.md │ │ └── usage.md │ ├── favicon.ico │ ├── humans.txt │ ├── img │ │ └── .gitignore │ ├── index.html │ ├── js │ │ ├── main.js │ │ ├── plugins.js │ │ └── vendor │ │ │ ├── jquery-1.9.1.min.js │ │ │ └── modernizr-2.6.2.min.js │ └── robots.txt ├── htmlbootstrap │ ├── css │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ ├── font-awesome.css │ │ └── font-awesome.min.css │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ ├── index.html │ └── js │ │ ├── bootstrap.js │ │ └── bootstrap.min.js └── pdf.css └── yarn.lock /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:prettier/recommended"], 3 | "plugins": ["prettier"], 4 | "parserOptions": { 5 | "ecmaVersion": 8 6 | }, 7 | "rules": { 8 | "prettier/prettier": [ 9 | "error", 10 | { 11 | "trailingComma": "all", 12 | "bracketSpacing": true, 13 | "semi": false, 14 | "printWidth": 80 15 | } 16 | ], 17 | "no-console": 0 18 | }, 19 | "env": { 20 | "node": true 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | templates/* linguist-vendored 2 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: weekly 7 | time: "12:00" 8 | open-pull-requests-limit: 10 9 | assignees: 10 | - peterdemartini 11 | ignore: 12 | - dependency-name: eslint-config-prettier 13 | versions: 14 | - 8.0.0 15 | - 8.1.0 16 | - 8.2.0 17 | - dependency-name: eslint 18 | versions: 19 | - 7.21.0 20 | - 7.22.0 21 | - 7.23.0 22 | - 7.24.0 23 | - dependency-name: puppeteer 24 | versions: 25 | - 7.0.1 26 | - 8.0.0 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # nyc test coverage 18 | .nyc_output 19 | 20 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 21 | .grunt 22 | 23 | # node-waf configuration 24 | .lock-wscript 25 | 26 | # Compiled binary addons (http://nodejs.org/api/addons.html) 27 | build/Release 28 | 29 | # Dependency directories 30 | node_modules 31 | jspm_packages 32 | 33 | # Optional npm cache directory 34 | .npm 35 | 36 | # Optional REPL history 37 | .node_repl_history 38 | 39 | tmp 40 | dist 41 | examples/tmp 42 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | os: 2 | - linux 3 | - osx 4 | language: node_js 5 | node_js: 6 | - '10' 7 | - '12' 8 | - '14' 9 | services: 10 | - docker 11 | before_script: 12 | - export DISPLAY=:99.0 13 | - sh -e /etc/init.d/xvfb start & 14 | - sleep 3 15 | script: 16 | - ./examples/basic-cli-test.sh 17 | - ./examples/example.js 18 | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then 19 | docker build -t local/html5-to-pdf-example -f examples/Dockerfile . && docker run --rm -i --cap-add=SYS_ADMIN local/html5-to-pdf-example; 20 | fi 21 | after_success: 22 | - yarn lint 23 | deploy: 24 | provider: npm 25 | email: thepeterdemartini@gmail.com 26 | api_key: 27 | secure: "iFlKrNUI5MbONm3oMJr+YQIZ+am5mPFRBSMwDstmI8Yod+2uWsZkQ+D35g8osGHr/A2/889/tOHGl/QS4adENO0Ui6mWyqQq+H97zsB555Wy5nIUmE6i++AWrm+w+GH3lz6TCTVyGKWmXp/cFZ7Qxxsge0Z09EON1PsKgb6Fgbg=" 28 | on: 29 | tags: true 30 | repo: peterdemartini/html5-to-pdf 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Peter DeMartini 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # html5-to-pdf 2 | 3 | > Node module that converts HTML files to PDFs. 4 | 5 | [![Dependency status](http://img.shields.io/david/peterdemartini/html5-to-pdf.svg?style=flat)](https://david-dm.org/peterdemartini/html5-to-pdf) 6 | [![devDependency Status](http://img.shields.io/david/dev/peterdemartini/html5-to-pdf.svg?style=flat)](https://david-dm.org/peterdemartini/html5-to-pdf#info=devDependencies) 7 | [![Build Status](https://travis-ci.com/peterdemartini/html5-to-pdf.svg?branch=master)](https://travis-ci.com/peterdemartini/html5-to-pdf) 8 | 9 | The PDF looks great because it is styled by HTML5 Boilerplate or Bootstrap. What? - Yes! HTML is pushed into the HTML5 template `index.html`. Electron renders the page and saves it to a PDF. You can customize the page by adding custom CSS and JS assets. 10 | 11 | ## v3.0.0 (BREAKING CHANGES) 12 | 13 | * Uses [Puppeteer](https://github.com/GoogleChrome/puppeteer) in order to get more fine-grain PDF options. 14 | * Use async/await and ES6 - no more coffee-script 15 | * For migration in your current code, consider using the new `async` functionality in your existing promise chains (see example) 16 | 17 | ## Getting started 18 | 19 | `npm install --save html5-to-pdf` 20 | 21 | or 22 | 23 | `npm install --global html5-to-pdf` 24 | 25 | ## Out in the Wild 26 | 27 | ### [CV](https://github.com/dwjohnston/cv/) 28 | 29 | Uses `webpack` and `webpack-dev-server` to let you see your changes live, and has the option to publish to HTML or PDF. 30 | 31 | ## Output Example usage 32 | 33 | ```javascript 34 | const HTML5ToPDF = require("../lib") 35 | const path = require("path") 36 | 37 | const run = async () => { 38 | const html5ToPDF = new HTML5ToPDF({ 39 | inputPath: path.join(__dirname, "assets", "basic.html"), 40 | outputPath: path.join(__dirname, "..", "tmp", "output.pdf"), 41 | templatePath: path.join(__dirname, "templates", "basic"), 42 | include: [ 43 | path.join(__dirname, "assets", "basic.css"), 44 | path.join(__dirname, "assets", "custom-margin.css"), 45 | ], 46 | }) 47 | 48 | await html5ToPDF.start() 49 | await html5ToPDF.build() 50 | await html5ToPDF.close() 51 | } 52 | 53 | (async () => { 54 | try { 55 | await run() 56 | console.log("DONE") 57 | } catch (error) { 58 | console.error(error) 59 | process.exitCode = 1 60 | } finally { 61 | process.exit(); 62 | } 63 | })() 64 | 65 | 66 | ``` 67 | 68 | --- 69 | 70 | ## Typescript 71 | 72 | A Typescript definition for this library can be obtained by installing [@types/html5-to-pdf](https://www.npmjs.com/package/@types/html5-to-pdf). 73 | 74 | ## Reference 75 | 76 | ### Options 77 | 78 | Options are passed into the constructor. 79 | 80 | #### options.inputPath 81 | 82 | Type: `String` 83 | Required: true 84 | 85 | Path to the input HTML 86 | 87 | #### options.inputBody 88 | 89 | Type: `String` or `Buffer` 90 | 91 | Path to the input html as a `String`, or `Buffer`. If specified this will override inputPath. 92 | 93 | #### options.outputPath 94 | 95 | Type: `String` 96 | 97 | Path to the output pdf file. 98 | 99 | #### options.include 100 | 101 | Type: `Array` 102 | 103 | An array of strings or objects containing a type of `['css', 'js']` and a filePath pointing to the asset. 104 | 105 | **Example:** 106 | 107 | ```javascript 108 | [ 109 | "/path/to/asset.css" 110 | // ... 111 | ] 112 | ``` 113 | 114 | or 115 | 116 | ```javascript 117 | [ 118 | { 119 | "type": "css", 120 | "filePath": "/path/to/asset.css" 121 | } 122 | // ... 123 | ] 124 | ``` 125 | 126 | #### options.renderDelay 127 | 128 | Type: `Number` 129 | Default value: `0` 130 | 131 | Delay in milli-seconds before rendering the PDF (give HTML and CSS a chance to load) 132 | 133 | #### options.template 134 | 135 | Type: `String` 136 | Default value: `html5bp` 137 | 138 | The template to use when rendering the html. You can choose between `html5bp` (HTML5 Boilerplate) or `htmlbootstrap` (Boostrap 3.1.1) 139 | 140 | #### options.templatePath 141 | 142 | Type: `String` 143 | Default value: the `html5-to-pdf/templates/#{options.template}` 144 | 145 | The template to use for rendering the html. If this is set, it will use this instead of the template path. 146 | 147 | #### options.templateUrl 148 | 149 | Type: `String` 150 | 151 | The url to use for rendering the html. If this is set, this will be used for serving up the html. This will override `options.templatePath` and `options.template` 152 | 153 | #### options.pdf 154 | 155 | Type: `Object` 156 | 157 | This object will be passed directly to [puppeteer](https://github.com/GoogleChrome/puppeteer). The full list of options can be found [here](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagepdfoptions). 158 | 159 | #### options.launchOptions 160 | 161 | Type: `Object` 162 | 163 | This object will be passed directly to [puppeteer](https://github.com/GoogleChrome/puppeteer). The full list of options can be found [here](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions). 164 | 165 | ### Legacy Options 166 | 167 | **[ DEPRECATED ]** 168 | 169 | See `options.pdf` above for pdf options. Since some of these options are converted over to work with [puppeteer](https://github.com/GoogleChrome/puppeteer), this is automatically done if `options.pdf` is left empty. 170 | 171 | #### options.options.pageSize **[COMPATIBLE]** 172 | 173 | Type: `String` 174 | Default value: `A4` 175 | 176 | 'A3', 'A4', 'Legal', 'Letter' or 'Tabloid' 177 | 178 | #### options.options.landscape **[COMPATIBLE]** 179 | 180 | Type: `Boolean` 181 | Default value: `false` 182 | 183 | true for landscape, false for portrait. 184 | 185 | #### options.options.marginsType **[NOT COMPATIBLE]** 186 | 187 | Type: `Number` 188 | Default value: `0` 189 | 190 | * 0 - default 191 | * 1 - none 192 | * 2 - minimum 193 | 194 | #### options.options.printBackground **[COMPATIBLE]** 195 | 196 | Type: `Boolean` 197 | Default value: `false` 198 | 199 | Whether to print CSS backgrounds. 200 | 201 | --- 202 | 203 | ## CLI interface 204 | 205 | ### Installation 206 | 207 | To use html5-to-pdf as a standalone program from the terminal run 208 | 209 | ```sh 210 | npm install --global html5-to-pdf 211 | ``` 212 | 213 | ### Usage 214 | 215 | ```sh 216 | Usage: html5-to-pdf [options] 217 | 218 | Options: 219 | 220 | -V, --version output the version number 221 | -i --include .. path to either a javascript asset, or a css asset 222 | --page-size [size] 'A3', 'A4', 'Legal', 'Letter' or 'Tabloid' 223 | --landscape If set it will change orientation to landscape from portriat 224 | --print-background Whether to print CSS backgrounds 225 | -t --template [template] The template to used. Defaults to html5bp. 226 | --template-path [/path/to/template/folder] Specifies the template folder path for static assets, this will override template. 227 | --template-url [http://localhost:8080] Specifies the template url to use. Cannot be used with --template-path. 228 | -d --render-delay [milli-seconds] Delay before rendering the PDF (give HTML and CSS a chance to load) 229 | -o --output Path of where to save the PDF 230 | -h, --help output usage information 231 | ``` 232 | 233 | --- 234 | 235 | ## Note for running in docker 236 | 237 | See [Example Dockerfile](/examples/Dockerfile). Make sure to container with 238 | `--cap-add=SYS_ADMIN`. 239 | 240 | ```sh 241 | docker build -t local/html5-to-pdf-example -f examples/Dockerfile . 242 | docker run --rm -i --cap-add=SYS_ADMIN local/html5-to-pdf-example 243 | ``` 244 | 245 | Refer to puppeteer [documentation](https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker). 246 | 247 | --- 248 | 249 | ### Note for running headlessly on Linux 250 | 251 | _(like on a server without X)_: 252 | 253 | html5-to-pdf uses Puppeteer, which Google Chrome Headlessly, which in turn relies on an X server to render the pdf. 254 | If for whatever reason it can't find a running X server, it will silently fail. 255 | 256 | To fix, just run whatever display server you prefer (that's implementing X). 257 | If you have no X server, chances are you are running on a headless server anyway, in which case there is no point in running a full-blown GUI (that's not facing any users). 258 | You can instead use [Xvfb](https://www.x.org/archive/X11R7.6/doc/man/man1/Xvfb.1.xhtml), a virtual frame buffer. 259 | 260 | #### Depedency Installation 261 | 262 | ```sh 263 | # (might need sudo) 264 | apt-get install -y libgtk2.0-0 libgconf-2-4 libasound2 libxtst6 libxss1 libnss3 xvfb 265 | ``` 266 | 267 | #### Environment Setup 268 | 269 | ```sh 270 | # (might need sudo) 271 | Xvfb -ac -screen scrn 1280x2000x24 :9.0 & 272 | export DISPLAY=:9.0 273 | ``` 274 | 275 | #### Troubleshooting 276 | 277 | It's ok if Xvfb can't find fonts or shows other warnings. 278 | If Xvfb can't start, it probably thinks there's another X server running. Check that. 279 | If there is no other X server running but Xvfb insists there is, run this: 280 | 281 | ```sh 282 | # (might need sudo) 283 | rm /tmp/.X11-unix/X1 284 | rm /tmp/.X1 285 | ``` 286 | -------------------------------------------------------------------------------- /command.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const split = require("lodash/split") 4 | const first = require("lodash/first") 5 | const colors = require("colors/safe") 6 | const commander = require("commander") 7 | const compact = require("lodash/compact") 8 | const toNumber = require("lodash/toNumber") 9 | const castArray = require("lodash/castArray") 10 | const { version } = require("./package.json") 11 | const HTML5ToPDF = require("./lib") 12 | 13 | const printMissing = (message) => { 14 | commander.outputHelp() 15 | if (message) { 16 | console.error(colors.red(message)) 17 | } 18 | process.exit(1) 19 | } 20 | 21 | const die = (error) => { 22 | if (!error) return process.exit(0) 23 | console.error(error.stack) 24 | process.exit(1) 25 | } 26 | 27 | const getOptions = () => { 28 | commander 29 | .version(version) 30 | .option( 31 | "-i --include ..", 32 | "path to either a javascript asset, or a css asset", 33 | ) 34 | .option("--page-size [size]", "'A3', 'A4', 'Legal', 'Letter' or 'Tabloid'") 35 | .option( 36 | "--landscape", 37 | "If set it will change orientation to landscape from portriat", 38 | ) 39 | .option("--print-background", "Whether to print CSS backgrounds") 40 | .option( 41 | "-t --template [template]", 42 | "The template to used. Defaults to html5bp.", 43 | ) 44 | .option( 45 | "--template-path [/path/to/template/folder]", 46 | "Specifies the template folder path for static assets, this will override template.", 47 | ) 48 | .option( 49 | "--template-url [http://localhost:8080]", 50 | "Specifies the template url to use. Cannot be used with --template-path.", 51 | ) 52 | .option( 53 | "-d --render-delay [milli-seconds]", 54 | "Delay before rendering the PDF (give HTML and CSS a chance to load)", 55 | ) 56 | .option("-o --output ", "Path of where to save the PDF") 57 | .usage("[options] ") 58 | .parse(process.argv) 59 | const inputPath = first(commander.args) 60 | const outputPath = commander.output 61 | if (inputPath == null && commander.templateUrl == null) { 62 | printMissing("Missing input path first argument or template-url") 63 | } 64 | 65 | const { 66 | pageSize, 67 | template, 68 | templatePath, 69 | templateUrl, 70 | renderDelay, 71 | } = commander 72 | const printBackground = commander.printBackground 73 | const landscape = commander.landscape 74 | 75 | const include = compact(castArray(split(commander.include, ","))) 76 | 77 | return { 78 | inputPath, 79 | outputPath, 80 | template, 81 | templateUrl, 82 | templatePath, 83 | renderDelay: toNumber(renderDelay), 84 | include, 85 | options: { 86 | landscape, 87 | printBackground, 88 | pageSize, 89 | }, 90 | } 91 | } 92 | 93 | const run = async () => { 94 | const options = getOptions() 95 | const pdf = new HTML5ToPDF(options) 96 | await pdf.start() 97 | const buf = await pdf.build() 98 | await pdf.close() 99 | if (buf != null) { 100 | process.stdout.write(buf) 101 | } 102 | } 103 | 104 | ;(async () => { 105 | try { 106 | await run() 107 | } catch (err) { 108 | die(err) 109 | } 110 | })() 111 | -------------------------------------------------------------------------------- /examples/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:12-alpine 2 | 3 | # Installs latest Chromium (63) package. 4 | RUN apk update && apk upgrade && \ 5 | echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \ 6 | echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \ 7 | apk add --no-cache \ 8 | chromium@edge \ 9 | nss@edge \ 10 | freetype@edge \ 11 | freetype-dev@edge \ 12 | harfbuzz@edge \ 13 | ca-certificates@edge \ 14 | ttf-freefont@edge 15 | 16 | # Tell Puppeteer to skip installing Chrome. We'll be using the installed package. 17 | ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \ 18 | PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser 19 | 20 | RUN npm install puppeteer 21 | 22 | COPY . /app/ 23 | 24 | # Add user so we don't need --no-sandbox. 25 | RUN addgroup -S pptruser && adduser -S -g pptruser pptruser \ 26 | && mkdir -p /home/pptruser/Downloads /app \ 27 | && chown -R pptruser:pptruser /home/pptruser \ 28 | && chown -R pptruser:pptruser /app 29 | 30 | # Run everything after as non-privileged user. 31 | USER pptruser 32 | 33 | CMD ["node", "/app/examples/example-docker.js"] 34 | -------------------------------------------------------------------------------- /examples/assets/basic.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | text-decoration: underline; 3 | color: green; 4 | } 5 | -------------------------------------------------------------------------------- /examples/assets/basic.html: -------------------------------------------------------------------------------- 1 |

Basic Example

2 | 3 |

This is just an example.

4 | 5 | chicken 6 | 7 | Test Link 8 | -------------------------------------------------------------------------------- /examples/assets/custom-margin.css: -------------------------------------------------------------------------------- 1 | body { 2 | size: auto; 3 | margin-top: 4cm !important; 4 | margin-left: 4cm !important; 5 | } 6 | -------------------------------------------------------------------------------- /examples/basic-cli-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | script_directory(){ 4 | local source="${BASH_SOURCE[0]}" 5 | local dir="" 6 | 7 | while [ -h "$source" ]; do # resolve $source until the file is no longer a symlink 8 | dir="$( cd -P "$( dirname "$source" )" && pwd )" 9 | source="$(readlink "$source")" 10 | [[ $source != /* ]] && source="$dir/$source" # if $source was a relative symlink, we need to resolve it relative to the path where the symlink file was located 11 | done 12 | 13 | dir="$( cd -P "$( dirname "$source" )" && pwd )" 14 | 15 | echo "$dir" 16 | } 17 | 18 | main() { 19 | local script_dir="$(script_directory)" 20 | local project_dir="$script_dir/.." 21 | local assets_dir="$script_dir/assets" 22 | local template_dir="$script_dir/templates/basic" 23 | local tmp_dir="$project_dir/tmp" 24 | local output_file="$tmp_dir/basic-$RANDOM.pdf" 25 | mkdir -p "$tmp_dir" 26 | 27 | "$project_dir/command.js" \ 28 | --template-path $template_dir \ 29 | --include $assets_dir/basic.css,$assets_dir/custom-margin.css \ 30 | --render-delay 500 \ 31 | $assets_dir/basic.html -o $output_file || exit 1 32 | 33 | echo "open $output_file" 34 | } 35 | 36 | main "$@" 37 | -------------------------------------------------------------------------------- /examples/basic-cli-to-stdout-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | script_directory(){ 4 | local source="${BASH_SOURCE[0]}" 5 | local dir="" 6 | 7 | while [ -h "$source" ]; do # resolve $source until the file is no longer a symlink 8 | dir="$( cd -P "$( dirname "$source" )" && pwd )" 9 | source="$(readlink "$source")" 10 | [[ $source != /* ]] && source="$dir/$source" # if $source was a relative symlink, we need to resolve it relative to the path where the symlink file was located 11 | done 12 | 13 | dir="$( cd -P "$( dirname "$source" )" && pwd )" 14 | 15 | echo "$dir" 16 | } 17 | 18 | main() { 19 | local script_dir="$(script_directory)" 20 | local project_dir="$script_dir/.." 21 | local assets_dir="$script_dir/assets" 22 | local template_dir="$script_dir/templates/basic" 23 | local tmp_dir="$project_dir/tmp" 24 | local output_file="$tmp_dir/basic-$RANDOM.pdf" 25 | mkdir -p "$tmp_dir" 26 | 27 | $project_dir/command.js \ 28 | --template-path $template_dir \ 29 | --include $assets_dir/basic.css,$assets_dir/custom-margin.css \ 30 | --render-delay 500 \ 31 | $assets_dir/basic.html > "$output_file" || exit 1 32 | 33 | open "$output_file" 34 | } 35 | 36 | main "$@" 37 | -------------------------------------------------------------------------------- /examples/example-docker.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const HTML5ToPDF = require("../lib") 4 | const path = require("path") 5 | 6 | const run = async () => { 7 | const html5ToPDF = new HTML5ToPDF({ 8 | inputPath: path.join(__dirname, "assets", "basic.html"), 9 | outputPath: "/tmp/output.pdf", 10 | templatePath: path.join(__dirname, "templates", "basic"), 11 | launchOptions: { 12 | executablePath: "/usr/bin/chromium-browser", 13 | }, 14 | include: [ 15 | path.join(__dirname, "assets", "basic.css"), 16 | path.join(__dirname, "assets", "custom-margin.css"), 17 | ], 18 | }) 19 | 20 | await html5ToPDF.start() 21 | await html5ToPDF.build() 22 | await html5ToPDF.close() 23 | } 24 | 25 | ;(async () => { 26 | try { 27 | await run() 28 | console.log("DONE") 29 | } catch (error) { 30 | console.error(error) 31 | process.exitCode = 1 32 | } finally { 33 | process.exit() 34 | } 35 | })() 36 | -------------------------------------------------------------------------------- /examples/example.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const HTML5ToPDF = require("../lib") 4 | const path = require("path") 5 | 6 | const run = async () => { 7 | const html5ToPDF = new HTML5ToPDF({ 8 | inputPath: path.join(__dirname, "assets", "basic.html"), 9 | outputPath: path.join(__dirname, "..", "tmp", "output.pdf"), 10 | templatePath: path.join(__dirname, "templates", "basic"), 11 | include: [ 12 | path.join(__dirname, "assets", "basic.css"), 13 | path.join(__dirname, "assets", "custom-margin.css"), 14 | ], 15 | }) 16 | 17 | await html5ToPDF.start() 18 | await html5ToPDF.build() 19 | await html5ToPDF.close() 20 | } 21 | 22 | ;(async () => { 23 | try { 24 | await run() 25 | console.log("DONE") 26 | } catch (error) { 27 | console.error(error) 28 | process.exitCode = 1 29 | } finally { 30 | process.exit() 31 | } 32 | })() 33 | -------------------------------------------------------------------------------- /examples/templates/basic/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto -------------------------------------------------------------------------------- /examples/templates/basic/.gitignore: -------------------------------------------------------------------------------- 1 | # Include your project-specific ignores in this file 2 | # Read about how to use .gitignore: https://help.github.com/articles/ignoring-files 3 | -------------------------------------------------------------------------------- /examples/templates/basic/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Page Not Found :( 6 | 141 | 142 | 143 |
144 |

Not found :(

145 |

Sorry, but the page you were trying to view does not exist.

146 |

It looks like this was the result of either:

147 |
    148 |
  • a mistyped address
  • 149 |
  • an out-of-date link
  • 150 |
151 | 154 | 155 |
156 | 157 | 158 | -------------------------------------------------------------------------------- /examples/templates/basic/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### HEAD 2 | 3 | ### 4.2.0 (April 8, 2013) 4 | 5 | * Remove Google Analytics protocol check ([#1319](https://github.com/h5bp/html5-boilerplate/pull/1319)). 6 | * Update to Normalize.css 1.1.1. 7 | * Update Apache configurations to include the latest changes in the canonical 8 | [`.htaccess`](https://github.com/h5bp/server-configs/blob/master/apache/.htaccess) 9 | file. 10 | * Use a protocol relative URL for the 404 template script. 11 | * Update to jQuery 1.9.1. 12 | 13 | ### 4.1.0 (January 21, 2013) 14 | 15 | * Update to Normalize.css 1.1.0. 16 | * Update to jQuery 1.9.0. 17 | 18 | ### 4.0.3 (January 12, 2013) 19 | 20 | * Use 32x32 favicon.ico ([#1286](https://github.com/h5bp/html5-boilerplate/pull/1286)). 21 | * Remove named function expression in plugins.js ([#1280](https://github.com/h5bp/html5-boilerplate/pull/1280)). 22 | * Adjust CSS image-replacement code ([#1239](https://github.com/h5bp/html5-boilerplate/issues/1239)). 23 | * Update HiDPI example media query ([#1127](https://github.com/h5bp/html5-boilerplate/issues/1127)). 24 | 25 | ### 4.0.2 (December 9, 2012) 26 | 27 | * Update placeholder icons. 28 | * Update to Normalize.css 1.0.2. 29 | * Update to jQuery 1.8.3. 30 | 31 | ### 4.0.1 (October 20, 2012) 32 | 33 | * Further improvements to `console` method stubbing ([#1206](https://github.com/h5bp/html5-boilerplate/issues/1206), [#1229](https://github.com/h5bp/html5-boilerplate/pull/1229)). 34 | * Update to jQuery 1.8.2. 35 | * Update to Modernizr 2.6.2. 36 | * Minor additions to the documentation. 37 | 38 | ### 4.0.0 (August 28, 2012) 39 | 40 | * Improve the Apache compression configuration ([#1012](https://github.com/h5bp/html5-boilerplate/issues/1012), [#1173](https://github.com/h5bp/html5-boilerplate/issues/1173)). 41 | * Add a HiDPI example media query ([#1127](https://github.com/h5bp/html5-boilerplate/issues/1127)). 42 | * Add bundled docs ([#1154](https://github.com/h5bp/html5-boilerplate/issues/1154)). 43 | * Add MIT license ([#1139](https://github.com/h5bp/html5-boilerplate/issues/1139)). 44 | * Update to Normalize.css 1.0.1. 45 | * Separate Normalize.css from the rest of the CSS ([#1160](https://github.com/h5bp/html5-boilerplate/issues/1160)). 46 | * Improve `console.log` protection ([#1107](https://github.com/h5bp/html5-boilerplate/issues/1107)). 47 | * Replace hot pink text selection color with a neutral color. 48 | * Change image replacement technique ([#1149](https://github.com/h5bp/html5-boilerplate/issues/1149)). 49 | * Code format and consistency changes ([#1112](https://github.com/h5bp/html5-boilerplate/issues/1112)). 50 | * Rename CSS file and rename JS files and subdirectories. 51 | * Update to jQuery 1.8 ([#1161](https://github.com/h5bp/html5-boilerplate/issues/1161)). 52 | * Update to Modernizr 2.6.1 ([#1086](https://github.com/h5bp/html5-boilerplate/issues/1086)). 53 | * Remove uncompressed jQuery ([#1153](https://github.com/h5bp/html5-boilerplate/issues/1153)). 54 | * Remove superfluous inline comments ([#1150](https://github.com/h5bp/html5-boilerplate/issues/1150)). 55 | 56 | ### 3.0.2 (February 19, 2012) 57 | 58 | * Update to Modernizr 2.5.3. 59 | 60 | ### 3.0.1 (February 08, 2012). 61 | 62 | * Update to Modernizr 2.5.2 (includes html5shiv 3.3). 63 | 64 | ### 3.0.0 (February 06, 2012) 65 | 66 | * Improvements to `.htaccess`. 67 | * Improve 404 design. 68 | * Simplify JS folder structure. 69 | * Change `html` IE class names changed to target ranges rather than specific versions of IE. 70 | * Update CSS to include latest normalize.css changes and better typographic defaults ([#825](https://github.com/h5bp/html5-boilerplate/issues/825)). 71 | * Update to Modernizr 2.5 (includes yepnope 1.5 and html5shiv 3.2). 72 | * Update to jQuery 1.7.1. 73 | * Revert to async snippet for the Google Analytics script. 74 | * Remove the ant build script ([#826](https://github.com/h5bp/html5-boilerplate/issues/826)). 75 | * Remove Respond.js ([#816](https://github.com/h5bp/html5-boilerplate/issues/816)). 76 | * Remove the `demo/` directory ([#808](https://github.com/h5bp/html5-boilerplate/issues/808)). 77 | * Remove the `test/` directory ([#808](https://github.com/h5bp/html5-boilerplate/issues/808)). 78 | * Remove Google Chrome Frame script for IE6 users; replace with links to Chrome Frame and options for alternative browsers. 79 | * Remove `initial-scale=1` from the viewport `meta` ([#824](https://github.com/h5bp/html5-boilerplate/issues/824)). 80 | * Remove `defer` from all scripts to avoid legacy IE bugs. 81 | * Remove explicit Site Speed tracking for Google Analytics. It's now enabled by default. 82 | 83 | ### 2.0.0 (August 10, 2011) 84 | 85 | * Change starting CSS to be based on normalize.css instead of reset.css ([#500](https://github.com/h5bp/html5-boilerplate/issues/500)). 86 | * Add Respond.js media query polyfill. 87 | * Add Google Chrome Frame script prompt for IE6 users. 88 | * Simplify the `html` conditional comments for modern browsers and add an `oldie` class. 89 | * Update clearfix to use "micro clearfix". 90 | * Add placeholder CSS MQs for mobile-first approach. 91 | * Add `textarea { resize: vertical; }` to only allow vertical resizing. 92 | * Add `img { max-width: 100%; }` to the print styles; prevents images being truncated. 93 | * Add Site Speed tracking for Google Analytics. 94 | * Update to jQuery 1.6.2 (and use minified by default). 95 | * Update to Modernizr 2.0 Complete, Production minified (includes yepnope, html5shiv, and Respond.js). 96 | * Use `Modernizr.load()` to load the Google Analytics script. 97 | * Much faster build process. 98 | * Add build script options for CSSLint, JSLint, JSHint tools. 99 | * Build script now compresses all images in subfolders. 100 | * Build script now versions files by SHA hash. 101 | * Many `.htaccess` improvements including: disable directory browsing, improved support for all versions of Apache, more robust and extensive HTTP compression rules. 102 | * Remove `handheld.css` as it has very poor device support. 103 | * Remove touch-icon `link` elements from the HTML and include improved touch-icon support. 104 | * Remove the cache-busting query paramaters from files references in the HTML. 105 | * Remove IE6 PNGFix. 106 | 107 | ### 1.0.0 (March 21, 2011) 108 | 109 | * Rewrite build script to make it more customizable and flexible. 110 | * Add a humans.txt. 111 | * Numerous `.htaccess` improvements (including inline documentation). 112 | * Move the alternative server configurations to the H5BP server configs repo. 113 | * Use a protocol-relative url to reference jQuery and prevent mixed content warnings. 114 | * Optimize the Google Analytics snippet. 115 | * Use Eric Meyer's recent CSS reset update and the HTML5 Doctor reset. 116 | * More robust `sub`/`sup` CSS styles. 117 | * Add keyboard `.focusable` helper class that extends `.visuallyhidden`. 118 | * Print styles no longer print hash or JavaScript links. 119 | * Add a print reset for IE's proprietary filters. 120 | * Remove IE9-specific conditional class on the `html` element. 121 | * Remove margins from lists within `nav` elements. 122 | * Remove YUI profiling. 123 | -------------------------------------------------------------------------------- /examples/templates/basic/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to HTML5 Boilerplate 2 | 3 | ♥ [HTML5 Boilerplate](http://html5boilerplate.com) and want to get involved? 4 | Thanks! There are plenty of ways you can help! 5 | 6 | 7 | ## Bugs 8 | 9 | A bug is a _demonstrable problem_ that is caused by the code in the 10 | repository. Good bug reports are extremely helpful - thank you! 11 | 12 | Guidelines for bug reports: 13 | 14 | 1. **Use the GitHub issue search** — check if the issue has already been 15 | reported. 16 | 17 | 2. **Check if the issue has been fixed** — try to reproduce it using the 18 | latest `master` branch in the repository. 19 | 20 | 3. **Isolate the problem** — ideally create a [reduced test 21 | case](http://css-tricks.com/6263-reduced-test-cases/) and a live example. 22 | 23 | A good bug report shouldn't leave others needing to chase you up for more 24 | information. Please try to be as detailed as possible in your report. What is 25 | your environment? What steps will reproduce the issue? What browser(s) and OS 26 | experience the problem? What would you expect to be the outcome? All these 27 | details will help people to fix any potential bugs. 28 | 29 | Example: 30 | 31 | > Short and descriptive example bug report title 32 | > 33 | > A summary of the issue and the browser/OS environment in which it occurs. If 34 | > suitable, include the steps required to reproduce the bug. 35 | > 36 | > 1. This is the first step 37 | > 2. This is the second step 38 | > 3. Further steps, etc. 39 | > 40 | > `` (a link to the reduced test case) 41 | > 42 | > Any other information you want to share that is relevant to the issue being 43 | > reported. This might include the lines of code that you have identified as 44 | > causing the bug, and potential solutions (and your opinions on their 45 | > merits). 46 | 47 | **[File a bug report](https://github.com/h5bp/html5-boilerplate/issues/)** 48 | 49 | 50 | ## Pull requests 51 | 52 | Good pull requests - patches, improvements, new features - are a fantastic 53 | help. They should remain focused in scope and avoid containing unrelated 54 | commits. If your contribution involves a significant amount of work or substantial 55 | changes to any part of the project, please open an issue to discuss it first. 56 | 57 | Make sure to adhere to the coding conventions used throughout a project 58 | (indentation, accurate comments, etc.). Please update any documentation that is 59 | relevant to the change you're making. 60 | 61 | Please follow this process; it's the best way to get your work included in the 62 | project: 63 | 64 | 1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, 65 | and configure the remotes: 66 | 67 | ```bash 68 | # Clones your fork of the repo into the current directory in terminal 69 | git clone https://github.com//html5-boilerplate.git 70 | # Navigate to the newly cloned directory 71 | cd html5-boilerplate 72 | # Assigns the original repo to a remote called "upstream" 73 | git remote add upstream https://github.com/h5bp/html5-boilerplate.git 74 | ``` 75 | 76 | 2. If you cloned a while ago, get the latest changes from upstream: 77 | 78 | ```bash 79 | git checkout master 80 | git pull upstream master 81 | ``` 82 | 83 | 3. Create a new topic branch to contain your feature, change, or fix: 84 | 85 | ```bash 86 | git checkout -b 87 | ``` 88 | 89 | 4. Commit your changes in logical chunks. Please adhere to these [git commit 90 | message 91 | guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) 92 | or your pull request is unlikely be merged into the main project. Use git's 93 | [interactive rebase](https://help.github.com/articles/interactive-rebase) 94 | feature to tidy up your commits before making them public. 95 | 96 | 5. Locally merge (or rebase) the upstream development branch into your topic branch: 97 | 98 | ```bash 99 | git pull [--rebase] upstream master 100 | ``` 101 | 102 | 6. Push your topic branch up to your fork: 103 | 104 | ```bash 105 | git push origin 106 | ``` 107 | 108 | 10. [Open a Pull Request](https://help.github.com/articles/using-pull-requests) with a 109 | clear title and description. 110 | 111 | 112 | ## Do not… 113 | 114 | Please **do not** use the issue tracker for personal support requests (use 115 | [StackOverflow](http://stackoverflow.com/questions/tagged/html5boilerplate) or IRC). 116 | 117 | Please **do not** derail or troll issues. Keep the 118 | discussion on topic and respect the opinions of others. 119 | -------------------------------------------------------------------------------- /examples/templates/basic/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) HTML5 Boilerplate 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /examples/templates/basic/README.md: -------------------------------------------------------------------------------- 1 | # [HTML5 Boilerplate](http://html5boilerplate.com) 2 | 3 | HTML5 Boilerplate is a professional front-end template for building fast, 4 | robust, and adaptable web apps or sites. 5 | 6 | This project is the product of many years of iterative development and combined 7 | community knowledge. It does not impose a specific development philosophy or 8 | framework, so you're free to architect your code in the way that you want. 9 | 10 | * Source: [https://github.com/h5bp/html5-boilerplate](https://github.com/h5bp/html5-boilerplate) 11 | * Homepage: [http://html5boilerplate.com](http://html5boilerplate.com) 12 | * Twitter: [@h5bp](http://twitter.com/h5bp) 13 | 14 | 15 | ## Quick start 16 | 17 | Choose one of the following options: 18 | 19 | 1. Download the latest stable release from 20 | [html5boilerplate.com](http://html5boilerplate.com/) or a custom build from 21 | [Initializr](http://www.initializr.com). 22 | 2. Clone the git repo — `git clone 23 | https://github.com/h5bp/html5-boilerplate.git` - and checkout the tagged 24 | release you'd like to use. 25 | 26 | 27 | ## Features 28 | 29 | * HTML5 ready. Use the new elements with confidence. 30 | * Cross-browser compatible (Chrome, Opera, Safari, Firefox 3.6+, IE6+). 31 | * Designed with progressive enhancement in mind. 32 | * Includes [Normalize.css](http://necolas.github.com/normalize.css/) for CSS 33 | normalizations and common bug fixes. 34 | * The latest [jQuery](http://jquery.com/) via CDN, with a local fallback. 35 | * The latest [Modernizr](http://modernizr.com/) build for feature detection. 36 | * IE-specific classes for easier cross-browser control. 37 | * Placeholder CSS Media Queries. 38 | * Useful CSS helpers. 39 | * Default print CSS, performance optimized. 40 | * Protection against any stray `console.log` causing JavaScript errors in 41 | IE6/7. 42 | * An optimized Google Analytics snippet. 43 | * Apache server caching, compression, and other configuration defaults for 44 | Grade-A performance. 45 | * Cross-domain Ajax and Flash. 46 | * "Delete-key friendly." Easy to strip out parts you don't need. 47 | * Extensive inline and accompanying documentation. 48 | 49 | 50 | ## Documentation 51 | 52 | Take a look at the [documentation table of contents](doc/TOC.md). This 53 | documentation is bundled with the project, which makes it readily available for 54 | offline reading and provides a useful starting point for any documentation you 55 | want to write about your project. 56 | 57 | 58 | ## Contributing 59 | 60 | Anyone and everyone is welcome to [contribute](CONTRIBUTING.md). Hundreds of 61 | developers have helped make the HTML5 Boilerplate what it is today. 62 | -------------------------------------------------------------------------------- /examples/templates/basic/apple-touch-icon-114x114-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/examples/templates/basic/apple-touch-icon-114x114-precomposed.png -------------------------------------------------------------------------------- /examples/templates/basic/apple-touch-icon-144x144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/examples/templates/basic/apple-touch-icon-144x144-precomposed.png -------------------------------------------------------------------------------- /examples/templates/basic/apple-touch-icon-57x57-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/examples/templates/basic/apple-touch-icon-57x57-precomposed.png -------------------------------------------------------------------------------- /examples/templates/basic/apple-touch-icon-72x72-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/examples/templates/basic/apple-touch-icon-72x72-precomposed.png -------------------------------------------------------------------------------- /examples/templates/basic/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/examples/templates/basic/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /examples/templates/basic/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/examples/templates/basic/apple-touch-icon.png -------------------------------------------------------------------------------- /examples/templates/basic/crossdomain.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /examples/templates/basic/css/main.css: -------------------------------------------------------------------------------- 1 | /* 2 | * HTML5 Boilerplate 3 | * 4 | * What follows is the result of much research on cross-browser styling. 5 | * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, 6 | * Kroc Camen, and the H5BP dev community and team. 7 | */ 8 | 9 | /* ========================================================================== 10 | Base styles: opinionated defaults 11 | ========================================================================== */ 12 | 13 | html, 14 | button, 15 | input, 16 | select, 17 | textarea { 18 | color: #222; 19 | } 20 | 21 | body { 22 | font-size: 1em; 23 | line-height: 1.4; 24 | } 25 | 26 | /* 27 | * Remove text-shadow in selection highlight: h5bp.com/i 28 | * These selection rule sets have to be separate. 29 | * Customize the background color to match your design. 30 | */ 31 | 32 | ::-moz-selection { 33 | background: #b3d4fc; 34 | text-shadow: none; 35 | } 36 | 37 | ::selection { 38 | background: #b3d4fc; 39 | text-shadow: none; 40 | } 41 | 42 | /* 43 | * A better looking default horizontal rule 44 | */ 45 | 46 | hr { 47 | display: block; 48 | height: 1px; 49 | border: 0; 50 | border-top: 1px solid #ccc; 51 | margin: 1em 0; 52 | padding: 0; 53 | } 54 | 55 | /* 56 | * Remove the gap between images and the bottom of their containers: h5bp.com/i/440 57 | */ 58 | 59 | img { 60 | vertical-align: middle; 61 | } 62 | 63 | /* 64 | * Remove default fieldset styles. 65 | */ 66 | 67 | fieldset { 68 | border: 0; 69 | margin: 0; 70 | padding: 0; 71 | } 72 | 73 | /* 74 | * Allow only vertical resizing of textareas. 75 | */ 76 | 77 | textarea { 78 | resize: vertical; 79 | } 80 | 81 | /* ========================================================================== 82 | Chrome Frame prompt 83 | ========================================================================== */ 84 | 85 | .chromeframe { 86 | margin: 0.2em 0; 87 | background: #ccc; 88 | color: #000; 89 | padding: 0.2em 0; 90 | } 91 | 92 | /* ========================================================================== 93 | Author's custom styles 94 | ========================================================================== */ 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | /* ========================================================================== 113 | Helper classes 114 | ========================================================================== */ 115 | 116 | /* 117 | * Image replacement 118 | */ 119 | 120 | .ir { 121 | background-color: transparent; 122 | border: 0; 123 | overflow: hidden; 124 | /* IE 6/7 fallback */ 125 | *text-indent: -9999px; 126 | } 127 | 128 | .ir:before { 129 | content: ""; 130 | display: block; 131 | width: 0; 132 | height: 150%; 133 | } 134 | 135 | /* 136 | * Hide from both screenreaders and browsers: h5bp.com/u 137 | */ 138 | 139 | .hidden { 140 | display: none !important; 141 | visibility: hidden; 142 | } 143 | 144 | /* 145 | * Hide only visually, but have it available for screenreaders: h5bp.com/v 146 | */ 147 | 148 | .visuallyhidden { 149 | border: 0; 150 | clip: rect(0 0 0 0); 151 | height: 1px; 152 | margin: -1px; 153 | overflow: hidden; 154 | padding: 0; 155 | position: absolute; 156 | width: 1px; 157 | } 158 | 159 | /* 160 | * Extends the .visuallyhidden class to allow the element to be focusable 161 | * when navigated to via the keyboard: h5bp.com/p 162 | */ 163 | 164 | .visuallyhidden.focusable:active, 165 | .visuallyhidden.focusable:focus { 166 | clip: auto; 167 | height: auto; 168 | margin: 0; 169 | overflow: visible; 170 | position: static; 171 | width: auto; 172 | } 173 | 174 | /* 175 | * Hide visually and from screenreaders, but maintain layout 176 | */ 177 | 178 | .invisible { 179 | visibility: hidden; 180 | } 181 | 182 | /* 183 | * Clearfix: contain floats 184 | * 185 | * For modern browsers 186 | * 1. The space content is one way to avoid an Opera bug when the 187 | * `contenteditable` attribute is included anywhere else in the document. 188 | * Otherwise it causes space to appear at the top and bottom of elements 189 | * that receive the `clearfix` class. 190 | * 2. The use of `table` rather than `block` is only necessary if using 191 | * `:before` to contain the top-margins of child elements. 192 | */ 193 | 194 | .clearfix:before, 195 | .clearfix:after { 196 | content: " "; /* 1 */ 197 | display: table; /* 2 */ 198 | } 199 | 200 | .clearfix:after { 201 | clear: both; 202 | } 203 | 204 | /* 205 | * For IE 6/7 only 206 | * Include this rule to trigger hasLayout and contain floats. 207 | */ 208 | 209 | .clearfix { 210 | *zoom: 1; 211 | } 212 | 213 | /* ========================================================================== 214 | EXAMPLE Media Queries for Responsive Design. 215 | These examples override the primary ('mobile first') styles. 216 | Modify as content requires. 217 | ========================================================================== */ 218 | 219 | @media only screen and (min-width: 35em) { 220 | /* Style adjustments for viewports that meet the condition */ 221 | } 222 | 223 | @media print, 224 | (-o-min-device-pixel-ratio: 5/4), 225 | (-webkit-min-device-pixel-ratio: 1.25), 226 | (min-resolution: 120dpi) { 227 | /* Style adjustments for high resolution devices */ 228 | } 229 | 230 | /* ========================================================================== 231 | Print styles. 232 | Inlined to avoid required HTTP connection: h5bp.com/r 233 | ========================================================================== */ 234 | 235 | @media print { 236 | 237 | a, 238 | a:visited { 239 | text-decoration: underline; 240 | } 241 | 242 | a[href]:after { 243 | content: " (" attr(href) ")"; 244 | } 245 | 246 | abbr[title]:after { 247 | content: " (" attr(title) ")"; 248 | } 249 | 250 | /* 251 | * Don't show links for images, or javascript/internal links 252 | */ 253 | 254 | .ir a:after, 255 | a[href^="javascript:"]:after, 256 | a[href^="#"]:after { 257 | content: ""; 258 | } 259 | 260 | pre, 261 | blockquote { 262 | border: 1px solid #999; 263 | page-break-inside: avoid; 264 | } 265 | 266 | thead { 267 | display: table-header-group; /* h5bp.com/t */ 268 | } 269 | 270 | tr, 271 | img { 272 | page-break-inside: avoid; 273 | } 274 | 275 | img { 276 | max-width: 100%; 277 | } 278 | 279 | @page { 280 | margin: 0.5cm; 281 | } 282 | 283 | p, 284 | h2, 285 | h3 { 286 | orphans: 3; 287 | widows: 3; 288 | } 289 | 290 | h2, 291 | h3 { 292 | page-break-after: avoid; 293 | } 294 | } 295 | -------------------------------------------------------------------------------- /examples/templates/basic/css/normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v1.1.1 | MIT License | git.io/normalize */ 2 | 3 | /* ========================================================================== 4 | HTML5 display definitions 5 | ========================================================================== */ 6 | 7 | /** 8 | * Correct `block` display not defined in IE 6/7/8/9 and Firefox 3. 9 | */ 10 | 11 | article, 12 | aside, 13 | details, 14 | figcaption, 15 | figure, 16 | footer, 17 | header, 18 | hgroup, 19 | main, 20 | nav, 21 | section, 22 | summary { 23 | display: block; 24 | } 25 | 26 | /** 27 | * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. 28 | */ 29 | 30 | audio, 31 | canvas, 32 | video { 33 | display: inline-block; 34 | *display: inline; 35 | *zoom: 1; 36 | } 37 | 38 | /** 39 | * Prevent modern browsers from displaying `audio` without controls. 40 | * Remove excess height in iOS 5 devices. 41 | */ 42 | 43 | audio:not([controls]) { 44 | display: none; 45 | height: 0; 46 | } 47 | 48 | /** 49 | * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4. 50 | * Known issue: no IE 6 support. 51 | */ 52 | 53 | [hidden] { 54 | display: none; 55 | } 56 | 57 | /* ========================================================================== 58 | Base 59 | ========================================================================== */ 60 | 61 | /** 62 | * 1. Prevent system color scheme's background color being used in Firefox, IE, 63 | * and Opera. 64 | * 2. Prevent system color scheme's text color being used in Firefox, IE, and 65 | * Opera. 66 | * 3. Correct text resizing oddly in IE 6/7 when body `font-size` is set using 67 | * `em` units. 68 | * 4. Prevent iOS text size adjust after orientation change, without disabling 69 | * user zoom. 70 | */ 71 | 72 | html { 73 | background: #fff; /* 1 */ 74 | color: #000; /* 2 */ 75 | font-size: 100%; /* 3 */ 76 | -webkit-text-size-adjust: 100%; /* 4 */ 77 | -ms-text-size-adjust: 100%; /* 4 */ 78 | } 79 | 80 | /** 81 | * Address `font-family` inconsistency between `textarea` and other form 82 | * elements. 83 | */ 84 | 85 | html, 86 | button, 87 | input, 88 | select, 89 | textarea { 90 | font-family: sans-serif; 91 | } 92 | 93 | /** 94 | * Address margins handled incorrectly in IE 6/7. 95 | */ 96 | 97 | body { 98 | margin: 0; 99 | } 100 | 101 | /* ========================================================================== 102 | Links 103 | ========================================================================== */ 104 | 105 | /** 106 | * Address `outline` inconsistency between Chrome and other browsers. 107 | */ 108 | 109 | a:focus { 110 | outline: thin dotted; 111 | } 112 | 113 | /** 114 | * Improve readability when focused and also mouse hovered in all browsers. 115 | */ 116 | 117 | a:active, 118 | a:hover { 119 | outline: 0; 120 | } 121 | 122 | /* ========================================================================== 123 | Typography 124 | ========================================================================== */ 125 | 126 | /** 127 | * Address font sizes and margins set differently in IE 6/7. 128 | * Address font sizes within `section` and `article` in Firefox 4+, Safari 5, 129 | * and Chrome. 130 | */ 131 | 132 | h1 { 133 | font-size: 2em; 134 | margin: 0.67em 0; 135 | } 136 | 137 | h2 { 138 | font-size: 1.5em; 139 | margin: 0.83em 0; 140 | } 141 | 142 | h3 { 143 | font-size: 1.17em; 144 | margin: 1em 0; 145 | } 146 | 147 | h4 { 148 | font-size: 1em; 149 | margin: 1.33em 0; 150 | } 151 | 152 | h5 { 153 | font-size: 0.83em; 154 | margin: 1.67em 0; 155 | } 156 | 157 | h6 { 158 | font-size: 0.67em; 159 | margin: 2.33em 0; 160 | } 161 | 162 | /** 163 | * Address styling not present in IE 7/8/9, Safari 5, and Chrome. 164 | */ 165 | 166 | abbr[title] { 167 | border-bottom: 1px dotted; 168 | } 169 | 170 | /** 171 | * Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome. 172 | */ 173 | 174 | b, 175 | strong { 176 | font-weight: bold; 177 | } 178 | 179 | blockquote { 180 | margin: 1em 40px; 181 | } 182 | 183 | /** 184 | * Address styling not present in Safari 5 and Chrome. 185 | */ 186 | 187 | dfn { 188 | font-style: italic; 189 | } 190 | 191 | /** 192 | * Address differences between Firefox and other browsers. 193 | * Known issue: no IE 6/7 normalization. 194 | */ 195 | 196 | hr { 197 | -moz-box-sizing: content-box; 198 | box-sizing: content-box; 199 | height: 0; 200 | } 201 | 202 | /** 203 | * Address styling not present in IE 6/7/8/9. 204 | */ 205 | 206 | mark { 207 | background: #ff0; 208 | color: #000; 209 | } 210 | 211 | /** 212 | * Address margins set differently in IE 6/7. 213 | */ 214 | 215 | p, 216 | pre { 217 | margin: 1em 0; 218 | } 219 | 220 | /** 221 | * Correct font family set oddly in IE 6, Safari 4/5, and Chrome. 222 | */ 223 | 224 | code, 225 | kbd, 226 | pre, 227 | samp { 228 | font-family: monospace, serif; 229 | _font-family: 'courier new', monospace; 230 | font-size: 1em; 231 | } 232 | 233 | /** 234 | * Improve readability of pre-formatted text in all browsers. 235 | */ 236 | 237 | pre { 238 | white-space: pre; 239 | white-space: pre-wrap; 240 | word-wrap: break-word; 241 | } 242 | 243 | /** 244 | * Address CSS quotes not supported in IE 6/7. 245 | */ 246 | 247 | q { 248 | quotes: none; 249 | } 250 | 251 | /** 252 | * Address `quotes` property not supported in Safari 4. 253 | */ 254 | 255 | q:before, 256 | q:after { 257 | content: ''; 258 | content: none; 259 | } 260 | 261 | /** 262 | * Address inconsistent and variable font size in all browsers. 263 | */ 264 | 265 | small { 266 | font-size: 80%; 267 | } 268 | 269 | /** 270 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 271 | */ 272 | 273 | sub, 274 | sup { 275 | font-size: 75%; 276 | line-height: 0; 277 | position: relative; 278 | vertical-align: baseline; 279 | } 280 | 281 | sup { 282 | top: -0.5em; 283 | } 284 | 285 | sub { 286 | bottom: -0.25em; 287 | } 288 | 289 | /* ========================================================================== 290 | Lists 291 | ========================================================================== */ 292 | 293 | /** 294 | * Address margins set differently in IE 6/7. 295 | */ 296 | 297 | dl, 298 | menu, 299 | ol, 300 | ul { 301 | margin: 1em 0; 302 | } 303 | 304 | dd { 305 | margin: 0 0 0 40px; 306 | } 307 | 308 | /** 309 | * Address paddings set differently in IE 6/7. 310 | */ 311 | 312 | menu, 313 | ol, 314 | ul { 315 | padding: 0 0 0 40px; 316 | } 317 | 318 | /** 319 | * Correct list images handled incorrectly in IE 7. 320 | */ 321 | 322 | nav ul, 323 | nav ol { 324 | list-style: none; 325 | list-style-image: none; 326 | } 327 | 328 | /* ========================================================================== 329 | Embedded content 330 | ========================================================================== */ 331 | 332 | /** 333 | * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3. 334 | * 2. Improve image quality when scaled in IE 7. 335 | */ 336 | 337 | img { 338 | border: 0; /* 1 */ 339 | -ms-interpolation-mode: bicubic; /* 2 */ 340 | } 341 | 342 | /** 343 | * Correct overflow displayed oddly in IE 9. 344 | */ 345 | 346 | svg:not(:root) { 347 | overflow: hidden; 348 | } 349 | 350 | /* ========================================================================== 351 | Figures 352 | ========================================================================== */ 353 | 354 | /** 355 | * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11. 356 | */ 357 | 358 | figure { 359 | margin: 0; 360 | } 361 | 362 | /* ========================================================================== 363 | Forms 364 | ========================================================================== */ 365 | 366 | /** 367 | * Correct margin displayed oddly in IE 6/7. 368 | */ 369 | 370 | form { 371 | margin: 0; 372 | } 373 | 374 | /** 375 | * Define consistent border, margin, and padding. 376 | */ 377 | 378 | fieldset { 379 | border: 1px solid #c0c0c0; 380 | margin: 0 2px; 381 | padding: 0.35em 0.625em 0.75em; 382 | } 383 | 384 | /** 385 | * 1. Correct color not being inherited in IE 6/7/8/9. 386 | * 2. Correct text not wrapping in Firefox 3. 387 | * 3. Correct alignment displayed oddly in IE 6/7. 388 | */ 389 | 390 | legend { 391 | border: 0; /* 1 */ 392 | padding: 0; 393 | white-space: normal; /* 2 */ 394 | *margin-left: -7px; /* 3 */ 395 | } 396 | 397 | /** 398 | * 1. Correct font size not being inherited in all browsers. 399 | * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5, 400 | * and Chrome. 401 | * 3. Improve appearance and consistency in all browsers. 402 | */ 403 | 404 | button, 405 | input, 406 | select, 407 | textarea { 408 | font-size: 100%; /* 1 */ 409 | margin: 0; /* 2 */ 410 | vertical-align: baseline; /* 3 */ 411 | *vertical-align: middle; /* 3 */ 412 | } 413 | 414 | /** 415 | * Address Firefox 3+ setting `line-height` on `input` using `!important` in 416 | * the UA stylesheet. 417 | */ 418 | 419 | button, 420 | input { 421 | line-height: normal; 422 | } 423 | 424 | /** 425 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 426 | * All other form control elements do not inherit `text-transform` values. 427 | * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+. 428 | * Correct `select` style inheritance in Firefox 4+ and Opera. 429 | */ 430 | 431 | button, 432 | select { 433 | text-transform: none; 434 | } 435 | 436 | /** 437 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 438 | * and `video` controls. 439 | * 2. Correct inability to style clickable `input` types in iOS. 440 | * 3. Improve usability and consistency of cursor style between image-type 441 | * `input` and others. 442 | * 4. Remove inner spacing in IE 7 without affecting normal text inputs. 443 | * Known issue: inner spacing remains in IE 6. 444 | */ 445 | 446 | button, 447 | html input[type="button"], /* 1 */ 448 | input[type="reset"], 449 | input[type="submit"] { 450 | -webkit-appearance: button; /* 2 */ 451 | cursor: pointer; /* 3 */ 452 | *overflow: visible; /* 4 */ 453 | } 454 | 455 | /** 456 | * Re-set default cursor for disabled elements. 457 | */ 458 | 459 | button[disabled], 460 | html input[disabled] { 461 | cursor: default; 462 | } 463 | 464 | /** 465 | * 1. Address box sizing set to content-box in IE 8/9. 466 | * 2. Remove excess padding in IE 8/9. 467 | * 3. Remove excess padding in IE 7. 468 | * Known issue: excess padding remains in IE 6. 469 | */ 470 | 471 | input[type="checkbox"], 472 | input[type="radio"] { 473 | box-sizing: border-box; /* 1 */ 474 | padding: 0; /* 2 */ 475 | *height: 13px; /* 3 */ 476 | *width: 13px; /* 3 */ 477 | } 478 | 479 | /** 480 | * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. 481 | * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome 482 | * (include `-moz` to future-proof). 483 | */ 484 | 485 | input[type="search"] { 486 | -webkit-appearance: textfield; /* 1 */ 487 | -moz-box-sizing: content-box; 488 | -webkit-box-sizing: content-box; /* 2 */ 489 | box-sizing: content-box; 490 | } 491 | 492 | /** 493 | * Remove inner padding and search cancel button in Safari 5 and Chrome 494 | * on OS X. 495 | */ 496 | 497 | input[type="search"]::-webkit-search-cancel-button, 498 | input[type="search"]::-webkit-search-decoration { 499 | -webkit-appearance: none; 500 | } 501 | 502 | /** 503 | * Remove inner padding and border in Firefox 3+. 504 | */ 505 | 506 | button::-moz-focus-inner, 507 | input::-moz-focus-inner { 508 | border: 0; 509 | padding: 0; 510 | } 511 | 512 | /** 513 | * 1. Remove default vertical scrollbar in IE 6/7/8/9. 514 | * 2. Improve readability and alignment in all browsers. 515 | */ 516 | 517 | textarea { 518 | overflow: auto; /* 1 */ 519 | vertical-align: top; /* 2 */ 520 | } 521 | 522 | /* ========================================================================== 523 | Tables 524 | ========================================================================== */ 525 | 526 | /** 527 | * Remove most spacing between table cells. 528 | */ 529 | 530 | table { 531 | border-collapse: collapse; 532 | border-spacing: 0; 533 | } 534 | -------------------------------------------------------------------------------- /examples/templates/basic/doc/TOC.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) 2 | 3 | # HTML5 Boilerplate documentation: 4 | 5 | ## Getting started 6 | 7 | * [Usage](usage.md) — Overview of the project contents. 8 | * [FAQ](faq.md) — Frequently asked questions, along with their answers. 9 | 10 | ## The core of HTML5 Boilerplate 11 | 12 | * [HTML](html.md) — A guide to the default HTML. 13 | * [CSS](css.md) — A guide to the default CSS. 14 | * [JavaScript](js.md) — A guide to the default JavaScript. 15 | * [.htaccess](https://github.com/h5bp/server-configs/blob/master/apache/README.md) 16 | — All about the Apache web server config (also see our 17 | [alternative server configs](https://github.com/h5bp/server-configs)). 18 | * [crossdomain.xml](crossdomain.md) — An introduction to making use of 19 | crossdomain requests. 20 | * [Everything else](misc.md). 21 | 22 | ## Development 23 | 24 | * [Extending and customizing HTML5 Boilerplate](extend.md) — Going further with 25 | the boilerplate. 26 | 27 | ## Related projects 28 | 29 | HTML5 Boilerplate has several related projects to help improve the performance 30 | of your site/app in various production environments. 31 | 32 | * [Server configs](https://github.com/h5bp/server-configs) — Configs for 33 | different servers. 34 | * [Node build script](https://github.com/h5bp/node-build-script) — A 35 | feature-rich [grunt](https://github.com/gruntjs/grunt) plugin. 36 | * [Ant build script](https://github.com/h5bp/ant-build-script) — The original 37 | HTML5 Boilerplate build script. 38 | -------------------------------------------------------------------------------- /examples/templates/basic/doc/crossdomain.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # crossdomain.xml 5 | 6 | A cross-domain policy file is an XML document that grants a web client—such as 7 | Adobe Flash Player, Adobe Reader, etc., permission to handle data across 8 | multiple domains. When a client hosts content from a particular source domain 9 | and that content makes requests directed towards a domain other than its own, 10 | the remote domain would need to host a cross-domain policy file that grants 11 | access to the source domain, allowing the client to continue with the 12 | transaction. Policy files grant read access to data, permit a client to include 13 | custom headers in cross-domain requests, and are also used with sockets to 14 | grant permissions for socket-based connections. 15 | 16 | For full details, check out Adobe's article about the [cross-domain policy file 17 | specification](http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html). 18 | -------------------------------------------------------------------------------- /examples/templates/basic/doc/css.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # The CSS 5 | 6 | The HTML5 Boilerplate starting CSS includes: 7 | 8 | * [Normalize.css](https://github.com/necolas/normalize.css). 9 | * Useful HTML5 Boilerplate defaults. 10 | * Common helpers. 11 | * Placeholder media queries. 12 | * Print styles. 13 | 14 | This starting CSS does not rely on the presence of conditional classnames, 15 | conditional style sheets, or Modernizr. It is ready to use whatever your 16 | development preferences happen to be. 17 | 18 | 19 | ## Normalize.css 20 | 21 | Normalize.css is a modern, HTML5-ready alternative to CSS resets. It contains 22 | extensive inline documentation. Please refer to the [Normalize.css 23 | project](http://necolas.github.com/normalize.css/) for more information. 24 | 25 | 26 | ## HTML5 Boilerplate defaults 27 | 28 | This project includes a handful of base styles that build upon Normalize.css. 29 | These include: 30 | 31 | * Basic typography settings to provide improved text readability by default. 32 | * Protection against unwanted `text-shadow` during text highlighting. 33 | * Tweaks to default image alignment, fieldsets, and textareas. 34 | * A pretty Chrome Frame prompt. 35 | 36 | You are free to modify or add to these base styles as your project requires. 37 | 38 | 39 | ## Common helpers 40 | 41 | #### `.ir` 42 | 43 | Add the `.ir` class to any element you are applying image-replacement to. When 44 | replacing an element's content with an image, make sure to also set a specific 45 | `background-image: url(pathtoimage.png);`, `width`, and `height` so that your 46 | replacement image appears. 47 | 48 | #### `.hidden` 49 | 50 | Add the `.hidden` class to any elements that you want to hide from all 51 | presentations, including screen readers. It could be an element that will be 52 | populated later with JavaScript or an element you will hide with JavaScript. Do 53 | not use this for SEO keyword stuffing. That is just not cool. 54 | 55 | #### `.visuallyhidden` 56 | 57 | Add the `.visuallyhidden` class to hide text from browsers but make it 58 | available for screen readers. You can use this to hide text that is specific to 59 | screen readers but that other users should not see. [About invisible 60 | content](http://www.webaim.org/techniques/css/invisiblecontent/), [Hiding 61 | content for 62 | accessibility](http://snook.ca/archives/html_and_css/hiding-content-for-accessibility), 63 | [HTML5 Boilerplate 64 | issue/research](https://github.com/h5bp/html5-boilerplate/issues/194/). 65 | 66 | #### `.invisible` 67 | 68 | Add the `.invisible` class to any element you want to hide without affecting 69 | layout. When you use `display: none` an element is effectively removed from the 70 | layout. But in some cases you want the element to simply be invisible while 71 | remaining in the flow and not affecting the positioning of surrounding 72 | content. 73 | 74 | #### `.clearfix` 75 | 76 | Adding `.clearfix` to an element will ensure that it always fully contains its 77 | floated children. There have been many variants of the clearfix hack over the 78 | years, and there are other hacks that can also help you to contain floated 79 | children, but the HTML5 Boilerplate currently uses the [micro 80 | clearfix](http://nicolasgallagher.com/micro-clearfix-hack/). 81 | 82 | 83 | ## Media Queries 84 | 85 | The boilerplate makes it easy to get started with a "Mobile First" and 86 | [Responsive Web 87 | Design](http://www.alistapart.com/articles/responsive-web-design/) approach to 88 | development. But it's worth remembering that there are [no silver 89 | bullets](http://www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/). 90 | 91 | We include a placeholder Media Queries to build up your mobile styles for wider 92 | viewports and high-resolution displays. It's recommended that you adapt these 93 | Media Queries based on the content of your site rather than mirroring the fixed 94 | dimensions of specific devices. 95 | 96 | If you do not want to take a "Mobile First" approach, you can simply edit or 97 | remove these placeholder Media Queries. One possibility would be to work from 98 | wide viewports down and use `max-width` MQs instead, e.g., `@media only screen 99 | and (max-width: 480px)`. 100 | 101 | Take a look into the [Mobile 102 | Boilerplate](https://github.com/h5bp/mobile-boilerplate) for features that are 103 | useful when developing mobile wep apps. 104 | 105 | 106 | ## Print styles 107 | 108 | * Print styles are inlined to [reduce the number of page 109 | requests](http://www.phpied.com/delay-loading-your-print-css/). 110 | * We strip all background colors and change the font color to dark gray and 111 | remove text-shadow. This is meant to help save printer ink. 112 | * Anchors do not need colors to indicate they are linked. They are underlined 113 | to indicate so. 114 | * Anchors and Abbreviations are expanded to indicate where users reading the 115 | printed page can refer to. 116 | * But we do not want to show link text for image replaced elements (given that 117 | they are primarily images). 118 | 119 | ### Paged media styles 120 | 121 | * Paged media is supported only in a [few 122 | browsers](http://en.wikipedia.org/wiki/Comparison_of_layout_engines_%28Cascading_Style_Sheets%29#Grammar_and_rules). 123 | * Paged media support means browsers would know how to interpret instructions 124 | on breaking content into pages and on orphans/widows. 125 | * We use `page-break-inside: avoid;` to prevent an image and table row from 126 | being split into two different pages, so use the same `page-break-inside: 127 | avoid;` for that as well. 128 | * Headings should always appear with the text they are titles for. So, we 129 | ensure headings never appear in a different page than the text they describe 130 | by using `page-break-after: avoid;`. 131 | * We also apply a default margin for the page specified in `cm`. 132 | * We do not want [orphans and 133 | widows](http://en.wikipedia.org/wiki/Widows_and_orphans) to appear on pages 134 | you print. So, by defining `orphans: 3` and `widows: 3` you define the minimal 135 | number of words that every line should contain. 136 | -------------------------------------------------------------------------------- /examples/templates/basic/doc/faq.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # Frequently asked questions 5 | 6 | ### Why is the URL for jQuery without "http"? 7 | 8 | This is an intentional use of [protocol-relative 9 | URLs](http://paulirish.com/2010/the-protocol-relative-url/) 10 | 11 | **N.B.** Using a protocol-relative URL for files that exist on a CDN is 12 | problematic when you try to view your local files directly in the browser. The 13 | browser will attempt to fetch the file from your local file system. We 14 | recommend that you use a local server to test your pages (or Dropbox). This can 15 | be done using Python 2.x by running `python -m SimpleHTTPServer` or Python 3.x 16 | with `python -m http.server` from your local directory, using Ruby by installing 17 | and running [asdf](https://rubygems.org/gems/asdf), and by installing any one of 18 | XAMPP, MAMP, or WAMP. 19 | 20 | ### Why don't you automatically load the latest version of jQuery from the Google CDN? 21 | 22 | 1. The latest version of jQuery may not be compatible with the existing 23 | plugins/code on the site. Version updating should be an intentional 24 | decision. 25 | 2. The latest version has a very short `max-age=3600` compares to the specific 26 | version of `max-age=31536000`, which means you won't get the benefits of 27 | long-term caching. 28 | 29 | 30 | ### Why is the Google Analytics code at the bottom? Google recommends it be placed the `head`. 31 | 32 | The advantage to placing it in the `head` is that you will track a user's 33 | pageview even if they leave the page before it has been fully loaded. However, 34 | putting the code at the bottom keeps all the scripts together and reinforces 35 | that scripts at the bottom are the right move. 36 | 37 | 38 | ### How can I integrate [Twitter Bootstrap](http://twitter.github.com/bootstrap/) with HTML5 Boilerplate? 39 | 40 | You can use [Initializr](http://initializr.com) to create a custom build that 41 | includes HTML5 Boilerplate with Twitter Bootstrap. 42 | 43 | Read more about how [HTML5 Boilerplate and Twitter Bootstrap complement each 44 | other](http://www.quora.com/Is-Bootstrap-a-complement-OR-an-alternative-to-HTML5-Boilerplate-or-viceversa/answer/Nicolas-Gallagher). 45 | 46 | 47 | ### How do I prevent phone numbers looking twice as large and having a Skype highlight? 48 | 49 | If this is occurring, it is because a user has the Skype browser extension 50 | installed. 51 | 52 | Use the following CSS to prevent Skype from formatting the numbers on your 53 | page: 54 | 55 | ```css 56 | span.skype_pnh_container { 57 | display: none !important; 58 | } 59 | 60 | span.skype_pnh_print_container { 61 | display: inline !important; 62 | } 63 | ``` 64 | 65 | 66 | ### Do I need to upgrade my sites each time a new version of HTML5 Boilerplate is released? 67 | 68 | No. You don't normally replace the foundations of a house once it has been 69 | built. There is nothing stopping you from trying to work in the latest changes 70 | but you'll have to assess the costs/benefits of doing so. 71 | 72 | 73 | ### Where can I get help for support questions? 74 | 75 | Please ask for help on 76 | [StackOverflow](http://stackoverflow.com/questions/tagged/html5boilerplate). 77 | -------------------------------------------------------------------------------- /examples/templates/basic/doc/html.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # The HTML 5 | 6 | ## Conditional `html` classes 7 | 8 | A series of IE conditional comments apply the relevant IE-specific classes to 9 | the `html` tag. This provides one method of specifying CSS fixes for specific 10 | legacy versions of IE. While you may or may not choose to use this technique in 11 | your project code, HTML5 Boilerplate's default CSS does not rely on it. 12 | 13 | When using the conditional classes technique, applying classes to the `html` 14 | element has several benefits: 15 | 16 | * It avoids a [file blocking 17 | issue](http://webforscher.wordpress.com/2010/05/20/ie-6-slowing-down-ie-8/) 18 | discovered by Stoyan Stefanov and Markus Leptien. 19 | * It avoids the need for an empty comment that also fixes the above issue. 20 | * CMSes like WordPress and Drupal use the body class more heavily. This makes 21 | integrating there a touch simpler. 22 | * It still validates as HTML5. 23 | * It uses the same element as Modernizr (and Dojo). That feels nice. 24 | * It can improve the clarity of code in multi-developer teams. 25 | 26 | 27 | ## The `no-js` class 28 | 29 | Allows you to more easily explicitly add custom styles when JavaScript is 30 | disabled (`no-js`) or enabled (`js`). More here: [Avoiding the 31 | FOUC](http://paulirish.com/2009/avoiding-the-fouc-v3/). 32 | 33 | 34 | ## The order of meta tags, and `` 35 | 36 | As recommended by [the HTML5 37 | spec](http://www.whatwg.org/specs/web-apps/current-work/complete/semantics.html#charset) 38 | (4.2.5.5 Specifying the document's character encoding), add your charset 39 | declaration early (before any ASCII art ;) to avoid a potential 40 | [encoding-related security 41 | issue](http://code.google.com/p/doctype/wiki/ArticleUtf7) in IE. It should come 42 | in the first [1024 43 | bytes](http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#charset). 44 | 45 | The charset should also come before the `<title>` tag, due to [potential XSS 46 | vectors](http://code.google.com/p/doctype-mirror/wiki/ArticleUtf7). 47 | 48 | The meta tag for compatibility mode [needs to be before all elements except 49 | title and meta](http://h5bp.com/f "Defining Document Compatibility - MSDN"). 50 | And that same meta tag can only be invoked for Google Chrome Frame if it is 51 | within the [first 1024 52 | bytes](http://code.google.com/p/chromium/issues/detail?id=23003). 53 | 54 | 55 | ## X-UA-Compatible 56 | 57 | This makes sure the latest version of IE is used in versions of IE that contain 58 | multiple rendering engines. Even if a site visitor is using IE8 or IE9, it's 59 | possible that they're not using the latest rendering engine their browser 60 | contains. To fix this, use: 61 | 62 | ```html 63 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 64 | ``` 65 | 66 | The `meta` tag tells the IE rendering engine two things: 67 | 68 | 1. It should use the latest, or edge, version of the IE rendering environment 69 | 2. If already installed, it should use the Google Chrome Frame rendering 70 | engine. 71 | 72 | This `meta` tag ensures that anyone browsing your site in IE is treated to the 73 | best possible user experience that their browser can offer. 74 | 75 | This line breaks validation, and the Google Chrome Frame part won't work inside 76 | a conditional comment. To avoid these edge case issues it is recommended that 77 | you **remove this line and use the `.htaccess`** (or other server config) 78 | to send these headers instead. You also might want to read [Validating: 79 | X-UA-Compatible](http://groups.google.com/group/html5boilerplate/browse_thread/thread/6d1b6b152aca8ed2). 80 | 81 | If you are serving your site on a non-standard port, you will need to set this 82 | header on the server-side. This is because the IE preference option 'Display 83 | intranet sites in Compatibility View' is checked by default. 84 | 85 | 86 | ## Mobile viewport 87 | 88 | There are a few different options that you can use with the [`viewport` meta 89 | tag](https://docs.google.com/present/view?id=dkx3qtm_22dxsrgcf4 "Viewport and 90 | Media Queries - The Complete Idiot's Guide"). You can find out more in [the 91 | Apple developer docs](http://j.mp/mobileviewport). HTML5 Boilerplate comes with 92 | a simple setup that strikes a good balance for general use cases. 93 | 94 | ```html 95 | <meta name="viewport" content="width=device-width"> 96 | ``` 97 | 98 | ## Favicons and Touch Icons 99 | 100 | The shortcut icons should be put in the root directory of your site. HTML5 101 | Boilerplate comes with a default set of icons (include favicon and Apple Touch 102 | Icons) that you can use as a baseline to create your own. 103 | 104 | If your site or icons are in a sub-directory, you will need to reference the 105 | icons using `link` elements placed in the HTML `head` of your document. 106 | 107 | For a comprehensive overview, please read [Everything you always wanted to know 108 | about touch icons](http://mathiasbynens.be/notes/touch-icons) by Mathias 109 | Bynens. 110 | 111 | 112 | ## Modernizr 113 | 114 | HTML5 Boilerplate uses a custom build of Modernizr. 115 | 116 | [Modernizr](http://modernizr.com) is a JavaScript library which adds classes to 117 | the `html` element based on the results of feature test and which ensures that 118 | all browsers can make use of HTML5 elements (as it includes the HTML5 Shiv). 119 | This allows you to target parts of your CSS and JavaScript based on the 120 | features supported by a browser. 121 | 122 | In general, in order to keep page load times to a minimum, it's best to call 123 | any JavaScript at the end of the page because if a script is slow to load 124 | from an external server it may cause the whole page to hang. That said, the 125 | Modernizr script *needs* to run *before* the browser begins rendering the page, 126 | so that browsers lacking support for some of the new HTML5 elements are able to 127 | handle them properly. Therefore the Modernizr script is the only JavaScript 128 | file synchronously loaded at the top of the document. 129 | 130 | 131 | ## The content area 132 | 133 | The central part of the boilerplate template is pretty much empty. This is 134 | intentional, in order to make the boilerplate suitable for both web page and 135 | web app development. 136 | 137 | ### Google Chrome Frame 138 | 139 | The main content area of the boilerplate includes a prompt to install Chrome 140 | Frame (which no longer requires administrative rights) for users of IE 6. If 141 | you intended to support IE 6, then you should remove the snippet of code. 142 | 143 | ### Google CDN for jQuery 144 | 145 | The Google CDN version of the jQuery JavaScript library is referenced towards 146 | the bottom of the page using a protocol-independent path (read more about this 147 | in the [FAQ](faq.md)). A local fallback of jQuery is included for rare instances 148 | when the CDN version might not be available, and to facilitate offline 149 | development. 150 | 151 | Regardless of which JavaScript library you choose to use, it is well worth the 152 | time and effort to look up and reference the Google CDN (Content Delivery 153 | Network) version. Your users may already have this version cached in their 154 | browsers, and Google's CDN is likely to deliver the asset faster than your 155 | server. 156 | 157 | ### Google Analytics Tracking Code 158 | 159 | Finally, an optimized version of the latest Google Analytics tracking code is 160 | included. Google recommends that this script be placed at the top of the page. 161 | Factors to consider: if you place this script at the top of the page, you’ll be 162 | able to count users who don’t fully load the page, and you’ll incur the max 163 | number of simultaneous connections of the browser. 164 | 165 | Further information: 166 | 167 | * [Optimizing the asynchronous Google Analytics 168 | snippet](http://mathiasbynens.be/notes/async-analytics-snippet). 169 | * [Tracking Site Activity - Google 170 | Analytics](http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html). 171 | -------------------------------------------------------------------------------- /examples/templates/basic/doc/js.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # The JavaScript 5 | 6 | Information about the default JavaScript included in the project. 7 | 8 | ## main.js 9 | 10 | This file can be used to contain or reference your site/app JavaScript code. 11 | For larger projects, you can make use of a JavaScript module loader, like 12 | [Require.js](http://requirejs.org/), to load any other scripts you need to 13 | run. 14 | 15 | ## plugins.js 16 | 17 | This file can be used to contain all your plugins, such as jQuery plugins and 18 | other 3rd party scripts. 19 | 20 | One approach is to put jQuery plugins inside of a `(function($){ ... 21 | })(jQuery);` closure to make sure they're in the jQuery namespace safety 22 | blanket. Read more about [jQuery plugin 23 | authoring](http://docs.jquery.com/Plugins/Authoring#Getting_Started) 24 | 25 | ## vendor 26 | 27 | This directory can be used to contain all 3rd party library code. 28 | 29 | Minified versions of the latest jQuery and Modernizr libraries are included by 30 | default. You may wish to create your own [custom Modernizr 31 | build](http://www.modernizr.com/download/). 32 | -------------------------------------------------------------------------------- /examples/templates/basic/doc/misc.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # Miscellaneous 5 | 6 | ## .gitignore 7 | 8 | HTML5 Boilerplate includes a basic project-level `.gitignore`. This should 9 | primarily be used to avoid certain project-level files and directories from 10 | being kept under source control. Different development-environments will 11 | benefit from different collections of ignores. 12 | 13 | OS-specific and editor-specific files should be ignored using a "global 14 | ignore" that applies to all repositories on your system. 15 | 16 | For example, add the following to your `~/.gitconfig`, where the `.gitignore` 17 | in your HOME directory contains the files and directories you'd like to 18 | globally ignore: 19 | 20 | ```gitignore 21 | [core] 22 | excludesfile = ~/.gitignore 23 | ``` 24 | 25 | * More on global ignores: http://help.github.com/ignore-files/ 26 | * Comprehensive set of ignores on GitHub: https://github.com/github/gitignore 27 | -------------------------------------------------------------------------------- /examples/templates/basic/doc/usage.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # Usage 5 | 6 | Once you have cloned or downloaded HTML5 Boilerplate, creating a site or app 7 | usually involves the following: 8 | 9 | 1. Set up the basic structure of the site. 10 | 2. Add some content, style, and functionality. 11 | 3. Run your site locally to see how it looks. 12 | 4. (Optionally run a build script to automate the optimization of your site - 13 | e.g. [ant build script](https://github.com/h5bp/ant-build-script) or [node 14 | build script](https://github.com/h5bp/node-build-script)). 15 | 5. Deploy your site. 16 | 17 | 18 | ## Basic structure 19 | 20 | A basic HTML5 Boilerplate site initially looks something like this: 21 | 22 | ``` 23 | . 24 | ├── css 25 | │ ├── main.css 26 | │ └── normalize.css 27 | ├── doc 28 | ├── img 29 | ├── js 30 | │ ├── main.js 31 | │ ├── plugins.js 32 | │ └── vendor 33 | │ ├── jquery.min.js 34 | │ └── modernizr.min.js 35 | ├── .htaccess 36 | ├── 404.html 37 | ├── index.html 38 | ├── humans.txt 39 | ├── robots.txt 40 | ├── crossdomain.xml 41 | ├── favicon.ico 42 | └── [apple-touch-icons] 43 | ``` 44 | 45 | What follows is a general overview of each major part and how to use them. 46 | 47 | ### css 48 | 49 | This directory should contain all your project's CSS files. It includes some 50 | initial CSS to help get you started from a solid foundation. [About the 51 | CSS](css.md). 52 | 53 | ### doc 54 | 55 | This directory contains all the HTML5 Boilerplate documentation. You can use it 56 | as the location and basis for your own project's documentation. 57 | 58 | ### js 59 | 60 | This directory should contain all your project's JS files. Libraries, plugins, 61 | and custom code can all be included here. It includes some initial JS to help 62 | get you started. [About the JavaScript](js.md). 63 | 64 | ### .htaccess 65 | 66 | The default web server config is for Apache. [About the .htaccess](htaccess.md). 67 | 68 | Host your site on a server other than Apache? You're likely to find the 69 | corresponding configuration file in our [server configs 70 | repo](https://github.com/h5bp/server-configs). If you cannot find a 71 | configuration file for your setup, please consider contributing one so that 72 | others can benefit too. 73 | 74 | ### 404.html 75 | 76 | A helpful custom 404 to get you started. 77 | 78 | ### index.html 79 | 80 | This is the default HTML skeleton that should form the basis of all pages on 81 | your site. If you are using a server-side templating framework, then you will 82 | need to integrate this starting HTML with your setup. 83 | 84 | Make sure that you update the URLs for the referenced CSS and JavaScript if you 85 | modify the directory structure at all. 86 | 87 | If you are using Google Analytics, make sure that you edit the corresponding 88 | snippet at the bottom to include your analytics ID. 89 | 90 | ### humans.txt 91 | 92 | Edit this file to include the team that worked on your site/app, and the 93 | technology powering it. 94 | 95 | ### robots.txt 96 | 97 | Edit this file to include any pages you need hidden from search engines. 98 | 99 | ### crossdomain.xml 100 | 101 | A template for working with cross-domain requests. [About 102 | crossdomain.xml](crossdomain.md). 103 | 104 | ### icons 105 | 106 | Replace the default `favicon.ico` and apple touch icons with your own. You 107 | might want to check out Hans Christian's handy [HTML5 Boilerplate Favicon and 108 | Apple Touch Icon 109 | PSD-Template](http://drublic.de/blog/html5-boilerplate-favicons-psd-template/). 110 | -------------------------------------------------------------------------------- /examples/templates/basic/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/examples/templates/basic/favicon.ico -------------------------------------------------------------------------------- /examples/templates/basic/humans.txt: -------------------------------------------------------------------------------- 1 | # humanstxt.org/ 2 | # The humans responsible & technology colophon 3 | 4 | # TEAM 5 | 6 | <name> -- <role> -- <twitter> 7 | 8 | # THANKS 9 | 10 | <name> 11 | 12 | # TECHNOLOGY COLOPHON 13 | 14 | HTML5, CSS3 15 | Normalize.css, jQuery, Modernizr 16 | -------------------------------------------------------------------------------- /examples/templates/basic/img/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/examples/templates/basic/img/.gitignore -------------------------------------------------------------------------------- /examples/templates/basic/img/big-white-chicken.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/examples/templates/basic/img/big-white-chicken.jpg -------------------------------------------------------------------------------- /examples/templates/basic/index.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> 3 | <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> 4 | <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> 5 | <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> 6 | <head> 7 | <meta charset="utf-8"> 8 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 9 | <title> 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 |

Hello world! This is HTML5 Boilerplate.

26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /examples/templates/basic/js/main.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/templates/basic/js/plugins.js: -------------------------------------------------------------------------------- 1 | // Avoid `console` errors in browsers that lack a console. 2 | (function() { 3 | var method; 4 | var noop = function () {}; 5 | var methods = [ 6 | 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 7 | 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 8 | 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', 9 | 'timeStamp', 'trace', 'warn' 10 | ]; 11 | var length = methods.length; 12 | var console = (window.console = window.console || {}); 13 | 14 | while (length--) { 15 | method = methods[length]; 16 | 17 | // Only stub undefined methods. 18 | if (!console[method]) { 19 | console[method] = noop; 20 | } 21 | } 22 | }()); 23 | 24 | // Place any jQuery/helper plugins in here. 25 | -------------------------------------------------------------------------------- /examples/templates/basic/js/vendor/modernizr-2.6.2.min.js: -------------------------------------------------------------------------------- 1 | /* Modernizr 2.6.2 (Custom Build) | MIT & BSD 2 | * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load 3 | */ 4 | ;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f { 52 | if (type === "js") { 53 | return this.page.addScriptTag({ 54 | path: filePath, 55 | }) 56 | } 57 | if (type === "css") { 58 | return this.page.addStyleTag({ 59 | path: filePath, 60 | }) 61 | } 62 | }) 63 | includePromises.push(() => { 64 | return this.page.addStyleTag({ 65 | path: getTemplateFilePath("pdf.css"), 66 | }) 67 | }) 68 | includePromises.push(() => { 69 | return this.page.addStyleTag({ 70 | path: getTemplateFilePath("highlight.css"), 71 | }) 72 | }) 73 | return Promise.all(includePromises) 74 | } 75 | 76 | async start() { 77 | this.server = new Server(this.options) 78 | await this.server.listen() 79 | this.browser = await puppeteer.launch(this.options.launchOptions) 80 | this.page = await this.browser.newPage() 81 | await this.page.goto(this.server.address(), { 82 | waitUntil: "networkidle0", 83 | }) 84 | if (this.options.body && /^\s*/.test(this.options.body)) { 85 | await this.page.setContent(this.options.body, { 86 | waitUntil: "networkidle0", 87 | }) 88 | } else if (this.options.body) { 89 | await this.page.evaluate((body) => { 90 | document.querySelector("body").innerHTML = body 91 | }, this.options.body) 92 | } 93 | await this.includeAssets() 94 | if (this.options.renderDelay) { 95 | await this.page.waitFor(this.options.renderDelay) 96 | } 97 | return this.page 98 | } 99 | 100 | async build() { 101 | const buf = await this.page.pdf(this.options.pdf) 102 | if (!this.options.pdf.path) { 103 | return buf 104 | } 105 | } 106 | 107 | async close() { 108 | await this.browser.close() 109 | await this.server.close() 110 | } 111 | } 112 | 113 | module.exports = HTML5ToPDF 114 | -------------------------------------------------------------------------------- /lib/server.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs") 2 | const http = require("http") 3 | const path = require("path") 4 | const { URL, parse } = require("url") 5 | 6 | class StaticServer { 7 | constructor({ templatePath }) { 8 | this.templatePath = templatePath 9 | this.server = http.createServer(this._handleRequest.bind(this)) 10 | } 11 | 12 | address() { 13 | let { address, port } = this.server.address() 14 | if (address === "::") { 15 | address = "localhost" 16 | } 17 | return new URL(`http://${address}:${port}`).toString() 18 | } 19 | 20 | listen() { 21 | return new Promise((resolve, reject) => { 22 | this.server.listen((err) => { 23 | if (err) { 24 | return reject(err) 25 | } 26 | resolve() 27 | }) 28 | }) 29 | } 30 | 31 | close() { 32 | return new Promise((resolve, reject) => { 33 | this.server.close((err) => { 34 | if (err) { 35 | return reject(err) 36 | } 37 | resolve() 38 | }) 39 | }) 40 | } 41 | 42 | _handleRequest(req, res) { 43 | const { pathname } = parse(req.url) 44 | let filePath = path.join(this.templatePath, pathname) 45 | fs.exists(filePath, (exists) => { 46 | if (!exists) { 47 | res.statusCode = 404 48 | return res.end(`File ${filePath} not found!`) 49 | } 50 | 51 | if (fs.statSync(filePath).isDirectory()) { 52 | filePath += "/index.html" 53 | } 54 | 55 | fs.readFile(filePath, (err, data) => { 56 | if (err) { 57 | res.statusCode = 500 58 | res.end(`Error getting the file: ${err}.`) 59 | } else { 60 | res.end(data) 61 | } 62 | }) 63 | }) 64 | } 65 | } 66 | 67 | class ExistingServer { 68 | constructor({ templateUrl }) { 69 | this.templateUrl = templateUrl 70 | } 71 | async listen() {} 72 | address() { 73 | return new URL(this.templateUrl).toString() 74 | } 75 | async close() {} 76 | } 77 | 78 | class Server { 79 | constructor({ templatePath, templateUrl }) { 80 | if (templateUrl) { 81 | return new ExistingServer({ templateUrl }) 82 | } 83 | return new StaticServer({ templatePath }) 84 | } 85 | } 86 | 87 | module.exports = Server 88 | -------------------------------------------------------------------------------- /lib/util.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs") 2 | const path = require("path") 3 | const toString = require("lodash/toString") 4 | const isPlainObject = require("lodash/isPlainObject") 5 | 6 | const convertPath = (filePath) => { 7 | if (path.isAbsolute(filePath)) return filePath 8 | return path.join(process.cwd(), filePath) 9 | } 10 | 11 | const getTemplateFilePath = ({ templatePath, template = "html5bp" }) => { 12 | if (templatePath) return templatePath 13 | return path.resolve(path.join(__dirname, "..", "templates", template)) 14 | } 15 | 16 | const readBodyOrFile = (body, filePath) => { 17 | if (body) { 18 | return toString(body) 19 | } 20 | if (!filePath) { 21 | return 22 | } 23 | if (fs.statSync(filePath).isDirectory()) { 24 | return 25 | } 26 | return fs.readFileSync(convertPath(filePath), "utf-8") 27 | } 28 | 29 | const convertIncludes = (includes) => { 30 | if (!includes || !Array.isArray(includes)) return [] 31 | 32 | return includes.map((include) => { 33 | if (typeof include === "string") { 34 | return { 35 | type: path.extname(include).replace(".", ""), 36 | filePath: include, 37 | } 38 | } 39 | if (isPlainObject(include)) { 40 | return include 41 | } 42 | }) 43 | } 44 | 45 | module.exports = { 46 | readBodyOrFile, 47 | convertPath, 48 | convertIncludes, 49 | getTemplateFilePath, 50 | } 51 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "html5-to-pdf", 3 | "version": "4.0.1", 4 | "description": "HTML5 to PDF converter", 5 | "main": "lib/index.js", 6 | "scripts": { 7 | "lint": "eslint *.js ./lib/*.js ./examples/*.js" 8 | }, 9 | "engineStrict": true, 10 | "engines": { 11 | "node": ">=10.18.0" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git@github.com:peterdemartini/html5-to-pdf.git" 16 | }, 17 | "license": "MIT", 18 | "keywords": [ 19 | "html5", 20 | "pdf", 21 | "convert", 22 | "template", 23 | "generator" 24 | ], 25 | "author": "Peter DeMartini", 26 | "homepage": "https://github.com/peterdemartini/html5-to-pdf", 27 | "licenses": [ 28 | { 29 | "type": "MIT", 30 | "url": "https://github.com/peterdemartini/html5-to-pdf/blob/master/LICENSE" 31 | } 32 | ], 33 | "dependencies": { 34 | "colors": "^1.3.3", 35 | "commander": "^7.0.0", 36 | "lodash": "^4.17.15", 37 | "puppeteer": "^7.1.0" 38 | }, 39 | "devDependencies": { 40 | "eslint": "^7.5.0", 41 | "eslint-config-prettier": "^7.0.0", 42 | "eslint-plugin-prettier": "^3.1.0", 43 | "prettier": "^2.0.5" 44 | }, 45 | "bin": { 46 | "html5-to-pdf": "./command.js" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /templates/highlight.css: -------------------------------------------------------------------------------- 1 | .hll { background-color: #ffffcc } 2 | .c { color: #999988; font-style: italic } /* Comment */ 3 | .err { color: #a61717; background-color: #e3d2d2 } /* Error */ 4 | .k { color: #000000; font-weight: bold } /* Keyword */ 5 | .o { color: #000000; font-weight: bold } /* Operator */ 6 | .cm { color: #999988; font-style: italic } /* Comment.Multiline */ 7 | .cp { color: #999999; font-weight: bold; font-style: italic } /* Comment.Preproc */ 8 | .c1 { color: #999988; font-style: italic } /* Comment.Single */ 9 | .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ 10 | .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ 11 | .ge { color: #000000; font-style: italic } /* Generic.Emph */ 12 | .gr { color: #aa0000 } /* Generic.Error */ 13 | .gh { color: #999999 } /* Generic.Heading */ 14 | .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ 15 | .go { color: #888888 } /* Generic.Output */ 16 | .gp { color: #555555 } /* Generic.Prompt */ 17 | .gs { font-weight: bold } /* Generic.Strong */ 18 | .gu { color: #aaaaaa } /* Generic.Subheading */ 19 | .gt { color: #aa0000 } /* Generic.Traceback */ 20 | .kc { color: #000000; font-weight: bold } /* Keyword.Constant */ 21 | .kd { color: #000000; font-weight: bold } /* Keyword.Declaration */ 22 | .kn { color: #000000; font-weight: bold } /* Keyword.Namespace */ 23 | .kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */ 24 | .kr { color: #000000; font-weight: bold } /* Keyword.Reserved */ 25 | .kt { color: #445588; font-weight: bold } /* Keyword.Type */ 26 | .m { color: #009999 } /* Literal.Number */ 27 | .s { color: #d01040 } /* Literal.String */ 28 | .na { color: #008080 } /* Name.Attribute */ 29 | .nb { color: #0086B3 } /* Name.Builtin */ 30 | .nc { color: #445588; font-weight: bold } /* Name.Class */ 31 | .no { color: #008080 } /* Name.Constant */ 32 | .nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */ 33 | .ni { color: #800080 } /* Name.Entity */ 34 | .ne { color: #990000; font-weight: bold } /* Name.Exception */ 35 | .nf { color: #990000; font-weight: bold } /* Name.Function */ 36 | .nl { color: #990000; font-weight: bold } /* Name.Label */ 37 | .nn { color: #555555 } /* Name.Namespace */ 38 | .nt { color: #000080 } /* Name.Tag */ 39 | .nv { color: #008080 } /* Name.Variable */ 40 | .ow { color: #000000; font-weight: bold } /* Operator.Word */ 41 | .w { color: #bbbbbb } /* Text.Whitespace */ 42 | .mf { color: #009999 } /* Literal.Number.Float */ 43 | .mh { color: #009999 } /* Literal.Number.Hex */ 44 | .mi { color: #009999 } /* Literal.Number.Integer */ 45 | .mo { color: #009999 } /* Literal.Number.Oct */ 46 | .sb { color: #d01040 } /* Literal.String.Backtick */ 47 | .sc { color: #d01040 } /* Literal.String.Char */ 48 | .sd { color: #d01040 } /* Literal.String.Doc */ 49 | .s2 { color: #d01040 } /* Literal.String.Double */ 50 | .se { color: #d01040 } /* Literal.String.Escape */ 51 | .sh { color: #d01040 } /* Literal.String.Heredoc */ 52 | .si { color: #d01040 } /* Literal.String.Interpol */ 53 | .sx { color: #d01040 } /* Literal.String.Other */ 54 | .sr { color: #009926 } /* Literal.String.Regex */ 55 | .s1 { color: #d01040 } /* Literal.String.Single */ 56 | .ss { color: #990073 } /* Literal.String.Symbol */ 57 | .bp { color: #999999 } /* Name.Builtin.Pseudo */ 58 | .vc { color: #008080 } /* Name.Variable.Class */ 59 | .vg { color: #008080 } /* Name.Variable.Global */ 60 | .vi { color: #008080 } /* Name.Variable.Instance */ 61 | .il { color: #009999 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /templates/html5bp/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto -------------------------------------------------------------------------------- /templates/html5bp/.gitignore: -------------------------------------------------------------------------------- 1 | # Include your project-specific ignores in this file 2 | # Read about how to use .gitignore: https://help.github.com/articles/ignoring-files 3 | -------------------------------------------------------------------------------- /templates/html5bp/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Page Not Found :( 6 | 141 | 142 | 143 |
144 |

Not found :(

145 |

Sorry, but the page you were trying to view does not exist.

146 |

It looks like this was the result of either:

147 |
    148 |
  • a mistyped address
  • 149 |
  • an out-of-date link
  • 150 |
151 | 154 | 155 |
156 | 157 | 158 | -------------------------------------------------------------------------------- /templates/html5bp/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### HEAD 2 | 3 | ### 4.2.0 (April 8, 2013) 4 | 5 | * Remove Google Analytics protocol check ([#1319](https://github.com/h5bp/html5-boilerplate/pull/1319)). 6 | * Update to Normalize.css 1.1.1. 7 | * Update Apache configurations to include the latest changes in the canonical 8 | [`.htaccess`](https://github.com/h5bp/server-configs/blob/master/apache/.htaccess) 9 | file. 10 | * Use a protocol relative URL for the 404 template script. 11 | * Update to jQuery 1.9.1. 12 | 13 | ### 4.1.0 (January 21, 2013) 14 | 15 | * Update to Normalize.css 1.1.0. 16 | * Update to jQuery 1.9.0. 17 | 18 | ### 4.0.3 (January 12, 2013) 19 | 20 | * Use 32x32 favicon.ico ([#1286](https://github.com/h5bp/html5-boilerplate/pull/1286)). 21 | * Remove named function expression in plugins.js ([#1280](https://github.com/h5bp/html5-boilerplate/pull/1280)). 22 | * Adjust CSS image-replacement code ([#1239](https://github.com/h5bp/html5-boilerplate/issues/1239)). 23 | * Update HiDPI example media query ([#1127](https://github.com/h5bp/html5-boilerplate/issues/1127)). 24 | 25 | ### 4.0.2 (December 9, 2012) 26 | 27 | * Update placeholder icons. 28 | * Update to Normalize.css 1.0.2. 29 | * Update to jQuery 1.8.3. 30 | 31 | ### 4.0.1 (October 20, 2012) 32 | 33 | * Further improvements to `console` method stubbing ([#1206](https://github.com/h5bp/html5-boilerplate/issues/1206), [#1229](https://github.com/h5bp/html5-boilerplate/pull/1229)). 34 | * Update to jQuery 1.8.2. 35 | * Update to Modernizr 2.6.2. 36 | * Minor additions to the documentation. 37 | 38 | ### 4.0.0 (August 28, 2012) 39 | 40 | * Improve the Apache compression configuration ([#1012](https://github.com/h5bp/html5-boilerplate/issues/1012), [#1173](https://github.com/h5bp/html5-boilerplate/issues/1173)). 41 | * Add a HiDPI example media query ([#1127](https://github.com/h5bp/html5-boilerplate/issues/1127)). 42 | * Add bundled docs ([#1154](https://github.com/h5bp/html5-boilerplate/issues/1154)). 43 | * Add MIT license ([#1139](https://github.com/h5bp/html5-boilerplate/issues/1139)). 44 | * Update to Normalize.css 1.0.1. 45 | * Separate Normalize.css from the rest of the CSS ([#1160](https://github.com/h5bp/html5-boilerplate/issues/1160)). 46 | * Improve `console.log` protection ([#1107](https://github.com/h5bp/html5-boilerplate/issues/1107)). 47 | * Replace hot pink text selection color with a neutral color. 48 | * Change image replacement technique ([#1149](https://github.com/h5bp/html5-boilerplate/issues/1149)). 49 | * Code format and consistency changes ([#1112](https://github.com/h5bp/html5-boilerplate/issues/1112)). 50 | * Rename CSS file and rename JS files and subdirectories. 51 | * Update to jQuery 1.8 ([#1161](https://github.com/h5bp/html5-boilerplate/issues/1161)). 52 | * Update to Modernizr 2.6.1 ([#1086](https://github.com/h5bp/html5-boilerplate/issues/1086)). 53 | * Remove uncompressed jQuery ([#1153](https://github.com/h5bp/html5-boilerplate/issues/1153)). 54 | * Remove superfluous inline comments ([#1150](https://github.com/h5bp/html5-boilerplate/issues/1150)). 55 | 56 | ### 3.0.2 (February 19, 2012) 57 | 58 | * Update to Modernizr 2.5.3. 59 | 60 | ### 3.0.1 (February 08, 2012). 61 | 62 | * Update to Modernizr 2.5.2 (includes html5shiv 3.3). 63 | 64 | ### 3.0.0 (February 06, 2012) 65 | 66 | * Improvements to `.htaccess`. 67 | * Improve 404 design. 68 | * Simplify JS folder structure. 69 | * Change `html` IE class names changed to target ranges rather than specific versions of IE. 70 | * Update CSS to include latest normalize.css changes and better typographic defaults ([#825](https://github.com/h5bp/html5-boilerplate/issues/825)). 71 | * Update to Modernizr 2.5 (includes yepnope 1.5 and html5shiv 3.2). 72 | * Update to jQuery 1.7.1. 73 | * Revert to async snippet for the Google Analytics script. 74 | * Remove the ant build script ([#826](https://github.com/h5bp/html5-boilerplate/issues/826)). 75 | * Remove Respond.js ([#816](https://github.com/h5bp/html5-boilerplate/issues/816)). 76 | * Remove the `demo/` directory ([#808](https://github.com/h5bp/html5-boilerplate/issues/808)). 77 | * Remove the `test/` directory ([#808](https://github.com/h5bp/html5-boilerplate/issues/808)). 78 | * Remove Google Chrome Frame script for IE6 users; replace with links to Chrome Frame and options for alternative browsers. 79 | * Remove `initial-scale=1` from the viewport `meta` ([#824](https://github.com/h5bp/html5-boilerplate/issues/824)). 80 | * Remove `defer` from all scripts to avoid legacy IE bugs. 81 | * Remove explicit Site Speed tracking for Google Analytics. It's now enabled by default. 82 | 83 | ### 2.0.0 (August 10, 2011) 84 | 85 | * Change starting CSS to be based on normalize.css instead of reset.css ([#500](https://github.com/h5bp/html5-boilerplate/issues/500)). 86 | * Add Respond.js media query polyfill. 87 | * Add Google Chrome Frame script prompt for IE6 users. 88 | * Simplify the `html` conditional comments for modern browsers and add an `oldie` class. 89 | * Update clearfix to use "micro clearfix". 90 | * Add placeholder CSS MQs for mobile-first approach. 91 | * Add `textarea { resize: vertical; }` to only allow vertical resizing. 92 | * Add `img { max-width: 100%; }` to the print styles; prevents images being truncated. 93 | * Add Site Speed tracking for Google Analytics. 94 | * Update to jQuery 1.6.2 (and use minified by default). 95 | * Update to Modernizr 2.0 Complete, Production minified (includes yepnope, html5shiv, and Respond.js). 96 | * Use `Modernizr.load()` to load the Google Analytics script. 97 | * Much faster build process. 98 | * Add build script options for CSSLint, JSLint, JSHint tools. 99 | * Build script now compresses all images in subfolders. 100 | * Build script now versions files by SHA hash. 101 | * Many `.htaccess` improvements including: disable directory browsing, improved support for all versions of Apache, more robust and extensive HTTP compression rules. 102 | * Remove `handheld.css` as it has very poor device support. 103 | * Remove touch-icon `link` elements from the HTML and include improved touch-icon support. 104 | * Remove the cache-busting query paramaters from files references in the HTML. 105 | * Remove IE6 PNGFix. 106 | 107 | ### 1.0.0 (March 21, 2011) 108 | 109 | * Rewrite build script to make it more customizable and flexible. 110 | * Add a humans.txt. 111 | * Numerous `.htaccess` improvements (including inline documentation). 112 | * Move the alternative server configurations to the H5BP server configs repo. 113 | * Use a protocol-relative url to reference jQuery and prevent mixed content warnings. 114 | * Optimize the Google Analytics snippet. 115 | * Use Eric Meyer's recent CSS reset update and the HTML5 Doctor reset. 116 | * More robust `sub`/`sup` CSS styles. 117 | * Add keyboard `.focusable` helper class that extends `.visuallyhidden`. 118 | * Print styles no longer print hash or JavaScript links. 119 | * Add a print reset for IE's proprietary filters. 120 | * Remove IE9-specific conditional class on the `html` element. 121 | * Remove margins from lists within `nav` elements. 122 | * Remove YUI profiling. 123 | -------------------------------------------------------------------------------- /templates/html5bp/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to HTML5 Boilerplate 2 | 3 | ♥ [HTML5 Boilerplate](http://html5boilerplate.com) and want to get involved? 4 | Thanks! There are plenty of ways you can help! 5 | 6 | 7 | ## Bugs 8 | 9 | A bug is a _demonstrable problem_ that is caused by the code in the 10 | repository. Good bug reports are extremely helpful - thank you! 11 | 12 | Guidelines for bug reports: 13 | 14 | 1. **Use the GitHub issue search** — check if the issue has already been 15 | reported. 16 | 17 | 2. **Check if the issue has been fixed** — try to reproduce it using the 18 | latest `master` branch in the repository. 19 | 20 | 3. **Isolate the problem** — ideally create a [reduced test 21 | case](http://css-tricks.com/6263-reduced-test-cases/) and a live example. 22 | 23 | A good bug report shouldn't leave others needing to chase you up for more 24 | information. Please try to be as detailed as possible in your report. What is 25 | your environment? What steps will reproduce the issue? What browser(s) and OS 26 | experience the problem? What would you expect to be the outcome? All these 27 | details will help people to fix any potential bugs. 28 | 29 | Example: 30 | 31 | > Short and descriptive example bug report title 32 | > 33 | > A summary of the issue and the browser/OS environment in which it occurs. If 34 | > suitable, include the steps required to reproduce the bug. 35 | > 36 | > 1. This is the first step 37 | > 2. This is the second step 38 | > 3. Further steps, etc. 39 | > 40 | > `` (a link to the reduced test case) 41 | > 42 | > Any other information you want to share that is relevant to the issue being 43 | > reported. This might include the lines of code that you have identified as 44 | > causing the bug, and potential solutions (and your opinions on their 45 | > merits). 46 | 47 | **[File a bug report](https://github.com/h5bp/html5-boilerplate/issues/)** 48 | 49 | 50 | ## Pull requests 51 | 52 | Good pull requests - patches, improvements, new features - are a fantastic 53 | help. They should remain focused in scope and avoid containing unrelated 54 | commits. If your contribution involves a significant amount of work or substantial 55 | changes to any part of the project, please open an issue to discuss it first. 56 | 57 | Make sure to adhere to the coding conventions used throughout a project 58 | (indentation, accurate comments, etc.). Please update any documentation that is 59 | relevant to the change you're making. 60 | 61 | Please follow this process; it's the best way to get your work included in the 62 | project: 63 | 64 | 1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, 65 | and configure the remotes: 66 | 67 | ```bash 68 | # Clones your fork of the repo into the current directory in terminal 69 | git clone https://github.com//html5-boilerplate.git 70 | # Navigate to the newly cloned directory 71 | cd html5-boilerplate 72 | # Assigns the original repo to a remote called "upstream" 73 | git remote add upstream https://github.com/h5bp/html5-boilerplate.git 74 | ``` 75 | 76 | 2. If you cloned a while ago, get the latest changes from upstream: 77 | 78 | ```bash 79 | git checkout master 80 | git pull upstream master 81 | ``` 82 | 83 | 3. Create a new topic branch to contain your feature, change, or fix: 84 | 85 | ```bash 86 | git checkout -b 87 | ``` 88 | 89 | 4. Commit your changes in logical chunks. Please adhere to these [git commit 90 | message 91 | guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) 92 | or your pull request is unlikely be merged into the main project. Use git's 93 | [interactive rebase](https://help.github.com/articles/interactive-rebase) 94 | feature to tidy up your commits before making them public. 95 | 96 | 5. Locally merge (or rebase) the upstream development branch into your topic branch: 97 | 98 | ```bash 99 | git pull [--rebase] upstream master 100 | ``` 101 | 102 | 6. Push your topic branch up to your fork: 103 | 104 | ```bash 105 | git push origin 106 | ``` 107 | 108 | 10. [Open a Pull Request](https://help.github.com/articles/using-pull-requests) with a 109 | clear title and description. 110 | 111 | 112 | ## Do not… 113 | 114 | Please **do not** use the issue tracker for personal support requests (use 115 | [StackOverflow](http://stackoverflow.com/questions/tagged/html5boilerplate) or IRC). 116 | 117 | Please **do not** derail or troll issues. Keep the 118 | discussion on topic and respect the opinions of others. 119 | -------------------------------------------------------------------------------- /templates/html5bp/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) HTML5 Boilerplate 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /templates/html5bp/README.md: -------------------------------------------------------------------------------- 1 | # [HTML5 Boilerplate](http://html5boilerplate.com) 2 | 3 | HTML5 Boilerplate is a professional front-end template for building fast, 4 | robust, and adaptable web apps or sites. 5 | 6 | This project is the product of many years of iterative development and combined 7 | community knowledge. It does not impose a specific development philosophy or 8 | framework, so you're free to architect your code in the way that you want. 9 | 10 | * Source: [https://github.com/h5bp/html5-boilerplate](https://github.com/h5bp/html5-boilerplate) 11 | * Homepage: [http://html5boilerplate.com](http://html5boilerplate.com) 12 | * Twitter: [@h5bp](http://twitter.com/h5bp) 13 | 14 | 15 | ## Quick start 16 | 17 | Choose one of the following options: 18 | 19 | 1. Download the latest stable release from 20 | [html5boilerplate.com](http://html5boilerplate.com/) or a custom build from 21 | [Initializr](http://www.initializr.com). 22 | 2. Clone the git repo — `git clone 23 | https://github.com/h5bp/html5-boilerplate.git` - and checkout the tagged 24 | release you'd like to use. 25 | 26 | 27 | ## Features 28 | 29 | * HTML5 ready. Use the new elements with confidence. 30 | * Cross-browser compatible (Chrome, Opera, Safari, Firefox 3.6+, IE6+). 31 | * Designed with progressive enhancement in mind. 32 | * Includes [Normalize.css](http://necolas.github.com/normalize.css/) for CSS 33 | normalizations and common bug fixes. 34 | * The latest [jQuery](http://jquery.com/) via CDN, with a local fallback. 35 | * The latest [Modernizr](http://modernizr.com/) build for feature detection. 36 | * IE-specific classes for easier cross-browser control. 37 | * Placeholder CSS Media Queries. 38 | * Useful CSS helpers. 39 | * Default print CSS, performance optimized. 40 | * Protection against any stray `console.log` causing JavaScript errors in 41 | IE6/7. 42 | * An optimized Google Analytics snippet. 43 | * Apache server caching, compression, and other configuration defaults for 44 | Grade-A performance. 45 | * Cross-domain Ajax and Flash. 46 | * "Delete-key friendly." Easy to strip out parts you don't need. 47 | * Extensive inline and accompanying documentation. 48 | 49 | 50 | ## Documentation 51 | 52 | Take a look at the [documentation table of contents](doc/TOC.md). This 53 | documentation is bundled with the project, which makes it readily available for 54 | offline reading and provides a useful starting point for any documentation you 55 | want to write about your project. 56 | 57 | 58 | ## Contributing 59 | 60 | Anyone and everyone is welcome to [contribute](CONTRIBUTING.md). Hundreds of 61 | developers have helped make the HTML5 Boilerplate what it is today. 62 | -------------------------------------------------------------------------------- /templates/html5bp/apple-touch-icon-114x114-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/templates/html5bp/apple-touch-icon-114x114-precomposed.png -------------------------------------------------------------------------------- /templates/html5bp/apple-touch-icon-144x144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/templates/html5bp/apple-touch-icon-144x144-precomposed.png -------------------------------------------------------------------------------- /templates/html5bp/apple-touch-icon-57x57-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/templates/html5bp/apple-touch-icon-57x57-precomposed.png -------------------------------------------------------------------------------- /templates/html5bp/apple-touch-icon-72x72-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/templates/html5bp/apple-touch-icon-72x72-precomposed.png -------------------------------------------------------------------------------- /templates/html5bp/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/templates/html5bp/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /templates/html5bp/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/templates/html5bp/apple-touch-icon.png -------------------------------------------------------------------------------- /templates/html5bp/crossdomain.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /templates/html5bp/css/main.css: -------------------------------------------------------------------------------- 1 | /* 2 | * HTML5 Boilerplate 3 | * 4 | * What follows is the result of much research on cross-browser styling. 5 | * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, 6 | * Kroc Camen, and the H5BP dev community and team. 7 | */ 8 | 9 | /* ========================================================================== 10 | Base styles: opinionated defaults 11 | ========================================================================== */ 12 | 13 | html, 14 | button, 15 | input, 16 | select, 17 | textarea { 18 | color: #222; 19 | } 20 | 21 | body { 22 | font-size: 1em; 23 | line-height: 1.4; 24 | } 25 | 26 | /* 27 | * Remove text-shadow in selection highlight: h5bp.com/i 28 | * These selection rule sets have to be separate. 29 | * Customize the background color to match your design. 30 | */ 31 | 32 | ::-moz-selection { 33 | background: #b3d4fc; 34 | text-shadow: none; 35 | } 36 | 37 | ::selection { 38 | background: #b3d4fc; 39 | text-shadow: none; 40 | } 41 | 42 | /* 43 | * A better looking default horizontal rule 44 | */ 45 | 46 | hr { 47 | display: block; 48 | height: 1px; 49 | border: 0; 50 | border-top: 1px solid #ccc; 51 | margin: 1em 0; 52 | padding: 0; 53 | } 54 | 55 | /* 56 | * Remove the gap between images and the bottom of their containers: h5bp.com/i/440 57 | */ 58 | 59 | img { 60 | vertical-align: middle; 61 | } 62 | 63 | /* 64 | * Remove default fieldset styles. 65 | */ 66 | 67 | fieldset { 68 | border: 0; 69 | margin: 0; 70 | padding: 0; 71 | } 72 | 73 | /* 74 | * Allow only vertical resizing of textareas. 75 | */ 76 | 77 | textarea { 78 | resize: vertical; 79 | } 80 | 81 | /* ========================================================================== 82 | Chrome Frame prompt 83 | ========================================================================== */ 84 | 85 | .chromeframe { 86 | margin: 0.2em 0; 87 | background: #ccc; 88 | color: #000; 89 | padding: 0.2em 0; 90 | } 91 | 92 | /* ========================================================================== 93 | Author's custom styles 94 | ========================================================================== */ 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | /* ========================================================================== 113 | Helper classes 114 | ========================================================================== */ 115 | 116 | /* 117 | * Image replacement 118 | */ 119 | 120 | .ir { 121 | background-color: transparent; 122 | border: 0; 123 | overflow: hidden; 124 | /* IE 6/7 fallback */ 125 | *text-indent: -9999px; 126 | } 127 | 128 | .ir:before { 129 | content: ""; 130 | display: block; 131 | width: 0; 132 | height: 150%; 133 | } 134 | 135 | /* 136 | * Hide from both screenreaders and browsers: h5bp.com/u 137 | */ 138 | 139 | .hidden { 140 | display: none !important; 141 | visibility: hidden; 142 | } 143 | 144 | /* 145 | * Hide only visually, but have it available for screenreaders: h5bp.com/v 146 | */ 147 | 148 | .visuallyhidden { 149 | border: 0; 150 | clip: rect(0 0 0 0); 151 | height: 1px; 152 | margin: -1px; 153 | overflow: hidden; 154 | padding: 0; 155 | position: absolute; 156 | width: 1px; 157 | } 158 | 159 | /* 160 | * Extends the .visuallyhidden class to allow the element to be focusable 161 | * when navigated to via the keyboard: h5bp.com/p 162 | */ 163 | 164 | .visuallyhidden.focusable:active, 165 | .visuallyhidden.focusable:focus { 166 | clip: auto; 167 | height: auto; 168 | margin: 0; 169 | overflow: visible; 170 | position: static; 171 | width: auto; 172 | } 173 | 174 | /* 175 | * Hide visually and from screenreaders, but maintain layout 176 | */ 177 | 178 | .invisible { 179 | visibility: hidden; 180 | } 181 | 182 | /* 183 | * Clearfix: contain floats 184 | * 185 | * For modern browsers 186 | * 1. The space content is one way to avoid an Opera bug when the 187 | * `contenteditable` attribute is included anywhere else in the document. 188 | * Otherwise it causes space to appear at the top and bottom of elements 189 | * that receive the `clearfix` class. 190 | * 2. The use of `table` rather than `block` is only necessary if using 191 | * `:before` to contain the top-margins of child elements. 192 | */ 193 | 194 | .clearfix:before, 195 | .clearfix:after { 196 | content: " "; /* 1 */ 197 | display: table; /* 2 */ 198 | } 199 | 200 | .clearfix:after { 201 | clear: both; 202 | } 203 | 204 | /* 205 | * For IE 6/7 only 206 | * Include this rule to trigger hasLayout and contain floats. 207 | */ 208 | 209 | .clearfix { 210 | *zoom: 1; 211 | } 212 | 213 | /* ========================================================================== 214 | EXAMPLE Media Queries for Responsive Design. 215 | These examples override the primary ('mobile first') styles. 216 | Modify as content requires. 217 | ========================================================================== */ 218 | 219 | @media only screen and (min-width: 35em) { 220 | /* Style adjustments for viewports that meet the condition */ 221 | } 222 | 223 | @media print, 224 | (-o-min-device-pixel-ratio: 5/4), 225 | (-webkit-min-device-pixel-ratio: 1.25), 226 | (min-resolution: 120dpi) { 227 | /* Style adjustments for high resolution devices */ 228 | } 229 | 230 | /* ========================================================================== 231 | Print styles. 232 | Inlined to avoid required HTTP connection: h5bp.com/r 233 | ========================================================================== */ 234 | 235 | @media print { 236 | 237 | a, 238 | a:visited { 239 | text-decoration: underline; 240 | } 241 | 242 | a[href]:after { 243 | content: " (" attr(href) ")"; 244 | } 245 | 246 | abbr[title]:after { 247 | content: " (" attr(title) ")"; 248 | } 249 | 250 | /* 251 | * Don't show links for images, or javascript/internal links 252 | */ 253 | 254 | .ir a:after, 255 | a[href^="javascript:"]:after, 256 | a[href^="#"]:after { 257 | content: ""; 258 | } 259 | 260 | pre, 261 | blockquote { 262 | border: 1px solid #999; 263 | page-break-inside: avoid; 264 | } 265 | 266 | thead { 267 | display: table-header-group; /* h5bp.com/t */ 268 | } 269 | 270 | tr, 271 | img { 272 | page-break-inside: avoid; 273 | } 274 | 275 | img { 276 | max-width: 100%; 277 | } 278 | 279 | @page { 280 | margin: 0.5cm; 281 | } 282 | 283 | p, 284 | h2, 285 | h3 { 286 | orphans: 3; 287 | widows: 3; 288 | } 289 | 290 | h2, 291 | h3 { 292 | page-break-after: avoid; 293 | } 294 | } 295 | -------------------------------------------------------------------------------- /templates/html5bp/css/normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v1.1.1 | MIT License | git.io/normalize */ 2 | 3 | /* ========================================================================== 4 | HTML5 display definitions 5 | ========================================================================== */ 6 | 7 | /** 8 | * Correct `block` display not defined in IE 6/7/8/9 and Firefox 3. 9 | */ 10 | 11 | article, 12 | aside, 13 | details, 14 | figcaption, 15 | figure, 16 | footer, 17 | header, 18 | hgroup, 19 | main, 20 | nav, 21 | section, 22 | summary { 23 | display: block; 24 | } 25 | 26 | /** 27 | * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. 28 | */ 29 | 30 | audio, 31 | canvas, 32 | video { 33 | display: inline-block; 34 | *display: inline; 35 | *zoom: 1; 36 | } 37 | 38 | /** 39 | * Prevent modern browsers from displaying `audio` without controls. 40 | * Remove excess height in iOS 5 devices. 41 | */ 42 | 43 | audio:not([controls]) { 44 | display: none; 45 | height: 0; 46 | } 47 | 48 | /** 49 | * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4. 50 | * Known issue: no IE 6 support. 51 | */ 52 | 53 | [hidden] { 54 | display: none; 55 | } 56 | 57 | /* ========================================================================== 58 | Base 59 | ========================================================================== */ 60 | 61 | /** 62 | * 1. Prevent system color scheme's background color being used in Firefox, IE, 63 | * and Opera. 64 | * 2. Prevent system color scheme's text color being used in Firefox, IE, and 65 | * Opera. 66 | * 3. Correct text resizing oddly in IE 6/7 when body `font-size` is set using 67 | * `em` units. 68 | * 4. Prevent iOS text size adjust after orientation change, without disabling 69 | * user zoom. 70 | */ 71 | 72 | html { 73 | background: #fff; /* 1 */ 74 | color: #000; /* 2 */ 75 | font-size: 100%; /* 3 */ 76 | -webkit-text-size-adjust: 100%; /* 4 */ 77 | -ms-text-size-adjust: 100%; /* 4 */ 78 | } 79 | 80 | /** 81 | * Address `font-family` inconsistency between `textarea` and other form 82 | * elements. 83 | */ 84 | 85 | html, 86 | button, 87 | input, 88 | select, 89 | textarea { 90 | font-family: sans-serif; 91 | } 92 | 93 | /** 94 | * Address margins handled incorrectly in IE 6/7. 95 | */ 96 | 97 | body { 98 | margin: 0; 99 | } 100 | 101 | /* ========================================================================== 102 | Links 103 | ========================================================================== */ 104 | 105 | /** 106 | * Address `outline` inconsistency between Chrome and other browsers. 107 | */ 108 | 109 | a:focus { 110 | outline: thin dotted; 111 | } 112 | 113 | /** 114 | * Improve readability when focused and also mouse hovered in all browsers. 115 | */ 116 | 117 | a:active, 118 | a:hover { 119 | outline: 0; 120 | } 121 | 122 | /* ========================================================================== 123 | Typography 124 | ========================================================================== */ 125 | 126 | /** 127 | * Address font sizes and margins set differently in IE 6/7. 128 | * Address font sizes within `section` and `article` in Firefox 4+, Safari 5, 129 | * and Chrome. 130 | */ 131 | 132 | h1 { 133 | font-size: 2em; 134 | margin: 0.67em 0; 135 | } 136 | 137 | h2 { 138 | font-size: 1.5em; 139 | margin: 0.83em 0; 140 | } 141 | 142 | h3 { 143 | font-size: 1.17em; 144 | margin: 1em 0; 145 | } 146 | 147 | h4 { 148 | font-size: 1em; 149 | margin: 1.33em 0; 150 | } 151 | 152 | h5 { 153 | font-size: 0.83em; 154 | margin: 1.67em 0; 155 | } 156 | 157 | h6 { 158 | font-size: 0.67em; 159 | margin: 2.33em 0; 160 | } 161 | 162 | /** 163 | * Address styling not present in IE 7/8/9, Safari 5, and Chrome. 164 | */ 165 | 166 | abbr[title] { 167 | border-bottom: 1px dotted; 168 | } 169 | 170 | /** 171 | * Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome. 172 | */ 173 | 174 | b, 175 | strong { 176 | font-weight: bold; 177 | } 178 | 179 | blockquote { 180 | margin: 1em 40px; 181 | } 182 | 183 | /** 184 | * Address styling not present in Safari 5 and Chrome. 185 | */ 186 | 187 | dfn { 188 | font-style: italic; 189 | } 190 | 191 | /** 192 | * Address differences between Firefox and other browsers. 193 | * Known issue: no IE 6/7 normalization. 194 | */ 195 | 196 | hr { 197 | -moz-box-sizing: content-box; 198 | box-sizing: content-box; 199 | height: 0; 200 | } 201 | 202 | /** 203 | * Address styling not present in IE 6/7/8/9. 204 | */ 205 | 206 | mark { 207 | background: #ff0; 208 | color: #000; 209 | } 210 | 211 | /** 212 | * Address margins set differently in IE 6/7. 213 | */ 214 | 215 | p, 216 | pre { 217 | margin: 1em 0; 218 | } 219 | 220 | /** 221 | * Correct font family set oddly in IE 6, Safari 4/5, and Chrome. 222 | */ 223 | 224 | code, 225 | kbd, 226 | pre, 227 | samp { 228 | font-family: monospace, serif; 229 | _font-family: 'courier new', monospace; 230 | font-size: 1em; 231 | } 232 | 233 | /** 234 | * Improve readability of pre-formatted text in all browsers. 235 | */ 236 | 237 | pre { 238 | white-space: pre; 239 | white-space: pre-wrap; 240 | word-wrap: break-word; 241 | } 242 | 243 | /** 244 | * Address CSS quotes not supported in IE 6/7. 245 | */ 246 | 247 | q { 248 | quotes: none; 249 | } 250 | 251 | /** 252 | * Address `quotes` property not supported in Safari 4. 253 | */ 254 | 255 | q:before, 256 | q:after { 257 | content: ''; 258 | content: none; 259 | } 260 | 261 | /** 262 | * Address inconsistent and variable font size in all browsers. 263 | */ 264 | 265 | small { 266 | font-size: 80%; 267 | } 268 | 269 | /** 270 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 271 | */ 272 | 273 | sub, 274 | sup { 275 | font-size: 75%; 276 | line-height: 0; 277 | position: relative; 278 | vertical-align: baseline; 279 | } 280 | 281 | sup { 282 | top: -0.5em; 283 | } 284 | 285 | sub { 286 | bottom: -0.25em; 287 | } 288 | 289 | /* ========================================================================== 290 | Lists 291 | ========================================================================== */ 292 | 293 | /** 294 | * Address margins set differently in IE 6/7. 295 | */ 296 | 297 | dl, 298 | menu, 299 | ol, 300 | ul { 301 | margin: 1em 0; 302 | } 303 | 304 | dd { 305 | margin: 0 0 0 40px; 306 | } 307 | 308 | /** 309 | * Address paddings set differently in IE 6/7. 310 | */ 311 | 312 | menu, 313 | ol, 314 | ul { 315 | padding: 0 0 0 40px; 316 | } 317 | 318 | /** 319 | * Correct list images handled incorrectly in IE 7. 320 | */ 321 | 322 | nav ul, 323 | nav ol { 324 | list-style: none; 325 | list-style-image: none; 326 | } 327 | 328 | /* ========================================================================== 329 | Embedded content 330 | ========================================================================== */ 331 | 332 | /** 333 | * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3. 334 | * 2. Improve image quality when scaled in IE 7. 335 | */ 336 | 337 | img { 338 | border: 0; /* 1 */ 339 | -ms-interpolation-mode: bicubic; /* 2 */ 340 | } 341 | 342 | /** 343 | * Correct overflow displayed oddly in IE 9. 344 | */ 345 | 346 | svg:not(:root) { 347 | overflow: hidden; 348 | } 349 | 350 | /* ========================================================================== 351 | Figures 352 | ========================================================================== */ 353 | 354 | /** 355 | * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11. 356 | */ 357 | 358 | figure { 359 | margin: 0; 360 | } 361 | 362 | /* ========================================================================== 363 | Forms 364 | ========================================================================== */ 365 | 366 | /** 367 | * Correct margin displayed oddly in IE 6/7. 368 | */ 369 | 370 | form { 371 | margin: 0; 372 | } 373 | 374 | /** 375 | * Define consistent border, margin, and padding. 376 | */ 377 | 378 | fieldset { 379 | border: 1px solid #c0c0c0; 380 | margin: 0 2px; 381 | padding: 0.35em 0.625em 0.75em; 382 | } 383 | 384 | /** 385 | * 1. Correct color not being inherited in IE 6/7/8/9. 386 | * 2. Correct text not wrapping in Firefox 3. 387 | * 3. Correct alignment displayed oddly in IE 6/7. 388 | */ 389 | 390 | legend { 391 | border: 0; /* 1 */ 392 | padding: 0; 393 | white-space: normal; /* 2 */ 394 | *margin-left: -7px; /* 3 */ 395 | } 396 | 397 | /** 398 | * 1. Correct font size not being inherited in all browsers. 399 | * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5, 400 | * and Chrome. 401 | * 3. Improve appearance and consistency in all browsers. 402 | */ 403 | 404 | button, 405 | input, 406 | select, 407 | textarea { 408 | font-size: 100%; /* 1 */ 409 | margin: 0; /* 2 */ 410 | vertical-align: baseline; /* 3 */ 411 | *vertical-align: middle; /* 3 */ 412 | } 413 | 414 | /** 415 | * Address Firefox 3+ setting `line-height` on `input` using `!important` in 416 | * the UA stylesheet. 417 | */ 418 | 419 | button, 420 | input { 421 | line-height: normal; 422 | } 423 | 424 | /** 425 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 426 | * All other form control elements do not inherit `text-transform` values. 427 | * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+. 428 | * Correct `select` style inheritance in Firefox 4+ and Opera. 429 | */ 430 | 431 | button, 432 | select { 433 | text-transform: none; 434 | } 435 | 436 | /** 437 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 438 | * and `video` controls. 439 | * 2. Correct inability to style clickable `input` types in iOS. 440 | * 3. Improve usability and consistency of cursor style between image-type 441 | * `input` and others. 442 | * 4. Remove inner spacing in IE 7 without affecting normal text inputs. 443 | * Known issue: inner spacing remains in IE 6. 444 | */ 445 | 446 | button, 447 | html input[type="button"], /* 1 */ 448 | input[type="reset"], 449 | input[type="submit"] { 450 | -webkit-appearance: button; /* 2 */ 451 | cursor: pointer; /* 3 */ 452 | *overflow: visible; /* 4 */ 453 | } 454 | 455 | /** 456 | * Re-set default cursor for disabled elements. 457 | */ 458 | 459 | button[disabled], 460 | html input[disabled] { 461 | cursor: default; 462 | } 463 | 464 | /** 465 | * 1. Address box sizing set to content-box in IE 8/9. 466 | * 2. Remove excess padding in IE 8/9. 467 | * 3. Remove excess padding in IE 7. 468 | * Known issue: excess padding remains in IE 6. 469 | */ 470 | 471 | input[type="checkbox"], 472 | input[type="radio"] { 473 | box-sizing: border-box; /* 1 */ 474 | padding: 0; /* 2 */ 475 | *height: 13px; /* 3 */ 476 | *width: 13px; /* 3 */ 477 | } 478 | 479 | /** 480 | * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. 481 | * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome 482 | * (include `-moz` to future-proof). 483 | */ 484 | 485 | input[type="search"] { 486 | -webkit-appearance: textfield; /* 1 */ 487 | -moz-box-sizing: content-box; 488 | -webkit-box-sizing: content-box; /* 2 */ 489 | box-sizing: content-box; 490 | } 491 | 492 | /** 493 | * Remove inner padding and search cancel button in Safari 5 and Chrome 494 | * on OS X. 495 | */ 496 | 497 | input[type="search"]::-webkit-search-cancel-button, 498 | input[type="search"]::-webkit-search-decoration { 499 | -webkit-appearance: none; 500 | } 501 | 502 | /** 503 | * Remove inner padding and border in Firefox 3+. 504 | */ 505 | 506 | button::-moz-focus-inner, 507 | input::-moz-focus-inner { 508 | border: 0; 509 | padding: 0; 510 | } 511 | 512 | /** 513 | * 1. Remove default vertical scrollbar in IE 6/7/8/9. 514 | * 2. Improve readability and alignment in all browsers. 515 | */ 516 | 517 | textarea { 518 | overflow: auto; /* 1 */ 519 | vertical-align: top; /* 2 */ 520 | } 521 | 522 | /* ========================================================================== 523 | Tables 524 | ========================================================================== */ 525 | 526 | /** 527 | * Remove most spacing between table cells. 528 | */ 529 | 530 | table { 531 | border-collapse: collapse; 532 | border-spacing: 0; 533 | } 534 | -------------------------------------------------------------------------------- /templates/html5bp/doc/TOC.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) 2 | 3 | # HTML5 Boilerplate documentation: 4 | 5 | ## Getting started 6 | 7 | * [Usage](usage.md) — Overview of the project contents. 8 | * [FAQ](faq.md) — Frequently asked questions, along with their answers. 9 | 10 | ## The core of HTML5 Boilerplate 11 | 12 | * [HTML](html.md) — A guide to the default HTML. 13 | * [CSS](css.md) — A guide to the default CSS. 14 | * [JavaScript](js.md) — A guide to the default JavaScript. 15 | * [.htaccess](https://github.com/h5bp/server-configs/blob/master/apache/README.md) 16 | — All about the Apache web server config (also see our 17 | [alternative server configs](https://github.com/h5bp/server-configs)). 18 | * [crossdomain.xml](crossdomain.md) — An introduction to making use of 19 | crossdomain requests. 20 | * [Everything else](misc.md). 21 | 22 | ## Development 23 | 24 | * [Extending and customizing HTML5 Boilerplate](extend.md) — Going further with 25 | the boilerplate. 26 | 27 | ## Related projects 28 | 29 | HTML5 Boilerplate has several related projects to help improve the performance 30 | of your site/app in various production environments. 31 | 32 | * [Server configs](https://github.com/h5bp/server-configs) — Configs for 33 | different servers. 34 | * [Node build script](https://github.com/h5bp/node-build-script) — A 35 | feature-rich [grunt](https://github.com/gruntjs/grunt) plugin. 36 | * [Ant build script](https://github.com/h5bp/ant-build-script) — The original 37 | HTML5 Boilerplate build script. 38 | -------------------------------------------------------------------------------- /templates/html5bp/doc/crossdomain.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # crossdomain.xml 5 | 6 | A cross-domain policy file is an XML document that grants a web client—such as 7 | Adobe Flash Player, Adobe Reader, etc., permission to handle data across 8 | multiple domains. When a client hosts content from a particular source domain 9 | and that content makes requests directed towards a domain other than its own, 10 | the remote domain would need to host a cross-domain policy file that grants 11 | access to the source domain, allowing the client to continue with the 12 | transaction. Policy files grant read access to data, permit a client to include 13 | custom headers in cross-domain requests, and are also used with sockets to 14 | grant permissions for socket-based connections. 15 | 16 | For full details, check out Adobe's article about the [cross-domain policy file 17 | specification](http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html). 18 | -------------------------------------------------------------------------------- /templates/html5bp/doc/css.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # The CSS 5 | 6 | The HTML5 Boilerplate starting CSS includes: 7 | 8 | * [Normalize.css](https://github.com/necolas/normalize.css). 9 | * Useful HTML5 Boilerplate defaults. 10 | * Common helpers. 11 | * Placeholder media queries. 12 | * Print styles. 13 | 14 | This starting CSS does not rely on the presence of conditional classnames, 15 | conditional style sheets, or Modernizr. It is ready to use whatever your 16 | development preferences happen to be. 17 | 18 | 19 | ## Normalize.css 20 | 21 | Normalize.css is a modern, HTML5-ready alternative to CSS resets. It contains 22 | extensive inline documentation. Please refer to the [Normalize.css 23 | project](http://necolas.github.com/normalize.css/) for more information. 24 | 25 | 26 | ## HTML5 Boilerplate defaults 27 | 28 | This project includes a handful of base styles that build upon Normalize.css. 29 | These include: 30 | 31 | * Basic typography settings to provide improved text readability by default. 32 | * Protection against unwanted `text-shadow` during text highlighting. 33 | * Tweaks to default image alignment, fieldsets, and textareas. 34 | * A pretty Chrome Frame prompt. 35 | 36 | You are free to modify or add to these base styles as your project requires. 37 | 38 | 39 | ## Common helpers 40 | 41 | #### `.ir` 42 | 43 | Add the `.ir` class to any element you are applying image-replacement to. When 44 | replacing an element's content with an image, make sure to also set a specific 45 | `background-image: url(pathtoimage.png);`, `width`, and `height` so that your 46 | replacement image appears. 47 | 48 | #### `.hidden` 49 | 50 | Add the `.hidden` class to any elements that you want to hide from all 51 | presentations, including screen readers. It could be an element that will be 52 | populated later with JavaScript or an element you will hide with JavaScript. Do 53 | not use this for SEO keyword stuffing. That is just not cool. 54 | 55 | #### `.visuallyhidden` 56 | 57 | Add the `.visuallyhidden` class to hide text from browsers but make it 58 | available for screen readers. You can use this to hide text that is specific to 59 | screen readers but that other users should not see. [About invisible 60 | content](http://www.webaim.org/techniques/css/invisiblecontent/), [Hiding 61 | content for 62 | accessibility](http://snook.ca/archives/html_and_css/hiding-content-for-accessibility), 63 | [HTML5 Boilerplate 64 | issue/research](https://github.com/h5bp/html5-boilerplate/issues/194/). 65 | 66 | #### `.invisible` 67 | 68 | Add the `.invisible` class to any element you want to hide without affecting 69 | layout. When you use `display: none` an element is effectively removed from the 70 | layout. But in some cases you want the element to simply be invisible while 71 | remaining in the flow and not affecting the positioning of surrounding 72 | content. 73 | 74 | #### `.clearfix` 75 | 76 | Adding `.clearfix` to an element will ensure that it always fully contains its 77 | floated children. There have been many variants of the clearfix hack over the 78 | years, and there are other hacks that can also help you to contain floated 79 | children, but the HTML5 Boilerplate currently uses the [micro 80 | clearfix](http://nicolasgallagher.com/micro-clearfix-hack/). 81 | 82 | 83 | ## Media Queries 84 | 85 | The boilerplate makes it easy to get started with a "Mobile First" and 86 | [Responsive Web 87 | Design](http://www.alistapart.com/articles/responsive-web-design/) approach to 88 | development. But it's worth remembering that there are [no silver 89 | bullets](http://www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/). 90 | 91 | We include a placeholder Media Queries to build up your mobile styles for wider 92 | viewports and high-resolution displays. It's recommended that you adapt these 93 | Media Queries based on the content of your site rather than mirroring the fixed 94 | dimensions of specific devices. 95 | 96 | If you do not want to take a "Mobile First" approach, you can simply edit or 97 | remove these placeholder Media Queries. One possibility would be to work from 98 | wide viewports down and use `max-width` MQs instead, e.g., `@media only screen 99 | and (max-width: 480px)`. 100 | 101 | Take a look into the [Mobile 102 | Boilerplate](https://github.com/h5bp/mobile-boilerplate) for features that are 103 | useful when developing mobile wep apps. 104 | 105 | 106 | ## Print styles 107 | 108 | * Print styles are inlined to [reduce the number of page 109 | requests](http://www.phpied.com/delay-loading-your-print-css/). 110 | * We strip all background colors and change the font color to dark gray and 111 | remove text-shadow. This is meant to help save printer ink. 112 | * Anchors do not need colors to indicate they are linked. They are underlined 113 | to indicate so. 114 | * Anchors and Abbreviations are expanded to indicate where users reading the 115 | printed page can refer to. 116 | * But we do not want to show link text for image replaced elements (given that 117 | they are primarily images). 118 | 119 | ### Paged media styles 120 | 121 | * Paged media is supported only in a [few 122 | browsers](http://en.wikipedia.org/wiki/Comparison_of_layout_engines_%28Cascading_Style_Sheets%29#Grammar_and_rules). 123 | * Paged media support means browsers would know how to interpret instructions 124 | on breaking content into pages and on orphans/widows. 125 | * We use `page-break-inside: avoid;` to prevent an image and table row from 126 | being split into two different pages, so use the same `page-break-inside: 127 | avoid;` for that as well. 128 | * Headings should always appear with the text they are titles for. So, we 129 | ensure headings never appear in a different page than the text they describe 130 | by using `page-break-after: avoid;`. 131 | * We also apply a default margin for the page specified in `cm`. 132 | * We do not want [orphans and 133 | widows](http://en.wikipedia.org/wiki/Widows_and_orphans) to appear on pages 134 | you print. So, by defining `orphans: 3` and `widows: 3` you define the minimal 135 | number of words that every line should contain. 136 | -------------------------------------------------------------------------------- /templates/html5bp/doc/faq.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # Frequently asked questions 5 | 6 | ### Why is the URL for jQuery without "http"? 7 | 8 | This is an intentional use of [protocol-relative 9 | URLs](http://paulirish.com/2010/the-protocol-relative-url/) 10 | 11 | **N.B.** Using a protocol-relative URL for files that exist on a CDN is 12 | problematic when you try to view your local files directly in the browser. The 13 | browser will attempt to fetch the file from your local file system. We 14 | recommend that you use a local server to test your pages (or Dropbox). This can 15 | be done using Python 2.x by running `python -m SimpleHTTPServer` or Python 3.x 16 | with `python -m http.server` from your local directory, using Ruby by installing 17 | and running [asdf](https://rubygems.org/gems/asdf), and by installing any one of 18 | XAMPP, MAMP, or WAMP. 19 | 20 | ### Why don't you automatically load the latest version of jQuery from the Google CDN? 21 | 22 | 1. The latest version of jQuery may not be compatible with the existing 23 | plugins/code on the site. Version updating should be an intentional 24 | decision. 25 | 2. The latest version has a very short `max-age=3600` compares to the specific 26 | version of `max-age=31536000`, which means you won't get the benefits of 27 | long-term caching. 28 | 29 | 30 | ### Why is the Google Analytics code at the bottom? Google recommends it be placed the `head`. 31 | 32 | The advantage to placing it in the `head` is that you will track a user's 33 | pageview even if they leave the page before it has been fully loaded. However, 34 | putting the code at the bottom keeps all the scripts together and reinforces 35 | that scripts at the bottom are the right move. 36 | 37 | 38 | ### How can I integrate [Twitter Bootstrap](http://twitter.github.com/bootstrap/) with HTML5 Boilerplate? 39 | 40 | You can use [Initializr](http://initializr.com) to create a custom build that 41 | includes HTML5 Boilerplate with Twitter Bootstrap. 42 | 43 | Read more about how [HTML5 Boilerplate and Twitter Bootstrap complement each 44 | other](http://www.quora.com/Is-Bootstrap-a-complement-OR-an-alternative-to-HTML5-Boilerplate-or-viceversa/answer/Nicolas-Gallagher). 45 | 46 | 47 | ### How do I prevent phone numbers looking twice as large and having a Skype highlight? 48 | 49 | If this is occurring, it is because a user has the Skype browser extension 50 | installed. 51 | 52 | Use the following CSS to prevent Skype from formatting the numbers on your 53 | page: 54 | 55 | ```css 56 | span.skype_pnh_container { 57 | display: none !important; 58 | } 59 | 60 | span.skype_pnh_print_container { 61 | display: inline !important; 62 | } 63 | ``` 64 | 65 | 66 | ### Do I need to upgrade my sites each time a new version of HTML5 Boilerplate is released? 67 | 68 | No. You don't normally replace the foundations of a house once it has been 69 | built. There is nothing stopping you from trying to work in the latest changes 70 | but you'll have to assess the costs/benefits of doing so. 71 | 72 | 73 | ### Where can I get help for support questions? 74 | 75 | Please ask for help on 76 | [StackOverflow](http://stackoverflow.com/questions/tagged/html5boilerplate). 77 | -------------------------------------------------------------------------------- /templates/html5bp/doc/html.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # The HTML 5 | 6 | ## Conditional `html` classes 7 | 8 | A series of IE conditional comments apply the relevant IE-specific classes to 9 | the `html` tag. This provides one method of specifying CSS fixes for specific 10 | legacy versions of IE. While you may or may not choose to use this technique in 11 | your project code, HTML5 Boilerplate's default CSS does not rely on it. 12 | 13 | When using the conditional classes technique, applying classes to the `html` 14 | element has several benefits: 15 | 16 | * It avoids a [file blocking 17 | issue](http://webforscher.wordpress.com/2010/05/20/ie-6-slowing-down-ie-8/) 18 | discovered by Stoyan Stefanov and Markus Leptien. 19 | * It avoids the need for an empty comment that also fixes the above issue. 20 | * CMSes like WordPress and Drupal use the body class more heavily. This makes 21 | integrating there a touch simpler. 22 | * It still validates as HTML5. 23 | * It uses the same element as Modernizr (and Dojo). That feels nice. 24 | * It can improve the clarity of code in multi-developer teams. 25 | 26 | 27 | ## The `no-js` class 28 | 29 | Allows you to more easily explicitly add custom styles when JavaScript is 30 | disabled (`no-js`) or enabled (`js`). More here: [Avoiding the 31 | FOUC](http://paulirish.com/2009/avoiding-the-fouc-v3/). 32 | 33 | 34 | ## The order of meta tags, and `` 35 | 36 | As recommended by [the HTML5 37 | spec](http://www.whatwg.org/specs/web-apps/current-work/complete/semantics.html#charset) 38 | (4.2.5.5 Specifying the document's character encoding), add your charset 39 | declaration early (before any ASCII art ;) to avoid a potential 40 | [encoding-related security 41 | issue](http://code.google.com/p/doctype/wiki/ArticleUtf7) in IE. It should come 42 | in the first [1024 43 | bytes](http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#charset). 44 | 45 | The charset should also come before the `<title>` tag, due to [potential XSS 46 | vectors](http://code.google.com/p/doctype-mirror/wiki/ArticleUtf7). 47 | 48 | The meta tag for compatibility mode [needs to be before all elements except 49 | title and meta](http://h5bp.com/f "Defining Document Compatibility - MSDN"). 50 | And that same meta tag can only be invoked for Google Chrome Frame if it is 51 | within the [first 1024 52 | bytes](http://code.google.com/p/chromium/issues/detail?id=23003). 53 | 54 | 55 | ## X-UA-Compatible 56 | 57 | This makes sure the latest version of IE is used in versions of IE that contain 58 | multiple rendering engines. Even if a site visitor is using IE8 or IE9, it's 59 | possible that they're not using the latest rendering engine their browser 60 | contains. To fix this, use: 61 | 62 | ```html 63 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 64 | ``` 65 | 66 | The `meta` tag tells the IE rendering engine two things: 67 | 68 | 1. It should use the latest, or edge, version of the IE rendering environment 69 | 2. If already installed, it should use the Google Chrome Frame rendering 70 | engine. 71 | 72 | This `meta` tag ensures that anyone browsing your site in IE is treated to the 73 | best possible user experience that their browser can offer. 74 | 75 | This line breaks validation, and the Google Chrome Frame part won't work inside 76 | a conditional comment. To avoid these edge case issues it is recommended that 77 | you **remove this line and use the `.htaccess`** (or other server config) 78 | to send these headers instead. You also might want to read [Validating: 79 | X-UA-Compatible](http://groups.google.com/group/html5boilerplate/browse_thread/thread/6d1b6b152aca8ed2). 80 | 81 | If you are serving your site on a non-standard port, you will need to set this 82 | header on the server-side. This is because the IE preference option 'Display 83 | intranet sites in Compatibility View' is checked by default. 84 | 85 | 86 | ## Mobile viewport 87 | 88 | There are a few different options that you can use with the [`viewport` meta 89 | tag](https://docs.google.com/present/view?id=dkx3qtm_22dxsrgcf4 "Viewport and 90 | Media Queries - The Complete Idiot's Guide"). You can find out more in [the 91 | Apple developer docs](http://j.mp/mobileviewport). HTML5 Boilerplate comes with 92 | a simple setup that strikes a good balance for general use cases. 93 | 94 | ```html 95 | <meta name="viewport" content="width=device-width"> 96 | ``` 97 | 98 | ## Favicons and Touch Icons 99 | 100 | The shortcut icons should be put in the root directory of your site. HTML5 101 | Boilerplate comes with a default set of icons (include favicon and Apple Touch 102 | Icons) that you can use as a baseline to create your own. 103 | 104 | If your site or icons are in a sub-directory, you will need to reference the 105 | icons using `link` elements placed in the HTML `head` of your document. 106 | 107 | For a comprehensive overview, please read [Everything you always wanted to know 108 | about touch icons](http://mathiasbynens.be/notes/touch-icons) by Mathias 109 | Bynens. 110 | 111 | 112 | ## Modernizr 113 | 114 | HTML5 Boilerplate uses a custom build of Modernizr. 115 | 116 | [Modernizr](http://modernizr.com) is a JavaScript library which adds classes to 117 | the `html` element based on the results of feature test and which ensures that 118 | all browsers can make use of HTML5 elements (as it includes the HTML5 Shiv). 119 | This allows you to target parts of your CSS and JavaScript based on the 120 | features supported by a browser. 121 | 122 | In general, in order to keep page load times to a minimum, it's best to call 123 | any JavaScript at the end of the page because if a script is slow to load 124 | from an external server it may cause the whole page to hang. That said, the 125 | Modernizr script *needs* to run *before* the browser begins rendering the page, 126 | so that browsers lacking support for some of the new HTML5 elements are able to 127 | handle them properly. Therefore the Modernizr script is the only JavaScript 128 | file synchronously loaded at the top of the document. 129 | 130 | 131 | ## The content area 132 | 133 | The central part of the boilerplate template is pretty much empty. This is 134 | intentional, in order to make the boilerplate suitable for both web page and 135 | web app development. 136 | 137 | ### Google Chrome Frame 138 | 139 | The main content area of the boilerplate includes a prompt to install Chrome 140 | Frame (which no longer requires administrative rights) for users of IE 6. If 141 | you intended to support IE 6, then you should remove the snippet of code. 142 | 143 | ### Google CDN for jQuery 144 | 145 | The Google CDN version of the jQuery JavaScript library is referenced towards 146 | the bottom of the page using a protocol-independent path (read more about this 147 | in the [FAQ](faq.md)). A local fallback of jQuery is included for rare instances 148 | when the CDN version might not be available, and to facilitate offline 149 | development. 150 | 151 | Regardless of which JavaScript library you choose to use, it is well worth the 152 | time and effort to look up and reference the Google CDN (Content Delivery 153 | Network) version. Your users may already have this version cached in their 154 | browsers, and Google's CDN is likely to deliver the asset faster than your 155 | server. 156 | 157 | ### Google Analytics Tracking Code 158 | 159 | Finally, an optimized version of the latest Google Analytics tracking code is 160 | included. Google recommends that this script be placed at the top of the page. 161 | Factors to consider: if you place this script at the top of the page, you’ll be 162 | able to count users who don’t fully load the page, and you’ll incur the max 163 | number of simultaneous connections of the browser. 164 | 165 | Further information: 166 | 167 | * [Optimizing the asynchronous Google Analytics 168 | snippet](http://mathiasbynens.be/notes/async-analytics-snippet). 169 | * [Tracking Site Activity - Google 170 | Analytics](http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html). 171 | -------------------------------------------------------------------------------- /templates/html5bp/doc/js.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # The JavaScript 5 | 6 | Information about the default JavaScript included in the project. 7 | 8 | ## main.js 9 | 10 | This file can be used to contain or reference your site/app JavaScript code. 11 | For larger projects, you can make use of a JavaScript module loader, like 12 | [Require.js](http://requirejs.org/), to load any other scripts you need to 13 | run. 14 | 15 | ## plugins.js 16 | 17 | This file can be used to contain all your plugins, such as jQuery plugins and 18 | other 3rd party scripts. 19 | 20 | One approach is to put jQuery plugins inside of a `(function($){ ... 21 | })(jQuery);` closure to make sure they're in the jQuery namespace safety 22 | blanket. Read more about [jQuery plugin 23 | authoring](http://docs.jquery.com/Plugins/Authoring#Getting_Started) 24 | 25 | ## vendor 26 | 27 | This directory can be used to contain all 3rd party library code. 28 | 29 | Minified versions of the latest jQuery and Modernizr libraries are included by 30 | default. You may wish to create your own [custom Modernizr 31 | build](http://www.modernizr.com/download/). 32 | -------------------------------------------------------------------------------- /templates/html5bp/doc/misc.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # Miscellaneous 5 | 6 | ## .gitignore 7 | 8 | HTML5 Boilerplate includes a basic project-level `.gitignore`. This should 9 | primarily be used to avoid certain project-level files and directories from 10 | being kept under source control. Different development-environments will 11 | benefit from different collections of ignores. 12 | 13 | OS-specific and editor-specific files should be ignored using a "global 14 | ignore" that applies to all repositories on your system. 15 | 16 | For example, add the following to your `~/.gitconfig`, where the `.gitignore` 17 | in your HOME directory contains the files and directories you'd like to 18 | globally ignore: 19 | 20 | ```gitignore 21 | [core] 22 | excludesfile = ~/.gitignore 23 | ``` 24 | 25 | * More on global ignores: http://help.github.com/ignore-files/ 26 | * Comprehensive set of ignores on GitHub: https://github.com/github/gitignore 27 | -------------------------------------------------------------------------------- /templates/html5bp/doc/usage.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # Usage 5 | 6 | Once you have cloned or downloaded HTML5 Boilerplate, creating a site or app 7 | usually involves the following: 8 | 9 | 1. Set up the basic structure of the site. 10 | 2. Add some content, style, and functionality. 11 | 3. Run your site locally to see how it looks. 12 | 4. (Optionally run a build script to automate the optimization of your site - 13 | e.g. [ant build script](https://github.com/h5bp/ant-build-script) or [node 14 | build script](https://github.com/h5bp/node-build-script)). 15 | 5. Deploy your site. 16 | 17 | 18 | ## Basic structure 19 | 20 | A basic HTML5 Boilerplate site initially looks something like this: 21 | 22 | ``` 23 | . 24 | ├── css 25 | │ ├── main.css 26 | │ └── normalize.css 27 | ├── doc 28 | ├── img 29 | ├── js 30 | │ ├── main.js 31 | │ ├── plugins.js 32 | │ └── vendor 33 | │ ├── jquery.min.js 34 | │ └── modernizr.min.js 35 | ├── .htaccess 36 | ├── 404.html 37 | ├── index.html 38 | ├── humans.txt 39 | ├── robots.txt 40 | ├── crossdomain.xml 41 | ├── favicon.ico 42 | └── [apple-touch-icons] 43 | ``` 44 | 45 | What follows is a general overview of each major part and how to use them. 46 | 47 | ### css 48 | 49 | This directory should contain all your project's CSS files. It includes some 50 | initial CSS to help get you started from a solid foundation. [About the 51 | CSS](css.md). 52 | 53 | ### doc 54 | 55 | This directory contains all the HTML5 Boilerplate documentation. You can use it 56 | as the location and basis for your own project's documentation. 57 | 58 | ### js 59 | 60 | This directory should contain all your project's JS files. Libraries, plugins, 61 | and custom code can all be included here. It includes some initial JS to help 62 | get you started. [About the JavaScript](js.md). 63 | 64 | ### .htaccess 65 | 66 | The default web server config is for Apache. [About the .htaccess](htaccess.md). 67 | 68 | Host your site on a server other than Apache? You're likely to find the 69 | corresponding configuration file in our [server configs 70 | repo](https://github.com/h5bp/server-configs). If you cannot find a 71 | configuration file for your setup, please consider contributing one so that 72 | others can benefit too. 73 | 74 | ### 404.html 75 | 76 | A helpful custom 404 to get you started. 77 | 78 | ### index.html 79 | 80 | This is the default HTML skeleton that should form the basis of all pages on 81 | your site. If you are using a server-side templating framework, then you will 82 | need to integrate this starting HTML with your setup. 83 | 84 | Make sure that you update the URLs for the referenced CSS and JavaScript if you 85 | modify the directory structure at all. 86 | 87 | If you are using Google Analytics, make sure that you edit the corresponding 88 | snippet at the bottom to include your analytics ID. 89 | 90 | ### humans.txt 91 | 92 | Edit this file to include the team that worked on your site/app, and the 93 | technology powering it. 94 | 95 | ### robots.txt 96 | 97 | Edit this file to include any pages you need hidden from search engines. 98 | 99 | ### crossdomain.xml 100 | 101 | A template for working with cross-domain requests. [About 102 | crossdomain.xml](crossdomain.md). 103 | 104 | ### icons 105 | 106 | Replace the default `favicon.ico` and apple touch icons with your own. You 107 | might want to check out Hans Christian's handy [HTML5 Boilerplate Favicon and 108 | Apple Touch Icon 109 | PSD-Template](http://drublic.de/blog/html5-boilerplate-favicons-psd-template/). 110 | -------------------------------------------------------------------------------- /templates/html5bp/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/templates/html5bp/favicon.ico -------------------------------------------------------------------------------- /templates/html5bp/humans.txt: -------------------------------------------------------------------------------- 1 | # humanstxt.org/ 2 | # The humans responsible & technology colophon 3 | 4 | # TEAM 5 | 6 | <name> -- <role> -- <twitter> 7 | 8 | # THANKS 9 | 10 | <name> 11 | 12 | # TECHNOLOGY COLOPHON 13 | 14 | HTML5, CSS3 15 | Normalize.css, jQuery, Modernizr 16 | -------------------------------------------------------------------------------- /templates/html5bp/img/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/templates/html5bp/img/.gitignore -------------------------------------------------------------------------------- /templates/html5bp/index.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> 3 | <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> 4 | <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> 5 | <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> 6 | <head> 7 | <meta charset="utf-8"> 8 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 9 | <title> 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | 29 |

Hello world! This is HTML5 Boilerplate.

30 | 31 | 32 | -------------------------------------------------------------------------------- /templates/html5bp/js/main.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /templates/html5bp/js/plugins.js: -------------------------------------------------------------------------------- 1 | // Avoid `console` errors in browsers that lack a console. 2 | (function() { 3 | var method; 4 | var noop = function () {}; 5 | var methods = [ 6 | 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 7 | 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 8 | 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', 9 | 'timeStamp', 'trace', 'warn' 10 | ]; 11 | var length = methods.length; 12 | var console = (window.console = window.console || {}); 13 | 14 | while (length--) { 15 | method = methods[length]; 16 | 17 | // Only stub undefined methods. 18 | if (!console[method]) { 19 | console[method] = noop; 20 | } 21 | } 22 | }()); 23 | 24 | // Place any jQuery/helper plugins in here. 25 | -------------------------------------------------------------------------------- /templates/html5bp/js/vendor/modernizr-2.6.2.min.js: -------------------------------------------------------------------------------- 1 | /* Modernizr 2.6.2 (Custom Build) | MIT & BSD 2 | * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load 3 | */ 4 | ;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;fli>a:hover,.dropdown-menu>li>a:focus{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-color:#e8e8e8}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);background-color:#357ebd}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f3f3f3 100%);background-image:linear-gradient(to bottom,#ebebeb 0,#f3f3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#222 0,#282828 100%);background-image:linear-gradient(to bottom,#222 0,#282828 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0)}.progress-bar{background-image:-webkit-linear-gradient(top,#428bca 0,#3071a9 100%);background-image:linear-gradient(to bottom,#428bca 0,#3071a9 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0)}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0)}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0)}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0)}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #3071a9;background-image:-webkit-linear-gradient(top,#428bca 0,#3278b3 100%);background-image:linear-gradient(to bottom,#428bca 0,#3278b3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);border-color:#3278b3}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0)}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0)}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0)}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0)}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0)}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0)}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} -------------------------------------------------------------------------------- /templates/htmlbootstrap/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/templates/htmlbootstrap/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /templates/htmlbootstrap/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/templates/htmlbootstrap/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /templates/htmlbootstrap/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/templates/htmlbootstrap/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /templates/htmlbootstrap/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/templates/htmlbootstrap/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /templates/htmlbootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/templates/htmlbootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /templates/htmlbootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/templates/htmlbootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /templates/htmlbootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterdemartini/html5-to-pdf/65145082c8e29e5ef8106daebf567a9e87aecac4/templates/htmlbootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /templates/htmlbootstrap/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Bootstrap Template 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |

Hello, world!

25 | 26 | 27 | -------------------------------------------------------------------------------- /templates/pdf.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-size: 0.75em; 3 | } --------------------------------------------------------------------------------