beef-layout 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.document +5 -0
- data/.gitignore +5 -0
- data/LICENSE +20 -0
- data/README.rdoc +7 -0
- data/Rakefile +56 -0
- data/VERSION +1 -0
- data/generators/layout_files/layout_files_generator.rb +32 -0
- data/generators/layout_files/templates/application_layout.html.erb +84 -0
- data/generators/layout_files/templates/public/images/icons/ical.gif +0 -0
- data/generators/layout_files/templates/public/images/icons/rss.gif +0 -0
- data/generators/layout_files/templates/public/images/icons/share-delicious.gif +0 -0
- data/generators/layout_files/templates/public/images/icons/share-digg.gif +0 -0
- data/generators/layout_files/templates/public/images/icons/share-email.gif +0 -0
- data/generators/layout_files/templates/public/images/icons/share-facebook.gif +0 -0
- data/generators/layout_files/templates/public/images/icons/share-stumble.gif +0 -0
- data/generators/layout_files/templates/public/images/logos/beef-logo.gif +0 -0
- data/generators/layout_files/templates/public/images/logos/logo.gif +0 -0
- data/generators/layout_files/templates/public/stylesheets/forms.css +0 -0
- data/generators/layout_files/templates/public/stylesheets/ie.css +8 -0
- data/generators/layout_files/templates/public/stylesheets/layout.css +64 -0
- data/generators/layout_files/templates/public/stylesheets/mobile.css +23 -0
- data/generators/layout_files/templates/public/stylesheets/print.css +59 -0
- data/generators/layout_files/templates/public/stylesheets/reset.css +74 -0
- data/generators/layout_files/templates/public/stylesheets/skin.css +78 -0
- data/generators/layout_files/templates/public/stylesheets/typography.css +45 -0
- data/lib/layout.rb +30 -0
- data/rails/init.rb +5 -0
- data/test/layout_test.rb +7 -0
- data/test/test_helper.rb +10 -0
- metadata +83 -0
data/.document
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Steve England
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "layout"
|
8
|
+
gem.summary = %Q{Generates basic beef layout}
|
9
|
+
gem.email = "steve@wearebeef.co.uk"
|
10
|
+
gem.homepage = "http://github.com/beef/Layout"
|
11
|
+
gem.authors = ["Steve England"]
|
12
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
13
|
+
end
|
14
|
+
|
15
|
+
rescue LoadError
|
16
|
+
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
17
|
+
end
|
18
|
+
|
19
|
+
require 'rake/testtask'
|
20
|
+
Rake::TestTask.new(:test) do |test|
|
21
|
+
test.libs << 'lib' << 'test'
|
22
|
+
test.pattern = 'test/**/*_test.rb'
|
23
|
+
test.verbose = true
|
24
|
+
end
|
25
|
+
|
26
|
+
begin
|
27
|
+
require 'rcov/rcovtask'
|
28
|
+
Rcov::RcovTask.new do |test|
|
29
|
+
test.libs << 'test'
|
30
|
+
test.pattern = 'test/**/*_test.rb'
|
31
|
+
test.verbose = true
|
32
|
+
end
|
33
|
+
rescue LoadError
|
34
|
+
task :rcov do
|
35
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
task :default => :test
|
41
|
+
|
42
|
+
require 'rake/rdoctask'
|
43
|
+
Rake::RDocTask.new do |rdoc|
|
44
|
+
if File.exist?('VERSION.yml')
|
45
|
+
config = YAML.load(File.read('VERSION.yml'))
|
46
|
+
version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
|
47
|
+
else
|
48
|
+
version = ""
|
49
|
+
end
|
50
|
+
|
51
|
+
rdoc.rdoc_dir = 'rdoc'
|
52
|
+
rdoc.title = "layout #{version}"
|
53
|
+
rdoc.rdoc_files.include('README*')
|
54
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
55
|
+
end
|
56
|
+
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.0
|
@@ -0,0 +1,32 @@
|
|
1
|
+
class LayoutFilesGenerator < Rails::Generator::Base
|
2
|
+
|
3
|
+
def manifest
|
4
|
+
record do |m|
|
5
|
+
m.directory File.join("public", "images", "icons")
|
6
|
+
m.directory File.join("public", "images", "logos")
|
7
|
+
|
8
|
+
["public/images/icons/ical.gif",
|
9
|
+
"public/images/icons/rss.gif",
|
10
|
+
"public/images/icons/share-delicious.gif",
|
11
|
+
"public/images/icons/share-digg.gif",
|
12
|
+
"public/images/icons/share-email.gif",
|
13
|
+
"public/images/icons/share-facebook.gif",
|
14
|
+
"public/images/icons/share-stumble.gif",
|
15
|
+
"public/images/logos/beef-logo.gif",
|
16
|
+
"public/images/logos/logo.gif",
|
17
|
+
"public/stylesheets/forms.css",
|
18
|
+
"public/stylesheets/ie.css",
|
19
|
+
"public/stylesheets/layout.css",
|
20
|
+
"public/stylesheets/mobile.css",
|
21
|
+
"public/stylesheets/print.css",
|
22
|
+
"public/stylesheets/reset.css",
|
23
|
+
"public/stylesheets/skin.css",
|
24
|
+
"public/stylesheets/typography.css"].each do |file|
|
25
|
+
m.file file, file
|
26
|
+
end
|
27
|
+
|
28
|
+
m.file( 'application_layout.html.erb', File.join('app/views/layouts', 'application.html.erb'))
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
+
<head>
|
4
|
+
<title><%= Settings.site_name %> | <%=h page_title %></title>
|
5
|
+
<!-- so:meta-tags -->
|
6
|
+
|
7
|
+
<meta name="description" content="<%=h page_description %>" />
|
8
|
+
<meta name="keywords" content="<%=h page_keywords %>" />
|
9
|
+
|
10
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
11
|
+
<meta http-equiv="content-language" content="en" />
|
12
|
+
|
13
|
+
<meta name="author" content="Beef (www.wearebeef.co.uk)" />
|
14
|
+
<meta name="copyright" content="<%= Time.now.year %>, Beef Ltd" />
|
15
|
+
|
16
|
+
<meta name="Geo.Country" content="GB" />
|
17
|
+
<meta name="Geo.Region" content="GB-BST" />
|
18
|
+
<meta name="Geo.Placename" content="Bristol" />
|
19
|
+
<meta name="Geo.Position" content="51.4619;-2.593" />
|
20
|
+
|
21
|
+
<!-- eo:meta-tags -->
|
22
|
+
<link rel="Bookmark" href="http://www.wearebeef.co.uk/" title="Beef" />
|
23
|
+
|
24
|
+
<!-- so:stylesheets -->
|
25
|
+
<%= stylesheet_link_tag 'reset', 'typography', 'layout', 'skin', 'forms', :cache => 'screen', :media=>'screen,tv,projection' %>
|
26
|
+
|
27
|
+
<%= stylesheet_link_tag 'print', :media=>'print' %>
|
28
|
+
<%= stylesheet_link_tag 'mobile', :media=>'handheld' %>
|
29
|
+
|
30
|
+
<!--[if IE]><link href="/stylesheets/ie.css" media="screen" rel="Stylesheet" type="text/css" /><![endif]-->
|
31
|
+
<!--[if IE 6]><link href="/stylesheets/ie6.css" media="screen" rel="Stylesheet" type="text/css" /><![endif]-->
|
32
|
+
|
33
|
+
<!-- eo:stylesheets -->
|
34
|
+
|
35
|
+
<%= yield :header %>
|
36
|
+
|
37
|
+
</head>
|
38
|
+
<body id="<%= page_id %>" class="<%= page_class %>">
|
39
|
+
<!-- so:screen -->
|
40
|
+
<div id="page">
|
41
|
+
<!-- so:header -->
|
42
|
+
<div id="header">
|
43
|
+
<a id="skip" href="#content-area">Skip to content</a>
|
44
|
+
|
45
|
+
<h1><a href="/" id="logo"><%= Settings.site_name %></a></h1>
|
46
|
+
<!-- so:navigation -->
|
47
|
+
<ul id="navigation">
|
48
|
+
<li id="home-nav"><a href="/" title="Home" >Home</a></li>
|
49
|
+
</ul>
|
50
|
+
<!-- eo:navigation -->
|
51
|
+
</div>
|
52
|
+
<!-- eo:header -->
|
53
|
+
|
54
|
+
<div id="content-area">
|
55
|
+
<%= flash_messages %>
|
56
|
+
<%= yield %>
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<!-- so:footer -->
|
60
|
+
<div id="footer">
|
61
|
+
© Copyright <%= Time.now.year %> <%= Settings.site_name %> • <%= [Settings.house_number,Settings.street,Settings.district,Settings.town,Settings.county,Settings.region,( link_to Settings.postcode, "http://maps.google.co.uk/?q=#{Settings.postcode}")].reject{|e| e.blank? }.join(' ') %> • <%= Settings.telephone %>
|
62
|
+
<a href="http://www.wearebeef.co.uk" id="beef-logo">With ♥ from Beef</a>
|
63
|
+
</div>
|
64
|
+
<!-- eo:footer -->
|
65
|
+
|
66
|
+
</div>
|
67
|
+
|
68
|
+
|
69
|
+
<!-- so:javascript -->
|
70
|
+
<%= javascript_include_tag 'prototype', 'effects', 'application', :cache => 'front' %>
|
71
|
+
<% unless Settings.google_analytics_web_property_id.blank? %>
|
72
|
+
<script type="text/javascript">
|
73
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
74
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
75
|
+
</script>
|
76
|
+
<script type="text/javascript">
|
77
|
+
var pageTracker = _gat._getTracker("<%= Settings.google_analytics_web_property_id %>");
|
78
|
+
pageTracker._trackPageview();
|
79
|
+
</script>
|
80
|
+
<% end -%>
|
81
|
+
<!-- eo:javascript -->
|
82
|
+
</body>
|
83
|
+
</html>
|
84
|
+
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
File without changes
|
@@ -0,0 +1,64 @@
|
|
1
|
+
/*
|
2
|
+
LAYOUT
|
3
|
+
Page positioning of elements. Plus borders, padding, margins etc.
|
4
|
+
Note: border color and style sghould go in skin.css
|
5
|
+
*/
|
6
|
+
|
7
|
+
/* skip to content link hide */
|
8
|
+
#skip {
|
9
|
+
display: none;
|
10
|
+
}
|
11
|
+
|
12
|
+
/* so:main-layout */
|
13
|
+
#page {
|
14
|
+
width: 750px;
|
15
|
+
margin: 0 auto;
|
16
|
+
}
|
17
|
+
|
18
|
+
#header {
|
19
|
+
border: 1px solid;
|
20
|
+
padding: 20px;
|
21
|
+
}
|
22
|
+
|
23
|
+
#content-area {
|
24
|
+
padding: 20px;
|
25
|
+
}
|
26
|
+
|
27
|
+
#main-content {
|
28
|
+
float: left;
|
29
|
+
width: 500px;
|
30
|
+
}
|
31
|
+
|
32
|
+
#supporting-content {
|
33
|
+
float: right;
|
34
|
+
width: 200px;
|
35
|
+
}
|
36
|
+
|
37
|
+
#footer {
|
38
|
+
padding: 20px;
|
39
|
+
clear: both;
|
40
|
+
}
|
41
|
+
/* eo:main-layout */
|
42
|
+
|
43
|
+
.fieldWithErrors {
|
44
|
+
display: inline;
|
45
|
+
}
|
46
|
+
|
47
|
+
/* so:clearfix */
|
48
|
+
|
49
|
+
#content-area:after,
|
50
|
+
#footer:after {
|
51
|
+
content: ".";
|
52
|
+
display: block;
|
53
|
+
height: 0;
|
54
|
+
clear: both;
|
55
|
+
visibility: hidden;
|
56
|
+
}
|
57
|
+
|
58
|
+
/* eo:clearfix */
|
59
|
+
|
60
|
+
|
61
|
+
/* adblock tab hide */
|
62
|
+
.sIFR-replaced > div {
|
63
|
+
display: none !important;
|
64
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
body {
|
2
|
+
background: #fff;
|
3
|
+
color: #000;
|
4
|
+
font-size: 12pt;
|
5
|
+
}
|
6
|
+
|
7
|
+
h1, h2, h3 {
|
8
|
+
background: #fff;
|
9
|
+
color: #000;
|
10
|
+
}
|
11
|
+
|
12
|
+
a:link, a:visited {
|
13
|
+
color: #0000ff;
|
14
|
+
background: transparent;
|
15
|
+
font-weight: bold;
|
16
|
+
text-decoration: underline;
|
17
|
+
}
|
18
|
+
|
19
|
+
/*Add elements here that dont need to be printed (add banners, unneccesary images etc )*/
|
20
|
+
/*a#skip{
|
21
|
+
display: none;
|
22
|
+
}*/
|
23
|
+
|
@@ -0,0 +1,59 @@
|
|
1
|
+
/*--------------------------------------
|
2
|
+
A quick guide to the print style sheet,
|
3
|
+
by Liam Richardson, age 21 and one quarter
|
4
|
+
|
5
|
+
Now this uses some intresting rulles i discovered in an old 'a list appart' article.
|
6
|
+
Basicaly, it starts by making everything black and white, with headings with some padding to space them out.
|
7
|
+
|
8
|
+
Links are set to blue and are underlined so they standout on both b+w and colour printers
|
9
|
+
|
10
|
+
Then there is some CSS3 stuff that adds the full URL after the link. Very Clever.
|
11
|
+
|
12
|
+
The first one just takes any link and adds the URL
|
13
|
+
|
14
|
+
The Second rule takes all impbedded links (all those that begin with a "/") and adds the site url to create a full link,
|
15
|
+
as otherwise "/news/01/01/2008/news.html" would be quite useless on a printout.
|
16
|
+
|
17
|
+
so "/news/01/01/2008/news.html" becomes "http://www.a-website.com/news/01/01/2008/news.html" on the print out.
|
18
|
+
|
19
|
+
This neeeds to be tested furthur on every site, but looks quite intresting for now.
|
20
|
+
|
21
|
+
----------------------------------------*/
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
body {
|
26
|
+
background: #fff;
|
27
|
+
color: #000;
|
28
|
+
font-size: 12pt;
|
29
|
+
}
|
30
|
+
|
31
|
+
h1, h2, h3 {
|
32
|
+
padding-bottom: 5px;
|
33
|
+
background: #fff;
|
34
|
+
color: #000;
|
35
|
+
}
|
36
|
+
|
37
|
+
a:link, a:visited {
|
38
|
+
color: #0000ff;
|
39
|
+
background: transparent;
|
40
|
+
font-weight: bold;
|
41
|
+
text-decoration: underline;
|
42
|
+
}
|
43
|
+
|
44
|
+
#main-content a:link:after, #main-content a:visited:after {
|
45
|
+
content: " (" attr(href) ") ";
|
46
|
+
font-size: 90%;
|
47
|
+
}
|
48
|
+
|
49
|
+
#main-content a[href^="/"]:after {
|
50
|
+
content: " (http://www.a-website.com" attr(href) ") "; /*This URL needs to be changed to the URL of the site. */
|
51
|
+
}
|
52
|
+
|
53
|
+
/*Add elements here that dont need to be printed (add banners, unneccesary images etc )*/
|
54
|
+
a#skip,
|
55
|
+
ul.tag-cloud,
|
56
|
+
ul.archive{
|
57
|
+
display: none;
|
58
|
+
}
|
59
|
+
|
@@ -0,0 +1,74 @@
|
|
1
|
+
/* --------------------------------------------------------------
|
2
|
+
reset.css
|
3
|
+
* Resets default browser CSS.
|
4
|
+
Bassed on reset from Blueprint and Eric Meyer Reset Reloaded
|
5
|
+
|
6
|
+
http://www.blueprintcss.org/
|
7
|
+
http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
|
8
|
+
-------------------------------------------------------------- */
|
9
|
+
|
10
|
+
html, body, div, span, applet, object, iframe,
|
11
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
12
|
+
a, abbr, acronym, address, big, cite, code,
|
13
|
+
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
14
|
+
small, strike, strong, sub, sup, tt, var,
|
15
|
+
dl, dt, dd, ol, ul, li,
|
16
|
+
fieldset, form, label, legend,
|
17
|
+
table, caption, tbody, tfoot, thead, tr, th, td {
|
18
|
+
margin: 0;
|
19
|
+
padding: 0;
|
20
|
+
border: 0;
|
21
|
+
outline: 0;
|
22
|
+
font-weight: inherit;
|
23
|
+
font-style: inherit;
|
24
|
+
font-size: 100%;
|
25
|
+
font-family: inherit;
|
26
|
+
vertical-align: baseline;
|
27
|
+
}
|
28
|
+
|
29
|
+
h1,h2,h3,h4,h5,h6{
|
30
|
+
font-size:100%;
|
31
|
+
font-weight: bold;
|
32
|
+
}
|
33
|
+
|
34
|
+
/* remember to define focus styles! ------------------------------Need to investigate the accesability issues */
|
35
|
+
:focus {
|
36
|
+
outline: 0;
|
37
|
+
}
|
38
|
+
|
39
|
+
ol, ul {
|
40
|
+
list-style: none;
|
41
|
+
}
|
42
|
+
|
43
|
+
/* tables still need 'cellspacing="0"' in the markup */
|
44
|
+
table {
|
45
|
+
border-collapse: separate;
|
46
|
+
border-spacing: 0;
|
47
|
+
}
|
48
|
+
|
49
|
+
caption, th, td {
|
50
|
+
text-align: left;
|
51
|
+
font-weight: normal;
|
52
|
+
}
|
53
|
+
|
54
|
+
blockquote:before, blockquote:after,
|
55
|
+
q:before, q:after {
|
56
|
+
content: "";
|
57
|
+
}
|
58
|
+
|
59
|
+
blockquote, q {
|
60
|
+
quotes: "" "";
|
61
|
+
}
|
62
|
+
|
63
|
+
fieldset, img{
|
64
|
+
border:0;
|
65
|
+
}
|
66
|
+
|
67
|
+
address,caption,cite,code,dfn,em,th,var{
|
68
|
+
font-style:normal;
|
69
|
+
font-weight:normal;
|
70
|
+
}
|
71
|
+
caption,th {
|
72
|
+
text-align:left;
|
73
|
+
}
|
74
|
+
|
@@ -0,0 +1,78 @@
|
|
1
|
+
/*
|
2
|
+
SKIN
|
3
|
+
All colour and background image styling.
|
4
|
+
*/
|
5
|
+
|
6
|
+
|
7
|
+
body {
|
8
|
+
color: #766D6A;
|
9
|
+
background: #CCC;
|
10
|
+
}
|
11
|
+
|
12
|
+
#page {
|
13
|
+
background-color: #fff;
|
14
|
+
}
|
15
|
+
|
16
|
+
#header {
|
17
|
+
border-color: #766c6a;
|
18
|
+
border-style: dashed;
|
19
|
+
padding: 20px;
|
20
|
+
}
|
21
|
+
|
22
|
+
#footer {
|
23
|
+
color: #fff;
|
24
|
+
background-color: #766c6a;
|
25
|
+
}
|
26
|
+
|
27
|
+
/* BIR */
|
28
|
+
/*a.share-link,*/
|
29
|
+
a#logo,
|
30
|
+
a#beef-logo{
|
31
|
+
text-indent: -1000em;
|
32
|
+
overflow: hidden;
|
33
|
+
text-align: left;
|
34
|
+
display: block;
|
35
|
+
}
|
36
|
+
|
37
|
+
a#logo{
|
38
|
+
background: url('/images/logos/logo.gif') no-repeat;
|
39
|
+
width: 238px; /*Change this to the dimensions of the new image*/
|
40
|
+
height: 121px; /*Change this to the dimensions of the new image*/
|
41
|
+
}
|
42
|
+
|
43
|
+
a#beef-logo{
|
44
|
+
background: url('/images/logos/beef-logo.gif') no-repeat;
|
45
|
+
width: 40px; /*Change this to the dimensions of the new image*/
|
46
|
+
height: 34px; /*Change this to the dimensions of the new image*/
|
47
|
+
}
|
48
|
+
|
49
|
+
/*Share links*/
|
50
|
+
|
51
|
+
/*a.share-link{
|
52
|
+
width: 16px;
|
53
|
+
height: 16px;
|
54
|
+
}
|
55
|
+
|
56
|
+
a#digg-submit{
|
57
|
+
background: transparent url("/images/icons/share-digg.gif") no-repeat 0 0px !important;
|
58
|
+
}
|
59
|
+
|
60
|
+
a#delicious-submit{
|
61
|
+
background: transparent url("/images/icons/share-delicious.gif") no-repeat 0 0px !important;
|
62
|
+
}
|
63
|
+
|
64
|
+
|
65
|
+
a#facebook-submit{
|
66
|
+
background: transparent url("/images/icons/share-facebook.gif") no-repeat 0 0px !important;
|
67
|
+
}
|
68
|
+
|
69
|
+
|
70
|
+
a#stumble-submit{
|
71
|
+
background: transparent url("/images/icons/share-stumble.gif") no-repeat 0 0px !important;
|
72
|
+
}
|
73
|
+
|
74
|
+
|
75
|
+
a#mail-link{
|
76
|
+
background: transparent url("/images/icons/share-email.gif") no-repeat 0 0px !important;
|
77
|
+
}
|
78
|
+
*/
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/*
|
2
|
+
TYPOGRAPHY
|
3
|
+
Font related information only (ie. font-*, text-*, line-height )
|
4
|
+
See http://www.alistapart.com/articles/howtosizetextincss for sizing technique
|
5
|
+
|
6
|
+
*/
|
7
|
+
body {
|
8
|
+
font-family: "Lucida Sans Unicode", "Lucida Grande", arial, verdana, sans-serif;
|
9
|
+
/*font-size:100%; - This is defined in the reset.css so dont need it here*/
|
10
|
+
line-height:1.125em; /* 16×1.125=18 */
|
11
|
+
}
|
12
|
+
h1, h2, h3, h4, h5, h6{
|
13
|
+
line-height: 1.5em;
|
14
|
+
}
|
15
|
+
|
16
|
+
h1 {
|
17
|
+
font-size: 2.125em;
|
18
|
+
}
|
19
|
+
|
20
|
+
h2 {
|
21
|
+
font-size: 1.625em;
|
22
|
+
}
|
23
|
+
|
24
|
+
ul#navigation {
|
25
|
+
font-size: 0.875em;
|
26
|
+
}
|
27
|
+
|
28
|
+
p {
|
29
|
+
font-size: 0.6875em;
|
30
|
+
}
|
31
|
+
|
32
|
+
#footer {
|
33
|
+
font-size: 0.625em;
|
34
|
+
}
|
35
|
+
|
36
|
+
.supporting-content h2 {
|
37
|
+
font-size: 1.375em;
|
38
|
+
}
|
39
|
+
|
40
|
+
/* Tag Cloud */
|
41
|
+
|
42
|
+
.tag1 { font-size: .875em; }
|
43
|
+
.tag2 { font-size: 1em; }
|
44
|
+
.tag3 { font-size: 1.25em; }
|
45
|
+
.tag4 { font-size: 1.375em; }
|
data/lib/layout.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
module Beef
|
2
|
+
module ApplicationHelper
|
3
|
+
|
4
|
+
def page_id
|
5
|
+
@page_id ||= controller.controller_name.gsub('_', '-')
|
6
|
+
end
|
7
|
+
|
8
|
+
def page_class
|
9
|
+
@page_class ||= controller.action_name.gsub('_', '-')
|
10
|
+
end
|
11
|
+
|
12
|
+
def page_title
|
13
|
+
@page_title ||= controller.controller_name.titleize + (controller.action_name == 'index' ? " #{controller.action_name.titleize}" : ' ' )
|
14
|
+
end
|
15
|
+
|
16
|
+
def page_description
|
17
|
+
@page_description ||= Settings.default_description
|
18
|
+
end
|
19
|
+
|
20
|
+
def page_keywords
|
21
|
+
@page_keywords ||= Settings.default_keywords
|
22
|
+
end
|
23
|
+
|
24
|
+
def flash_messages
|
25
|
+
flash.collect do |name, message|
|
26
|
+
content_tag :div, message, :class => "flash #{name}"
|
27
|
+
end.join
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/rails/init.rb
ADDED
data/test/layout_test.rb
ADDED
data/test/test_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: beef-layout
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Steve England
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-06-24 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description:
|
17
|
+
email: steve@wearebeef.co.uk
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- LICENSE
|
24
|
+
- README.rdoc
|
25
|
+
files:
|
26
|
+
- .document
|
27
|
+
- .gitignore
|
28
|
+
- LICENSE
|
29
|
+
- README.rdoc
|
30
|
+
- Rakefile
|
31
|
+
- VERSION
|
32
|
+
- generators/layout_files/layout_files_generator.rb
|
33
|
+
- generators/layout_files/templates/application_layout.html.erb
|
34
|
+
- generators/layout_files/templates/public/images/icons/ical.gif
|
35
|
+
- generators/layout_files/templates/public/images/icons/rss.gif
|
36
|
+
- generators/layout_files/templates/public/images/icons/share-delicious.gif
|
37
|
+
- generators/layout_files/templates/public/images/icons/share-digg.gif
|
38
|
+
- generators/layout_files/templates/public/images/icons/share-email.gif
|
39
|
+
- generators/layout_files/templates/public/images/icons/share-facebook.gif
|
40
|
+
- generators/layout_files/templates/public/images/icons/share-stumble.gif
|
41
|
+
- generators/layout_files/templates/public/images/logos/beef-logo.gif
|
42
|
+
- generators/layout_files/templates/public/images/logos/logo.gif
|
43
|
+
- generators/layout_files/templates/public/stylesheets/forms.css
|
44
|
+
- generators/layout_files/templates/public/stylesheets/ie.css
|
45
|
+
- generators/layout_files/templates/public/stylesheets/layout.css
|
46
|
+
- generators/layout_files/templates/public/stylesheets/mobile.css
|
47
|
+
- generators/layout_files/templates/public/stylesheets/print.css
|
48
|
+
- generators/layout_files/templates/public/stylesheets/reset.css
|
49
|
+
- generators/layout_files/templates/public/stylesheets/skin.css
|
50
|
+
- generators/layout_files/templates/public/stylesheets/typography.css
|
51
|
+
- lib/layout.rb
|
52
|
+
- rails/init.rb
|
53
|
+
- test/layout_test.rb
|
54
|
+
- test/test_helper.rb
|
55
|
+
has_rdoc: false
|
56
|
+
homepage: http://github.com/beef/Layout
|
57
|
+
post_install_message:
|
58
|
+
rdoc_options:
|
59
|
+
- --charset=UTF-8
|
60
|
+
require_paths:
|
61
|
+
- lib
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: "0"
|
67
|
+
version:
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: "0"
|
73
|
+
version:
|
74
|
+
requirements: []
|
75
|
+
|
76
|
+
rubyforge_project:
|
77
|
+
rubygems_version: 1.2.0
|
78
|
+
signing_key:
|
79
|
+
specification_version: 3
|
80
|
+
summary: Generates basic beef layout
|
81
|
+
test_files:
|
82
|
+
- test/layout_test.rb
|
83
|
+
- test/test_helper.rb
|