Last active
May 12, 2025 09:45
-
-
Save hubgit/7025107 to your computer and use it in GitHub Desktop.
Revisions
-
hubgit revised this gist
Dec 22, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,7 +35,7 @@ body { background: #fff; } /* an image that fills the whole of the front face */ .face-front img { position: absolute; top: 0; -
hubgit revised this gist
Dec 22, 2013 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,8 +15,6 @@ body { height: 210mm; width: 148.5mm; margin: 0; } @@ -34,7 +32,7 @@ body { /* the front face */ .face-front { background: #fff; } /* an image that fill the whole of the front face */ -
hubgit revised this gist
Dec 22, 2013 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ @page { /* dimensions for the whole page */ size: A5; margin: 0; } -
hubgit revised this gist
Dec 22, 2013 . 2 changed files with 16 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ 1. Clone this Gist. 2. For card sizes other than A5, edit the `size` value in `@page`, and the `height` and `width` properties of `body`. 3. Add contents to each face. The simplest approach is to add an image called `front.png` of the same dimensions as the card. 4. Generate a PDF from the HTML + CSS. If using [Prince](http://www.princexml.com/), it's as simple as `prince index.html card.pdf`. 5. Take the PDF to a printer, and ask them to print as many copies as you need. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,11 @@ /* dimensions for the whole page */ @page { size: A5; margin: 0; } html { /* off-white, so body edge is visible in browser */ background: #eee; } @@ -12,20 +14,29 @@ body { height: 210mm; width: 148.5mm; /* default background color - over-ride in face-front and face-back */ background: #fff; margin: 0; } /* fill half the height with each face */ .face { height: 50%; width: 100%; position: relative; } /* the back face */ .face-back { background: #f6f6f6; } /* the front face */ .face-front { } /* an image that fill the whole of the front face */ .face-front img { position: absolute; top: 0; -
hubgit revised this gist
Dec 22, 2013 . 1 changed file with 20 additions and 22 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,39 +1,37 @@ @page { size: A5; margin: 0; } html { background: #eee; } body { /* A5 dimensions */ height: 210mm; width: 148.5mm; background: #fff; margin: 0; } .face { height: 50%; width: 100%; position: relative; } .face-back { background: #f6f6f6; } .face-front img { position: absolute; top: 0; left: 0; bottom: 0; right: 0; width: 100%; height: 100%; } -
hubgit revised this gist
Dec 22, 2013 . 1 changed file with 3 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,7 @@ <!doctype html> <meta charset="utf-8"> <link rel="stylesheet" href="card.css"> <body> <div class="face face-back"></div> <div class="face face-front"><img src="front.png"></div> -
hubgit revised this gist
Dec 22, 2013 . 1 changed file with 6 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,9 @@ <!doctype html> <head> <meta charset="utf-8"> <link rel="stylesheet" href="card.css"> </head> <body> <div class="face face-back"></div> <div class="face face-front"><img src="front.png"></div> </body> -
hubgit revised this gist
Oct 17, 2013 . 2 changed files with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ @page { size: A5; margin: 0; } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,6 @@ <link rel="stylesheet" href="card.css"> <body> <div class="face face-back"></div> <div class="face face-front"><img class="front-image" src="front.png"></div> </body> -
hubgit created this gist
Oct 17, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ @page { size: A5; margin: 0; } html { background: #eee; } body { /* A5 dimensions */ height: 210mm; width: 148.5mm; background: #fff; margin: 0; } .face { height: 50%; width: 100%; position: relative; } .face-back { background: #f6f6f6; } .front-image { position: absolute; top: 0; left: 0; bottom: 0; right: 0; width: 100%; height: 100%; } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ <!doctype html> <meta charset="utf-8"> <link rel="stylesheet" href="card.css"> <body> <div class="face face-back"></div> <div class="face face-front"><img class="front-image" src="front.png"></div> </body>