Skip to content

Commit

Permalink
Use slim instead of haml
Browse files Browse the repository at this point in the history
  • Loading branch information
divins committed Oct 12, 2013
1 parent db2cbdc commit 4ad4632
Show file tree
Hide file tree
Showing 11 changed files with 103 additions and 36 deletions.
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.9.3-p448
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source "https://rubygems.org"
gem 'rake'
gem 'sinatra'
gem 'shotgun'
gem 'haml'
gem 'slim'

# Sass & Compass
gem 'sass'
Expand Down
8 changes: 5 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ GEM
fssm (>= 0.2.7)
sass (~> 3.1)
fssm (0.2.10)
haml (4.0.3)
tilt
rack (1.5.2)
rack-protection (1.5.0)
rack
Expand All @@ -20,15 +18,19 @@ GEM
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
slim (2.0.1)
temple (~> 0.6.6)
tilt (>= 1.3.3, < 2.1)
temple (0.6.7)
tilt (1.4.1)

PLATFORMS
ruby

DEPENDENCIES
compass
haml
rake
sass
shotgun
sinatra
slim
6 changes: 3 additions & 3 deletions app.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
require 'rubygems'
require 'sinatra/base'
require 'haml'
require 'slim'

class SinatraBootstrap < Sinatra::Base
require './helpers/render_partial'
# require './helpers/render_partial'

get '/' do
haml :index
slim :index
end

# start the server if ruby file executed directly
Expand Down
70 changes: 69 additions & 1 deletion public/stylesheets/application.css
Original file line number Diff line number Diff line change
@@ -1 +1,69 @@
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}html{line-height:1}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}caption,th,td{text-align:left;font-weight:normal;vertical-align:middle}q,blockquote{quotes:none}q:before,q:after,blockquote:before,blockquote:after{content:"";content:none}a img{border:none}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary{display:block}body{font:62.5% Arial, Helvetica, sans-serif;background:#fff;color:#0d0d0d;padding:50px}h1{font-size:3em;font-weight:bold;text-align:center}
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font: inherit;
font-size: 100%;
vertical-align: baseline;
}

html {
line-height: 1;
}

ol, ul {
list-style: none;
}

table {
border-collapse: collapse;
border-spacing: 0;
}

caption, th, td {
text-align: left;
font-weight: normal;
vertical-align: middle;
}

q, blockquote {
quotes: none;
}
q:before, q:after, blockquote:before, blockquote:after {
content: "";
content: none;
}

a img {
border: none;
}

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
display: block;
}

body {
font: 62.5% Arial, Helvetica, sans-serif;
background: white;
color: #0d0d0d;
padding: 50px;
}

h1 {
font-size: 3em;
font-weight: bold;
text-align: center;
color: orange;
}
15 changes: 15 additions & 0 deletions stylesheets/application.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@import "compass/reset"
@import "compass/utilities"
@import "compass/css3"

body
font: 62.5% Arial, Helvetica, sans-serif
background: #fff
color: #0d0d0d
padding: 50px

h1
font-size: 3em
font-weight: bold
text-align: center
color: orange
16 changes: 0 additions & 16 deletions stylesheets/application.scss

This file was deleted.

1 change: 0 additions & 1 deletion views/index.haml

This file was deleted.

1 change: 1 addition & 0 deletions views/index.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1 Sinatra has taken the stage
11 changes: 0 additions & 11 deletions views/layout.haml

This file was deleted.

8 changes: 8 additions & 0 deletions views/layout.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
html
head
title Sinatra Bootstrap
link href='/stylesheets/application.css' media='screen' rel='stylesheet' type="text/css"
script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"
script type="text/javascript" src="/javascripts/application.js"
body
== yield

0 comments on commit 4ad4632

Please sign in to comment.