diff --git a/Gemfile b/Gemfile index f2a36ac..a7206df 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,10 @@ source 'http://rubygems.org' -gem "serve", "~> 1.0.0" -gem "grid-coordinates", "~> 1.1.4" -gem "meyer-reset", "~> 2.0.0" -gem "maruku", "~> 0.6.0" \ No newline at end of file +gem 'serve', '~> 1.0.0' +gem 'haml', '~> 3.1.1' +gem 'sass', '~> 3.1.1' +gem 'compass', '~> 0.11.1' +gem 'css_parser', '~> 1.1.9' +gem 'grid-coordinates', '~> 1.1.4' +gem 'meyer-reset', '~> 2.0.0' +gem 'maruku', '~> 0.6.0' \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 1a3c38e..28dccc8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,31 +1,41 @@ GEM remote: http://rubygems.org/ specs: - activesupport (3.0.1) - compass (0.10.6) - haml (>= 3.0.4) + activesupport (3.0.7) + chunky_png (1.1.2) + compass (0.11.1) + chunky_png (~> 1.1) + fssm (>= 0.2.7) + sass (~> 3.1) + css_parser (1.1.9) + fssm (0.2.7) grid-coordinates (1.1.4) compass (>= 0.10.5) - haml (3.0.25) + haml (3.1.1) i18n (0.4.2) maruku (0.6.0) syntax (>= 1.0.0) meyer-reset (2.0.0) compass (>= 0.10.5) - rack (1.2.1) + rack (1.2.2) + sass (3.1.1) serve (1.0.0) activesupport (~> 3.0.1) i18n (~> 0.4.1) rack (~> 1.2.1) tzinfo (~> 0.3.23) syntax (1.0.0) - tzinfo (0.3.23) + tzinfo (0.3.27) PLATFORMS ruby DEPENDENCIES + compass (~> 0.11.1) + css_parser (~> 1.1.9) grid-coordinates (~> 1.1.4) + haml (~> 3.1.1) maruku (~> 0.6.0) meyer-reset (~> 2.0.0) + sass (~> 3.1.1) serve (~> 1.0.0) diff --git a/config.rb b/config.rb index 651a2c7..903d60b 100644 --- a/config.rb +++ b/config.rb @@ -17,6 +17,7 @@ # Set to true for easier debugging line_comments = false +preferred_syntax = :sass # CSS output style - :nested, :expanded, :compact, or :compressed output_style = :expanded diff --git a/config.ru b/config.ru index 5ff4168..f366f52 100644 --- a/config.ru +++ b/config.ru @@ -14,13 +14,13 @@ root = ::File.dirname(__FILE__) # Set the haml options # http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html#options -class Haml::Engine - alias old_initialize initialize - def initialize(lines, options) - options.update(:format => :html5) - old_initialize(lines, options) - end -end +# class Haml::Engine +# alias old_initialize initialize +# def initialize(lines, options) +# options.update(:format => :html5) +# old_initialize(lines, options) +# end +# end # Compass Compass.add_project_configuration(root + '/config.rb') diff --git a/public/stylesheets/stylesheet.css b/public/stylesheets/stylesheet.css index 30bf20e..0d8e2ef 100644 --- a/public/stylesheets/stylesheet.css +++ b/public/stylesheets/stylesheet.css @@ -1,4 +1,3 @@ -@charset "UTF-8"; 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; @@ -165,10 +164,10 @@ input:invalid, textarea:invalid { -ms-border-radius: 1px; -khtml-border-radius: 1px; border-radius: 1px; - -moz-box-shadow: red 0px 0px 5px 0; - -webkit-box-shadow: red 0px 0px 5px 0; - -o-box-shadow: red 0px 0px 5px 0; - box-shadow: red 0px 0px 5px 0; + -moz-box-shadow: red 0px 0px 5px; + -webkit-box-shadow: red 0px 0px 5px; + -o-box-shadow: red 0px 0px 5px; + box-shadow: red 0px 0px 5px; } .no-boxshadow input:invalid, .no-boxshadow textarea:invalid { @@ -475,6 +474,98 @@ h1, h2, h3, h4, h5, h6 { padding-left: 920px; } +.grid-prefix-margin-1 { + margin-left: 45px; +} + +.grid-prefix-margin-2 { + margin-left: 85px; +} + +.grid-prefix-margin-3 { + margin-left: 125px; +} + +.grid-prefix-margin-4 { + margin-left: 165px; +} + +.grid-prefix-margin-5 { + margin-left: 205px; +} + +.grid-prefix-margin-6 { + margin-left: 245px; +} + +.grid-prefix-margin-7 { + margin-left: 285px; +} + +.grid-prefix-margin-8 { + margin-left: 325px; +} + +.grid-prefix-margin-9 { + margin-left: 365px; +} + +.grid-prefix-margin-10 { + margin-left: 405px; +} + +.grid-prefix-margin-11 { + margin-left: 445px; +} + +.grid-prefix-margin-12 { + margin-left: 485px; +} + +.grid-prefix-margin-13 { + margin-left: 525px; +} + +.grid-prefix-margin-14 { + margin-left: 565px; +} + +.grid-prefix-margin-15 { + margin-left: 605px; +} + +.grid-prefix-margin-16 { + margin-left: 645px; +} + +.grid-prefix-margin-17 { + margin-left: 685px; +} + +.grid-prefix-margin-18 { + margin-left: 725px; +} + +.grid-prefix-margin-19 { + margin-left: 765px; +} + +.grid-prefix-margin-20 { + margin-left: 805px; +} + +.grid-prefix-margin-21 { + margin-left: 845px; +} + +.grid-prefix-margin-22 { + margin-left: 885px; +} + +.grid-prefix-margin-23 { + margin-left: 925px; +} + .grid-suffix-1 { padding-right: 40px; } @@ -567,6 +658,98 @@ h1, h2, h3, h4, h5, h6 { padding-right: 920px; } +.grid-suffix-margin-1 { + margin-right: 45px; +} + +.grid-suffix-margin-2 { + margin-right: 85px; +} + +.grid-suffix-margin-3 { + margin-right: 125px; +} + +.grid-suffix-margin-4 { + margin-right: 165px; +} + +.grid-suffix-margin-5 { + margin-right: 205px; +} + +.grid-suffix-margin-6 { + margin-right: 245px; +} + +.grid-suffix-margin-7 { + margin-right: 285px; +} + +.grid-suffix-margin-8 { + margin-right: 325px; +} + +.grid-suffix-margin-9 { + margin-right: 365px; +} + +.grid-suffix-margin-10 { + margin-right: 405px; +} + +.grid-suffix-margin-11 { + margin-right: 445px; +} + +.grid-suffix-margin-12 { + margin-right: 485px; +} + +.grid-suffix-margin-13 { + margin-right: 525px; +} + +.grid-suffix-margin-14 { + margin-right: 565px; +} + +.grid-suffix-margin-15 { + margin-right: 605px; +} + +.grid-suffix-margin-16 { + margin-right: 645px; +} + +.grid-suffix-margin-17 { + margin-right: 685px; +} + +.grid-suffix-margin-18 { + margin-right: 725px; +} + +.grid-suffix-margin-19 { + margin-right: 765px; +} + +.grid-suffix-margin-20 { + margin-right: 805px; +} + +.grid-suffix-margin-21 { + margin-right: 845px; +} + +.grid-suffix-margin-22 { + margin-right: 885px; +} + +.grid-suffix-margin-23 { + margin-right: 925px; +} + .grid-push-1 { left: 40px; } @@ -660,95 +843,95 @@ h1, h2, h3, h4, h5, h6 { } .grid-pull-1 { - left: -40px; + left: -20px; } .grid-pull-2 { - left: -80px; + left: -40px; } .grid-pull-3 { - left: -120px; + left: -60px; } .grid-pull-4 { - left: -160px; + left: -80px; } .grid-pull-5 { - left: -200px; + left: -100px; } .grid-pull-6 { - left: -240px; + left: -120px; } .grid-pull-7 { - left: -280px; + left: -140px; } .grid-pull-8 { - left: -320px; + left: -160px; } .grid-pull-9 { - left: -360px; + left: -180px; } .grid-pull-10 { - left: -400px; + left: -200px; } .grid-pull-11 { - left: -440px; + left: -220px; } .grid-pull-12 { - left: -480px; + left: -240px; } .grid-pull-13 { - left: -520px; + left: -260px; } .grid-pull-14 { - left: -560px; + left: -280px; } .grid-pull-15 { - left: -600px; + left: -300px; } .grid-pull-16 { - left: -640px; + left: -320px; } .grid-pull-17 { - left: -680px; + left: -340px; } .grid-pull-18 { - left: -720px; + left: -360px; } .grid-pull-19 { - left: -760px; + left: -380px; } .grid-pull-20 { - left: -800px; + left: -400px; } .grid-pull-21 { - left: -840px; + left: -420px; } .grid-pull-22 { - left: -880px; + left: -440px; } .grid-pull-23 { - left: -920px; + left: -460px; } body { @@ -772,68 +955,10 @@ p:last-child { margin-bottom: 0; } -@media all and (orientation:portrait) { - /* Portrait styles */ -} - -@media all and (orientation:landscape) { - /* landscape styles */ -} - -@media screen and (max-device-width: 480px) { - body { - padding: 0; - } - - .container { - margin: 0; - padding: 40px 30px; - padding-top: 150px; - width: auto; - } - .container .content { - padding: 0; - width: auto; - } - - h1 { - font-size: 180px; - margin-bottom: 80px; - } - - ul { - padding: 40px 0 0 40px; - } - ul li { - font-size: 40px; - } - - p { - font-size: 60px; - line-height: 1.2; - margin-bottom: 20px; - } - p.last { - position: absolute; - top: 0; - left: 0; - background: green; - display: block; - font-weight: bold; - margin: 0; - padding: 20px 40px; - text-align: center; - width: 100%; - } - p.last a { - color: white; - } -} - -.content ul { +ul { list-style: disc; margin-bottom: 15px; } -.content ul li { +ul li { line-height: 1.5; } diff --git a/sass/_landscape.sass b/sass/_landscape.sass deleted file mode 100644 index 65123a0..0000000 --- a/sass/_landscape.sass +++ /dev/null @@ -1,2 +0,0 @@ -=landscape - /* landscape styles \ No newline at end of file diff --git a/sass/_mobile-480.sass b/sass/_mobile-480.sass deleted file mode 100644 index d8428bd..0000000 --- a/sass/_mobile-480.sass +++ /dev/null @@ -1,35 +0,0 @@ -=mobile-480 - body - padding: 0 - .container - margin: 0 - padding: 40px 30px - padding-top: 150px - width: auto - .content - padding: 0 - width: auto - h1 - font-size: 180px - margin-bottom: 80px - ul - padding: 40px 0 0 40px - li - font-size: 40px - p - font-size: 60px - line-height: 1.2 - margin-bottom: 20px - &.last - position: absolute - top: 0 - left: 0 - background: green - display: block - font-weight: bold - margin: 0 - padding: 20px 40px - text-align: center - width: 100% - a - color: #fff \ No newline at end of file diff --git a/sass/_portrait.sass b/sass/_portrait.sass deleted file mode 100644 index ae8a3ce..0000000 --- a/sass/_portrait.sass +++ /dev/null @@ -1,2 +0,0 @@ -=portrait - /* Portrait styles \ No newline at end of file diff --git a/sass/_screen.sass b/sass/_screen.sass deleted file mode 100644 index 14c66bb..0000000 --- a/sass/_screen.sass +++ /dev/null @@ -1,37 +0,0 @@ -// Configure grid coordinates -$grid-columns: 24 -$grid-width: 30px -$grid-gutter-width: 10px - -@import grid-coordinates - -+grid-coordinates - -.container - @extend .grid-container - .content - @extend .grid-16 - @extend .grid-prefix-4 - @extend .grid-suffix-4 - -body - @extend .font-helvetica - background: white - padding-top: 40px - -h1 - font-size: 30px - font-weight: bold - margin-bottom: 20px - -p - color: #444 - font-size: 14px - line-height: 1.4 - margin-bottom: 14px - &:last-child - margin-bottom: 0 - &.last - @extend .grid-16 - @extend .grid-prefix-4 - @extend .grid-suffix-4 \ No newline at end of file diff --git a/sass/partials/_minimal-base-styles.sass b/sass/partials/_minimal-base-styles.sass index bc57826..70dab37 100644 --- a/sass/partials/_minimal-base-styles.sass +++ b/sass/partials/_minimal-base-styles.sass @@ -119,7 +119,7 @@ input:valid, textarea:valid input:invalid, textarea:invalid +border-radius(1px) - +box-shadow($invalid-box-shadow-color, 0px, 0px, 5px) + +box-shadow($invalid-box-shadow-color 0px 0px 5px) .no-boxshadow input:invalid, textarea:invalid diff --git a/sass/stylesheet.sass b/sass/stylesheet.sass index d5b42f2..5b9adbd 100644 --- a/sass/stylesheet.sass +++ b/sass/stylesheet.sass @@ -1,30 +1,45 @@ @import base -@import screen -@import portrait -@import landscape -@import mobile-480 +// Configure grid coordinates +$grid-columns: 24 +$grid-width: 30px +$grid-gutter-width: 10px -// Media queries for responsive design -// These follow after primary styles so they will successfully override +@import grid-coordinates -@media all and (orientation:portrait) - +portrait ++grid-coordinates -@media all and (orientation:landscape) - +landscape +.container + @extend .grid-container + .content + @extend .grid-16 + @extend .grid-prefix-4 + @extend .grid-suffix-4 + +body + @extend .font-helvetica + background: white + padding-top: 40px -// Grade-A Mobile Browsers (Opera Mobile, Mobile Safari, Android Chrome) -@media screen and (max-device-width: 480px) - +mobile-480 - // Uncomment if you don't want iOS and WinMobile to mobile-optimize the text for you: j.mp/textsizeadjust - // html - // -webkit-text-size-adjust: none - // -ms-text-size-adjust: none +h1 + font-size: 30px + font-weight: bold + margin-bottom: 20px -.content - ul - list-style: disc - margin-bottom: 15px - li - line-height: 1.5 \ No newline at end of file +p + color: #444 + font-size: 14px + line-height: 1.4 + margin-bottom: 14px + &:last-child + margin-bottom: 0 + &.last + @extend .grid-16 + @extend .grid-prefix-4 + @extend .grid-suffix-4 + +ul + list-style: disc + margin-bottom: 15px + li + line-height: 1.5 \ No newline at end of file diff --git a/views/about/index.haml b/views/about.haml similarity index 100% rename from views/about/index.haml rename to views/about.haml diff --git a/views/index.haml b/views/index.haml index ec7ca77..e031ad9 100644 --- a/views/index.haml +++ b/views/index.haml @@ -4,13 +4,11 @@ %h1= @title :markdown - This is [serve bootstrap](https://github.com/adamstac/serve-bootstrap), a bootstrap project to do rapid design protyping using: + Serve bootstrap is a "bootstrapping" project for [Serve](https://github.com/jlong/serve) to do rapid design protyping using: - * [Haml](http://haml-lang.com/) - * [Sass](http://sass-lang.com/) - * [Compass](http://beta.compass-style.org/) - * [jQuery](http://jquery.com/) - * [@media queries](http://www.w3.org/TR/css3-mediaqueries/) for [responsive web design](http://www.alistapart.com/articles/responsive-web-design/) - -%p.last - = link_to "Fork this project on GitHub!", "https://github.com/adamstac/serve-bootstrap" \ No newline at end of file + * [Haml](http://haml-lang.com/) - Version 3.1.1 + * [Sass](http://sass-lang.com/) - Version 3.1.1 + * [Compass](http://beta.compass-style.org/) - Version 0.11.1 + * [jQuery](http://jquery.com/) - Version 1.5 + + [Fork this project on GitHub!](https://github.com/adamstac/serve-bootstrap) \ No newline at end of file diff --git a/views/layouts/application.haml b/views/layouts/application.haml index 850d9b1..df392b5 100644 --- a/views/layouts/application.haml +++ b/views/layouts/application.haml @@ -1,11 +1,8 @@ -!!! +!!! 5 %html{html_attrs} %head %title= @title - // Buggy on the iPhone4 - // %meta{:content => "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0", :name => "viewport"} %link{:href => "stylesheets/stylesheet.css", :media => "all", :rel => "stylesheet", :type => "text/css"} - %script{:type => "text/javascript", :src => "javascripts/respond.min.js"} %script{:type => "text/javascript", :src => "http://code.jquery.com/jquery-1.5.min.js"} %script{:type => "text/javascript", :src => "javascripts/modernizr-1.6.min.js"} %script{:type => "text/javascript", :src => "javascripts/application.js"}