Skip to content

Commit aeb51fb

Browse files
author
Raven
committed
layout filled
1 parent 9db7f31 commit aeb51fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1686
-8
lines changed

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ gem 'ZenTest'
55
gem 'test-unit'
66
gem 'win32console'
77

8-
98
group :development do
109
gem 'rspec-rails'
1110
end

app/helpers/application_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module ApplicationHelper
22
#Return a title on a per-page basis.
33
def title
44
base_title = "Ruby on Rails Tutorial Sample App"
5-
if @title.nil? or @title.empty?
5+
if @title.nil? || @title.empty?
66
base_title
77
else
88
"#{base_title} | #{@title}"

app/views/layouts/_header.html.erb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<header>
2+
<%= image_tag("logo.png", :alt => "Sample App", :class => "round")%>
3+
<nav class="round">
4+
<ul>
5+
<li> <%= link_to "Home", "#" %> </li>
6+
<li> <%= link_to "Help", "#" %> </li>
7+
<li> <%= link_to "Sign in", "#" %> </li>
8+
</ul>
9+
</nav>
10+
</header>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!--[if lt IE 9]>
2+
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
3+
<![endif]-->
4+
<!--[if lt IE 8]><%= stylesheet_link_tag 'blueprint/ie' %><![endif]-->
5+
<%= stylesheet_link_tag 'blueprint/screen', :media => 'screen' %>
6+
<%= stylesheet_link_tag 'blueprint/print', :media => 'print' %>
7+
<%= stylesheet_link_tag 'custom', :media => 'screen' %>
8+
<%= stylesheet_link_tag 'css3buttons', :media => 'screen' %>
9+
<%= javascript_include_tag :defaults %>
10+
<%= csrf_meta_tag %>

app/views/layouts/application.html.erb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
<html>
33
<head>
44
<title><%= title %></title>
5-
<%= stylesheet_link_tag :all %>
6-
<%= javascript_include_tag :defaults %>
7-
<%= csrf_meta_tag %>
5+
<%= render 'layouts/stylesheets' %>
86
</head>
97
<body>
10-
11-
<%= yield %>
12-
8+
<div class="container">
9+
<%= render 'layouts/header'%>
10+
<section class="round">
11+
<%= yield %>
12+
</section>
13+
</div>
1314
</body>
1415
</html>

app/views/pages/home.html.erb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@
55
sample application.
66
</p>
77

8+
<%= link_to "#", :class => "button" do %>
9+
<span class="plus icon"></span>Sign up now!
10+
<%end%>
11+

example_user.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class User
2+
attr_accessor :name, :email
3+
4+
def initialize(attributes = {})
5+
@name = attributes[:name]
6+
@email = attributes[:email]
7+
end
8+
9+
def formatted_email
10+
"#{@name} <#{@email}>"
11+
end
12+
end

public/images/Thumbs.db

21.5 KB
Binary file not shown.
17.7 KB
Loading

public/images/css3buttons_icons.png

3.04 KB
Loading

public/images/logo.png

55 KB
Loading

public/stylesheets/blueprint/ie.css

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/* -----------------------------------------------------------------------
2+
3+
4+
Blueprint CSS Framework 1.0
5+
http://blueprintcss.org
6+
7+
* Copyright (c) 2007-Present. See LICENSE for more info.
8+
* See README for instructions on how to use Blueprint.
9+
* For credits and origins, see AUTHORS.
10+
* This is a compressed file. See the sources in the 'src' directory.
11+
12+
----------------------------------------------------------------------- */
13+
14+
/* ie.css */
15+
body {text-align:center;}
16+
.container {text-align:left;}
17+
* html .column, * html .span-1, * html .span-2, * html .span-3, * html .span-4, * html .span-5, * html .span-6, * html .span-7, * html .span-8, * html .span-9, * html .span-10, * html .span-11, * html .span-12, * html .span-13, * html .span-14, * html .span-15, * html .span-16, * html .span-17, * html .span-18, * html .span-19, * html .span-20, * html .span-21, * html .span-22, * html .span-23, * html .span-24 {display:inline;overflow-x:hidden;}
18+
* html legend {margin:0px -8px 16px 0;padding:0;}
19+
sup {vertical-align:text-top;}
20+
sub {vertical-align:text-bottom;}
21+
html>body p code {*white-space:normal;}
22+
hr {margin:-8px auto 11px;}
23+
img {-ms-interpolation-mode:bicubic;}
24+
.clearfix, .container {display:inline-block;}
25+
* html .clearfix, * html .container {height:1%;}
26+
fieldset {padding-top:0;}
27+
legend {margin-top:-0.2em;margin-bottom:1em;margin-left:-0.5em;}
28+
textarea {overflow:auto;}
29+
label {vertical-align:middle;position:relative;top:-0.25em;}
30+
input.text, input.title, textarea {background-color:#fff;border:1px solid #bbb;}
31+
input.text:focus, input.title:focus {border-color:#666;}
32+
input.text, input.title, textarea, select {margin:0.5em 0;}
33+
input.checkbox, input.radio {position:relative;top:.25em;}
34+
form.inline div, form.inline p {vertical-align:middle;}
35+
form.inline input.checkbox, form.inline input.radio, form.inline input.button, form.inline button {margin:0.5em 0;}
36+
button, input.button {position:relative;top:0.25em;}
Binary file not shown.
Loading
Loading
Loading
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Buttons
2+
3+
* Gives you great looking CSS buttons, for both <a> and <button>.
4+
* Demo: particletree.com/features/rediscovering-the-button-element
5+
6+
7+
Credits
8+
----------------------------------------------------------------
9+
10+
* Created by Kevin Hale [particletree.com]
11+
* Adapted for Blueprint by Olav Bjorkoy [bjorkoy.com]
12+
13+
14+
Usage
15+
----------------------------------------------------------------
16+
17+
1) Add this plugin to lib/settings.yml.
18+
See compress.rb for instructions.
19+
20+
2) Use the following HTML code to place the buttons on your site:
21+
22+
<button type="submit" class="button positive">
23+
<img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/> Save
24+
</button>
25+
26+
<a class="button" href="/password/reset/">
27+
<img src="css/blueprint/plugins/buttons/icons/key.png" alt=""/> Change Password
28+
</a>
29+
30+
<a href="#" class="button negative">
31+
<img src="css/blueprint/plugins/buttons/icons/cross.png" alt=""/> Cancel
32+
</a>
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
/* --------------------------------------------------------------
2+
3+
buttons.css
4+
* Gives you some great CSS-only buttons.
5+
6+
Created by Kevin Hale [particletree.com]
7+
* particletree.com/features/rediscovering-the-button-element
8+
9+
See Readme.txt in this folder for instructions.
10+
11+
-------------------------------------------------------------- */
12+
13+
a.button, button {
14+
display:block;
15+
float:left;
16+
margin: 0.7em 0.5em 0.7em 0;
17+
padding:5px 10px 5px 7px; /* Links */
18+
19+
border:1px solid #dedede;
20+
border-top:1px solid #eee;
21+
border-left:1px solid #eee;
22+
23+
background-color:#f5f5f5;
24+
font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
25+
font-size:100%;
26+
line-height:130%;
27+
text-decoration:none;
28+
font-weight:bold;
29+
color:#565656;
30+
cursor:pointer;
31+
}
32+
button {
33+
width:auto;
34+
overflow:visible;
35+
padding:4px 10px 3px 7px; /* IE6 */
36+
}
37+
button[type] {
38+
padding:4px 10px 4px 7px; /* Firefox */
39+
line-height:17px; /* Safari */
40+
}
41+
*:first-child+html button[type] {
42+
padding:4px 10px 3px 7px; /* IE7 */
43+
}
44+
button img, a.button img{
45+
margin:0 3px -3px 0 !important;
46+
padding:0;
47+
border:none;
48+
width:16px;
49+
height:16px;
50+
float:none;
51+
}
52+
53+
54+
/* Button colors
55+
-------------------------------------------------------------- */
56+
57+
/* Standard */
58+
button:hover, a.button:hover{
59+
background-color:#dff4ff;
60+
border:1px solid #c2e1ef;
61+
color:#336699;
62+
}
63+
a.button:active{
64+
background-color:#6299c5;
65+
border:1px solid #6299c5;
66+
color:#fff;
67+
}
68+
69+
/* Positive */
70+
body .positive {
71+
color:#529214;
72+
}
73+
a.positive:hover, button.positive:hover {
74+
background-color:#E6EFC2;
75+
border:1px solid #C6D880;
76+
color:#529214;
77+
}
78+
a.positive:active {
79+
background-color:#529214;
80+
border:1px solid #529214;
81+
color:#fff;
82+
}
83+
84+
/* Negative */
85+
body .negative {
86+
color:#d12f19;
87+
}
88+
a.negative:hover, button.negative:hover {
89+
background-color:#fbe3e4;
90+
border:1px solid #fbc2c4;
91+
color:#d12f19;
92+
}
93+
a.negative:active {
94+
background-color:#d12f19;
95+
border:1px solid #d12f19;
96+
color:#fff;
97+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Fancy Type
2+
3+
* Gives you classes to use if you'd like some
4+
extra fancy typography.
5+
6+
Credits and instructions are specified above each class
7+
in the fancy-type.css file in this directory.
8+
9+
10+
Usage
11+
----------------------------------------------------------------
12+
13+
1) Add this plugin to lib/settings.yml.
14+
See compress.rb for instructions.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/* --------------------------------------------------------------
2+
3+
fancy-type.css
4+
* Lots of pretty advanced classes for manipulating text.
5+
6+
See the Readme file in this folder for additional instructions.
7+
8+
-------------------------------------------------------------- */
9+
10+
/* Indentation instead of line shifts for sibling paragraphs. */
11+
p + p { text-indent:2em; margin-top:-1.5em; }
12+
form p + p { text-indent: 0; } /* Don't want this in forms. */
13+
14+
15+
/* For great looking type, use this code instead of asdf:
16+
<span class="alt">asdf</span>
17+
Best used on prepositions and ampersands. */
18+
19+
.alt {
20+
color: #666;
21+
font-family: "Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua", Georgia, serif;
22+
font-style: italic;
23+
font-weight: normal;
24+
}
25+
26+
27+
/* For great looking quote marks in titles, replace "asdf" with:
28+
<span class="dquo">&#8220;</span>asdf&#8221;
29+
(That is, when the title starts with a quote mark).
30+
(You may have to change this value depending on your font size). */
31+
32+
.dquo { margin-left: -.5em; }
33+
34+
35+
/* Reduced size type with incremental leading
36+
(http://www.markboulton.co.uk/journal/comments/incremental_leading/)
37+
38+
This could be used for side notes. For smaller type, you don't necessarily want to
39+
follow the 1.5x vertical rhythm -- the line-height is too much.
40+
41+
Using this class, it reduces your font size and line-height so that for
42+
every four lines of normal sized type, there is five lines of the sidenote. eg:
43+
44+
New type size in em's:
45+
10px (wanted side note size) / 12px (existing base size) = 0.8333 (new type size in ems)
46+
47+
New line-height value:
48+
12px x 1.5 = 18px (old line-height)
49+
18px x 4 = 72px
50+
72px / 5 = 14.4px (new line height)
51+
14.4px / 10px = 1.44 (new line height in em's) */
52+
53+
p.incr, .incr p {
54+
font-size: 10px;
55+
line-height: 1.44em;
56+
margin-bottom: 1.5em;
57+
}
58+
59+
60+
/* Surround uppercase words and abbreviations with this class.
61+
Based on work by Jørgen Arnor Gårdsø Lom [http://twistedintellect.com/] */
62+
63+
.caps {
64+
font-variant: small-caps;
65+
letter-spacing: 1px;
66+
text-transform: lowercase;
67+
font-size:1.2em;
68+
line-height:1%;
69+
font-weight:bold;
70+
padding:0 2px;
71+
}
Loading
Loading
Loading
Loading
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Link Icons
2+
* Icons for links based on protocol or file type.
3+
4+
This is not supported in IE versions < 7.
5+
6+
7+
Credits
8+
----------------------------------------------------------------
9+
10+
* Marc Morgan
11+
* Olav Bjorkoy [bjorkoy.com]
12+
13+
14+
Usage
15+
----------------------------------------------------------------
16+
17+
1) Add this line to your HTML:
18+
<link rel="stylesheet" href="css/blueprint/plugins/link-icons/screen.css" type="text/css" media="screen, projection">
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/* --------------------------------------------------------------
2+
3+
link-icons.css
4+
* Icons for links based on protocol or file type.
5+
6+
See the Readme file in this folder for additional instructions.
7+
8+
-------------------------------------------------------------- */
9+
10+
/* Use this class if a link gets an icon when it shouldn't. */
11+
body a.noicon {
12+
background:transparent none !important;
13+
padding:0 !important;
14+
margin:0 !important;
15+
}
16+
17+
/* Make sure the icons are not cut */
18+
a[href^="http:"], a[href^="mailto:"], a[href^="http:"]:visited,
19+
a[href$=".pdf"], a[href$=".doc"], a[href$=".xls"], a[href$=".rss"],
20+
a[href$=".rdf"], a[href^="aim:"] {
21+
padding:2px 22px 2px 0;
22+
margin:-2px 0;
23+
background-repeat: no-repeat;
24+
background-position: right center;
25+
}
26+
27+
/* External links */
28+
a[href^="http:"] { background-image: url(icons/external.png); }
29+
a[href^="mailto:"] { background-image: url(icons/email.png); }
30+
a[href^="http:"]:visited { background-image: url(icons/visited.png); }
31+
32+
/* Files */
33+
a[href$=".pdf"] { background-image: url(icons/pdf.png); }
34+
a[href$=".doc"] { background-image: url(icons/doc.png); }
35+
a[href$=".xls"] { background-image: url(icons/xls.png); }
36+
37+
/* Misc */
38+
a[href$=".rss"],
39+
a[href$=".rdf"] { background-image: url(icons/feed.png); }
40+
a[href^="aim:"] { background-image: url(icons/im.png); }

0 commit comments

Comments
 (0)