HarryGuerilla-damn-layout-generators 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/CHANGELOG +3 -0
- data/LICENSE +20 -0
- data/README.rdoc +33 -0
- data/Rakefile +13 -0
- data/TODO +0 -0
- data/VERSION +1 -0
- data/damn-layout-generators.gemspec +54 -0
- data/lib/damn_layout_generators.rb +3 -0
- data/rails_generators/damn_layout/.DS_Store +0 -0
- data/rails_generators/damn_layout/USAGE.txt +13 -0
- data/rails_generators/damn_layout/damn_layout_generator.rb +31 -0
- data/rails_generators/damn_layout/templates/.DS_Store +0 -0
- data/rails_generators/damn_layout/templates/application.css +160 -0
- data/rails_generators/damn_layout/templates/application.html.erb +41 -0
- data/rails_generators/damn_layout/templates/docs/mono_greenish_color_swatch.ase +0 -0
- data/rails_generators/damn_layout/templates/images/error.png +0 -0
- data/rails_generators/damn_layout/templates/images/info.png +0 -0
- data/rails_generators/damn_layout/templates/images/success.png +0 -0
- data/rails_generators/damn_layout/templates/images/validation.png +0 -0
- data/rails_generators/damn_layout/templates/images/warning.png +0 -0
- metadata +74 -0
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
pkg
|
data/CHANGELOG
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Tony Pelaez
|
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
@@ -0,0 +1,33 @@
|
|
1
|
+
= Damn Layout Generator
|
2
|
+
|
3
|
+
Generates a default layout file with a css layout based on the 960 framework.
|
4
|
+
|
5
|
+
== Installation
|
6
|
+
|
7
|
+
gem install damn-layout-generators
|
8
|
+
|
9
|
+
== Running the Gem
|
10
|
+
|
11
|
+
From the root of your Rails app run:
|
12
|
+
|
13
|
+
script/generate damn_layout
|
14
|
+
|
15
|
+
== Usage
|
16
|
+
|
17
|
+
The photoshop template for the 960 framework page layout is saved under the
|
18
|
+
#{RAILS_ROOT}/docs directory. Change the css in application.css as you see
|
19
|
+
fit. Default colors are based on the colorswatch found in the
|
20
|
+
#{RAILS_ROOT}/docs directory.
|
21
|
+
|
22
|
+
== Development
|
23
|
+
|
24
|
+
This project can be found on github at the following URL.
|
25
|
+
|
26
|
+
http://github.com/HarryGuerilla/damn-layout-generators
|
27
|
+
|
28
|
+
|
29
|
+
This project relied heavily on work done by:
|
30
|
+
|
31
|
+
The 960 Grid System - http://960.gs/
|
32
|
+
Janko Jovanovic - http://www.jankoatwarpspeed.com/post/2008/05/22/CSS-Message-Boxes-for-different-message-types.aspx
|
33
|
+
Ryan Bates - http://railscasts.com/
|
data/Rakefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
begin
|
2
|
+
require 'jeweler'
|
3
|
+
Jeweler::Tasks.new do |gemspec|
|
4
|
+
gemspec.name = "damn-layout-generators"
|
5
|
+
gemspec.summary = "Generates layout based on the 960 grid system."
|
6
|
+
gemspec.email = "tnyplz@gmail.com"
|
7
|
+
gemspec.homepage = "http://github.com/technicalpickles/the-perfect-gem"
|
8
|
+
gemspec.description = "Generates a default layout file with a css layout based on the 960 framework."
|
9
|
+
gemspec.authors = ["Tony Pelaez"]
|
10
|
+
end
|
11
|
+
rescue LoadError
|
12
|
+
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
13
|
+
end
|
data/TODO
ADDED
File without changes
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.1
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{damn-layout-generators}
|
5
|
+
s.version = "0.1.1"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Tony Pelaez"]
|
9
|
+
s.date = %q{2009-05-24}
|
10
|
+
s.description = %q{Generates a default layout file with a css layout based on the 960 framework.}
|
11
|
+
s.email = %q{tnyplz@gmail.com}
|
12
|
+
s.extra_rdoc_files = [
|
13
|
+
"LICENSE",
|
14
|
+
"README.rdoc"
|
15
|
+
]
|
16
|
+
s.files = [
|
17
|
+
".gitignore",
|
18
|
+
"CHANGELOG",
|
19
|
+
"LICENSE",
|
20
|
+
"README.rdoc",
|
21
|
+
"Rakefile",
|
22
|
+
"TODO",
|
23
|
+
"VERSION",
|
24
|
+
"damn-layout-generators.gemspec",
|
25
|
+
"lib/damn_layout_generators.rb",
|
26
|
+
"rails_generators/damn_layout/.DS_Store",
|
27
|
+
"rails_generators/damn_layout/USAGE.txt",
|
28
|
+
"rails_generators/damn_layout/damn_layout_generator.rb",
|
29
|
+
"rails_generators/damn_layout/templates/.DS_Store",
|
30
|
+
"rails_generators/damn_layout/templates/application.css",
|
31
|
+
"rails_generators/damn_layout/templates/application.html.erb",
|
32
|
+
"rails_generators/damn_layout/templates/docs/mono_greenish_color_swatch.ase",
|
33
|
+
"rails_generators/damn_layout/templates/images/error.png",
|
34
|
+
"rails_generators/damn_layout/templates/images/info.png",
|
35
|
+
"rails_generators/damn_layout/templates/images/success.png",
|
36
|
+
"rails_generators/damn_layout/templates/images/validation.png",
|
37
|
+
"rails_generators/damn_layout/templates/images/warning.png"
|
38
|
+
]
|
39
|
+
s.homepage = %q{http://github.com/technicalpickles/the-perfect-gem}
|
40
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
41
|
+
s.require_paths = ["lib"]
|
42
|
+
s.rubygems_version = %q{1.3.3}
|
43
|
+
s.summary = %q{Generates layout based on the 960 grid system.}
|
44
|
+
|
45
|
+
if s.respond_to? :specification_version then
|
46
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
47
|
+
s.specification_version = 3
|
48
|
+
|
49
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
50
|
+
else
|
51
|
+
end
|
52
|
+
else
|
53
|
+
end
|
54
|
+
end
|
Binary file
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Description:
|
2
|
+
Generates a default layout file with a css layout based on the 960 framework.
|
3
|
+
|
4
|
+
Usage:
|
5
|
+
The photoshop template for the 960 framework page layout is saved under the
|
6
|
+
#{RAILS_ROOT}/docs directory. Change the css in application.css as you see
|
7
|
+
fit. Default colors are based on the colorswatch found in the
|
8
|
+
#{RAILS_ROOT}/docs directory.
|
9
|
+
|
10
|
+
Examples:
|
11
|
+
script/generate damn_layout
|
12
|
+
|
13
|
+
Creates default application layout and css
|
@@ -0,0 +1,31 @@
|
|
1
|
+
class DamnLayoutGenerator < Rails::Generator::Base
|
2
|
+
def manifest
|
3
|
+
record do |m|
|
4
|
+
# Copy default app layout and color theme
|
5
|
+
m.file "application.html.erb", "app/views/layouts/application.html.erb"
|
6
|
+
m.file "application.css", "public/stylesheets/application.css"
|
7
|
+
|
8
|
+
# Copy Photoshop color swatch for color theme
|
9
|
+
m.file "docs/mono_greenish_color_swatch.ase", "doc/mono_greenish_color_swatch.ase"
|
10
|
+
|
11
|
+
# Copy 960 grid system CSS framework
|
12
|
+
m.directory "public/stylesheets/960"
|
13
|
+
m.file "960-grid-system/code/css/uncompressed/960.css", "public/stylesheets/960/960.css"
|
14
|
+
m.file "960-grid-system/code/css/uncompressed/reset.css", "public/stylesheets/960/reset.css"
|
15
|
+
m.file "960-grid-system/code/css/uncompressed/text.css", "public/stylesheets/960/text.css"
|
16
|
+
m.file "960-grid-system/sketch_sheets/960_sketch.pdf", "doc/960_sketch.pdf"
|
17
|
+
m.file "960-grid-system/templates/photoshop/960_grid_12_col.psd", "doc/960_grid_12_col.psd"
|
18
|
+
m.file "960-grid-system/templates/photoshop/960_grid_16_col.psd", "doc/960_grid_16_col.psd"
|
19
|
+
m.file "960-grid-system/licenses/GPL_license.txt", "public/stylesheets/960/GPL_license.txt"
|
20
|
+
m.file "960-grid-system/licenses/MIT_license.txt", "public/stylesheets/960/MIT_license.txt"
|
21
|
+
m.file "960-grid-system/README.txt", "public/stylesheets/960/README.txt"
|
22
|
+
|
23
|
+
# Copy default flash images
|
24
|
+
m.file "images/error.png", "public/images/error.png"
|
25
|
+
m.file "images/info.png", "public/images/info.png"
|
26
|
+
m.file "images/success.png", "public/images/success.png"
|
27
|
+
m.file "images/validation.png", "public/images/validation.png"
|
28
|
+
m.file "images/warning.png", "public/images/warning.png"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
Binary file
|
@@ -0,0 +1,160 @@
|
|
1
|
+
|
2
|
+
/* FLASH MESSAGES */
|
3
|
+
#flash_notice, #flash_success, #flash_warning, #flash_error, #flash_validation {
|
4
|
+
border: 2px solid;
|
5
|
+
padding:15px 10px 15px 50px;
|
6
|
+
margin-top: 10px;
|
7
|
+
margin-bottom: 10px;
|
8
|
+
font-size: smaller;
|
9
|
+
background-repeat: no-repeat;
|
10
|
+
background-position: 10px center;
|
11
|
+
}
|
12
|
+
#flash_notice {
|
13
|
+
color: #00529B;
|
14
|
+
background-color: #BDE5F8;
|
15
|
+
background-image: url('../images/info.png');
|
16
|
+
}
|
17
|
+
#flash_success {
|
18
|
+
color: #4F8A10;
|
19
|
+
background-color: #DFF2BF;
|
20
|
+
background-image:url('../images/success.png');
|
21
|
+
}
|
22
|
+
#flash_warning {
|
23
|
+
color: #9F6000;
|
24
|
+
background-color: #FEEFB3;
|
25
|
+
background-image: url('../images/warning.png');
|
26
|
+
}
|
27
|
+
#flash_error {
|
28
|
+
color: #D8000C;
|
29
|
+
background-color: #FFBABA;
|
30
|
+
background-image: url('../images/error.png');
|
31
|
+
}
|
32
|
+
|
33
|
+
#flash_validation {
|
34
|
+
color: #D63301;
|
35
|
+
background-color: #FFCCBA;
|
36
|
+
background-image: url('../images/validation.png');
|
37
|
+
}
|
38
|
+
|
39
|
+
/* ERROR MESSGAES */
|
40
|
+
/* Error Reporting Styles */
|
41
|
+
|
42
|
+
.fieldWithErrors {
|
43
|
+
color: #D63301;
|
44
|
+
float: left;
|
45
|
+
}
|
46
|
+
|
47
|
+
.fieldWithErrors input {
|
48
|
+
margin-right: .4em;
|
49
|
+
}
|
50
|
+
|
51
|
+
div.fieldWithErrors input, div.fieldWithErrors textarea, div.fieldWithErrors select {
|
52
|
+
background: #FFBABA;
|
53
|
+
}
|
54
|
+
|
55
|
+
|
56
|
+
#errorExplanation {
|
57
|
+
color: #D8000C;
|
58
|
+
background-color: #FFBABA;
|
59
|
+
background-image: url('../images/validation.png');
|
60
|
+
border: 2px solid;
|
61
|
+
margin: 1em;
|
62
|
+
padding-bottom: 1em;
|
63
|
+
background-repeat: no-repeat;
|
64
|
+
background-position: 10px 3em;
|
65
|
+
}
|
66
|
+
|
67
|
+
#errorExplanation h2 {
|
68
|
+
text-align: left;
|
69
|
+
font-weight: bold;
|
70
|
+
padding: .2em .2em .2em .4em;
|
71
|
+
font-size: 1.2em;
|
72
|
+
margin: -.1em;
|
73
|
+
background-color: #D8000C;
|
74
|
+
color: #fff;
|
75
|
+
}
|
76
|
+
|
77
|
+
#errorExplanation p {
|
78
|
+
margin-bottom: 0;
|
79
|
+
padding: .3em .3em 0em 3.8em;
|
80
|
+
}
|
81
|
+
|
82
|
+
#errorExplanation ul li {
|
83
|
+
font-size:smaller;
|
84
|
+
list-style: square;
|
85
|
+
margin: 0em 0em 0em 6.5em;
|
86
|
+
}
|
87
|
+
|
88
|
+
|
89
|
+
.clear{
|
90
|
+
clear: both;
|
91
|
+
width: 0px; height: 0px;
|
92
|
+
}
|
93
|
+
|
94
|
+
/*
|
95
|
+
COLOR THEME COLORS:
|
96
|
+
===================
|
97
|
+
|
98
|
+
#fff white
|
99
|
+
#b1c4bb light green
|
100
|
+
#5a7869 green grey
|
101
|
+
#6c7872 grey
|
102
|
+
#34453d medium dark
|
103
|
+
#272b29 dark
|
104
|
+
|
105
|
+
*/
|
106
|
+
|
107
|
+
body { background-color: #272b29; color: #b1c4bb;}
|
108
|
+
|
109
|
+
table {
|
110
|
+
border-collapse: collapse;
|
111
|
+
}
|
112
|
+
|
113
|
+
h1, h2, h3 {
|
114
|
+
color: #fff;
|
115
|
+
padding: 10px;
|
116
|
+
}
|
117
|
+
|
118
|
+
a:link {color: #b1c4bb;text-decoration:none;}
|
119
|
+
a:visited {color: #b1c4bb;text-decoration:none;}
|
120
|
+
a:hover {color: #fff;text-decoration:underline;}
|
121
|
+
a:active {text-decoration:underline;}
|
122
|
+
|
123
|
+
#container {
|
124
|
+
background-color: #34453d;
|
125
|
+
border: 2px solid #6c7872;
|
126
|
+
margin-top: 20px;
|
127
|
+
overflow:hidden;
|
128
|
+
}
|
129
|
+
|
130
|
+
#header {
|
131
|
+
background-color: #b1c4bb;
|
132
|
+
color: #272b29;
|
133
|
+
border-bottom: 5px solid #fff;
|
134
|
+
margin:0;
|
135
|
+
width: 960px;
|
136
|
+
height: 160px;
|
137
|
+
}
|
138
|
+
|
139
|
+
#header h1 {
|
140
|
+
color: #272b29;
|
141
|
+
}
|
142
|
+
|
143
|
+
#sidebar {
|
144
|
+
background-color: #5a7869;
|
145
|
+
margin:0;
|
146
|
+
padding: 10px;
|
147
|
+
width: 220px;
|
148
|
+
}
|
149
|
+
|
150
|
+
#footer {
|
151
|
+
margin-top: 30px;
|
152
|
+
border-top: 1px solid #6c7872;
|
153
|
+
text-align: center;
|
154
|
+
}
|
155
|
+
|
156
|
+
#footer p {
|
157
|
+
margin: 10px;
|
158
|
+
font-size: 10px;
|
159
|
+
text-align: center;
|
160
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
+
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
|
7
|
+
<title><%= controller.controller_name.capitalize %>: <%= controller.action_name.capitalize %></title>
|
8
|
+
<%= stylesheet_link_tag '960/reset' %>
|
9
|
+
<%= stylesheet_link_tag '960/960' %>
|
10
|
+
<%= stylesheet_link_tag '960/text' %>
|
11
|
+
<%= stylesheet_link_tag 'application' %>
|
12
|
+
<%= javascript_include_tag :defaults %>
|
13
|
+
</head>
|
14
|
+
<body>
|
15
|
+
<div id="container" class="container_12">
|
16
|
+
|
17
|
+
<div id="header" class="grid_12">
|
18
|
+
<h1>Header</h1>
|
19
|
+
</div> <!-- /End Header div -->
|
20
|
+
|
21
|
+
<div id="notices" class="grid_12">
|
22
|
+
<% flash.each do |name, msg| %>
|
23
|
+
<%= content_tag :div, msg, :id => "flash_#{name}" %>
|
24
|
+
<% end %>
|
25
|
+
</div> <!-- /End Notices div -->
|
26
|
+
|
27
|
+
<div id="sidebar" class="grid_3">
|
28
|
+
<%= yield :sidebar %>
|
29
|
+
</div> <!-- /End Sidebar div -->
|
30
|
+
|
31
|
+
<div id="main_content" class="grid_9">
|
32
|
+
<%= yield %>
|
33
|
+
</div> <!-- /End Main Content div -->
|
34
|
+
|
35
|
+
<div id="footer" class="grid_12">
|
36
|
+
<p>© <%= Date.today.year %></p>
|
37
|
+
</div> <!-- /End Footer div -->
|
38
|
+
|
39
|
+
</div> <!-- /End Container div -->
|
40
|
+
</body>
|
41
|
+
</html>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
metadata
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: HarryGuerilla-damn-layout-generators
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tony Pelaez
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-05-24 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: Generates a default layout file with a css layout based on the 960 framework.
|
17
|
+
email: tnyplz@gmail.com
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- LICENSE
|
24
|
+
- README.rdoc
|
25
|
+
files:
|
26
|
+
- .gitignore
|
27
|
+
- CHANGELOG
|
28
|
+
- LICENSE
|
29
|
+
- README.rdoc
|
30
|
+
- Rakefile
|
31
|
+
- TODO
|
32
|
+
- VERSION
|
33
|
+
- damn-layout-generators.gemspec
|
34
|
+
- lib/damn_layout_generators.rb
|
35
|
+
- rails_generators/damn_layout/.DS_Store
|
36
|
+
- rails_generators/damn_layout/USAGE.txt
|
37
|
+
- rails_generators/damn_layout/damn_layout_generator.rb
|
38
|
+
- rails_generators/damn_layout/templates/.DS_Store
|
39
|
+
- rails_generators/damn_layout/templates/application.css
|
40
|
+
- rails_generators/damn_layout/templates/application.html.erb
|
41
|
+
- rails_generators/damn_layout/templates/docs/mono_greenish_color_swatch.ase
|
42
|
+
- rails_generators/damn_layout/templates/images/error.png
|
43
|
+
- rails_generators/damn_layout/templates/images/info.png
|
44
|
+
- rails_generators/damn_layout/templates/images/success.png
|
45
|
+
- rails_generators/damn_layout/templates/images/validation.png
|
46
|
+
- rails_generators/damn_layout/templates/images/warning.png
|
47
|
+
has_rdoc: false
|
48
|
+
homepage: http://github.com/technicalpickles/the-perfect-gem
|
49
|
+
post_install_message:
|
50
|
+
rdoc_options:
|
51
|
+
- --charset=UTF-8
|
52
|
+
require_paths:
|
53
|
+
- lib
|
54
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: "0"
|
59
|
+
version:
|
60
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: "0"
|
65
|
+
version:
|
66
|
+
requirements: []
|
67
|
+
|
68
|
+
rubyforge_project:
|
69
|
+
rubygems_version: 1.2.0
|
70
|
+
signing_key:
|
71
|
+
specification_version: 3
|
72
|
+
summary: Generates layout based on the 960 grid system.
|
73
|
+
test_files: []
|
74
|
+
|