Permalink
Browse files

responsive

  • Loading branch information...
1 parent 02cf973 commit 6c3672ba9215845640cffe70774f576e0ef63f3f @stefl committed Jun 17, 2012
Showing with 34 additions and 24 deletions.
  1. +4 −1 app/controllers/page.rb
  2. +9 −4 app/stylesheets/application.scss
  3. +21 −19 public/stylesheets/application.css
@@ -5,7 +5,10 @@
get :index, :map => "/", :cache => true do
expires_in 300
@items = []
- json = ::JSON.parse(open("http://myshakespeare.worldshakespearefestival.org.uk/api/?dateRange=10-06-2012,17-06-2012").read)
+ t = Time.new
+ to = t.strftime("%d-%m-%Y")
+ from = (t - (2*7*24*60*60)).strftime("%d-%m-%Y")
+ json = ::JSON.parse(open("http://myshakespeare.worldshakespearefestival.org.uk/api/?dateRange=#{from},#{to}").read)
json.keys.each do |key|
begin
day = ::JSON.parse(json[key]) if json[key]
@@ -153,11 +153,16 @@ h2 {
@include trailer;
}
-.item {
- @include span-columns(4,12);
- &:nth-child(n+3) {
- &:nth-child(3n) { @include omega; }
+@include at-breakpoint(60em 12) {
+ .item {
+ @include span-columns(4,12);
+ &:nth-child(n+3) {
+ &:nth-child(3n) { @include omega; }
+ }
}
+}
+
+.item {
p {
font-family: $body_face;
.price {
@@ -265,36 +265,38 @@ h2 {
margin-bottom: 1.333em;
}
-/* line 156, ../../app/stylesheets/application.scss */
-.item {
- width: 32.203%;
- float: left;
- margin-right: 1.695%;
- display: inline;
-}
-/* line 159, ../../app/stylesheets/application.scss */
-.item:nth-child(n+3):nth-child(3n) {
- float: right;
- margin-right: 0;
- #margin-left: -1em;
- display: inline;
-}
-/* line 161, ../../app/stylesheets/application.scss */
+@media (min-width: 67.5em) {
+ /* line 157, ../../app/stylesheets/application.scss */
+ .item {
+ width: 32.203%;
+ float: left;
+ margin-right: 1.695%;
+ display: inline;
+ }
+ /* line 160, ../../app/stylesheets/application.scss */
+ .item:nth-child(n+3):nth-child(3n) {
+ float: right;
+ margin-right: 0;
+ #margin-left: -1em;
+ display: inline;
+ }
+}
+/* line 166, ../../app/stylesheets/application.scss */
.item p {
font-family: "lapture-display", serif;
margin-bottom: 1.333em;
}
-/* line 163, ../../app/stylesheets/application.scss */
+/* line 168, ../../app/stylesheets/application.scss */
.item p .price {
color: #8c5e2f;
font-size: 2em;
line-height: 1.333em;
}
-/* line 167, ../../app/stylesheets/application.scss */
+/* line 172, ../../app/stylesheets/application.scss */
.item p i {
font-style: italic;
}
-/* line 172, ../../app/stylesheets/application.scss */
+/* line 177, ../../app/stylesheets/application.scss */
.item img {
width: 100%;
filter: url(filters.svg#grayscale);
@@ -305,7 +307,7 @@ h2 {
/* Google Chrome & Webkit Nightlies */
}
-/* line 180, ../../app/stylesheets/application.scss */
+/* line 185, ../../app/stylesheets/application.scss */
section#items {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;

0 comments on commit 6c3672b

Please sign in to comment.