Skip to content

Commit e583bb4

Browse files
committed
first commit
0 parents  commit e583bb4

22 files changed

Lines changed: 621 additions & 0 deletions

‎.gitignore‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## MAC OS
2+
.DS_Store
3+
4+
## TEXTMATE
5+
*.tmproj
6+
tmtags
7+
8+
## EMACS
9+
*~
10+
\#*
11+
.\#*
12+
13+
## VIM
14+
*.swp
15+
16+
## PROJECT::GENERAL
17+
.sass-cache
18+
coverage
19+
rdoc
20+
pkg
21+
22+
## PROJECT::SPECIFIC
23+
*.gem
24+
.rvmrc
25+
.bundle

‎Gemfile‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
source :rubygems
2+
3+
gem 'serve', '1.5.1'
4+
5+
# Use edge instead:
6+
# gem 'serve', :git => 'git://github.com/jlong/serve.git'
7+
8+
# Use Compass and Sass
9+
gem 'compass'
10+
11+
# Markdown and Textile
12+
# gem 'rdiscount' # Markdown
13+
# gem 'RedCloth' # Textile
14+
15+
# Other templating languages
16+
# gem 'erubis'
17+
# gem 'haml'
18+
# gem 'slim'
19+
# gem 'radius'
20+
# gem 'less'
21+
22+
# Coffee Script
23+
# gem 'coffee-script'
24+
25+
# Use mongrel for the Web server
26+
# gem 'mongrel'

‎README.markdown‎

Whitespace-only changes.

‎README.md‎

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
What is this?
2+
=============
3+
4+
This is a simple HTML prototype written in HAML or ERB that is designed to be
5+
viewed with Serve.
6+
7+
What is Serve? Serve is an open-source rapid prototyping framework for Web
8+
applications. It makes it easy to prototype functionality without writing a
9+
single line of backend code.
10+
11+
12+
How do I install and run Serve?
13+
-------------------------------
14+
15+
Serve is distributed as a Ruby gem to make it easy to get up and running. You
16+
must have Ruby installed in order to download and use Serve. The Ruby download
17+
page provides instructions for getting Ruby setup on different platforms:
18+
19+
<http://www.ruby-lang.org/en/downloads/>
20+
21+
After you have Ruby installed, open up the command prompt and type:
22+
23+
gem install serve
24+
25+
(OSX and Unix users may need to prefix the command with `sudo`.)
26+
27+
After Serve is installed, you can start it up in a given directory like this:
28+
29+
serve
30+
31+
This will start Serve on port 4000. You can now view the prototype in your
32+
Web browser at this URL:
33+
34+
<http://localhost:4000>
35+
36+
37+
Compass and Sass
38+
----------------
39+
40+
This prototype uses Compass and Sass to generate CSS. Both are distributed as
41+
Ruby gems and can be easily installed from the command prompt. Since the
42+
Compass gem depends on Sass, you can install them both with one command:
43+
44+
gem install compass
45+
46+
Learn more about Sass:
47+
48+
<http://sass-lang.org>
49+
50+
Learn more about Compass:
51+
52+
<http://compass-style.org>
53+
54+
55+
Rack and Passenger
56+
------------------
57+
58+
Astute users may notice that this project is also a simple Rack application.
59+
This means that it is easy to deploy it on Passenger or in any other
60+
Rack-friendly environment. Rack it up with the `rackup` command. For more
61+
information about using Serve and Passenger see:
62+
63+
<http://bit.ly/serve-and-passenger>
64+
65+
66+
Exporting
67+
---------
68+
69+
To export this project to pure HTML and CSS you will need the prerelease
70+
version of Serve. To get started with the prerelease version:
71+
72+
gem install --pre serve
73+
74+
To export your project, use the new "export" command:
75+
76+
serve export <project>:<output>
77+
78+
Where "project" is the path to the project and "output" is the path to the
79+
directory where you would like your HTML and CSS generated.
80+
81+
82+
Learning More
83+
-------------
84+
85+
You can learn more about Serve on the GitHub project page:
86+
87+
<http://github.com/jlong/serve>

‎compass.config‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#
2+
# Compass Configuration
3+
#
4+
5+
# HTTP paths
6+
http_path = '/'
7+
http_stylesheets_path = '/stylesheets'
8+
http_images_path = '/images'
9+
http_javascripts_path = '/javascripts'
10+
11+
# File system locations
12+
sass_dir = 'stylesheets'
13+
css_dir = 'public/stylesheets'
14+
images_dir = 'public/images'
15+
javascripts_dir = 'public/javascripts'
16+
17+
# Set to true for easier debugging
18+
line_comments = false
19+
20+
# CSS output style - :nested, :expanded, :compact, or :compressed
21+
output_style = :expanded
22+
23+
# Determine whether Compass asset helper functions generate relative
24+
# or absolute paths
25+
relative_assets = true
26+
27+
# Learn more:
28+
# http://compass-style.org/docs/tutorials/configuration-reference/

‎config.ru‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#\ -p 4000
2+
3+
require 'rubygems'
4+
require 'bundler'
5+
begin
6+
Bundler.setup(:default, :development)
7+
rescue Bundler::BundlerError => e
8+
$stderr.puts e.message
9+
$stderr.puts "Run `bundle install` to install missing gems"
10+
exit e.status_code
11+
end
12+
13+
require 'serve'
14+
require 'serve/rack'
15+
16+
# The project root directory
17+
root = ::File.dirname(__FILE__)
18+
19+
# Compile Sass on the fly with the Sass plugin. Some production environments
20+
# don't allow you to write to the file system on the fly (like Heroku).
21+
# Remove this conditional if you want to compile Sass in production.
22+
if ENV['RACK_ENV'] != 'production'
23+
require 'sass'
24+
require 'sass/plugin/rack'
25+
require 'compass'
26+
27+
Compass.add_project_configuration(root + '/compass.config')
28+
Compass.configure_sass_plugin!
29+
30+
use Sass::Plugin::Rack # Sass Middleware
31+
end
32+
33+
# Other Rack Middleware
34+
use Rack::ShowStatus # Nice looking 404s and other messages
35+
use Rack::ShowExceptions # Nice looking errors
36+
37+
# Rack Application
38+
if ENV['SERVER_SOFTWARE'] =~ /passenger/i
39+
# Passendger only needs the adapter
40+
run Serve::RackAdapter.new(root + '/views')
41+
else
42+
# Use Rack::Cascade and Rack::Directory on other platforms for static assets
43+
run Rack::Cascade.new([
44+
Serve::RackAdapter.new(root + '/views'),
45+
Rack::Directory.new(root + '/public')
46+
])
47+
end

‎public/.htaccess‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Options +MultiViews

‎public/images/serve-logo.png‎

35.3 KB
Loading

‎stylesheets/modules/_all.scss‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@import "utility";
2+
@import "links";
3+
@import "typography";

‎stylesheets/modules/_links.scss‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@mixin basic-link($color: $link-color, $visited: $color, $hover: $color, $decoration: "underline") {
2+
&:link {
3+
color: $color;
4+
@if $decoration == "underline" { text-decoration: underline; }
5+
@if $decoration == "plain" { text-decoration: none; }
6+
}
7+
&:visited {
8+
color: $visited;
9+
}
10+
&:hover {
11+
color: $hover;
12+
@if $decoration == "underline" { text-decoration: none; }
13+
@if $decoration == "plain" { text-decoration: underline; }
14+
}
15+
}

0 commit comments

Comments
 (0)