Merge branch 'master' of git@gitorious.org:gallery-without-a-name/gallery-without-a-name

This commit is contained in:
Espen Antonsen 2009-06-10 01:24:02 +02:00
commit 6ef0ac7424
133 changed files with 9158 additions and 0 deletions

View file

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ImageGallery</title>
<meta name="generator" content="TextMate http://macromates.com/">
<meta name="author" content="Arne Fismen">
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="css/print.css" type="text/css" media="print">
</head>
<body>
<div id="container">
<div id="header">
<p class="links"><a href="index.html">Home</a> / <a href="projects.html" class="active">Outdoor</a> / <a href="album.html">Prosjekt 1</a></p>
<h1>ImageGallery
</h1>
<form id="search">
<input type="text" class="textfield" />
<input type="submit" class="button" value="S&oslash;k"/>
</form>
<hr class="seperator" />
</div>
<div id="content">
<div id="multipleimages">
<table>
<tr>
<td><img src="images/project2.jpg" /> </td>
<td><img src="images/project4.jpg" /> </td>
<td><img src="images/project2.jpg" /> </td>
<td><img src="images/project.jpg" /> </td>
</tr>
<tr>
<td><img src="images/project4.jpg" /> </td>
<td><img src="images/project3.jpg" /> </td>
<td><img src="images/project2.jpg" /> </td>
<td><img src="images/project.jpg" /> </td>
</tr>
</table>
</div>
</div>
<div id="footer">
<hr class="seperator" />
&copy; Arne Fismen.
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,35 @@
/* -----------------------------------------------------------------------
Blueprint CSS Framework 0.8
http://blueprintcss.org
* Copyright (c) 2007-Present. See LICENSE for more info.
* See README for instructions on how to use Blueprint.
* For credits and origins, see AUTHORS.
* This is a compressed file. See the sources in the 'src' directory.
----------------------------------------------------------------------- */
/* ie.css */
body {text-align:center;}
.container {text-align:left;}
* html .column, * html div.span-1, * html div.span-2, * html div.span-3, * html div.span-4, * html div.span-5, * html div.span-6, * html div.span-7, * html div.span-8, * html div.span-9, * html div.span-10, * html div.span-11, * html div.span-12, * html div.span-13, * html div.span-14, * html div.span-15, * html div.span-16, * html div.span-17, * html div.span-18, * html div.span-19, * html div.span-20, * html div.span-21, * html div.span-22, * html div.span-23, * html div.span-24 {overflow-x:hidden;}
* html legend {margin:0px -8px 16px 0;padding:0;}
ol {margin-left:2em;}
sup {vertical-align:text-top;}
sub {vertical-align:text-bottom;}
html>body p code {*white-space:normal;}
hr {margin:-8px auto 11px;}
img {-ms-interpolation-mode:bicubic;}
.clearfix, .container {display:inline-block;}
* html .clearfix, * html .container {height:1%;}
fieldset {padding-top:0;}
input.text, input.title {background-color:#fff;border:1px solid #bbb;}
input.text:focus, input.title:focus {border-color:#666;}
input.text, input.title, textarea, select {margin:0.5em 0;}
input.checkbox, input.radio {position:relative;top:.25em;}
form.inline div, form.inline p {vertical-align:middle;}
form.inline label {position:relative;top:-0.25em;}
form.inline input.checkbox, form.inline input.radio, form.inline input.button, form.inline button {margin:0.5em 0;}
button, input.button {position:relative;top:0.25em;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

View file

@ -0,0 +1,32 @@
Buttons
* Gives you great looking CSS buttons, for both <a> and <button>.
* Demo: particletree.com/features/rediscovering-the-button-element
Credits
----------------------------------------------------------------
* Created by Kevin Hale [particletree.com]
* Adapted for Blueprint by Olav Bjorkoy [bjorkoy.com]
Usage
----------------------------------------------------------------
1) Add this plugin to lib/settings.yml.
See compress.rb for instructions.
2) Use the following HTML code to place the buttons on your site:
<button type="submit" class="button positive">
<img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/> Save
</button>
<a class="button" href="/password/reset/">
<img src="css/blueprint/plugins/buttons/icons/key.png" alt=""/> Change Password
</a>
<a href="#" class="button negative">
<img src="css/blueprint/plugins/buttons/icons/cross.png" alt=""/> Cancel
</a>

View file

@ -0,0 +1,97 @@
/* --------------------------------------------------------------
buttons.css
* Gives you some great CSS-only buttons.
Created by Kevin Hale [particletree.com]
* particletree.com/features/rediscovering-the-button-element
See Readme.txt in this folder for instructions.
-------------------------------------------------------------- */
a.button, button {
display:block;
float:left;
margin: 0.7em 0.5em 0.7em 0;
padding:5px 10px 5px 7px; /* Links */
border:1px solid #dedede;
border-top:1px solid #eee;
border-left:1px solid #eee;
background-color:#f5f5f5;
font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
font-size:100%;
line-height:130%;
text-decoration:none;
font-weight:bold;
color:#565656;
cursor:pointer;
}
button {
width:auto;
overflow:visible;
padding:4px 10px 3px 7px; /* IE6 */
}
button[type] {
padding:4px 10px 4px 7px; /* Firefox */
line-height:17px; /* Safari */
}
*:first-child+html button[type] {
padding:4px 10px 3px 7px; /* IE7 */
}
button img, a.button img{
margin:0 3px -3px 0 !important;
padding:0;
border:none;
width:16px;
height:16px;
float:none;
}
/* Button colors
-------------------------------------------------------------- */
/* Standard */
button:hover, a.button:hover{
background-color:#dff4ff;
border:1px solid #c2e1ef;
color:#336699;
}
a.button:active{
background-color:#6299c5;
border:1px solid #6299c5;
color:#fff;
}
/* Positive */
body .positive {
color:#529214;
}
a.positive:hover, button.positive:hover {
background-color:#E6EFC2;
border:1px solid #C6D880;
color:#529214;
}
a.positive:active {
background-color:#529214;
border:1px solid #529214;
color:#fff;
}
/* Negative */
body .negative {
color:#d12f19;
}
a.negative:hover, button.negative:hover {
background-color:#fbe3e4;
border:1px solid #fbc2c4;
color:#d12f19;
}
a.negative:active {
background-color:#d12f19;
border:1px solid #d12f19;
color:#fff;
}

View file

@ -0,0 +1,14 @@
Fancy Type
* Gives you classes to use if you'd like some
extra fancy typography.
Credits and instructions are specified above each class
in the fancy-type.css file in this directory.
Usage
----------------------------------------------------------------
1) Add this plugin to lib/settings.yml.
See compress.rb for instructions.

View file

@ -0,0 +1,71 @@
/* --------------------------------------------------------------
fancy-type.css
* Lots of pretty advanced classes for manipulating text.
See the Readme file in this folder for additional instructions.
-------------------------------------------------------------- */
/* Indentation instead of line shifts for sibling paragraphs. */
p + p { text-indent:2em; margin-top:-1.5em; }
form p + p { text-indent: 0; } /* Don't want this in forms. */
/* For great looking type, use this code instead of asdf:
<span class="alt">asdf</span>
Best used on prepositions and ampersands. */
.alt {
color: #666;
font-family: "Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua", Georgia, serif;
font-style: italic;
font-weight: normal;
}
/* For great looking quote marks in titles, replace "asdf" with:
<span class="dquo">&#8220;</span>asdf&#8221;
(That is, when the title starts with a quote mark).
(You may have to change this value depending on your font size). */
.dquo { margin-left: -.5em; }
/* Reduced size type with incremental leading
(http://www.markboulton.co.uk/journal/comments/incremental_leading/)
This could be used for side notes. For smaller type, you don't necessarily want to
follow the 1.5x vertical rhythm -- the line-height is too much.
Using this class, it reduces your font size and line-height so that for
every four lines of normal sized type, there is five lines of the sidenote. eg:
New type size in em's:
10px (wanted side note size) / 12px (existing base size) = 0.8333 (new type size in ems)
New line-height value:
12px x 1.5 = 18px (old line-height)
18px x 4 = 72px
72px / 5 = 14.4px (new line height)
14.4px / 10px = 1.44 (new line height in em's) */
p.incr, .incr p {
font-size: 10px;
line-height: 1.44em;
margin-bottom: 1.5em;
}
/* Surround uppercase words and abbreviations with this class.
Based on work by Jørgen Arnor Gårdsø Lom [http://twistedintellect.com/] */
.caps {
font-variant: small-caps;
letter-spacing: 1px;
text-transform: lowercase;
font-size:1.2em;
line-height:1%;
font-weight:bold;
padding:0 2px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

View file

@ -0,0 +1,18 @@
Link Icons
* Icons for links based on protocol or file type.
This is not supported in IE versions < 7.
Credits
----------------------------------------------------------------
* Marc Morgan
* Olav Bjorkoy [bjorkoy.com]
Usage
----------------------------------------------------------------
1) Add this line to your HTML:
<link rel="stylesheet" href="css/blueprint/plugins/link-icons/screen.css" type="text/css" media="screen, projection">

View file

@ -0,0 +1,40 @@
/* --------------------------------------------------------------
link-icons.css
* Icons for links based on protocol or file type.
See the Readme file in this folder for additional instructions.
-------------------------------------------------------------- */
/* Use this class if a link gets an icon when it shouldn't. */
body a.noicon {
background:transparent none !important;
padding:0 !important;
margin:0 !important;
}
/* Make sure the icons are not cut */
a[href^="http:"], a[href^="mailto:"], a[href^="http:"]:visited,
a[href$=".pdf"], a[href$=".doc"], a[href$=".xls"], a[href$=".rss"],
a[href$=".rdf"], a[href^="aim:"] {
padding:2px 22px 2px 0;
margin:-2px 0;
background-repeat: no-repeat;
background-position: right center;
}
/* External links */
a[href^="http:"] { background-image: url(icons/external.png); }
a[href^="mailto:"] { background-image: url(icons/email.png); }
a[href^="http:"]:visited { background-image: url(icons/visited.png); }
/* Files */
a[href$=".pdf"] { background-image: url(icons/pdf.png); }
a[href$=".doc"] { background-image: url(icons/doc.png); }
a[href$=".xls"] { background-image: url(icons/xls.png); }
/* Misc */
a[href$=".rss"],
a[href$=".rdf"] { background-image: url(icons/feed.png); }
a[href^="aim:"] { background-image: url(icons/im.png); }

View file

@ -0,0 +1,10 @@
RTL
* Mirrors Blueprint, so it can be used with Right-to-Left languages.
By Ran Yaniv Hartstein, ranh.co.il
Usage
----------------------------------------------------------------
1) Add this line to your HTML:
<link rel="stylesheet" href="css/blueprint/plugins/rtl/screen.css" type="text/css" media="screen, projection">

View file

@ -0,0 +1,109 @@
/* --------------------------------------------------------------
rtl.css
* Mirrors Blueprint for left-to-right languages
By Ran Yaniv Hartstein [ranh.co.il]
-------------------------------------------------------------- */
body .container { direction: rtl; }
body .column {
float: right;
margin-right: 0;
margin-left: 10px;
}
body div.last { margin-left: 0; }
body table .last { padding-left: 0; }
body .append-1 { padding-right: 0; padding-left: 40px; }
body .append-2 { padding-right: 0; padding-left: 80px; }
body .append-3 { padding-right: 0; padding-left: 120px; }
body .append-4 { padding-right: 0; padding-left: 160px; }
body .append-5 { padding-right: 0; padding-left: 200px; }
body .append-6 { padding-right: 0; padding-left: 240px; }
body .append-7 { padding-right: 0; padding-left: 280px; }
body .append-8 { padding-right: 0; padding-left: 320px; }
body .append-9 { padding-right: 0; padding-left: 360px; }
body .append-10 { padding-right: 0; padding-left: 400px; }
body .append-11 { padding-right: 0; padding-left: 440px; }
body .append-12 { padding-right: 0; padding-left: 480px; }
body .append-13 { padding-right: 0; padding-left: 520px; }
body .append-14 { padding-right: 0; padding-left: 560px; }
body .append-15 { padding-right: 0; padding-left: 600px; }
body .append-16 { padding-right: 0; padding-left: 640px; }
body .append-17 { padding-right: 0; padding-left: 680px; }
body .append-18 { padding-right: 0; padding-left: 720px; }
body .append-19 { padding-right: 0; padding-left: 760px; }
body .append-20 { padding-right: 0; padding-left: 800px; }
body .append-21 { padding-right: 0; padding-left: 840px; }
body .append-22 { padding-right: 0; padding-left: 880px; }
body .append-23 { padding-right: 0; padding-left: 920px; }
body .prepend-1 { padding-left: 0; padding-right: 40px; }
body .prepend-2 { padding-left: 0; padding-right: 80px; }
body .prepend-3 { padding-left: 0; padding-right: 120px; }
body .prepend-4 { padding-left: 0; padding-right: 160px; }
body .prepend-5 { padding-left: 0; padding-right: 200px; }
body .prepend-6 { padding-left: 0; padding-right: 240px; }
body .prepend-7 { padding-left: 0; padding-right: 280px; }
body .prepend-8 { padding-left: 0; padding-right: 320px; }
body .prepend-9 { padding-left: 0; padding-right: 360px; }
body .prepend-10 { padding-left: 0; padding-right: 400px; }
body .prepend-11 { padding-left: 0; padding-right: 440px; }
body .prepend-12 { padding-left: 0; padding-right: 480px; }
body .prepend-13 { padding-left: 0; padding-right: 520px; }
body .prepend-14 { padding-left: 0; padding-right: 560px; }
body .prepend-15 { padding-left: 0; padding-right: 600px; }
body .prepend-16 { padding-left: 0; padding-right: 640px; }
body .prepend-17 { padding-left: 0; padding-right: 680px; }
body .prepend-18 { padding-left: 0; padding-right: 720px; }
body .prepend-19 { padding-left: 0; padding-right: 760px; }
body .prepend-20 { padding-left: 0; padding-right: 800px; }
body .prepend-21 { padding-left: 0; padding-right: 840px; }
body .prepend-22 { padding-left: 0; padding-right: 880px; }
body .prepend-23 { padding-left: 0; padding-right: 920px; }
body .border {
padding-right: 0;
padding-left: 4px;
margin-right: 0;
margin-left: 5px;
border-right: none;
border-left: 1px solid #eee;
}
body .colborder {
padding-right: 0;
padding-left: 24px;
margin-right: 0;
margin-left: 25px;
border-right: none;
border-left: 1px solid #eee;
}
body .pull-1 { margin-left: 0; margin-right: -40px; }
body .pull-2 { margin-left: 0; margin-right: -80px; }
body .pull-3 { margin-left: 0; margin-right: -120px; }
body .pull-4 { margin-left: 0; margin-right: -160px; }
body .push-0 { margin: 0 18px 0 0; }
body .push-1 { margin: 0 18px 0 -40px; }
body .push-2 { margin: 0 18px 0 -80px; }
body .push-3 { margin: 0 18px 0 -120px; }
body .push-4 { margin: 0 18px 0 -160px; }
body .push-0, body .push-1, body .push-2,
body .push-3, body .push-4 { float: left; }
/* Typography with RTL support */
body h1,body h2,body h3,
body h4,body h5,body h6 { font-family: Arial, sans-serif; }
html body { font-family: Arial, sans-serif; }
body pre,body code,body tt { font-family: monospace; }
/* Mirror floats and margins on typographic elements */
body p img { float: right; margin: 1.5em 0 1.5em 1.5em; }
body dd, body ul, body ol { margin-left: 0; margin-right: 1.5em;}
body td, body th { text-align:right; }

View file

@ -0,0 +1,30 @@
/* -----------------------------------------------------------------------
Blueprint CSS Framework 0.8
http://blueprintcss.org
* Copyright (c) 2007-Present. See LICENSE for more info.
* See README for instructions on how to use Blueprint.
* For credits and origins, see AUTHORS.
* This is a compressed file. See the sources in the 'src' directory.
----------------------------------------------------------------------- */
/* print.css */
body {line-height:1.5;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;color:#000;background:none;font-size:10pt;}
.container {background:none;}
hr {background:#ccc;color:#ccc;width:100%;height:2px;margin:2em 0;padding:0;border:none;}
hr.space {background:#fff;color:#fff;}
h1, h2, h3, h4, h5, h6 {font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif;}
code {font:.9em "Courier New", Monaco, Courier, monospace;}
img {float:left;margin:1.5em 1.5em 1.5em 0;}
a img {border:none;}
p img.top {margin-top:0;}
blockquote {margin:1.5em;padding:1em;font-style:italic;font-size:.9em;}
.small {font-size:.9em;}
.large {font-size:1.1em;}
.quiet {color:#999;}
.hide {display:none;}
a:link, a:visited {background:transparent;font-weight:700;text-decoration:underline;}
a:link:after, a:visited:after {content:" (" attr(href) ")";font-size:90%;}

View file

@ -0,0 +1,256 @@
/* -----------------------------------------------------------------------
Blueprint CSS Framework 0.8
http://blueprintcss.org
* Copyright (c) 2007-Present. See LICENSE for more info.
* See README for instructions on how to use Blueprint.
* For credits and origins, see AUTHORS.
* This is a compressed file. See the sources in the 'src' directory.
----------------------------------------------------------------------- */
/* reset.css */
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}
body {line-height:1.5;}
table {border-collapse:separate;border-spacing:0;}
caption, th, td {text-align:left;font-weight:normal;}
table, td, th {vertical-align:middle;}
blockquote:before, blockquote:after, q:before, q:after {content:"";}
blockquote, q {quotes:"" "";}
a img {border:none;}
/* typography.css */
body {font-size:75%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;}
h1, h2, h3, h4, h5, h6 {font-weight:normal;}
h1 {font-size:3em;line-height:1;margin-bottom:0.5em;}
h2 {font-size:2em;margin-bottom:0.75em;}
h3 {font-size:1.5em;line-height:1;margin-bottom:1em;}
h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;}
h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;}
h6 {font-size:1em;font-weight:bold;}
h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;}
p {margin:0 0 1.5em;}
p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;}
p img.right {float:right;margin:1.5em 0 1.5em 1.5em;}
a:focus, a:hover {color:#000;}
a {color:#009;text-decoration:underline;}
blockquote {margin:1.5em;color:#666;font-style:italic;}
strong {font-weight:bold;}
em, dfn {font-style:italic;}
dfn {font-weight:bold;}
sup, sub {line-height:0;}
abbr, acronym {border-bottom:1px dotted #666;}
address {margin:0 0 1.5em;font-style:italic;}
del {color:#666;}
pre {margin:1.5em 0;white-space:pre;}
pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;}
li ul, li ol {margin:0 1.5em;}
ul, ol {margin:0 1.5em 1.5em 1.5em;}
ul {list-style-type:disc;}
ol {list-style-type:decimal;}
dl {margin:0 0 1.5em 0;}
dl dt {font-weight:bold;}
dd {margin-left:1.5em;}
table {margin-bottom:1.4em;width:100%;}
th {font-weight:bold;}
thead th {background:#c3d9ff;}
th, td, caption {padding:4px 10px 4px 5px;}
tr.even td {background:#e5ecf9;}
tfoot {font-style:italic;}
caption {background:#eee;}
.small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;}
.large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;}
.hide {display:none;}
.quiet {color:#666;}
.loud {color:#000;}
.highlight {background:#ff0;}
.added {background:#060;color:#fff;}
.removed {background:#900;color:#fff;}
.first {margin-left:0;padding-left:0;}
.last {margin-right:0;padding-right:0;}
.top {margin-top:0;padding-top:0;}
.bottom {margin-bottom:0;padding-bottom:0;}
/* forms.css */
label {font-weight:bold;}
fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;}
legend {font-weight:bold;font-size:1.2em;}
input[type=text], input.text, input.title, textarea, select {background-color:#fff;border:1px solid #bbb;}
input[type=text]:focus, input.text:focus, input.title:focus, textarea:focus, select:focus {border-color:#666;}
input[type=text], input.text, input.title, textarea, select {margin:0.5em 0;}
input.text, input.title {width:300px;padding:5px;}
input.title {font-size:1.5em;}
textarea {width:390px;height:250px;padding:5px;}
input[type=checkbox], input[type=radio], input.checkbox, input.radio {position:relative;top:.25em;}
form.inline {line-height:3;}
form.inline p {margin-bottom:0;}
.error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;}
.error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;}
.notice {background:#FFF6BF;color:#514721;border-color:#FFD324;}
.success {background:#E6EFC2;color:#264409;border-color:#C6D880;}
.error a {color:#8a1f11;}
.notice a {color:#514721;}
.success a {color:#264409;}
/* grid.css */
.container {width:950px;margin:0 auto;}
.showgrid {background:url(src/grid.png);}
.column, div.span-1, div.span-2, div.span-3, div.span-4, div.span-5, div.span-6, div.span-7, div.span-8, div.span-9, div.span-10, div.span-11, div.span-12, div.span-13, div.span-14, div.span-15, div.span-16, div.span-17, div.span-18, div.span-19, div.span-20, div.span-21, div.span-22, div.span-23, div.span-24 {float:left;margin-right:10px;}
.last, div.last {margin-right:0;}
.span-1 {width:30px;}
.span-2 {width:70px;}
.span-3 {width:110px;}
.span-4 {width:150px;}
.span-5 {width:190px;}
.span-6 {width:230px;}
.span-7 {width:270px;}
.span-8 {width:310px;}
.span-9 {width:350px;}
.span-10 {width:390px;}
.span-11 {width:430px;}
.span-12 {width:470px;}
.span-13 {width:510px;}
.span-14 {width:550px;}
.span-15 {width:590px;}
.span-16 {width:630px;}
.span-17 {width:670px;}
.span-18 {width:710px;}
.span-19 {width:750px;}
.span-20 {width:790px;}
.span-21 {width:830px;}
.span-22 {width:870px;}
.span-23 {width:910px;}
.span-24, div.span-24 {width:950px;margin:0;}
input.span-1, textarea.span-1, input.span-2, textarea.span-2, input.span-3, textarea.span-3, input.span-4, textarea.span-4, input.span-5, textarea.span-5, input.span-6, textarea.span-6, input.span-7, textarea.span-7, input.span-8, textarea.span-8, input.span-9, textarea.span-9, input.span-10, textarea.span-10, input.span-11, textarea.span-11, input.span-12, textarea.span-12, input.span-13, textarea.span-13, input.span-14, textarea.span-14, input.span-15, textarea.span-15, input.span-16, textarea.span-16, input.span-17, textarea.span-17, input.span-18, textarea.span-18, input.span-19, textarea.span-19, input.span-20, textarea.span-20, input.span-21, textarea.span-21, input.span-22, textarea.span-22, input.span-23, textarea.span-23, input.span-24, textarea.span-24 {border-left-width:1px!important;border-right-width:1px!important;padding-left:5px!important;padding-right:5px!important;}
input.span-1, textarea.span-1 {width:18px!important;}
input.span-2, textarea.span-2 {width:58px!important;}
input.span-3, textarea.span-3 {width:98px!important;}
input.span-4, textarea.span-4 {width:138px!important;}
input.span-5, textarea.span-5 {width:178px!important;}
input.span-6, textarea.span-6 {width:218px!important;}
input.span-7, textarea.span-7 {width:258px!important;}
input.span-8, textarea.span-8 {width:298px!important;}
input.span-9, textarea.span-9 {width:338px!important;}
input.span-10, textarea.span-10 {width:378px!important;}
input.span-11, textarea.span-11 {width:418px!important;}
input.span-12, textarea.span-12 {width:458px!important;}
input.span-13, textarea.span-13 {width:498px!important;}
input.span-14, textarea.span-14 {width:538px!important;}
input.span-15, textarea.span-15 {width:578px!important;}
input.span-16, textarea.span-16 {width:618px!important;}
input.span-17, textarea.span-17 {width:658px!important;}
input.span-18, textarea.span-18 {width:698px!important;}
input.span-19, textarea.span-19 {width:738px!important;}
input.span-20, textarea.span-20 {width:778px!important;}
input.span-21, textarea.span-21 {width:818px!important;}
input.span-22, textarea.span-22 {width:858px!important;}
input.span-23, textarea.span-23 {width:898px!important;}
input.span-24, textarea.span-24 {width:938px!important;}
.append-1 {padding-right:40px;}
.append-2 {padding-right:80px;}
.append-3 {padding-right:120px;}
.append-4 {padding-right:160px;}
.append-5 {padding-right:200px;}
.append-6 {padding-right:240px;}
.append-7 {padding-right:280px;}
.append-8 {padding-right:320px;}
.append-9 {padding-right:360px;}
.append-10 {padding-right:400px;}
.append-11 {padding-right:440px;}
.append-12 {padding-right:480px;}
.append-13 {padding-right:520px;}
.append-14 {padding-right:560px;}
.append-15 {padding-right:600px;}
.append-16 {padding-right:640px;}
.append-17 {padding-right:680px;}
.append-18 {padding-right:720px;}
.append-19 {padding-right:760px;}
.append-20 {padding-right:800px;}
.append-21 {padding-right:840px;}
.append-22 {padding-right:880px;}
.append-23 {padding-right:920px;}
.prepend-1 {padding-left:40px;}
.prepend-2 {padding-left:80px;}
.prepend-3 {padding-left:120px;}
.prepend-4 {padding-left:160px;}
.prepend-5 {padding-left:200px;}
.prepend-6 {padding-left:240px;}
.prepend-7 {padding-left:280px;}
.prepend-8 {padding-left:320px;}
.prepend-9 {padding-left:360px;}
.prepend-10 {padding-left:400px;}
.prepend-11 {padding-left:440px;}
.prepend-12 {padding-left:480px;}
.prepend-13 {padding-left:520px;}
.prepend-14 {padding-left:560px;}
.prepend-15 {padding-left:600px;}
.prepend-16 {padding-left:640px;}
.prepend-17 {padding-left:680px;}
.prepend-18 {padding-left:720px;}
.prepend-19 {padding-left:760px;}
.prepend-20 {padding-left:800px;}
.prepend-21 {padding-left:840px;}
.prepend-22 {padding-left:880px;}
.prepend-23 {padding-left:920px;}
div.border {padding-right:4px;margin-right:5px;border-right:1px solid #eee;}
div.colborder {padding-right:24px;margin-right:25px;border-right:1px solid #eee;}
.pull-1 {margin-left:-40px;}
.pull-2 {margin-left:-80px;}
.pull-3 {margin-left:-120px;}
.pull-4 {margin-left:-160px;}
.pull-5 {margin-left:-200px;}
.pull-6 {margin-left:-240px;}
.pull-7 {margin-left:-280px;}
.pull-8 {margin-left:-320px;}
.pull-9 {margin-left:-360px;}
.pull-10 {margin-left:-400px;}
.pull-11 {margin-left:-440px;}
.pull-12 {margin-left:-480px;}
.pull-13 {margin-left:-520px;}
.pull-14 {margin-left:-560px;}
.pull-15 {margin-left:-600px;}
.pull-16 {margin-left:-640px;}
.pull-17 {margin-left:-680px;}
.pull-18 {margin-left:-720px;}
.pull-19 {margin-left:-760px;}
.pull-20 {margin-left:-800px;}
.pull-21 {margin-left:-840px;}
.pull-22 {margin-left:-880px;}
.pull-23 {margin-left:-920px;}
.pull-24 {margin-left:-960px;}
.pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20, .pull-21, .pull-22, .pull-23, .pull-24 {float:left;position:relative;}
.push-1 {margin:0 -40px 1.5em 40px;}
.push-2 {margin:0 -80px 1.5em 80px;}
.push-3 {margin:0 -120px 1.5em 120px;}
.push-4 {margin:0 -160px 1.5em 160px;}
.push-5 {margin:0 -200px 1.5em 200px;}
.push-6 {margin:0 -240px 1.5em 240px;}
.push-7 {margin:0 -280px 1.5em 280px;}
.push-8 {margin:0 -320px 1.5em 320px;}
.push-9 {margin:0 -360px 1.5em 360px;}
.push-10 {margin:0 -400px 1.5em 400px;}
.push-11 {margin:0 -440px 1.5em 440px;}
.push-12 {margin:0 -480px 1.5em 480px;}
.push-13 {margin:0 -520px 1.5em 520px;}
.push-14 {margin:0 -560px 1.5em 560px;}
.push-15 {margin:0 -600px 1.5em 600px;}
.push-16 {margin:0 -640px 1.5em 640px;}
.push-17 {margin:0 -680px 1.5em 680px;}
.push-18 {margin:0 -720px 1.5em 720px;}
.push-19 {margin:0 -760px 1.5em 760px;}
.push-20 {margin:0 -800px 1.5em 800px;}
.push-21 {margin:0 -840px 1.5em 840px;}
.push-22 {margin:0 -880px 1.5em 880px;}
.push-23 {margin:0 -920px 1.5em 920px;}
.push-24 {margin:0 -960px 1.5em 960px;}
.push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float:right;position:relative;}
.prepend-top {margin-top:1.5em;}
.append-bottom {margin-bottom:1.5em;}
.box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;}
hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;}
hr.space {background:#fff;color:#fff;}
.clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;}
.clearfix, .container {display:block;}
.clear {clear:both;}

View file

@ -0,0 +1,65 @@
/* --------------------------------------------------------------
forms.css
* Sets up some default styling for forms
* Gives you classes to enhance your forms
Usage:
* For text fields, use class .title or .text
* For inline forms, use .inline (even when using columns)
-------------------------------------------------------------- */
label { font-weight: bold; }
fieldset { padding:1.4em; margin: 0 0 1.5em 0; border: 1px solid #ccc; }
legend { font-weight: bold; font-size:1.2em; }
/* Form fields
-------------------------------------------------------------- */
input[type=text],
input.text, input.title,
textarea, select {
background-color:#fff;
border:1px solid #bbb;
}
input[type=text]:focus,
input.text:focus, input.title:focus,
textarea:focus, select:focus {
border-color:#666;
}
input[type=text],
input.text, input.title,
textarea, select {
margin:0.5em 0;
}
input.text,
input.title { width: 300px; padding:5px; }
input.title { font-size:1.5em; }
textarea { width: 390px; height: 250px; padding:5px; }
input[type=checkbox], input[type=radio],
input.checkbox, input.radio {
position:relative; top:.25em;
}
form.inline { line-height:3; }
form.inline p { margin-bottom:0; }
/* Success, notice and error boxes
-------------------------------------------------------------- */
.error,
.notice,
.success { padding: .8em; margin-bottom: 1em; border: 2px solid #ddd; }
.error { background: #FBE3E4; color: #8a1f11; border-color: #FBC2C4; }
.notice { background: #FFF6BF; color: #514721; border-color: #FFD324; }
.success { background: #E6EFC2; color: #264409; border-color: #C6D880; }
.error a { color: #8a1f11; }
.notice a { color: #514721; }
.success a { color: #264409; }

View file

@ -0,0 +1,281 @@
/* --------------------------------------------------------------
grid.css
* Sets up an easy-to-use grid of 24 columns.
By default, the grid is 950px wide, with 24 columns
spanning 30px, and a 10px margin between columns.
If you need fewer or more columns, namespaces or semantic
element names, use the compressor script (lib/compress.rb)
Note: Changes made in this file will not be applied when
using the compressor: make changes in lib/blueprint/grid.css.rb
-------------------------------------------------------------- */
/* A container should group all your columns. */
.container {
width: 950px;
margin: 0 auto;
}
/* Use this class on any div.span / container to see the grid. */
.showgrid {
background: url(src/grid.png);
}
/* Columns
-------------------------------------------------------------- */
/* Sets up basic grid floating and margin. */
.column, div.span-1, div.span-2, div.span-3, div.span-4, div.span-5, div.span-6, div.span-7, div.span-8, div.span-9, div.span-10, div.span-11, div.span-12, div.span-13, div.span-14, div.span-15, div.span-16, div.span-17, div.span-18, div.span-19, div.span-20, div.span-21, div.span-22, div.span-23, div.span-24 {
float: left;
margin-right: 10px;
}
/* The last column in a row needs this class. */
.last, div.last { margin-right: 0; }
/* Use these classes to set the width of a column. */
.span-1 {width: 30px;}
.span-2 {width: 70px;}
.span-3 {width: 110px;}
.span-4 {width: 150px;}
.span-5 {width: 190px;}
.span-6 {width: 230px;}
.span-7 {width: 270px;}
.span-8 {width: 310px;}
.span-9 {width: 350px;}
.span-10 {width: 390px;}
.span-11 {width: 430px;}
.span-12 {width: 470px;}
.span-13 {width: 510px;}
.span-14 {width: 550px;}
.span-15 {width: 590px;}
.span-16 {width: 630px;}
.span-17 {width: 670px;}
.span-18 {width: 710px;}
.span-19 {width: 750px;}
.span-20 {width: 790px;}
.span-21 {width: 830px;}
.span-22 {width: 870px;}
.span-23 {width: 910px;}
.span-24, div.span-24 { width:950px; margin:0; }
/* Use these classes to set the width of an input. */
input.span-1, textarea.span-1, input.span-2, textarea.span-2, input.span-3, textarea.span-3, input.span-4, textarea.span-4, input.span-5, textarea.span-5, input.span-6, textarea.span-6, input.span-7, textarea.span-7, input.span-8, textarea.span-8, input.span-9, textarea.span-9, input.span-10, textarea.span-10, input.span-11, textarea.span-11, input.span-12, textarea.span-12, input.span-13, textarea.span-13, input.span-14, textarea.span-14, input.span-15, textarea.span-15, input.span-16, textarea.span-16, input.span-17, textarea.span-17, input.span-18, textarea.span-18, input.span-19, textarea.span-19, input.span-20, textarea.span-20, input.span-21, textarea.span-21, input.span-22, textarea.span-22, input.span-23, textarea.span-23, input.span-24, textarea.span-24 {
border-left-width: 1px!important;
border-right-width: 1px!important;
padding-left: 5px!important;
padding-right: 5px!important;
}
input.span-1, textarea.span-1 { width: 18px!important; }
input.span-2, textarea.span-2 { width: 58px!important; }
input.span-3, textarea.span-3 { width: 98px!important; }
input.span-4, textarea.span-4 { width: 138px!important; }
input.span-5, textarea.span-5 { width: 178px!important; }
input.span-6, textarea.span-6 { width: 218px!important; }
input.span-7, textarea.span-7 { width: 258px!important; }
input.span-8, textarea.span-8 { width: 298px!important; }
input.span-9, textarea.span-9 { width: 338px!important; }
input.span-10, textarea.span-10 { width: 378px!important; }
input.span-11, textarea.span-11 { width: 418px!important; }
input.span-12, textarea.span-12 { width: 458px!important; }
input.span-13, textarea.span-13 { width: 498px!important; }
input.span-14, textarea.span-14 { width: 538px!important; }
input.span-15, textarea.span-15 { width: 578px!important; }
input.span-16, textarea.span-16 { width: 618px!important; }
input.span-17, textarea.span-17 { width: 658px!important; }
input.span-18, textarea.span-18 { width: 698px!important; }
input.span-19, textarea.span-19 { width: 738px!important; }
input.span-20, textarea.span-20 { width: 778px!important; }
input.span-21, textarea.span-21 { width: 818px!important; }
input.span-22, textarea.span-22 { width: 858px!important; }
input.span-23, textarea.span-23 { width: 898px!important; }
input.span-24, textarea.span-24 { width: 938px!important; }
/* Add these to a column to append empty cols. */
.append-1 { padding-right: 40px;}
.append-2 { padding-right: 80px;}
.append-3 { padding-right: 120px;}
.append-4 { padding-right: 160px;}
.append-5 { padding-right: 200px;}
.append-6 { padding-right: 240px;}
.append-7 { padding-right: 280px;}
.append-8 { padding-right: 320px;}
.append-9 { padding-right: 360px;}
.append-10 { padding-right: 400px;}
.append-11 { padding-right: 440px;}
.append-12 { padding-right: 480px;}
.append-13 { padding-right: 520px;}
.append-14 { padding-right: 560px;}
.append-15 { padding-right: 600px;}
.append-16 { padding-right: 640px;}
.append-17 { padding-right: 680px;}
.append-18 { padding-right: 720px;}
.append-19 { padding-right: 760px;}
.append-20 { padding-right: 800px;}
.append-21 { padding-right: 840px;}
.append-22 { padding-right: 880px;}
.append-23 { padding-right: 920px;}
/* Add these to a column to prepend empty cols. */
.prepend-1 { padding-left: 40px;}
.prepend-2 { padding-left: 80px;}
.prepend-3 { padding-left: 120px;}
.prepend-4 { padding-left: 160px;}
.prepend-5 { padding-left: 200px;}
.prepend-6 { padding-left: 240px;}
.prepend-7 { padding-left: 280px;}
.prepend-8 { padding-left: 320px;}
.prepend-9 { padding-left: 360px;}
.prepend-10 { padding-left: 400px;}
.prepend-11 { padding-left: 440px;}
.prepend-12 { padding-left: 480px;}
.prepend-13 { padding-left: 520px;}
.prepend-14 { padding-left: 560px;}
.prepend-15 { padding-left: 600px;}
.prepend-16 { padding-left: 640px;}
.prepend-17 { padding-left: 680px;}
.prepend-18 { padding-left: 720px;}
.prepend-19 { padding-left: 760px;}
.prepend-20 { padding-left: 800px;}
.prepend-21 { padding-left: 840px;}
.prepend-22 { padding-left: 880px;}
.prepend-23 { padding-left: 920px;}
/* Border on right hand side of a column. */
div.border {
padding-right: 4px;
margin-right: 5px;
border-right: 1px solid #eee;
}
/* Border with more whitespace, spans one column. */
div.colborder {
padding-right: 24px;
margin-right: 25px;
border-right: 1px solid #eee;
}
/* Use these classes on an element to push it into the
next column, or to pull it into the previous column. */
.pull-1 { margin-left: -40px; }
.pull-2 { margin-left: -80px; }
.pull-3 { margin-left: -120px; }
.pull-4 { margin-left: -160px; }
.pull-5 { margin-left: -200px; }
.pull-6 { margin-left: -240px; }
.pull-7 { margin-left: -280px; }
.pull-8 { margin-left: -320px; }
.pull-9 { margin-left: -360px; }
.pull-10 { margin-left: -400px; }
.pull-11 { margin-left: -440px; }
.pull-12 { margin-left: -480px; }
.pull-13 { margin-left: -520px; }
.pull-14 { margin-left: -560px; }
.pull-15 { margin-left: -600px; }
.pull-16 { margin-left: -640px; }
.pull-17 { margin-left: -680px; }
.pull-18 { margin-left: -720px; }
.pull-19 { margin-left: -760px; }
.pull-20 { margin-left: -800px; }
.pull-21 { margin-left: -840px; }
.pull-22 { margin-left: -880px; }
.pull-23 { margin-left: -920px; }
.pull-24 { margin-left: -960px; }
.pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20, .pull-21, .pull-22, .pull-23, .pull-24 {float: left; position:relative;}
.push-1 { margin: 0 -40px 1.5em 40px; }
.push-2 { margin: 0 -80px 1.5em 80px; }
.push-3 { margin: 0 -120px 1.5em 120px; }
.push-4 { margin: 0 -160px 1.5em 160px; }
.push-5 { margin: 0 -200px 1.5em 200px; }
.push-6 { margin: 0 -240px 1.5em 240px; }
.push-7 { margin: 0 -280px 1.5em 280px; }
.push-8 { margin: 0 -320px 1.5em 320px; }
.push-9 { margin: 0 -360px 1.5em 360px; }
.push-10 { margin: 0 -400px 1.5em 400px; }
.push-11 { margin: 0 -440px 1.5em 440px; }
.push-12 { margin: 0 -480px 1.5em 480px; }
.push-13 { margin: 0 -520px 1.5em 520px; }
.push-14 { margin: 0 -560px 1.5em 560px; }
.push-15 { margin: 0 -600px 1.5em 600px; }
.push-16 { margin: 0 -640px 1.5em 640px; }
.push-17 { margin: 0 -680px 1.5em 680px; }
.push-18 { margin: 0 -720px 1.5em 720px; }
.push-19 { margin: 0 -760px 1.5em 760px; }
.push-20 { margin: 0 -800px 1.5em 800px; }
.push-21 { margin: 0 -840px 1.5em 840px; }
.push-22 { margin: 0 -880px 1.5em 880px; }
.push-23 { margin: 0 -920px 1.5em 920px; }
.push-24 { margin: 0 -960px 1.5em 960px; }
.push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float: right; position:relative;}
/* Misc classes and elements
-------------------------------------------------------------- */
/* In case you need to add a gutter above/below an element */
.prepend-top {
margin-top:1.5em;
}
.append-bottom {
margin-bottom:1.5em;
}
/* Use a .box to create a padded box inside a column. */
.box {
padding: 1.5em;
margin-bottom: 1.5em;
background: #E5ECF9;
}
/* Use this to create a horizontal ruler across a column. */
hr {
background: #ddd;
color: #ddd;
clear: both;
float: none;
width: 100%;
height: .1em;
margin: 0 0 1.45em;
border: none;
}
hr.space {
background: #fff;
color: #fff;
}
/* Clearing floats without extra markup
Based on How To Clear Floats Without Structural Markup by PiE
[http://www.positioniseverything.net/easyclearing.html] */
.clearfix:after, .container:after {
content: "\0020";
display: block;
height: 0;
clear: both;
visibility: hidden;
overflow:hidden;
}
.clearfix, .container {display: block;}
/* Regular clearing
apply to column that should drop below previous ones. */
.clear { clear:both; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

View file

@ -0,0 +1,76 @@
/* --------------------------------------------------------------
ie.css
Contains every hack for Internet Explorer,
so that our core files stay sweet and nimble.
-------------------------------------------------------------- */
/* Make sure the layout is centered in IE5 */
body { text-align: center; }
.container { text-align: left; }
/* Fixes IE margin bugs */
* html .column, * html div.span-1, * html div.span-2,
* html div.span-3, * html div.span-4, * html div.span-5,
* html div.span-6, * html div.span-7, * html div.span-8,
* html div.span-9, * html div.span-10, * html div.span-11,
* html div.span-12, * html div.span-13, * html div.span-14,
* html div.span-15, * html div.span-16, * html div.span-17,
* html div.span-18, * html div.span-19, * html div.span-20,
* html div.span-21, * html div.span-22, * html div.span-23,
* html div.span-24 { overflow-x: hidden; }
/* Elements
-------------------------------------------------------------- */
/* Fixes incorrect styling of legend in IE6. */
* html legend { margin:0px -8px 16px 0; padding:0; }
/* Fixes incorrect placement of ol numbers in IE6/7. */
ol { margin-left:2em; }
/* Fixes wrong line-height on sup/sub in IE. */
sup { vertical-align: text-top; }
sub { vertical-align: text-bottom; }
/* Fixes IE7 missing wrapping of code elements. */
html>body p code { *white-space: normal; }
/* IE 6&7 has problems with setting proper <hr> margins. */
hr { margin: -8px auto 11px; }
/* Explicitly set interpolation, allowing dynamically resized images to not look horrible */
img { -ms-interpolation-mode: bicubic; }
/* Clearing
-------------------------------------------------------------- */
/* Makes clearfix actually work in IE */
.clearfix, .container {display: inline-block;}
* html .clearfix,
* html .container {height: 1%;}
/* Forms
-------------------------------------------------------------- */
/* Fixes padding on fieldset */
fieldset {padding-top: 0;}
/* Fixes rule that IE 6 ignores */
input.text, input.title {background-color:#fff;border:1px solid #bbb;}
input.text:focus, input.title:focus {border-color:#666;}
input.text, input.title, textarea, select {margin:0.5em 0;}
input.checkbox, input.radio {position:relative; top:.25em;}
/* Fixes alignment of inline form elements */
form.inline div, form.inline p {vertical-align:middle;}
form.inline label {position:relative;top:-0.25em;}
form.inline input.checkbox, form.inline input.radio,
form.inline input.button, form.inline button {
margin:0.5em 0;
}
button, input.button {position:relative;top:0.25em;}

View file

@ -0,0 +1,85 @@
/* --------------------------------------------------------------
print.css
* Gives you some sensible styles for printing pages.
* See Readme file in this directory for further instructions.
Some additions you'll want to make, customized to your markup:
#header, #footer, #navigation { display:none; }
-------------------------------------------------------------- */
body {
line-height: 1.5;
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
color:#000;
background: none;
font-size: 10pt;
}
/* Layout
-------------------------------------------------------------- */
.container {
background: none;
}
hr {
background:#ccc;
color:#ccc;
width:100%;
height:2px;
margin:2em 0;
padding:0;
border:none;
}
hr.space {
background: #fff;
color: #fff;
}
/* Text
-------------------------------------------------------------- */
h1,h2,h3,h4,h5,h6 { font-family: "Helvetica Neue", Arial, "Lucida Grande", sans-serif; }
code { font:.9em "Courier New", Monaco, Courier, monospace; }
img { float:left; margin:1.5em 1.5em 1.5em 0; }
a img { border:none; }
p img.top { margin-top: 0; }
blockquote {
margin:1.5em;
padding:1em;
font-style:italic;
font-size:.9em;
}
.small { font-size: .9em; }
.large { font-size: 1.1em; }
.quiet { color: #999; }
.hide { display:none; }
/* Links
-------------------------------------------------------------- */
a:link, a:visited {
background: transparent;
font-weight:700;
text-decoration: underline;
}
a:link:after, a:visited:after {
content: " (" attr(href) ")";
font-size: 90%;
}
/* If you're having trouble printing relative links, uncomment and customize this:
(note: This is valid CSS3, but it still won't go through the W3C CSS Validator) */
/* a[href^="/"]:after {
content: " (http://www.yourdomain.com" attr(href) ") ";
} */

View file

@ -0,0 +1,38 @@
/* --------------------------------------------------------------
reset.css
* Resets default browser CSS.
-------------------------------------------------------------- */
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, code,
del, dfn, em, img, q, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
line-height: 1.5;
}
/* Tables still need 'cellspacing="0"' in the markup. */
table { border-collapse: separate; border-spacing: 0; }
caption, th, td { text-align: left; font-weight: normal; }
table, td, th { vertical-align: middle; }
/* Remove possible quote marks (") from <q>, <blockquote>. */
blockquote:before, blockquote:after, q:before, q:after { content: ""; }
blockquote, q { quotes: "" ""; }
/* Remove annoying border on linked images. */
a img { border: none; }

View file

@ -0,0 +1,105 @@
/* --------------------------------------------------------------
typography.css
* Sets up some sensible default typography.
-------------------------------------------------------------- */
/* Default font settings.
The font-size percentage is of 16px. (0.75 * 16px = 12px) */
body {
font-size: 75%;
color: #222;
background: #fff;
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
}
/* Headings
-------------------------------------------------------------- */
h1,h2,h3,h4,h5,h6 { font-weight: normal; color: #111; }
h1 { font-size: 3em; line-height: 1; margin-bottom: 0.5em; }
h2 { font-size: 2em; margin-bottom: 0.75em; }
h3 { font-size: 1.5em; line-height: 1; margin-bottom: 1em; }
h4 { font-size: 1.2em; line-height: 1.25; margin-bottom: 1.25em; }
h5 { font-size: 1em; font-weight: bold; margin-bottom: 1.5em; }
h6 { font-size: 1em; font-weight: bold; }
h1 img, h2 img, h3 img,
h4 img, h5 img, h6 img {
margin: 0;
}
/* Text elements
-------------------------------------------------------------- */
p { margin: 0 0 1.5em; }
p img.left { float: left; margin: 1.5em 1.5em 1.5em 0; padding: 0; }
p img.right { float: right; margin: 1.5em 0 1.5em 1.5em; }
a:focus,
a:hover { color: #000; }
a { color: #009; text-decoration: underline; }
blockquote { margin: 1.5em; color: #666; font-style: italic; }
strong { font-weight: bold; }
em,dfn { font-style: italic; }
dfn { font-weight: bold; }
sup, sub { line-height: 0; }
abbr,
acronym { border-bottom: 1px dotted #666; }
address { margin: 0 0 1.5em; font-style: italic; }
del { color:#666; }
pre { margin: 1.5em 0; white-space: pre; }
pre,code,tt { font: 1em 'andale mono', 'lucida console', monospace; line-height: 1.5; }
/* Lists
-------------------------------------------------------------- */
li ul,
li ol { margin:0 1.5em; }
ul, ol { margin: 0 1.5em 1.5em 1.5em; }
ul { list-style-type: disc; }
ol { list-style-type: decimal; }
dl { margin: 0 0 1.5em 0; }
dl dt { font-weight: bold; }
dd { margin-left: 1.5em;}
/* Tables
-------------------------------------------------------------- */
table { margin-bottom: 1.4em; width:100%; }
th { font-weight: bold; }
thead th { background: #c3d9ff; }
th,td,caption { padding: 4px 10px 4px 5px; }
tr.even td { background: #e5ecf9; }
tfoot { font-style: italic; }
caption { background: #eee; }
/* Misc classes
-------------------------------------------------------------- */
.small { font-size: .8em; margin-bottom: 1.875em; line-height: 1.875em; }
.large { font-size: 1.2em; line-height: 2.5em; margin-bottom: 1.25em; }
.hide { display: none; }
.quiet { color: #666; }
.loud { color: #000; }
.highlight { background:#ff0; }
.added { background:#060; color: #fff; }
.removed { background:#900; color: #fff; }
.first { margin-left:0; padding-left:0; }
.last { margin-right:0; padding-right:0; }
.top { margin-top:0; padding-top:0; }
.bottom { margin-bottom:0; padding-bottom:0; }

View file

@ -0,0 +1,4 @@
*.svn
*.DS_Store
tmp/*
lib/settings.yml

View file

@ -0,0 +1,42 @@
h1. Blueprint CSS Framework Authors and Contributors
Blueprint is based on the work of many talented people. It is
through their good intentions we are allowed to use many of the
techniques found in the framework.
h2. Current Team
Blueprint was realized and maintained through version 0.7.1 by
"Olav Bjorkoy":http://bjorkoy.com who has sinced passed the torch
to the current team. They are:
Admins:
* "Christian Montoya":http://christianmontoya.net
* "Josh Clayton":http://jdclayton.com
Contributors:
* "Glenn Rempe":http://blog.rempe.us/
* "Chris Eppstein":http://twitter.com/chriseppstein
* "Sean K. Stewart":http://seankstewart.com/
h2. Original CSS authors
The first iteration of Blueprint was built upon many conventions
and ideas that were developed by true CSS experts.
The grid and typography is based on work by:
* "Jeff Croft":http://jeffcroft.com
* "Nathan Borror":http://www.playgroundblues.com
* "Christian Metts":http://mintchaos.com
* "Wilson Miner":http://www.wilsonminer.com
The CSS reset is based on work by:
* "Eric Meyer":http://www.meyerweb.com/eric
The Fancy Type plugin is based on work by:
* "Mark Boulton":http://www.markboulton.co.uk
* "Typogrify":http://typogrify.googlecode.com
(However, remember that these people are not involved with the
framework, so please don't waste their or your time asking them
for support.)

View file

@ -0,0 +1,159 @@
Blueprint CSS Framework Change Log
----------------------------------------------------------------
Version 0.9 - Date May 29, 2009
--
New features:
* Changed all conditional comments to [if lt IE 8] for IE 8 compatibility [CMM]
* Updated forms code to align inline form elements, with additions for IE 6 [CMM]
* Use <form class="inline"> for inline forms
* Use classes "text", "button", "radio" and "checkbox" on inputs for IE 6 compatibility
Version 0.8 - Date November 11, 2008
--
New features:
* Much of the flexibility of 0.6 has been pushed back into the core [CMM]
* Plugins from 0.6 are now back in the core [CMM]
Bug fixes:
* Lots. See http://blueprintcss.lighthouseapp.com/projects/15318-blueprint-css
Version 0.7.1 - Date February 21, 2008
--
New features:
* Rubydoc for compressor [JC]
Bug fixes:
* Fixed bug in the compressor related to Rubygems. [JC]
* <tt> should be inline, not block. [OFB]
Version 0.7 - February 19, 2008
--
New features:
* New directory structure. [OFB]
* New compressor script. [JC]
* Ability to set custom namespace for BP classes. [JC]
* Optional custom column count and widths. [JC]
* Ability to add your own CSS files. [JC]
* Custom output paths. [JC]
* Support for multiple projects. [JC]
* Semantic class naming from CSS rules. [JC]
* Automatic compression for plugins. [JC]
* Compressed version of ie.css. [OFB]
* Alternating table row colors. [OFB]
* Added class .showgrid to see the grid of any column or container. [OFB]
* No need for .column! You now have to use divs for columns,
but you can still use span/prepend/append for other elements as well.
In other words, div.span-x now implies that the element is a .column. [OFB]
Bug fixes:
* Sidebar alignment in tests/sample.html. [OFB]
* Line-height on sub/sup. [OFB]
* Clearfix not properly applied to container. [OFB]
* Misc validation errors in tests. [OFB]
* Proper margin on address. [OFB]
* Unwanted bottom margin on nested lists. [OFB]
* Form labels with unwanted fancy-type indentation. [OFB]
* Proper margin on all form elements. [OFB]
* No margins for images in headings. [OFB]
* Push-x bottom margin. [OFB]
* Vertical align set to middle on tables. [OFB]
* Improved .notice, .error and .success color contrast. [OFB]
* Size of input[text]. [OFB]
* Baseline alignment of <h4>. [OFB]
Misc:
* Improved structure in print.css. [OFB]
* Dual-licensed under MIT and GPL licenses. [OFB]
* Changed name of .clear to .clearfix, and added .clear (clear:both;). [OFB]
Version 0.6 - September 21, 2007
--
* Created a new plugin, "iepngfix", that adds support for PNG transparency in IE5.5+ [OFB]
* Added an IE stylesheet, updated the test files and the readme accordingly [OFB]
* Re-added improved support for em units [OFB]
* Lots of minor changes to typography.css and reset.css, provided by Christian Montoya [OFB]
* Extracted the fancy typography section in typography.css to a new plugin [OFB]
* Extracted the support for CSS buttons into a new plugin. [OFB]
* Added new plugin structure. [OFB]
* Changed some default fonts so that BP works better with ClearType in XP [OFB]
* Re-added the hack for clearing floats without extra markup. [OFB]
* Added Changelog.txt to track changes in each release. [GR]
* Cleaned up and rationalized SVN dir structure. [GR, OFB]
* print.css : removed reference to 'baseline.png' as it no longer exists. [GR]
* grid.css : removed reference to '.first' css class as it no longer exists. [GR]
* Added append-13 to append-23 and prepend-13 to prepend-23 to allow pushing elements
to both extreme sides of the grid. Added test cases to tests/grid.css [GR]
* Moved test sample files to blueprint/tests sub-directory so tests stay with the code. [GR]
* Consolidated all references to release version number to screen.css [OFB]
* Added ruby script (generate_compressed_css.rb) to scripts dir, and 'csstidy' binary (OS X Universal)
for generating tidied version of Blueprint (lib/compressed.css).
* Consolidated test pages into one single page (test.html). Uses compressed stylesheet by default. This ensures test of
the chain of generation. (todo) Intention is to delete other test files if single file works well. (todo) ensure singular
test file contains latest changes to other test files. [GR]
* Moved the blueprint framework to its own folder in the package, so that the tests, script,
license and readme don't clutter up our BP folder. [OFB]
* Re-saved grid.png with Photoshop to remove Fireworks data which was bloating it.
Now its about 3KB instead of 40+KB. Resolves Issue 22. [GR]
* Moved compressed files to new compressed dir [OFB]
* print.css is now also being generated by the compressor ruby script and is available for use.
* Added new script 'validate_css.rb' which will validate all css files and present a report with
a local java binary of the W3C validator.
* Created an experimental CSS classes plugin, by popular demand. [OFB]
* Improved handling of multi-line headings. [OFB]
* Improved styling of <table>s, you may now use .span classes on <th>s to create tables that follow the grid. [OFB]
* Added support for indented paragraphs to the Fancy-type plugin. [OFB]
* Added a new plugin: link-icons. [OFB]
* Seperated the plugins tests into their own file. [OFB]
* Re-structured some of the tests.html sections. [OFB]
* Added class ".colborder" to grid.css. [OFB]
* Added .error, .notice and .success classes to typography.css. [OFB]
* Added tests for more elements which gets reset in reset.css [OFB, GR]
* Added forms.css, awaiting implementation. Moved form styling from typography.css [OFB]
* Updated compressor script to include forms.css [OFB]
* Improved forms.html tests for upcoming forms.css implementation. This will change based on the
markup that forms.css will use. [OFB]
* Fixed clearing image in button element bug in buttons.css [OFB]
* Fixed bug where IE6 clips pushed/pulled elements. [OFB]
* Fixed typo in grid.css formula. [OFB]
* Fixed varying formatting across core files. [OFB]
* Fixed legend element in IE6. [OFB]
* Fixed indentation in test files. [OFB]
* Removed tests for plugins not bundled with the next release. [OFB]
* Improved styling of <h3>. [OFB]
* Fixed indentation bug in ul/ol, removed some redundant styling. [OFB]
* Fixed validation errors in tests. [OFB]
* Changed IE stylesheet condition comment to include all versions of IE. [OFB]
* Started on a new approach for the PNG plugin. Will not be included in this release. [OFB]
* Fixed incorrect rendering of ol in IE6/7. [OFB]
* Created a new, spiffier sample page. [OFB]
Version 0.5 - August 28, 2007
--
* Changed grid width from 14 to 24 columns [OFB]
* Removed 'first' CSS class and the need to apply it to the first column in a row of columns. [OFB]
* Reverted to using pixels instead of em units to specify vertical spacing due to baseline issues with
all browsers except Firefox. [OFB]
* New set of default fonts. (Experimental) [OFB]
* Added test files [OFB]
Version 0.4 - August 11, 2007
--
* All font sizes and vertical margins are now elastic, through the use of em units.
Resizing works great in every tested browser. [OFB]
* Comes with a new, compressed version of BP, which reduces the size of the core files by 60 percent. [OFB]
* Support for incremental leading, contributed by Mark Boulton. [OFB]
* Adds perfected CSS buttons, by Kevin Hale of Particletree fame. [OFB]
* Fixes all known IE bugs. [OFB]
* Loads of minor fixes and additions. [OFB]
Version 0.3 - March 8, 2007
--
* Initial release of Blueprint (versions 0.1 and 0.2 were internal only).

View file

@ -0,0 +1,314 @@
Blueprint CSS Framework License
----------------------------------------------------------------
Copyright (c) 2007-2008 blueprintcss.org
The Blueprint CSS Framework is available for use in all personal or
commercial projects, under both the (modified) MIT and the GPL license. You
may choose the one that fits your project.
The (modified) MIT License
----------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sub-license, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice, and every other copyright notice found in this
software, and all the attributions in every file, and this permission notice
shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
The GPL License
----------------------------------------------------------------
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

View file

@ -0,0 +1,83 @@
h1. Blueprint CSS Framework Readme
Welcome to Blueprint! This is a CSS framework designed to cut down on your CSS development time. It gives you a solid foundation to build your own CSS on. Here are some of the features BP provides out-of-the-box:
* An easily customizable grid
* Sensible default typography
* A typographic baseline
* Perfected browser CSS reset
* A stylesheet for printing
* Powerful scripts for customization
* Absolutely no bloat!
h2. Project Info
* *Web*: "http://blueprintcss.org":http://blueprintcss.org
* *Source*: "http://github.com/joshuaclayton/blueprint-css":http://github.com/joshuaclayton/blueprint-css
* *Wiki*: "http://github.com/joshuaclayton/blueprint-css/wikis/home":http://github.com/joshuaclayton/blueprint-css/wikis/home
* *Bug/Feature Tracking*: "http://blueprintcss.lighthouseapp.com":http://blueprintcss.lighthouseapp.com
h2. Setup Instructions
Here's how you set up Blueprint on your site.
# Upload the "blueprint" folder in this folder to your server, and place it in whatever folder you'd like. A good choice would be your CSS folder.
# Add the following three lines to every @<head/>@ of your site. Make sure the three @href@ paths are correct (here, BP is in my CSS folder): <pre>
<link rel="stylesheet" href="css/blueprint/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="css/blueprint/print.css" type="text/css" media="print">
<!--[if lt IE 8]>
<link rel="stylesheet" href="css/blueprint/ie.css" type="text/css" media="screen, projection">
<![endif]-->
</pre>
Remember to include trailing slashes (" />") in these lines if you're using XHTML.
# For development, add the .showgrid class to any container or column to see the underlying grid. Check out the @plugins@ directory for more advanced functionality.
h2. Tutorials
* "Tutorial on BlueFlavor":http://blueflavor.com/blog/design/blueprintcss_101.php
* "How to customize BP with the compressor script":http://jdclayton.com/blueprints_compress_a_walkthrough.html
* "How to use a grid in a layout":http://subtraction.com/2007/03/18/oh-yeeaahh
* "How to use a baseline in your typography":http://alistapart.com/articles/settingtypeontheweb
h2. Files in Blueprint
The framework has a few files you should check out. Every file in the @src@ directory contains lots of (hopefully) clarifying comments.
Compressed files (these go in the HTML):
* @blueprint/screen.css@
* @blueprint/print.css@
* @blueprint/ie.css@
Source files:
* @blueprint/src/reset.css@<br/>
This file resets CSS values that browsers tend to set for you.
* @blueprint/src/grid.css@<br/>
This file sets up the grid (it's true). It has a lot of classes you apply to @<div/>@ elements to set up any sort of column-based grid.
* @blueprint/src/typography.css@<br/>
This file sets some default typography. It also has a few methods for some really fancy stuff to do with your text.
* @blueprint/src/forms.css@<br/>
Includes some minimal styling of forms.
* @blueprint/src/print.css@<br/>
This file sets some default print rules, so that printed versions of your site looks better than they usually would. It should be included on every page.
* @blueprint/src/ie.css@<br/>
Includes every hack for our beloved IE6 and 7.
Scripts:
* @lib/compress.rb@<br/>
A Ruby script for compressing and customizing your CSS. Set a custom namespace, column count, widths, output paths, multiple projects, and semantic class names. See commenting in @compress.rb@ or run @$ruby compress.rb -h@ for more information.
* @lib/validate.rb@<br/>
Validates the Blueprint core files with the W3C CSS validator.
Other:
* @blueprint/plugins/@<br/>
Contains additional functionality in the form of simple plugins for Blueprint. See individual readme files in the directory of each plugin for further instructions.
* @tests/@<br/>
Contains html files which tests most aspects of Blueprint. Open @tests/index.html@ for further instructions.
h2. Extra Information
* For credits and origins, see AUTHORS.
* For license instructions, see LICENSE.
* For the latest updates, see CHANGELOG.

View file

@ -0,0 +1,206 @@
h1. Blueprint CSS Framework Tutorial
Welcome to this tutorial on Blueprint. It will give you a thorough intro to what you can do with the framework, and a few notes on what you shouldn't do with it. Let's get started.
h2. About Blueprint
Blueprint is a CSS framework, designed to cut down on your development time. It gives you a solid foundation to build your CSS on top of, including some sensible default typography, a customizable grid, a print stylesheet and much more.
However, BP is not a silver bullet, and it's best suited for websites where each page may require it's own design. Take a look at existing BP pages before deciding if the framework is right for you. You may also check out the test files in the @tests@ directory, which demonstrates most of the features in Blueprint.
The word "framework" may be a bit misleading in this context, since BP does not make suggestions on how you should organize or write your CSS. It's more like a "css toolbox" with helpful bits and pieces, from which you may pick and choose based on your needs.
h2. Structural Overview
From the bottom up, here are the CSS layers in Blueprint:
# *CSS reset*: Removes any default CSS rules set by each browser.
# *Typography*: Gives you some nice default typography and colors.
# *Grid*: Provides a set of CSS classes for making grid layouts.
The second part of Blueprint are the scripts, which lets you customize most
aspects of the framework, from column count and widths, to output paths and
CSS class namespaces. We have two scripts:
# *Compressor*: For compressing and customizing the source files.
# *Validator*: For validating the Blueprint core files.
That's the quick overview, so now we can finally get into the details. First, we'll take
a look at the CSS in Blueprint. We'll then move on to the scripts, where I'll show you
how to customize the framework.
h2. Setting Up Blueprint
To use Blueprint, you must include three files in your HTML:
* @blueprint/screen.css@: All CSS for screen, projection viewing.
* @blueprint/print.css@: A basic stylesheet for printing.
* @blueprint/ie.css@: A few needed corrections for Internet Explorer
To include them, use the following HTML (make sure the href paths are correct):
<pre>
<link rel="stylesheet" href="css/blueprint/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="css/blueprint/print.css" type="text/css" media="print">
<!--[if lt IE 8]>
<link rel="stylesheet" href="css/blueprint/ie.css" type="text/css" media="screen, projection">
<![endif]-->
</pre>
Remember to add trailing slashes if you're using XHTML (" />").
h2. Using the CSS in Blueprint
As mentioned before, there's basically three layers of CSS in Blueprint. The first two layers, the browser CSS reset and the default typography, apply themselves by changing CSS of standard HTML elements. In other words, you don't need to change anything in these files. If you for instance want to change the font size, do this in your own stylesheet, so that it's easy to upgrade Blueprint when new versions arrive.
h3. Classes for Typography
While the typography of Blueprint mainly applies itself, there's a few classes
provided. Here's a list of their names and what they do:
<dl>
<dt>@.small@</dt><dd>Makes the text of this element smaller.</dd>
<dt>@.large@</dt><dd>Makes the text of this element larger.</dd>
<dt>@.hide@</dt><dd>Hides an element.</dd>
<dt>@.quiet@</dt><dd>Tones down the font color for this element.</dd>
<dt>@.loud@</dt><dd>Makes this elements text black.</dd>
<dt>@.highlight@</dt><dd>Adds a yellow background to the text.</dd>
<dt>@.added@</dt><dd>Adds green background to the text.</dd>
<dt>@.removed@</dt><dd>Adds red background to the text.</dd>
<dt>@.first@</dt><dd>Removes any left sided margin/padding from the element.</dd>
<dt>@.last@</dt><dd>Removes any right sided margin/padding from the element.</dd>
<dt>@.top@</dt><dd>Removes any top margin/padding from the element.</dd>
<dt>@.bottom@</dt><dd>Removes any bottom margin/padding from the element.</dd>
</dl>
h3. Styling Forms
To make Blueprint style your input elements, each text input element should
have the class @.text@, or @.title@, where @.text@ is the normal size,
and @.title@ gives you an input field with larger text.
There's also a few classes you may use for success and error messages:
<dl>
<dt>@div.error@</dt><dd>Creates an error box (red).</dd>
<dt>@div.notice@</dt><dd>Creates a box for notices (yellow).</dd>
<dt>@div.success@</dt><dd>Creates a box for success messages (green).</dd>
</dl>
h3. Creating a Grid
The third layer is the grid CSS classes, which is the tool Blueprint gives you to create almost any kind of grid layout for your site. Keep in mind that most of the CSS behind the grid can be customized (explained below). In this section however, I'm using the default settings.
The default grid is made up of 24 columns, each spanning 30px, with a 10px margin between each column. The total width comes to 950px, which is a good width for 1024x768 resolution displays. If you're interested in a narrower design, see the section on customizing the grid, below.
So how do you set up a grid? By using classes provided by Blueprint. To create a column, make a new @<div/>@, and apply one of the @.span-x@ classes to it. For instance, if you want a 3-column setup, with two narrow and one wide column, a header and a footer here's how you do it:
<pre>
<div class="container">
<div class="span-24">
The header
</div>
<div class="span-4">
The first column
</div>
<div class="span-16">
The center column
</div>
<div class="span-4 last">
The last column
</div>
<div class="span-24">
The footer
</div>
</div>
</pre>
In addition to the spans, there are two important classes you need to know about. First of all, every Blueprint site needs to be wrapped in a div with the class @.container@, which is usually placed right after the body tag.
Second, the last column in a row (which by default has 24 columns), needs the class @.last@ to remove its left hand margin. Note, however, that each @.span-24@ don't need the @.last@ class, since these always span the entire width of the page.
To create basic grids, this is all you need to know. The grid CSS however, provides many more classes for more intricate designs. To see some of them in action, check out the files in @tests/parts/@. These files demonstrate what's possible with the grid in Blueprint.
Here's a quick overview of the other classes you can use in to make your grid:
<dl>
<dt>@.append-x@</dt><dd>Appends x number of empty columns after a column.</dd>
<dt>@.prepend-x@</dt><dd>Preppends x number of empty columns before a column.</dd>
<dt>@.push-x@</dt><dd>Pushes a column x columns to the left. Can be used to swap columns.</dd>
<dt>@.pull-x@</dt><dd>Pulls a column x columns to the right. Can be used to swap columns.</dd>
<dt>@.border@</dt><dd>Applies a border to the right side of the column.</dd>
<dt>@.colborder@</dt><dd>Appends one empty column, with a border down the middle.</dd>
<dt>@.clear@</dt><dd>Makes a column drop below a row, regardless of space.</dd>
<dt>@.showgrid@</dt><dd>Add to container or column to see the grid and baseline.</dd>
</dl>
In this list, @x@ is a number from 1 through 23 for append/prepend and 1 through 24 for push/pull. These numbers will of course change if you set a new number of columns in the settings file.
Here's another example where we have four columns of equal width, with a border between the two first and the two last columns, as well as a four column gap in the middle:
<pre>
<div class="container">
<div class="span-5 border">
The first column
</div>
<div class="span-5 append-4">
The second column
</div>
<div class="span-5 border">
The third column
</div>
<div class="span-5 last">
The fourth (last) column
</div>
</div>
</pre>
You may also nest columns to achieve the desired layout. Here's a setup where we want four rectangles with two on top and two below on the first half of the page, and one single column spanning the second half of the page:
<pre>
<div class="container">
<div class="span-12">
<div class="span-6">
Top left
</div>
<div class="span-6 last">
Top right
</div>
<div class="span-6">
Bottom left
</div>
<div class="span-6 last">
Bottom right
</div>
</div>
<div class="span-12 last">
Second half of page
</div>
</div>
</pre>
Try this code in your browser it it's difficult to understand what it would look like. To see more examples on how to use these classes, check out @/tests/parts/grid.html@.
h2. The Scripts
Blueprint comes with two scripts: one for compressing and customizing the CSS, and one for validating the core CSS files, which is handy if you're making changes to these files.
h3. The Validator
The validator has a fairly simple job - validate the CSS in the core BP files. The script uses a bundled version of the W3C CSS validator to accomplish this. To run it, you'll need to have Ruby installed on your machine. You can then run the script like so: @$ ruby validate.rb@.
Note that there are a few validation errors shipping with Blueprint. These are known, and comes from a few CSS hacks needed to ensure consistent rendering across the vast browser field.
h3. The Compressor
As the files you'll include in your HTML are the compressed versions of the core CSS files, you'll have to recompress the core if you've made any changes. This is what the compressor script is for.
In addition this is where you customize the grid. To customize the grid, a special settings file is used, and the new CSS is generated once you run the compressor. The new compressed files will then reflect your settings file.
To recompress, you just have to run the script. This will parse the core CSS files and output new compressed files in the blueprint folder. As with the validator, Ruby has to be installed to use this script. In the @lib@ directory, run: @$ruby compress.rb@
Calling this file by itself will pull files from @blueprint/src@ and concatenate them into three files; @ie.css@, @print.css@, and @screen.css@. However, argument variables can be set to change how this works. Calling @$ruby compress.rb -h@ will reveal basic arguments you can pass to the script.
h3. Custom Settings
To learn how to use custom settings, read through the documentation within @lib/compress.rb@

View file

@ -0,0 +1,278 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Module: Blueprint</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Module</strong></td>
<td class="class-name-in-header">Blueprint</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../files/lib/blueprint/blueprint_rb.html">
lib/blueprint/blueprint.rb
</a>
<br />
<a href="../files/lib/blueprint/compressor_rb.html">
lib/blueprint/compressor.rb
</a>
<br />
<a href="../files/lib/blueprint/css_parser_rb.html">
lib/blueprint/css_parser.rb
</a>
<br />
<a href="../files/lib/blueprint/custom_layout_rb.html">
lib/blueprint/custom_layout.rb
</a>
<br />
<a href="../files/lib/blueprint/grid_builder_rb.html">
lib/blueprint/grid_builder.rb
</a>
<br />
<a href="../files/lib/blueprint/namespace_rb.html">
lib/blueprint/namespace.rb
</a>
<br />
<a href="../files/lib/blueprint/semantic_class_names_rb.html">
lib/blueprint/semantic_class_names.rb
</a>
<br />
<a href="../files/lib/blueprint/validator_rb.html">
lib/blueprint/validator.rb
</a>
<br />
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="class-list">
<h3 class="section-bar">Classes and Modules</h3>
Class <a href="Blueprint/CSSParser.html" class="link">Blueprint::CSSParser</a><br />
Class <a href="Blueprint/Compressor.html" class="link">Blueprint::Compressor</a><br />
Class <a href="Blueprint/CustomLayout.html" class="link">Blueprint::CustomLayout</a><br />
Class <a href="Blueprint/GridBuilder.html" class="link">Blueprint::GridBuilder</a><br />
Class <a href="Blueprint/Namespace.html" class="link">Blueprint::Namespace</a><br />
Class <a href="Blueprint/SemanticClassNames.html" class="link">Blueprint::SemanticClassNames</a><br />
Class <a href="Blueprint/Validator.html" class="link">Blueprint::Validator</a><br />
</div>
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
<tr class="top-aligned-row context-row">
<td class="context-item-name">ROOT_PATH</td>
<td>=</td>
<td class="context-item-value">File.join(File.expand_path(File.dirname(__FILE__)), &quot;../../&quot;)</td>
<td width="3em">&nbsp;</td>
<td class="context-item-desc">
path to the root <a href="Blueprint.html">Blueprint</a> directory
</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">BLUEPRINT_ROOT_PATH</td>
<td>=</td>
<td class="context-item-value">File.join(Blueprint::ROOT_PATH, 'blueprint')</td>
<td width="3em">&nbsp;</td>
<td class="context-item-desc">
path to where the <a href="Blueprint.html">Blueprint</a> CSS files are
stored
</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">SOURCE_PATH</td>
<td>=</td>
<td class="context-item-value">File.join(Blueprint::BLUEPRINT_ROOT_PATH, 'src')</td>
<td width="3em">&nbsp;</td>
<td class="context-item-desc">
path to where the <a href="Blueprint.html">Blueprint</a> CSS raw CSS files
are stored
</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">TEST_PATH</td>
<td>=</td>
<td class="context-item-value">File.join(Blueprint::ROOT_PATH, 'tests')</td>
<td width="3em">&nbsp;</td>
<td class="context-item-desc">
path to where the <a href="Blueprint.html">Blueprint</a> CSS generated test
files are stored
</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">LIB_PATH</td>
<td>=</td>
<td class="context-item-value">File.join(Blueprint::ROOT_PATH, 'lib', 'blueprint')</td>
<td width="3em">&nbsp;</td>
<td class="context-item-desc">
path to the root of the <a href="Blueprint.html">Blueprint</a> scripts
</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">PLUGINS_PATH</td>
<td>=</td>
<td class="context-item-value">File.join(Blueprint::BLUEPRINT_ROOT_PATH, 'plugins')</td>
<td width="3em">&nbsp;</td>
<td class="context-item-desc">
path to where <a href="Blueprint.html">Blueprint</a> plugins are stored
</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">SETTINGS_FILE</td>
<td>=</td>
<td class="context-item-value">File.join(Blueprint::ROOT_PATH, 'lib', 'settings.yml')</td>
<td width="3em">&nbsp;</td>
<td class="context-item-desc">
settings YAML file where custom user settings are saved
</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">VALIDATOR_FILE</td>
<td>=</td>
<td class="context-item-value">File.join(Blueprint::LIB_PATH, 'validate', 'css-validator.jar')</td>
<td width="3em">&nbsp;</td>
<td class="context-item-desc">
path to validator jar file to validate generated CSS files
</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">CSS_FILES</td>
<td>=</td>
<td class="context-item-value">{ 'screen.css' =&gt; ['reset.css', 'typography.css', 'grid.css', 'forms.css'], 'print.css' =&gt; ['print.css'], 'ie.css' =&gt; ['ie.css']</td>
<td width="3em">&nbsp;</td>
<td class="context-item-desc">
hash of compressed and source CSS files
</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">COLUMN_COUNT</td>
<td>=</td>
<td class="context-item-value">24</td>
<td width="3em">&nbsp;</td>
<td class="context-item-desc">
default number of columns for <a href="Blueprint.html">Blueprint</a> layout
</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">COLUMN_WIDTH</td>
<td>=</td>
<td class="context-item-value">30</td>
<td width="3em">&nbsp;</td>
<td class="context-item-desc">
default column width (in pixels) for <a href="Blueprint.html">Blueprint</a>
layout
</td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">GUTTER_WIDTH</td>
<td>=</td>
<td class="context-item-value">10</td>
<td width="3em">&nbsp;</td>
<td class="context-item-desc">
default gutter width (in pixels) for <a href="Blueprint.html">Blueprint</a>
layout
</td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,226 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: Blueprint::CSSParser</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">Blueprint::CSSParser</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/lib/blueprint/css_parser_rb.html">
lib/blueprint/css_parser.rb
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
Strips out most whitespace and can return a hash or string of parsed data
</p>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000011">new</a>&nbsp;&nbsp;
<a href="#M000013">parse</a>&nbsp;&nbsp;
<a href="#M000012">to_s</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="attribute-list">
<h3 class="section-bar">Attributes</h3>
<div class="name-list">
<table>
<tr class="top-aligned-row context-row">
<td class="context-item-name">css_output</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">namespace</td>
<td class="context-item-value">&nbsp;[RW]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">raw_data</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000011" class="method-detail">
<a name="M000011"></a>
<div class="method-heading">
<a href="CSSParser.src/M000011.html" target="Code" class="method-signature"
onclick="popupCode('CSSParser.src/M000011.html');return false;">
<span class="method-name">new</span><span class="method-args">(css_string = &quot;&quot;, options = {})</span>
</a>
</div>
<div class="method-description">
<h4>Options</h4>
<ul>
<li><tt>css_string</tt> <a href="../String.html">String</a> of CSS data
</li>
<li><tt>options</tt>
<ul>
<li><tt>:namespace</tt> &#8212; <a href="Namespace.html">Namespace</a> to use
when generating output
</li>
</ul>
</li>
</ul>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000013" class="method-detail">
<a name="M000013"></a>
<div class="method-heading">
<a href="CSSParser.src/M000013.html" target="Code" class="method-signature"
onclick="popupCode('CSSParser.src/M000013.html');return false;">
<span class="method-name">parse</span><span class="method-args">(data = nil)</span>
</a>
</div>
<div class="method-description">
<p>
returns a hash of all CSS data passed
</p>
<h4>Options</h4>
<ul>
<li><tt>data</tt> &#8212; CSS string; defaults to string passed into the
constructor
</li>
</ul>
</div>
</div>
<div id="method-M000012" class="method-detail">
<a name="M000012"></a>
<div class="method-heading">
<a href="CSSParser.src/M000012.html" target="Code" class="method-signature"
onclick="popupCode('CSSParser.src/M000012.html');return false;">
<span class="method-name">to_s</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
returns string of CSS which can be saved to a file or otherwise
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (Blueprint::CSSParser)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/css_parser.rb, line 11</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">css_string</span> = <span class="ruby-value str">&quot;&quot;</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-ivar">@raw_data</span> = <span class="ruby-identifier">css_string</span>
<span class="ruby-ivar">@namespace</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:namespace</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">&quot;&quot;</span>
<span class="ruby-identifier">compress</span>(<span class="ruby-ivar">@raw_data</span>)
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>to_s (Blueprint::CSSParser)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/css_parser.rb, line 18</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
<span class="ruby-ivar">@css_output</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>parse (Blueprint::CSSParser)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/css_parser.rb, line 26</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse</span>(<span class="ruby-identifier">data</span> = <span class="ruby-keyword kw">nil</span>)
<span class="ruby-identifier">data</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@raw_data</span>
<span class="ruby-comment cmt"># wrapper array holding hashes of css tags/rules</span>
<span class="ruby-identifier">css_out</span> = []
<span class="ruby-comment cmt"># clear initial spaces</span>
<span class="ruby-identifier">data</span>.<span class="ruby-identifier">strip_side_space!</span>.<span class="ruby-identifier">strip_space!</span>
<span class="ruby-comment cmt"># split on end of assignments</span>
<span class="ruby-identifier">data</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'}'</span>).<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">assignments</span>, <span class="ruby-identifier">index</span><span class="ruby-operator">|</span>
<span class="ruby-comment cmt"># split again to separate tags from rules</span>
<span class="ruby-identifier">tags</span>, <span class="ruby-identifier">styles</span> = <span class="ruby-identifier">assignments</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'{'</span>).<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">strip_side_space!</span>}
<span class="ruby-comment cmt"># clean up tags and apply namespaces as needed</span>
<span class="ruby-identifier">tags</span>.<span class="ruby-identifier">strip_selector_space!</span>
<span class="ruby-identifier">tags</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/\./</span>, <span class="ruby-node">&quot;.#{namespace}&quot;</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">blank?</span>
<span class="ruby-comment cmt"># split on semicolon to iterate through each rule</span>
<span class="ruby-identifier">rules</span> = []
<span class="ruby-identifier">styles</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">';'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key_val_pair</span><span class="ruby-operator">|</span>
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">key_val_pair</span>.<span class="ruby-identifier">nil?</span>
<span class="ruby-comment cmt"># split by property/val and append to rules array with correct declaration</span>
<span class="ruby-identifier">property</span>, <span class="ruby-identifier">value</span> = <span class="ruby-identifier">key_val_pair</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">':'</span>).<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">kv</span><span class="ruby-operator">|</span> <span class="ruby-identifier">kv</span>.<span class="ruby-identifier">strip_side_space!</span>}
<span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">property</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">value</span>
<span class="ruby-identifier">rules</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{property}:#{value};&quot;</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-comment cmt"># now keeps track of index as hashes don't keep track of position (which will be fixed in Ruby 1.9)</span>
<span class="ruby-identifier">css_out</span> <span class="ruby-operator">&lt;&lt;</span> {<span class="ruby-identifier">:tags</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">tags</span>, <span class="ruby-identifier">:rules</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">rules</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">:idx</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">index</span>} <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">tags</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">rules</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">blank?</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-identifier">css_out</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,251 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: Blueprint::Compressor</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">Blueprint::Compressor</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/lib/blueprint/compressor_rb.html">
lib/blueprint/compressor.rb
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000027">destination_path=</a>&nbsp;&nbsp;
<a href="#M000029">generate!</a>&nbsp;&nbsp;
<a href="#M000028">new</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
<tr class="top-aligned-row context-row">
<td class="context-item-name">TEST_FILES</td>
<td>=</td>
<td class="context-item-value">['index.html', 'parts/elements.html', 'parts/forms.html', 'parts/grid.html', 'parts/sample.html']</td>
</tr>
</table>
</div>
</div>
<div id="attribute-list">
<h3 class="section-bar">Attributes</h3>
<div class="name-list">
<table>
<tr class="top-aligned-row context-row">
<td class="context-item-name">custom_css</td>
<td class="context-item-value">&nbsp;[RW]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">custom_layout</td>
<td class="context-item-value">&nbsp;[RW]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">custom_path</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">destination_path</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">loaded_from_settings</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">namespace</td>
<td class="context-item-value">&nbsp;[RW]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">plugins</td>
<td class="context-item-value">&nbsp;[RW]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">project_name</td>
<td class="context-item-value">&nbsp;[RW]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">script_name</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">semantic_classes</td>
<td class="context-item-value">&nbsp;[RW]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000028" class="method-detail">
<a name="M000028"></a>
<div class="method-heading">
<a href="Compressor.src/M000028.html" target="Code" class="method-signature"
onclick="popupCode('Compressor.src/M000028.html');return false;">
<span class="method-name">new</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
constructor
</p>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000027" class="method-detail">
<a name="M000027"></a>
<div class="method-heading">
<a href="Compressor.src/M000027.html" target="Code" class="method-signature"
onclick="popupCode('Compressor.src/M000027.html');return false;">
<span class="method-name">destination_path=</span><span class="method-args">(path)</span>
</a>
</div>
<div class="method-description">
<p>
overridden setter method for destination_path also sets custom_path flag on
<a href="Compressor.html">Blueprint::Compressor</a> instance
</p>
</div>
</div>
<div id="method-M000029" class="method-detail">
<a name="M000029"></a>
<div class="method-heading">
<a href="Compressor.src/M000029.html" target="Code" class="method-signature"
onclick="popupCode('Compressor.src/M000029.html');return false;">
<span class="method-name">generate!</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
generates output CSS based on any args passed in overwrites any existing
CSS, as well as grid.png and tests
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>destination_path= (Blueprint::Compressor)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/compressor.rb, line 16</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destination_path=</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-ivar">@destination_path</span> = <span class="ruby-identifier">path</span>
<span class="ruby-ivar">@custom_path</span> = <span class="ruby-ivar">@destination_path</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">Blueprint</span><span class="ruby-operator">::</span><span class="ruby-constant">BLUEPRINT_ROOT_PATH</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (Blueprint::Compressor)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/compressor.rb, line 22</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
<span class="ruby-comment cmt"># set up defaults</span>
<span class="ruby-ivar">@script_name</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">$0</span>)
<span class="ruby-ivar">@loaded_from_settings</span> = <span class="ruby-keyword kw">false</span>
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">namespace</span> = <span class="ruby-value str">&quot;&quot;</span>
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">destination_path</span> = <span class="ruby-constant">Blueprint</span><span class="ruby-operator">::</span><span class="ruby-constant">BLUEPRINT_ROOT_PATH</span>
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">custom_layout</span> = <span class="ruby-constant">CustomLayout</span>.<span class="ruby-identifier">new</span>
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">project_name</span> = <span class="ruby-keyword kw">nil</span>
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">custom_css</span> = {}
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">semantic_classes</span> = {}
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">plugins</span> = []
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">options</span>.<span class="ruby-identifier">parse!</span>(<span class="ruby-constant">ARGV</span>)
<span class="ruby-identifier">initialize_project_from_yaml</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">project_name</span>)
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>generate! (Blueprint::Compressor)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/compressor.rb, line 40</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate!</span>
<span class="ruby-identifier">output_header</span> <span class="ruby-comment cmt"># information to the user (in the console) describing custom settings</span>
<span class="ruby-identifier">generate_css_files</span> <span class="ruby-comment cmt"># loops through Blueprint::CSS_FILES to generate output CSS</span>
<span class="ruby-identifier">generate_tests</span> <span class="ruby-comment cmt"># updates HTML with custom namespaces in order to test the generated library. TODO: have tests kick out to custom location</span>
<span class="ruby-identifier">output_footer</span> <span class="ruby-comment cmt"># informs the user that the CSS generation process is complete</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,318 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: Blueprint::CustomLayout</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">Blueprint::CustomLayout</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/lib/blueprint/custom_layout_rb.html">
lib/blueprint/custom_layout.rb
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
Generates a custom grid file, using ERB to evaluate custom settings
</p>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000020">column_count</a>&nbsp;&nbsp;
<a href="#M000021">column_width</a>&nbsp;&nbsp;
<a href="#M000025">default?</a>&nbsp;&nbsp;
<a href="#M000026">generate_grid_css</a>&nbsp;&nbsp;
<a href="#M000022">gutter_width</a>&nbsp;&nbsp;
<a href="#M000024">new</a>&nbsp;&nbsp;
<a href="#M000023">page_width</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="constants-list">
<h3 class="section-bar">Constants</h3>
<div class="name-list">
<table summary="Constants">
<tr class="top-aligned-row context-row">
<td class="context-item-name">CSS_ERB_FILE</td>
<td>=</td>
<td class="context-item-value">File.join(Blueprint::LIB_PATH, 'grid.css.erb')</td>
<td width="3em">&nbsp;</td>
<td class="context-item-desc">
path to ERB file used for CSS template
</td>
</tr>
</table>
</div>
</div>
<div id="attribute-list">
<h3 class="section-bar">Attributes</h3>
<div class="name-list">
<table>
<tr class="top-aligned-row context-row">
<td class="context-item-name">column_count</td>
<td class="context-item-value">&nbsp;[W]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">column_width</td>
<td class="context-item-value">&nbsp;[W]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">gutter_width</td>
<td class="context-item-value">&nbsp;[W]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000024" class="method-detail">
<a name="M000024"></a>
<div class="method-heading">
<a href="CustomLayout.src/M000024.html" target="Code" class="method-signature"
onclick="popupCode('CustomLayout.src/M000024.html');return false;">
<span class="method-name">new</span><span class="method-args">(options = {})</span>
</a>
</div>
<div class="method-description">
<h4>Options</h4>
<ul>
<li><tt>options</tt>
<ul>
<li><tt>:<a href="CustomLayout.html#M000020">column_count</a></tt> &#8212; Sets
the column count of generated CSS
</li>
<li><tt>:<a href="CustomLayout.html#M000021">column_width</a></tt> &#8212; Sets
the column width (in pixels) of generated CSS
</li>
<li><tt>:<a href="CustomLayout.html#M000022">gutter_width</a></tt> &#8212; Sets
the gutter width (in pixels) of generated CSS
</li>
</ul>
</li>
</ul>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000020" class="method-detail">
<a name="M000020"></a>
<div class="method-heading">
<a href="CustomLayout.src/M000020.html" target="Code" class="method-signature"
onclick="popupCode('CustomLayout.src/M000020.html');return false;">
<span class="method-name">column_count</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Column count of generated CSS. Returns itself or <a
href="../Blueprint.html">Blueprint</a>&#8216;s default
</p>
</div>
</div>
<div id="method-M000021" class="method-detail">
<a name="M000021"></a>
<div class="method-heading">
<a href="CustomLayout.src/M000021.html" target="Code" class="method-signature"
onclick="popupCode('CustomLayout.src/M000021.html');return false;">
<span class="method-name">column_width</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Column width (in pixels) of generated CSS. Returns itself or <a
href="../Blueprint.html">Blueprint</a>&#8216;s default
</p>
</div>
</div>
<div id="method-M000025" class="method-detail">
<a name="M000025"></a>
<div class="method-heading">
<a href="CustomLayout.src/M000025.html" target="Code" class="method-signature"
onclick="popupCode('CustomLayout.src/M000025.html');return false;">
<span class="method-name">default?</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Boolean value if current settings are <a
href="../Blueprint.html">Blueprint</a>&#8216;s defaults
</p>
</div>
</div>
<div id="method-M000026" class="method-detail">
<a name="M000026"></a>
<div class="method-heading">
<a href="CustomLayout.src/M000026.html" target="Code" class="method-signature"
onclick="popupCode('CustomLayout.src/M000026.html');return false;">
<span class="method-name">generate_grid_css</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Loads grid.css.erb file, binds it to current instance, and returns output
</p>
</div>
</div>
<div id="method-M000022" class="method-detail">
<a name="M000022"></a>
<div class="method-heading">
<a href="CustomLayout.src/M000022.html" target="Code" class="method-signature"
onclick="popupCode('CustomLayout.src/M000022.html');return false;">
<span class="method-name">gutter_width</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Gutter width (in pixels) of generated CSS. Returns itself or <a
href="../Blueprint.html">Blueprint</a>&#8216;s default
</p>
</div>
</div>
<div id="method-M000023" class="method-detail">
<a name="M000023"></a>
<div class="method-heading">
<a href="CustomLayout.src/M000023.html" target="Code" class="method-signature"
onclick="popupCode('CustomLayout.src/M000023.html');return false;">
<span class="method-name">page_width</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Returns page width (in pixels)
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>column_count (Blueprint::CustomLayout)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/custom_layout.rb, line 11</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">column_count</span>
(<span class="ruby-ivar">@column_count</span> <span class="ruby-operator">||</span> <span class="ruby-constant">Blueprint</span><span class="ruby-operator">::</span><span class="ruby-constant">COLUMN_COUNT</span>).<span class="ruby-identifier">to_i</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>column_width (Blueprint::CustomLayout)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/custom_layout.rb, line 16</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">column_width</span>
(<span class="ruby-ivar">@column_width</span> <span class="ruby-operator">||</span> <span class="ruby-constant">Blueprint</span><span class="ruby-operator">::</span><span class="ruby-constant">COLUMN_WIDTH</span>).<span class="ruby-identifier">to_i</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>gutter_width (Blueprint::CustomLayout)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/custom_layout.rb, line 21</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gutter_width</span>
(<span class="ruby-ivar">@gutter_width</span> <span class="ruby-operator">||</span> <span class="ruby-constant">Blueprint</span><span class="ruby-operator">::</span><span class="ruby-constant">GUTTER_WIDTH</span>).<span class="ruby-identifier">to_i</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>page_width (Blueprint::CustomLayout)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/custom_layout.rb, line 26</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">page_width</span>
<span class="ruby-identifier">column_count</span> <span class="ruby-operator">*</span> (<span class="ruby-identifier">column_width</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">gutter_width</span>) <span class="ruby-operator">-</span> <span class="ruby-identifier">gutter_width</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (Blueprint::CustomLayout)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/custom_layout.rb, line 35</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span> = {})
<span class="ruby-ivar">@column_count</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:column_count</span>]
<span class="ruby-ivar">@column_width</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:column_width</span>]
<span class="ruby-ivar">@gutter_width</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:gutter_width</span>]
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>default? (Blueprint::CustomLayout)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/custom_layout.rb, line 42</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default?</span>
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">column_width</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Blueprint</span><span class="ruby-operator">::</span><span class="ruby-constant">COLUMN_WIDTH</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">column_count</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Blueprint</span><span class="ruby-operator">::</span><span class="ruby-constant">COLUMN_COUNT</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">gutter_width</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Blueprint</span><span class="ruby-operator">::</span><span class="ruby-constant">GUTTER_WIDTH</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>generate_grid_css (Blueprint::CustomLayout)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/custom_layout.rb, line 47</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate_grid_css</span>
<span class="ruby-comment cmt"># loads up erb template to evaluate custom widths</span>
<span class="ruby-identifier">css</span> = <span class="ruby-constant">ERB</span><span class="ruby-operator">::</span><span class="ruby-identifier">new</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">path_to_string</span>(<span class="ruby-constant">CustomLayout</span><span class="ruby-operator">::</span><span class="ruby-constant">CSS_ERB_FILE</span>))
<span class="ruby-comment cmt"># bind it to this instance</span>
<span class="ruby-identifier">css</span>.<span class="ruby-identifier">result</span>(<span class="ruby-identifier">binding</span>)
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,216 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: Blueprint::GridBuilder</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">Blueprint::GridBuilder</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/lib/blueprint/grid_builder_rb.html">
lib/blueprint/grid_builder.rb
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
Uses ImageMagick and RMagick to generate grid.png file
</p>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000015">generate!</a>&nbsp;&nbsp;
<a href="#M000014">new</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="includes">
<h3 class="section-bar">Included Modules</h3>
<div id="includes-list">
<span class="include-name">Magick</span>
</div>
</div>
<div id="section">
<div id="attribute-list">
<h3 class="section-bar">Attributes</h3>
<div class="name-list">
<table>
<tr class="top-aligned-row context-row">
<td class="context-item-name">able_to_generate</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">column_width</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">gutter_width</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">output_path</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000014" class="method-detail">
<a name="M000014"></a>
<div class="method-heading">
<a href="GridBuilder.src/M000014.html" target="Code" class="method-signature"
onclick="popupCode('GridBuilder.src/M000014.html');return false;">
<span class="method-name">new</span><span class="method-args">(options={})</span>
</a>
</div>
<div class="method-description">
<h4>Options</h4>
<ul>
<li><tt>options</tt>
<ul>
<li><tt>:column_width</tt> &#8212; Width (in pixels) of current grid column
</li>
<li><tt>:gutter_width</tt> &#8212; Width (in pixels) of current grid gutter
</li>
<li><tt>:output_path</tt> &#8212; Output path of grid.png file
</li>
</ul>
</li>
</ul>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000015" class="method-detail">
<a name="M000015"></a>
<div class="method-heading">
<a href="GridBuilder.src/M000015.html" target="Code" class="method-signature"
onclick="popupCode('GridBuilder.src/M000015.html');return false;">
<span class="method-name">generate!</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
generates (overwriting if necessary) grid.png image to be tiled in
background
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (Blueprint::GridBuilder)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/grid_builder.rb, line 23</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>={})
<span class="ruby-ivar">@able_to_generate</span> = <span class="ruby-constant">Magick</span><span class="ruby-operator">::</span><span class="ruby-constant">Long_version</span> <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">false</span>
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@able_to_generate</span>
<span class="ruby-ivar">@column_width</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:column_width</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">Blueprint</span><span class="ruby-operator">::</span><span class="ruby-constant">COLUMN_WIDTH</span>
<span class="ruby-ivar">@gutter_width</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:gutter_width</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">Blueprint</span><span class="ruby-operator">::</span><span class="ruby-constant">GUTTER_WIDTH</span>
<span class="ruby-ivar">@output_path</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:output_path</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">Blueprint</span><span class="ruby-operator">::</span><span class="ruby-constant">SOURCE_PATH</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>generate! (Blueprint::GridBuilder)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/grid_builder.rb, line 32</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate!</span>
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">able_to_generate</span>
<span class="ruby-identifier">total_width</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">column_width</span> <span class="ruby-operator">+</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">gutter_width</span>
<span class="ruby-identifier">height</span> = <span class="ruby-value">20</span>
<span class="ruby-constant">RVG</span><span class="ruby-operator">::</span><span class="ruby-identifier">dpi</span> = <span class="ruby-value">100</span>
<span class="ruby-identifier">rvg</span> = <span class="ruby-constant">RVG</span>.<span class="ruby-identifier">new</span>((<span class="ruby-identifier">total_width</span>.<span class="ruby-identifier">to_f</span><span class="ruby-operator">/</span><span class="ruby-constant">RVG</span><span class="ruby-operator">::</span><span class="ruby-identifier">dpi</span>).<span class="ruby-identifier">in</span>, (<span class="ruby-identifier">height</span>.<span class="ruby-identifier">to_f</span><span class="ruby-operator">/</span><span class="ruby-constant">RVG</span><span class="ruby-operator">::</span><span class="ruby-identifier">dpi</span>).<span class="ruby-identifier">in</span>).<span class="ruby-identifier">viewbox</span>(<span class="ruby-value">0</span>, <span class="ruby-value">0</span>, <span class="ruby-identifier">total_width</span>, <span class="ruby-identifier">height</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">canvas</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">canvas</span>.<span class="ruby-identifier">background_fill</span> = <span class="ruby-value str">'white'</span>
<span class="ruby-identifier">canvas</span>.<span class="ruby-identifier">g</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">column</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">column</span>.<span class="ruby-identifier">rect</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">column_width</span>, <span class="ruby-identifier">height</span>).<span class="ruby-identifier">styles</span>(<span class="ruby-identifier">:fill</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;#e8effb&quot;</span>)
<span class="ruby-keyword kw">end</span>
<span class="ruby-identifier">canvas</span>.<span class="ruby-identifier">g</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">baseline</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">baseline</span>.<span class="ruby-identifier">line</span>(<span class="ruby-value">0</span>, (<span class="ruby-identifier">height</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>), <span class="ruby-identifier">total_width</span>, (<span class="ruby-identifier">height</span><span class="ruby-operator">-</span> <span class="ruby-value">1</span>)).<span class="ruby-identifier">styles</span>(<span class="ruby-identifier">:fill</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;#e9e9e9&quot;</span>)
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">output_path</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">output_path</span>
<span class="ruby-identifier">rvg</span>.<span class="ruby-identifier">draw</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">output_path</span>, <span class="ruby-value str">&quot;grid.png&quot;</span>))
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,197 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: Blueprint::Namespace</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">Blueprint::Namespace</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/lib/blueprint/namespace_rb.html">
lib/blueprint/namespace.rb
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000017">add_namespace</a>&nbsp;&nbsp;
<a href="#M000019">current_namespace</a>&nbsp;&nbsp;
<a href="#M000016">new</a>&nbsp;&nbsp;
<a href="#M000018">remove_current_namespace</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000016" class="method-detail">
<a name="M000016"></a>
<div class="method-heading">
<a href="Namespace.src/M000016.html" target="Code" class="method-signature"
onclick="popupCode('Namespace.src/M000016.html');return false;">
<span class="method-name">new</span><span class="method-args">(path, namespace)</span>
</a>
</div>
<div class="method-description">
<p>
Read html to string, remove namespace if any, set the <a
href="Namespace.html#M000016">new</a> namespace, and update the test file.
</p>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000017" class="method-detail">
<a name="M000017"></a>
<div class="method-heading">
<a href="Namespace.src/M000017.html" target="Code" class="method-signature"
onclick="popupCode('Namespace.src/M000017.html');return false;">
<span class="method-name">add_namespace</span><span class="method-args">(html, namespace)</span>
</a>
</div>
<div class="method-description">
<p>
adds namespace to BP classes in a html file
</p>
</div>
</div>
<div id="method-M000019" class="method-detail">
<a name="M000019"></a>
<div class="method-heading">
<a href="Namespace.src/M000019.html" target="Code" class="method-signature"
onclick="popupCode('Namespace.src/M000019.html');return false;">
<span class="method-name">current_namespace</span><span class="method-args">(html)</span>
</a>
</div>
<div class="method-description">
<p>
returns current namespace in test files based on container class
</p>
</div>
</div>
<div id="method-M000018" class="method-detail">
<a name="M000018"></a>
<div class="method-heading">
<a href="Namespace.src/M000018.html" target="Code" class="method-signature"
onclick="popupCode('Namespace.src/M000018.html');return false;">
<span class="method-name">remove_current_namespace</span><span class="method-args">(html)</span>
</a>
</div>
<div class="method-description">
<p>
removes a namespace from a string of html
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (Blueprint::Namespace)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/namespace.rb, line 6</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">namespace</span>)
<span class="ruby-identifier">html</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">path_to_string</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-identifier">remove_current_namespace</span>(<span class="ruby-identifier">html</span>)
<span class="ruby-identifier">add_namespace</span>(<span class="ruby-identifier">html</span>, <span class="ruby-identifier">namespace</span>)
<span class="ruby-constant">File</span>.<span class="ruby-identifier">string_to_file</span>(<span class="ruby-identifier">html</span>, <span class="ruby-identifier">path</span>)
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>add_namespace (Blueprint::Namespace)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/namespace.rb, line 14</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_namespace</span>(<span class="ruby-identifier">html</span>, <span class="ruby-identifier">namespace</span>)
<span class="ruby-identifier">html</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/(class=&quot;)([a-zA-Z0-9\-_ ]*)(&quot;)/</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">classes</span> = <span class="ruby-identifier">m</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'&quot;'</span>)[<span class="ruby-value">1</span>].<span class="ruby-identifier">split</span>(<span class="ruby-value str">' '</span>)
<span class="ruby-identifier">classes</span>.<span class="ruby-identifier">map!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span> = <span class="ruby-identifier">namespace</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">c</span> }
<span class="ruby-value str">'class=&quot;'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">classes</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">'&quot;'</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-identifier">html</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>remove_current_namespace (Blueprint::Namespace)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/namespace.rb, line 24</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_current_namespace</span>(<span class="ruby-identifier">html</span>)
<span class="ruby-identifier">current</span> = <span class="ruby-identifier">current_namespace</span>(<span class="ruby-identifier">html</span>)
<span class="ruby-identifier">html</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-identifier">current</span>, <span class="ruby-value str">''</span>)
<span class="ruby-identifier">html</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>current_namespace (Blueprint::Namespace)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/namespace.rb, line 32</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_namespace</span>(<span class="ruby-identifier">html</span>)
<span class="ruby-identifier">html</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/class=&quot;([\S]+)container/</span>
<span class="ruby-identifier">current_namespace</span> = <span class="ruby-identifier">$1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$1</span>
<span class="ruby-identifier">current_namespace</span> <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,216 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: Blueprint::SemanticClassNames</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">Blueprint::SemanticClassNames</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/lib/blueprint/semantic_class_names_rb.html">
lib/blueprint/semantic_class_names.rb
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
parses a hash of key/value pairs, key being output CSS selectors, value
being a list of CSS selectors to draw from
</p>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000010">css_from_assignments</a>&nbsp;&nbsp;
<a href="#M000009">new</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="attribute-list">
<h3 class="section-bar">Attributes</h3>
<div class="name-list">
<table>
<tr class="top-aligned-row context-row">
<td class="context-item-name">class_assignments</td>
<td class="context-item-value">&nbsp;[RW]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">namespace</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
<tr class="top-aligned-row context-row">
<td class="context-item-name">source_file</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000009" class="method-detail">
<a name="M000009"></a>
<div class="method-heading">
<a href="SemanticClassNames.src/M000009.html" target="Code" class="method-signature"
onclick="popupCode('SemanticClassNames.src/M000009.html');return false;">
<span class="method-name">new</span><span class="method-args">(options = {})</span>
</a>
</div>
<div class="method-description">
<h4>Options</h4>
<ul>
<li><tt>options</tt>
<ul>
<li><tt>:namespace</tt> &#8212; <a href="Namespace.html">Namespace</a> to be
used when matching CSS selectors to draw from
</li>
<li><tt>:source_file</tt> &#8212; Source file to use as reference of CSS
selectors. Defaults to <a href="../Blueprint.html">Blueprint</a>&#8216;s
generated screen.css
</li>
<li><tt>:class_assignments</tt> &#8212; Hash of key/value pairs, key being
output CSS selectors, value being a list of CSS selectors to draw from
</li>
</ul>
</li>
</ul>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000010" class="method-detail">
<a name="M000010"></a>
<div class="method-heading">
<a href="SemanticClassNames.src/M000010.html" target="Code" class="method-signature"
onclick="popupCode('SemanticClassNames.src/M000010.html');return false;">
<span class="method-name">css_from_assignments</span><span class="method-args">(assignments = {})</span>
</a>
</div>
<div class="method-description">
<p>
Returns a CSS string of semantic selectors and associated styles
</p>
<h4>Options</h4>
<ul>
<li><tt>assignments</tt> &#8212; Hash of key/value pairs, key being output CSS
selectors, value being a list of CSS selectors to draw from; defaults to
what was passed in constructor or empty hash
</li>
</ul>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (Blueprint::SemanticClassNames)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/semantic_class_names.rb, line 12</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span> = {})
<span class="ruby-ivar">@namespace</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:namespace</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">&quot;&quot;</span>
<span class="ruby-ivar">@source_file</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:source_file</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Blueprint</span><span class="ruby-operator">::</span><span class="ruby-constant">BLUEPRINT_ROOT_PATH</span>, <span class="ruby-value str">'screen.css'</span>)
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class_assignments</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:class_assignments</span>] <span class="ruby-operator">||</span> {}
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>css_from_assignments (Blueprint::SemanticClassNames)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/semantic_class_names.rb, line 21</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">css_from_assignments</span>(<span class="ruby-identifier">assignments</span> = {})
<span class="ruby-identifier">assignments</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class_assignments</span>
<span class="ruby-comment cmt"># define a wrapper hash to hold all the new CSS assignments</span>
<span class="ruby-identifier">output_css</span> = {}
<span class="ruby-comment cmt">#loads full stylesheet into an array of hashes</span>
<span class="ruby-identifier">blueprint_assignments</span> = <span class="ruby-constant">CSSParser</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">path_to_string</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">source_file</span>)).<span class="ruby-identifier">parse</span>
<span class="ruby-comment cmt"># iterates through each class assignment ('#footer' =&gt; '.span-24 div.span-24', '#header' =&gt; '.span-24 div.span-24')</span>
<span class="ruby-identifier">assignments</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">semantic_class</span>, <span class="ruby-identifier">blueprint_classes</span><span class="ruby-operator">|</span>
<span class="ruby-comment cmt"># gathers all BP classes we're going to be mimicing</span>
<span class="ruby-identifier">blueprint_classes</span> = <span class="ruby-identifier">blueprint_classes</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/,|\s/</span>).<span class="ruby-identifier">find_all</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span><span class="ruby-identifier">c</span>.<span class="ruby-identifier">blank?</span> }.<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">strip</span> }
<span class="ruby-identifier">classes</span> = []
<span class="ruby-comment cmt"># loop through each BP class, grabbing the full hash (containing tags, index, and CSS rules)</span>
<span class="ruby-identifier">blueprint_classes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">bp_class</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">match</span> = <span class="ruby-identifier">bp_class</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">'.'</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">bp_class</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">&quot;.&quot;</span>, <span class="ruby-node">&quot;.#{self.namespace}&quot;</span>) <span class="ruby-operator">:</span> <span class="ruby-node">&quot;.#{self.namespace}#{bp_class}&quot;</span>
<span class="ruby-identifier">classes</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">blueprint_assignments</span>.<span class="ruby-identifier">find_all</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">line</span>[<span class="ruby-identifier">:tags</span>] <span class="ruby-operator">=~</span> <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">/^([\w\.\-]+, ?)*#{match}(, ?[\w\.\-]+)*$/</span>) }.<span class="ruby-identifier">uniq</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-comment cmt"># clean up the array</span>
<span class="ruby-identifier">classes</span> = <span class="ruby-identifier">classes</span>.<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">uniq</span>
<span class="ruby-comment cmt"># set the semantic class to the rules gathered in classes, sorted by index</span>
<span class="ruby-comment cmt"># this way, the styles will be applied in the correct order from top of file to bottom</span>
<span class="ruby-identifier">output_css</span>[<span class="ruby-identifier">semantic_class</span>] = <span class="ruby-node">&quot;#{classes.sort_by {|i| i[:idx]}.map {|i| i[:rules]}}&quot;</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-comment cmt"># return the css in proper format</span>
<span class="ruby-identifier">css</span> = <span class="ruby-value str">&quot;&quot;</span>
<span class="ruby-identifier">output_css</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tags</span>, <span class="ruby-identifier">rules</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">css</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;#{tags} {#{rules}}\n&quot;</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-identifier">css</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,176 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: Blueprint::Validator</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">Blueprint::Validator</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../../files/lib/blueprint/validator_rb.html">
lib/blueprint/validator.rb
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>
Validates generated CSS against the W3 using Java
</p>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000007">new</a>&nbsp;&nbsp;
<a href="#M000008">validate</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="attribute-list">
<h3 class="section-bar">Attributes</h3>
<div class="name-list">
<table>
<tr class="top-aligned-row context-row">
<td class="context-item-name">error_count</td>
<td class="context-item-value">&nbsp;[R]&nbsp;</td>
<td class="context-item-desc"></td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000007" class="method-detail">
<a name="M000007"></a>
<div class="method-heading">
<a href="Validator.src/M000007.html" target="Code" class="method-signature"
onclick="popupCode('Validator.src/M000007.html');return false;">
<span class="method-name">new</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000008" class="method-detail">
<a name="M000008"></a>
<div class="method-heading">
<a href="Validator.src/M000008.html" target="Code" class="method-signature"
onclick="popupCode('Validator.src/M000008.html');return false;">
<span class="method-name">validate</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Validates all three CSS files
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>new (Blueprint::Validator)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/validator.rb, line 6</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
<span class="ruby-ivar">@error_count</span> = <span class="ruby-value">0</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>validate (Blueprint::Validator)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/validator.rb, line 11</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validate</span>
<span class="ruby-identifier">java_path</span> = <span class="ruby-value">`which java`</span>.<span class="ruby-identifier">rstrip</span>
<span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;You do not have a Java installed, but it is required.&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">java_path</span>.<span class="ruby-identifier">blank?</span>
<span class="ruby-identifier">output_header</span>
<span class="ruby-constant">Blueprint</span><span class="ruby-operator">::</span><span class="ruby-constant">CSS_FILES</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file_name</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">css_output_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Blueprint</span><span class="ruby-operator">::</span><span class="ruby-constant">BLUEPRINT_ROOT_PATH</span>, <span class="ruby-identifier">file_name</span>)
<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;\n\n Testing #{css_output_path}&quot;</span>
<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot; Output ============================================================\n\n&quot;</span>
<span class="ruby-ivar">@error_count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>(<span class="ruby-node">&quot;#{java_path} -jar '#{Blueprint::VALIDATOR_FILE}' -e '#{css_output_path}'&quot;</span>)
<span class="ruby-keyword kw">end</span>
<span class="ruby-identifier">output_footer</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,158 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: File</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">File</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../files/lib/blueprint/core_ext_rb.html">
lib/blueprint/core_ext.rb
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000001">path_to_string</a>&nbsp;&nbsp;
<a href="#M000002">string_to_file</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000001" class="method-detail">
<a name="M000001"></a>
<div class="method-heading">
<a href="File.src/M000001.html" target="Code" class="method-signature"
onclick="popupCode('File.src/M000001.html');return false;">
<span class="method-name">path_to_string</span><span class="method-args">(path)</span>
</a>
</div>
<div class="method-description">
<p>
string output from file
</p>
</div>
</div>
<div id="method-M000002" class="method-detail">
<a name="M000002"></a>
<div class="method-heading">
<a href="File.src/M000002.html" target="Code" class="method-signature"
onclick="popupCode('File.src/M000002.html');return false;">
<span class="method-name">string_to_file</span><span class="method-args">(string, path)</span>
</a>
</div>
<div class="method-description">
<p>
saves a string to a specified file path
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>path_to_string (File)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/core_ext.rb, line 23</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">path_to_string</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">read</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>string_to_file (File)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/core_ext.rb, line 28</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">string_to_file</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">path</span>)
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span> <span class="ruby-identifier">path</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">path</span>))
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">path</span>, <span class="ruby-value str">'w'</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">string</span> }
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,196 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: String</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">String</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../files/lib/blueprint/core_ext_rb.html">
lib/blueprint/core_ext.rb
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
Object
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000003">blank?</a>&nbsp;&nbsp;
<a href="#M000005">strip_selector_space!</a>&nbsp;&nbsp;
<a href="#M000006">strip_side_space!</a>&nbsp;&nbsp;
<a href="#M000004">strip_space!</a>&nbsp;&nbsp;
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000003" class="method-detail">
<a name="M000003"></a>
<div class="method-heading">
<a href="String.src/M000003.html" target="Code" class="method-signature"
onclick="popupCode('String.src/M000003.html');return false;">
<span class="method-name">blank?</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
see if string has any content
</p>
</div>
</div>
<div id="method-M000005" class="method-detail">
<a name="M000005"></a>
<div class="method-heading">
<a href="String.src/M000005.html" target="Code" class="method-signature"
onclick="popupCode('String.src/M000005.html');return false;">
<span class="method-name">strip_selector_space!</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
remove newlines, insert space after comma, replace two spaces with one
space after comma
</p>
</div>
</div>
<div id="method-M000006" class="method-detail">
<a name="M000006"></a>
<div class="method-heading">
<a href="String.src/M000006.html" target="Code" class="method-signature"
onclick="popupCode('String.src/M000006.html');return false;">
<span class="method-name">strip_side_space!</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
remove leading whitespace, remove end whitespace
</p>
</div>
</div>
<div id="method-M000004" class="method-detail">
<a name="M000004"></a>
<div class="method-heading">
<a href="String.src/M000004.html" target="Code" class="method-signature"
onclick="popupCode('String.src/M000004.html');return false;">
<span class="method-name">strip_space!</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
strip space after :, remove newlines, replace multiple spaces with only one
space, remove comments
</p>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>blank? (String)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/core_ext.rb, line 3</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">blank?</span>; <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">length</span>.<span class="ruby-identifier">zero?</span>; <span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>strip_space! (String)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/core_ext.rb, line 6</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_space!</span>
<span class="ruby-identifier">replace</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/:\s*/</span>, <span class="ruby-value str">':'</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\n/</span>, <span class="ruby-value str">''</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\s+/</span>, <span class="ruby-value str">' '</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/(\/\*).*?(\*\/)/</span>, <span class="ruby-value str">''</span>)
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>strip_selector_space! (String)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/core_ext.rb, line 11</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_selector_space!</span>
<span class="ruby-identifier">replace</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/(\n)/</span>, <span class="ruby-value str">''</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">','</span>, <span class="ruby-value str">', '</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">', '</span>, <span class="ruby-value str">', '</span>)
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>strip_side_space! (String)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/blueprint/core_ext.rb, line 16</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strip_side_space!</span>
<span class="ruby-identifier">replace</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/^\s+/</span>, <span class="ruby-value str">''</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\s+$/</span>, <span class="ruby-identifier">$/</span>)
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>

View file

@ -0,0 +1 @@
Thu, 21 Feb 2008 20:15:33 -0500

View file

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>File: blueprint.rb</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>blueprint.rb</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>lib/blueprint/blueprint.rb
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Wed Feb 20 23:47:35 -0500 2008</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="requires-list">
<h3 class="section-bar">Required files</h3>
<div class="name-list">
fileutils&nbsp;&nbsp;
</div>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>File: compressor.rb</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>compressor.rb</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>lib/blueprint/compressor.rb
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Thu Feb 21 20:02:09 -0500 2008</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="requires-list">
<h3 class="section-bar">Required files</h3>
<div class="name-list">
yaml&nbsp;&nbsp;
optparse&nbsp;&nbsp;
</div>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>File: core_ext.rb</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>core_ext.rb</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>lib/blueprint/core_ext.rb
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Thu Feb 21 20:03:32 -0500 2008</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>File: css_parser.rb</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>css_parser.rb</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>lib/blueprint/css_parser.rb
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Thu Feb 21 20:05:19 -0500 2008</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>File: custom_layout.rb</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>custom_layout.rb</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>lib/blueprint/custom_layout.rb
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Thu Feb 21 17:34:18 -0500 2008</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="requires-list">
<h3 class="section-bar">Required files</h3>
<div class="name-list">
erb&nbsp;&nbsp;
</div>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>File: grid_builder.rb</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>grid_builder.rb</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>lib/blueprint/grid_builder.rb
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Thu Feb 21 20:05:42 -0500 2008</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="requires-list">
<h3 class="section-bar">Required files</h3>
<div class="name-list">
rubygems&nbsp;&nbsp;
rvg/rvg&nbsp;&nbsp;
</div>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>File: namespace.rb</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>namespace.rb</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>lib/blueprint/namespace.rb
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Wed Feb 20 23:46:08 -0500 2008</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>File: semantic_class_names.rb</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>semantic_class_names.rb</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>lib/blueprint/semantic_class_names.rb
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Thu Feb 21 20:07:48 -0500 2008</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>File: validator.rb</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>validator.rb</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>lib/blueprint/validator.rb
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Thu Feb 21 20:06:11 -0500 2008</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>File: compress.rb</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>compress.rb</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>lib/compress.rb
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Wed Feb 20 23:25:52 -0500 2008</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="requires-list">
<h3 class="section-bar">Required files</h3>
<div class="name-list">
blueprint/blueprint&nbsp;&nbsp;
</div>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>File: validate.rb</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="fileHeader">
<h1>validate.rb</h1>
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Path:</strong></td>
<td>lib/validate.rb
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
<td>Wed Feb 20 23:27:06 -0500 2008</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="requires-list">
<h3 class="section-bar">Required files</h3>
<div class="name-list">
blueprint/blueprint&nbsp;&nbsp;
blueprint/validator&nbsp;&nbsp;
</div>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>

View file

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Classes
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Classes</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
<base target="docwin" />
</head>
<body>
<div id="index">
<h1 class="section-bar">Classes</h1>
<div id="index-entries">
<a href="classes/Blueprint.html">Blueprint</a><br />
<a href="classes/Blueprint/CSSParser.html">Blueprint::CSSParser</a><br />
<a href="classes/Blueprint/Compressor.html">Blueprint::Compressor</a><br />
<a href="classes/Blueprint/CustomLayout.html">Blueprint::CustomLayout</a><br />
<a href="classes/Blueprint/GridBuilder.html">Blueprint::GridBuilder</a><br />
<a href="classes/Blueprint/Namespace.html">Blueprint::Namespace</a><br />
<a href="classes/Blueprint/SemanticClassNames.html">Blueprint::SemanticClassNames</a><br />
<a href="classes/Blueprint/Validator.html">Blueprint::Validator</a><br />
<a href="classes/File.html">File</a><br />
<a href="classes/String.html">String</a><br />
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Files
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Files</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
<base target="docwin" />
</head>
<body>
<div id="index">
<h1 class="section-bar">Files</h1>
<div id="index-entries">
<a href="files/lib/blueprint/blueprint_rb.html">lib/blueprint/blueprint.rb</a><br />
<a href="files/lib/blueprint/compressor_rb.html">lib/blueprint/compressor.rb</a><br />
<a href="files/lib/blueprint/core_ext_rb.html">lib/blueprint/core_ext.rb</a><br />
<a href="files/lib/blueprint/css_parser_rb.html">lib/blueprint/css_parser.rb</a><br />
<a href="files/lib/blueprint/custom_layout_rb.html">lib/blueprint/custom_layout.rb</a><br />
<a href="files/lib/blueprint/grid_builder_rb.html">lib/blueprint/grid_builder.rb</a><br />
<a href="files/lib/blueprint/namespace_rb.html">lib/blueprint/namespace.rb</a><br />
<a href="files/lib/blueprint/semantic_class_names_rb.html">lib/blueprint/semantic_class_names.rb</a><br />
<a href="files/lib/blueprint/validator_rb.html">lib/blueprint/validator.rb</a><br />
<a href="files/lib/compress_rb.html">lib/compress.rb</a><br />
<a href="files/lib/validate_rb.html">lib/validate.rb</a><br />
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Methods
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Methods</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
<base target="docwin" />
</head>
<body>
<div id="index">
<h1 class="section-bar">Methods</h1>
<div id="index-entries">
<a href="classes/Blueprint/Namespace.html#M000017">add_namespace (Blueprint::Namespace)</a><br />
<a href="classes/String.html#M000003">blank? (String)</a><br />
<a href="classes/Blueprint/CustomLayout.html#M000020">column_count (Blueprint::CustomLayout)</a><br />
<a href="classes/Blueprint/CustomLayout.html#M000021">column_width (Blueprint::CustomLayout)</a><br />
<a href="classes/Blueprint/SemanticClassNames.html#M000010">css_from_assignments (Blueprint::SemanticClassNames)</a><br />
<a href="classes/Blueprint/Namespace.html#M000019">current_namespace (Blueprint::Namespace)</a><br />
<a href="classes/Blueprint/CustomLayout.html#M000025">default? (Blueprint::CustomLayout)</a><br />
<a href="classes/Blueprint/Compressor.html#M000027">destination_path= (Blueprint::Compressor)</a><br />
<a href="classes/Blueprint/Compressor.html#M000029">generate! (Blueprint::Compressor)</a><br />
<a href="classes/Blueprint/GridBuilder.html#M000015">generate! (Blueprint::GridBuilder)</a><br />
<a href="classes/Blueprint/CustomLayout.html#M000026">generate_grid_css (Blueprint::CustomLayout)</a><br />
<a href="classes/Blueprint/CustomLayout.html#M000022">gutter_width (Blueprint::CustomLayout)</a><br />
<a href="classes/Blueprint/SemanticClassNames.html#M000009">new (Blueprint::SemanticClassNames)</a><br />
<a href="classes/Blueprint/GridBuilder.html#M000014">new (Blueprint::GridBuilder)</a><br />
<a href="classes/Blueprint/CSSParser.html#M000011">new (Blueprint::CSSParser)</a><br />
<a href="classes/Blueprint/Validator.html#M000007">new (Blueprint::Validator)</a><br />
<a href="classes/Blueprint/Compressor.html#M000028">new (Blueprint::Compressor)</a><br />
<a href="classes/Blueprint/CustomLayout.html#M000024">new (Blueprint::CustomLayout)</a><br />
<a href="classes/Blueprint/Namespace.html#M000016">new (Blueprint::Namespace)</a><br />
<a href="classes/Blueprint/CustomLayout.html#M000023">page_width (Blueprint::CustomLayout)</a><br />
<a href="classes/Blueprint/CSSParser.html#M000013">parse (Blueprint::CSSParser)</a><br />
<a href="classes/File.html#M000001">path_to_string (File)</a><br />
<a href="classes/Blueprint/Namespace.html#M000018">remove_current_namespace (Blueprint::Namespace)</a><br />
<a href="classes/File.html#M000002">string_to_file (File)</a><br />
<a href="classes/String.html#M000005">strip_selector_space! (String)</a><br />
<a href="classes/String.html#M000006">strip_side_space! (String)</a><br />
<a href="classes/String.html#M000004">strip_space! (String)</a><br />
<a href="classes/Blueprint/CSSParser.html#M000012">to_s (Blueprint::CSSParser)</a><br />
<a href="classes/Blueprint/Validator.html#M000008">validate (Blueprint::Validator)</a><br />
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<!--
RDoc Documentation
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>RDoc Documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<frameset rows="20%, 80%">
<frameset cols="25%,35%,45%">
<frame src="fr_file_index.html" title="Files" name="Files" />
<frame src="fr_class_index.html" name="Classes" />
<frame src="fr_method_index.html" name="Methods" />
</frameset>
<frame src="files/lib/blueprint/blueprint_rb.html" name="docwin" />
</frameset>
</html>

View file

@ -0,0 +1,208 @@
body {
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: 90%;
margin: 0;
margin-left: 40px;
padding: 0;
background: white;
}
h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; }
h1 { font-size: 150%; }
h2,h3,h4 { margin-top: 1em; }
a { background: #eef; color: #039; text-decoration: none; }
a:hover { background: #039; color: #eef; }
/* Override the base stylesheet's Anchor inside a table cell */
td > a {
background: transparent;
color: #039;
text-decoration: none;
}
/* and inside a section title */
.section-title > a {
background: transparent;
color: #eee;
text-decoration: none;
}
/* === Structural elements =================================== */
div#index {
margin: 0;
margin-left: -40px;
padding: 0;
font-size: 90%;
}
div#index a {
margin-left: 0.7em;
}
div#index .section-bar {
margin-left: 0px;
padding-left: 0.7em;
background: #ccc;
font-size: small;
}
div#classHeader, div#fileHeader {
width: auto;
color: white;
padding: 0.5em 1.5em 0.5em 1.5em;
margin: 0;
margin-left: -40px;
border-bottom: 3px solid #006;
}
div#classHeader a, div#fileHeader a {
background: inherit;
color: white;
}
div#classHeader td, div#fileHeader td {
background: inherit;
color: white;
}
div#fileHeader {
background: #057;
}
div#classHeader {
background: #048;
}
.class-name-in-header {
font-size: 180%;
font-weight: bold;
}
div#bodyContent {
padding: 0 1.5em 0 1.5em;
}
div#description {
padding: 0.5em 1.5em;
background: #efefef;
border: 1px dotted #999;
}
div#description h1,h2,h3,h4,h5,h6 {
color: #125;;
background: transparent;
}
div#validator-badges {
text-align: center;
}
div#validator-badges img { border: 0; }
div#copyright {
color: #333;
background: #efefef;
font: 0.75em sans-serif;
margin-top: 5em;
margin-bottom: 0;
padding: 0.5em 2em;
}
/* === Classes =================================== */
table.header-table {
color: white;
font-size: small;
}
.type-note {
font-size: small;
color: #DEDEDE;
}
.xxsection-bar {
background: #eee;
color: #333;
padding: 3px;
}
.section-bar {
color: #333;
border-bottom: 1px solid #999;
margin-left: -20px;
}
.section-title {
background: #79a;
color: #eee;
padding: 3px;
margin-top: 2em;
margin-left: -30px;
border: 1px solid #999;
}
.top-aligned-row { vertical-align: top }
.bottom-aligned-row { vertical-align: bottom }
/* --- Context section classes ----------------------- */
.context-row { }
.context-item-name { font-family: monospace; font-weight: bold; color: black; }
.context-item-value { font-size: small; color: #448; }
.context-item-desc { color: #333; padding-left: 2em; }
/* --- Method classes -------------------------- */
.method-detail {
background: #efefef;
padding: 0;
margin-top: 0.5em;
margin-bottom: 1em;
border: 1px dotted #ccc;
}
.method-heading {
color: black;
background: #ccc;
border-bottom: 1px solid #666;
padding: 0.2em 0.5em 0 0.5em;
}
.method-signature { color: black; background: inherit; }
.method-name { font-weight: bold; }
.method-args { font-style: italic; }
.method-description { padding: 0 0.5em 0 0.5em; }
/* --- Source code sections -------------------- */
a.source-toggle { font-size: 90%; }
div.method-source-code {
background: #262626;
color: #ffdead;
margin: 1em;
padding: 0.5em;
border: 1px dashed #999;
overflow: hidden;
}
div.method-source-code pre { color: #ffdead; overflow: hidden; }
/* --- Ruby keyword styles --------------------- */
.standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
.ruby-constant { color: #7fffd4; background: transparent; }
.ruby-keyword { color: #00ffff; background: transparent; }
.ruby-ivar { color: #eedd82; background: transparent; }
.ruby-operator { color: #00ffee; background: transparent; }
.ruby-identifier { color: #ffdead; background: transparent; }
.ruby-node { color: #ffa07a; background: transparent; }
.ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
.ruby-regexp { color: #ffa07a; background: transparent; }
.ruby-value { color: #7fffd4; background: transparent; }

View file

@ -0,0 +1,39 @@
require 'fileutils'
module Blueprint
# path to the root Blueprint directory
ROOT_PATH = File.join(File.expand_path(File.dirname(__FILE__)), "../../")
# path to where the Blueprint CSS files are stored
BLUEPRINT_ROOT_PATH = File.join(Blueprint::ROOT_PATH, 'blueprint')
# path to where the Blueprint CSS raw CSS files are stored
SOURCE_PATH = File.join(Blueprint::BLUEPRINT_ROOT_PATH, 'src')
# path to where the Blueprint CSS generated test files are stored
TEST_PATH = File.join(Blueprint::ROOT_PATH, 'tests')
# path to the root of the Blueprint scripts
LIB_PATH = File.join(Blueprint::ROOT_PATH, 'lib', 'blueprint')
# path to where Blueprint plugins are stored
PLUGINS_PATH = File.join(Blueprint::BLUEPRINT_ROOT_PATH, 'plugins')
# settings YAML file where custom user settings are saved
SETTINGS_FILE = File.join(Blueprint::ROOT_PATH, 'lib', 'settings.yml')
# path to validator jar file to validate generated CSS files
VALIDATOR_FILE = File.join(Blueprint::LIB_PATH, 'validate', 'css-validator.jar')
# hash of compressed and source CSS files
CSS_FILES = {
'screen.css' => ['reset.css', 'typography.css', 'forms.css', 'grid.css'],
'print.css' => ['print.css'],
'ie.css' => ['ie.css']
}
# default number of columns for Blueprint layout
COLUMN_COUNT = 24
# default column width (in pixels) for Blueprint layout
COLUMN_WIDTH = 30
# default gutter width (in pixels) for Blueprint layout
GUTTER_WIDTH = 10
INPUT_PADDING = 5
INPUT_BORDER = 1
end
Dir["#{File.join(Blueprint::LIB_PATH)}/*"].each do |file|
require "#{file}" if file =~ /\.rb$/ && file !~ /blueprint.rb/
end

View file

@ -0,0 +1,261 @@
require 'yaml'
require 'optparse'
module Blueprint
class Compressor
TEST_FILES = ['index.html',
'parts/elements.html',
'parts/forms.html',
'parts/grid.html',
'parts/sample.html']
attr_accessor :namespace, :custom_css, :custom_layout, :semantic_classes, :project_name, :plugins
attr_reader :custom_path, :loaded_from_settings, :destination_path, :script_name
# overridden setter method for destination_path
# also sets custom_path flag on Blueprint::Compressor instance
def destination_path=(path)
@destination_path = path
@custom_path = @destination_path != Blueprint::BLUEPRINT_ROOT_PATH
end
# constructor
def initialize
# set up defaults
@script_name = File.basename($0)
@loaded_from_settings = false
self.namespace = ""
self.destination_path = Blueprint::BLUEPRINT_ROOT_PATH
self.custom_layout = CustomLayout.new
self.project_name = nil
self.custom_css = {}
self.semantic_classes = {}
self.plugins = []
self.options.parse!(ARGV)
initialize_project_from_yaml(self.project_name)
end
# generates output CSS based on any args passed in
# overwrites any existing CSS, as well as grid.png and tests
def generate!
output_header # information to the user (in the console) describing custom settings
generate_css_files # loops through Blueprint::CSS_FILES to generate output CSS
generate_tests # updates HTML with custom namespaces in order to test the generated library. TODO: have tests kick out to custom location
output_footer # informs the user that the CSS generation process is complete
end
def options #:nodoc:#
OptionParser.new do |o|
o.set_summary_indent(' ')
o.banner = "Usage: #{@script_name} [options]"
o.define_head "Blueprint Compressor"
o.separator ""
o.separator "options"
o.on( "-oOUTPUT_PATH", "--output_path=OUTPUT_PATH", String,
"Define a different path to output generated CSS files to.") { |path| self.destination_path = path }
o.on( "-nBP_NAMESPACE", "--namespace=BP_NAMESPACE", String,
"Define a namespace prepended to all Blueprint classes (e.g. .your-ns-span-24)") { |ns| self.namespace = ns }
o.on( "-pPROJECT_NAME", "--project=PROJECT_NAME", String,
"If using the settings.yml file, PROJECT_NAME is the project name you want to export") {|project| @project_name = project }
o.on( "--column_width=COLUMN_WIDTH", Integer,
"Set a new column width (in pixels) for the output grid") {|cw| self.custom_layout.column_width = cw }
o.on( "--gutter_width=GUTTER_WIDTH", Integer,
"Set a new gutter width (in pixels) for the output grid") {|gw| self.custom_layout.gutter_width = gw }
o.on( "--column_count=COLUMN_COUNT", Integer,
"Set a new column count for the output grid") {|cc| self.custom_layout.column_count = cc }
#o.on("-v", "--verbose", "Turn on verbose output.") { |$verbose| }
o.on("-h", "--help", "Show this help message.") { puts o; exit }
end
end
private
# attempts to load output settings from settings.yml
def initialize_project_from_yaml(project_name = nil)
# ensures project_name is set and settings.yml is present
return unless (project_name && File.exist?(Blueprint::SETTINGS_FILE))
# loads yaml into hash
projects = YAML::load(File.path_to_string(Blueprint::SETTINGS_FILE))
if (project = projects[project_name]) # checks to see if project info is present
self.namespace = project['namespace'] || ""
self.destination_path = (self.destination_path == Blueprint::BLUEPRINT_ROOT_PATH ? project['path'] : self.destination_path) || Blueprint::BLUEPRINT_ROOT_PATH
self.custom_css = project['custom_css'] || {}
self.semantic_classes = project['semantic_classes'] || {}
self.plugins = project['plugins'] || []
if (layout = project['custom_layout'])
self.custom_layout = CustomLayout.new(:column_count => layout['column_count'], :column_width => layout['column_width'], :gutter_width => layout['gutter_width'], :input_padding => layout['input_padding'], :input_border => layout['input_border'])
end
@loaded_from_settings = true
end
end
def generate_css_files
Blueprint::CSS_FILES.each do |output_file_name, css_source_file_names|
css_output_path = File.join(destination_path, output_file_name)
puts "\n Assembling to #{custom_path ? css_output_path : "default blueprint path"}"
# CSS file generation
css_output = css_file_header # header included on all three Blueprint-generated files
css_output += "\n\n"
# Iterate through src/ .css files and compile to individual core compressed file
css_source_file_names.each do |css_source_file|
puts " + src/#{css_source_file}"
css_output += "/* #{css_source_file} */\n" if css_source_file_names.any?
source_options = if self.custom_layout && css_source_file == 'grid.css'
self.custom_layout.generate_grid_css
else
File.path_to_string File.join(Blueprint::SOURCE_PATH, css_source_file)
end
css_output += Blueprint::CSSParser.new(source_options, :namespace => namespace).to_s
css_output += "\n"
end
# append CSS from custom files
css_output = append_custom_css(css_output, output_file_name)
#append CSS from plugins
css_output = append_plugin_css(css_output, output_file_name)
#save CSS to correct path, stripping out any extra whitespace at the end of the file
File.string_to_file(css_output.rstrip, css_output_path)
end
# append semantic class names if set
append_semantic_classes
#attempt to generate a grid.png file
if (grid_builder = GridBuilder.new(:column_width => self.custom_layout.column_width, :gutter_width => self.custom_layout.gutter_width, :output_path => File.join(self.destination_path, 'src')))
grid_builder.generate!
end
end
def append_custom_css(css, current_file_name)
# check to see if a custom (non-default) location was used for output files
# if custom path is used, handle custom CSS, if any
return css unless self.custom_path and self.custom_css[current_file_name]
self.custom_css[current_file_name].each do |custom_css|
overwrite_path = File.join(destination_path, (custom_css || "my-#{current_file_name}"))
overwrite_css = File.exists?(overwrite_path) ? File.path_to_string(overwrite_path) : ""
# if there's CSS present, add it to the CSS output
unless overwrite_css.blank?
puts " + custom styles (#{custom_css})\n"
css += "/* #{overwrite_path} */\n"
css += CSSParser.new(overwrite_css).to_s + "\n"
end
end
css
end
def append_plugin_css(css, current_file_name)
return css unless self.plugins.any?
plugin_css = ""
self.plugins.each do |plugin|
plugin_file_specific = File.join(Blueprint::PLUGINS_PATH, plugin, current_file_name)
plugin_file_generic = File.join(Blueprint::PLUGINS_PATH, plugin, "#{plugin}.css")
file = if File.exists?(plugin_file_specific)
plugin_file_specific
elsif File.exists?(plugin_file_generic) && current_file_name =~ /^screen|print/
plugin_file_generic
end
if file
puts " + #{plugin} plugin\n"
plugin_css += "/* #{plugin} */\n"
plugin_css += CSSParser.new(File.path_to_string(file)).to_s + "\n"
Dir.glob(File.join(File.dirname(file), "**", "**")).each do |cp|
short_path = cp.gsub(/#{File.dirname(file)}./ , '')
# make directory if it doesn't exist
directory = File.dirname(short_path)
FileUtils.mkdir_p(File.join(destination_path, directory)) unless directory == "."
FileUtils.cp cp, File.join(destination_path, short_path) unless File.directory?(File.join(File.dirname(file), short_path)) || cp == file
end
end
end
css += plugin_css
end
def append_semantic_classes
screen_output_path = File.join(self.destination_path, "screen.css")
semantic_styles = SemanticClassNames.new(:namespace => self.namespace, :source_file => screen_output_path).css_from_assignments(self.semantic_classes)
return if semantic_styles.blank?
css = File.path_to_string(screen_output_path)
css += "\n\n/* semantic class names */\n"
css += semantic_styles
File.string_to_file(css.rstrip, screen_output_path)
end
def generate_tests
puts "\n Updating namespace to \"#{namespace}\" in test files:"
test_files = Compressor::TEST_FILES.map {|f| File.join(Blueprint::TEST_PATH, *f.split(/\//))}
test_files.each do |file|
puts " + #{file}"
Namespace.new(file, namespace)
end
end
def output_header
puts "\n"
puts " #{"*" * 100}"
puts " **"
puts " ** Blueprint CSS Compressor"
puts " **"
puts " ** Builds compressed files from the source directory."
puts " **"
puts " ** Loaded from settings.yml" if loaded_from_settings
puts " ** Namespace: '#{namespace}'" unless namespace.blank?
puts " ** Output to: #{destination_path}"
puts " ** Grid Settings:"
puts " ** - Column Count: #{self.custom_layout.column_count}"
puts " ** - Column Width: #{self.custom_layout.column_width}px"
puts " ** - Gutter Width: #{self.custom_layout.gutter_width}px"
puts " ** - Total Width : #{self.custom_layout.page_width}px"
puts " **"
puts " #{"*" * 100}"
end
def output_footer
puts "\n\n"
puts " #{"*" * 100}"
puts " **"
puts " ** Done!"
puts " ** Your compressed files and test files are now up-to-date."
puts " **"
puts " #{"*" * 100}\n\n"
end
def css_file_header
%(/* -----------------------------------------------------------------------
Blueprint CSS Framework 0.8
http://blueprintcss.org
* Copyright (c) 2007-Present. See LICENSE for more info.
* See README for instructions on how to use Blueprint.
* For credits and origins, see AUTHORS.
* This is a compressed file. See the sources in the 'src' directory.
----------------------------------------------------------------------- */)
end
def putsv(str)
puts str if $verbose
end
end
end

View file

@ -0,0 +1,39 @@
class String
# see if string has any content
def blank?; self.length.zero?; end
# strip space after :, remove newlines, replace multiple spaces with only one space, remove comments
def strip_space!
replace self.gsub(/:\s*/, ':').gsub(/\n/, '').gsub(/\s+/, ' ').gsub(/(\/\*).*?(\*\/)/, '')
end
# remove newlines, insert space after comma, replace two spaces with one space after comma
def strip_selector_space!
replace self.gsub(/(\n)/, '').gsub(',', ', ').gsub(', ', ', ')
end
# remove leading whitespace, remove end whitespace
def strip_side_space!
replace self.gsub(/^\s+/, '').gsub(/\s+$/, $/)
end
end
class NilClass
def blank?
true
end
end
class File
# string output from file
def self.path_to_string(path)
File.new(path).read
end
# saves a string to a specified file path
def self.string_to_file(string, path)
directory = File.dirname(path)
FileUtils.mkdir_p directory unless File.directory?(directory)
File.open(path, 'w') { |f| f << string }
end
end

View file

@ -0,0 +1,69 @@
module Blueprint
# Strips out most whitespace and can return a hash or string of parsed data
class CSSParser
attr_accessor :namespace
attr_reader :css_output, :raw_data
# ==== Options
# * <tt>css_string</tt> String of CSS data
# * <tt>options</tt>
# * <tt>:namespace</tt> -- Namespace to use when generating output
def initialize(css_string = "", options = {})
@raw_data = css_string
@namespace = options[:namespace] || ""
compress(@raw_data)
end
# returns string of CSS which can be saved to a file or otherwise
def to_s
@css_output
end
# returns a hash of all CSS data passed
#
# ==== Options
# * <tt>data</tt> -- CSS string; defaults to string passed into the constructor
def parse(data = nil)
data ||= @raw_data
# wrapper array holding hashes of css tags/rules
css_out = []
# clear initial spaces
data.strip_side_space!.strip_space!
# split on end of assignments
data.split('}').each_with_index do |assignments, index|
# split again to separate tags from rules
tags, styles = assignments.split('{').map{|a| a.strip_side_space!}
unless styles.blank?
# clean up tags and apply namespaces as needed
tags.strip_selector_space!
tags.gsub!(/\./, ".#{namespace}") unless namespace.blank?
# split on semicolon to iterate through each rule
rules = []
styles.split(';').each do |key_val_pair|
unless key_val_pair.nil?
# split by property/val and append to rules array with correct declaration
property, value = key_val_pair.split(':').map{|kv| kv.strip_side_space!}
break unless property && value
rules << "#{property}:#{value};"
end
end
# now keeps track of index as hashes don't keep track of position (which will be fixed in Ruby 1.9)
css_out << {:tags => tags, :rules => rules.to_s, :idx => index} unless tags.blank? || rules.to_s.blank?
end
end
css_out
end
private
def compress(data)
@css_output = ""
parse(data).flatten.sort_by {|i| i[:idx]}.each do |line|
@css_output += "#{line[:tags]} {#{line[:rules]}}\n"
end
end
end
end

View file

@ -0,0 +1,71 @@
require 'erb'
module Blueprint
# Generates a custom grid file, using ERB to evaluate custom settings
class CustomLayout
# path to ERB file used for CSS template
CSS_ERB_FILE = File.join(Blueprint::LIB_PATH, 'grid.css.erb')
attr_writer :column_count, :column_width, :gutter_width, :input_padding, :input_border
# Column count of generated CSS. Returns itself or Blueprint's default
def column_count
(@column_count || Blueprint::COLUMN_COUNT).to_i
end
# Column width (in pixels) of generated CSS. Returns itself or Blueprint's default
def column_width
(@column_width || Blueprint::COLUMN_WIDTH).to_i
end
# Gutter width (in pixels) of generated CSS. Returns itself or Blueprint's default
def gutter_width
(@gutter_width || Blueprint::GUTTER_WIDTH).to_i
end
def input_padding
(@input_padding || Blueprint::INPUT_PADDING).to_i
end
def input_border
(@input_border || Blueprint::INPUT_BORDER).to_i
end
# Returns page width (in pixels)
def page_width
column_count * (column_width + gutter_width) - gutter_width
end
# ==== Options
# * <tt>options</tt>
# * <tt>:column_count</tt> -- Sets the column count of generated CSS
# * <tt>:column_width</tt> -- Sets the column width (in pixels) of generated CSS
# * <tt>:gutter_width</tt> -- Sets the gutter width (in pixels) of generated CSS
# * <tt>:input_padding</tt> -- Sets the input padding width (in pixels) of generated CSS
# * <tt>:input_border</tt> -- Sets the border width (in pixels) of generated CSS
def initialize(options = {})
@column_count = options[:column_count]
@column_width = options[:column_width]
@gutter_width = options[:gutter_width]
@input_padding = options[:input_padding]
@input_border = options[:input_border]
end
# Boolean value if current settings are Blueprint's defaults
def default?
self.column_width == Blueprint::COLUMN_WIDTH &&
self.column_count == Blueprint::COLUMN_COUNT &&
self.gutter_width == Blueprint::GUTTER_WIDTH &&
self.input_padding == Blueprint::INPUT_PADDING &&
self.input_border == Blueprint::INPUT_BORDER
end
# Loads grid.css.erb file, binds it to current instance, and returns output
def generate_grid_css
# loads up erb template to evaluate custom widths
css = ERB::new(File.path_to_string(CustomLayout::CSS_ERB_FILE))
# bind it to this instance
css.result(binding)
end
end
end

View file

@ -0,0 +1,136 @@
/* --------------------------------------------------------------
grid.css - mirror version of src/grid.css
-------------------------------------------------------------- */
/* A container should group all your columns. */
.container {
width: <%= page_width %>px;
margin: 0 auto;
}
/* Use this class on any div.span / container to see the grid. */
.showgrid {
background: url(src/grid.png);
}
/* Columns
-------------------------------------------------------------- */
/* Sets up basic grid floating and margin. */
.column, <%= (1..column_count).map {|c| "div.span-#{c}" }.join(", ") %> {
float: left;
margin-right: <%= gutter_width %>px;
}
/* The last column in a row needs this class. */
.last, div.last { margin-right: 0; }
/* Use these classes to set the width of a column. */
.span-1 {width: <%= column_width %>px;}
<% (2..column_count-1).each do |column| %>
.span-<%= column %> {width: <%= (column_width + ((column - 1) * (column_width + gutter_width))).to_i %>px;<%= "margin: 0;" if column == column_count %>}<% end %>
.span-<%= column_count %>, div.span-<%= column_count %> { width:<%= page_width %>px; margin:0; }
/* Use these classes to set the width of an input. */
<%= (1..column_count).map {|column| "input.span-#{column}, textarea.span-#{column}"}.join(", ") %> {
border-left-width: <%= input_border %>px!important;
border-right-width: <%= input_border %>px!important;
padding-left: <%= input_padding %>px!important;
padding-right: <%= input_padding %>px!important;
}
<% (1..column_count).each do |column| %>
input.span-<%= column %>, textarea.span-<%= column %> { width: <%= ((column_width + gutter_width) * (column - 1) + column_width - 2*(input_padding + input_border))%>px!important; }<% end %>
/* Add these to a column to append empty cols. */
<% (1..(column_count-1)).each do |column| %>
.append-<%= column %> { padding-right: <%= (column * (column_width + gutter_width)).to_i %>px;}<% end %>
/* Add these to a column to prepend empty cols. */
<% (1..(column_count-1)).each do |column| %>
.prepend-<%= column %> { padding-left: <%= (column * (column_width + gutter_width)).to_i %>px;}<% end %>
/* Border on right hand side of a column. */
div.border {
padding-right: <%= (gutter_width * 0.5 - 1).to_i %>px;
margin-right: <%= (gutter_width * 0.5).to_i %>px;
border-right: 1px solid #eee;
}
/* Border with more whitespace, spans one column. */
div.colborder {
padding-right: <%= (column_width + 2*gutter_width - 1)/2.to_i %>px;
margin-right: <%= (column_width + 2 * gutter_width)/2.to_i %>px;
border-right: 1px solid #eee;
}
/* Use these classes on an element to push it into the
next column, or to pull it into the previous column. */
<% (1..column_count).each do |column| %>
.pull-<%= column %> { margin-left: -<%= (column * (column_width + gutter_width)).to_i %>px; }<% end %>
<%= (1..column_count).map {|c| ".pull-#{c}" }.join(", ") %> {float: left; position:relative;}
<% (1..(column_count)).each do |column| %>
.push-<%= column %> { margin: 0 -<%= (column * (column_width + gutter_width)).to_i %>px 1.5em <%= (column * (column_width + gutter_width)).to_i %>px; }<% end %>
<%= (1..column_count).map {|c| ".push-#{c}" }.join(", ") %> {float: right; position:relative;}
/* Misc classes and elements
-------------------------------------------------------------- */
/* In case you need to add a gutter above/below an element */
.prepend-top {
margin-top:1.5em;
}
.append-bottom {
margin-bottom:1.5em;
}
/* Use a .box to create a padded box inside a column. */
.box {
padding: 1.5em;
margin-bottom: 1.5em;
background: #E5ECF9;
}
/* Use this to create a horizontal ruler across a column. */
hr {
background: #ddd;
color: #ddd;
clear: both;
float: none;
width: 100%;
height: .1em;
margin: 0 0 1.45em;
border: none;
}
hr.space {
background: #fff;
color: #fff;
}
/* Clearing floats without extra markup
Based on How To Clear Floats Without Structural Markup by PiE
[http://www.positioniseverything.net/easyclearing.html] */
.clearfix:after, .container:after {
content: "\0020";
display: block;
height: 0;
clear: both;
visibility: hidden;
overflow:hidden;
}
.clearfix, .container {display: block;}
/* Regular clearing
apply to column that should drop below previous ones. */
.clear { clear:both; }

View file

@ -0,0 +1,54 @@
begin
require 'rubygems'
gem 'rmagick'
require 'rvg/rvg'
rescue Exception => e
end
module Blueprint
# Uses ImageMagick and RMagick to generate grid.png file
class GridBuilder
begin
include Magick
rescue Exception => e
end
attr_reader :column_width, :gutter_width, :output_path, :able_to_generate
# ==== Options
# * <tt>options</tt>
# * <tt>:column_width</tt> -- Width (in pixels) of current grid column
# * <tt>:gutter_width</tt> -- Width (in pixels) of current grid gutter
# * <tt>:output_path</tt> -- Output path of grid.png file
def initialize(options={})
@able_to_generate = Magick::Long_version rescue false
return unless @able_to_generate
@column_width = options[:column_width] || Blueprint::COLUMN_WIDTH
@gutter_width = options[:gutter_width] || Blueprint::GUTTER_WIDTH
@output_path = options[:output_path] || Blueprint::SOURCE_PATH
end
# generates (overwriting if necessary) grid.png image to be tiled in background
def generate!
return false unless self.able_to_generate
total_width = self.column_width + self.gutter_width
height = 18
RVG::dpi = 100
rvg = RVG.new((total_width.to_f/RVG::dpi).in, (height.to_f/RVG::dpi).in).viewbox(0, 0, total_width, height) do |canvas|
canvas.background_fill = 'white'
canvas.g do |column|
column.rect(self.column_width, height).styles(:fill => "#e8effb")
end
canvas.g do |baseline|
baseline.line(0, (height - 1), total_width, (height- 1)).styles(:fill => "#e9e9e9")
end
end
FileUtils.mkdir self.output_path unless File.exists? self.output_path
rvg.draw.write(File.join(self.output_path, "grid.png"))
end
end
end

View file

@ -0,0 +1,38 @@
module Blueprint
class Namespace
# Read html to string, remove namespace if any,
# set the new namespace, and update the test file.
def initialize(path, namespace)
html = File.path_to_string(path)
remove_current_namespace(html)
add_namespace(html, namespace)
File.string_to_file(html, path)
end
# adds namespace to BP classes in a html file
def add_namespace(html, namespace)
html.gsub!(/(class=")([a-zA-Z0-9\-_ ]*)(")/) do |m|
classes = m.to_s.split('"')[1].split(' ')
classes.map! { |c| c = namespace + c }
'class="' + classes.join(' ') + '"'
end
html
end
# removes a namespace from a string of html
def remove_current_namespace(html)
current = current_namespace(html)
html.gsub!(current, '')
html
end
# returns current namespace in test files
# based on container class
def current_namespace(html)
html =~ /class="([\S]+)container/
current_namespace = $1 if $1
current_namespace || ''
end
end
end

Some files were not shown because too many files have changed in this diff Show more