From 836dcff67eb1debbcb24d2129e4833278723eced Mon Sep 17 00:00:00 2001 From: Skud Date: Mon, 28 Jan 2013 21:07:03 +1100 Subject: [PATCH] Fixed the homepage so it doesn't look messy on phones. Basically the "hero unit" was rendering horribly on very small screens (eg. phones). I've made it so that the hero unit is only shown on "desktop" and "tablet" devices, not "phone". I also moved the actual content of the hero-unit out into a partial to avoid repeating myself. --- app/views/home/_blurb.html.haml | 7 +++++++ app/views/home/index.html.haml | 12 +++++------- 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 app/views/home/_blurb.html.haml diff --git a/app/views/home/_blurb.html.haml b/app/views/home/_blurb.html.haml new file mode 100644 index 000000000..f9428f4a6 --- /dev/null +++ b/app/views/home/_blurb.html.haml @@ -0,0 +1,7 @@ +%h1 + Growstuff + %small development site + +%p Growstuff is a community of food gardeners working together to build an open source platform to track, share, and discuss edible gardens and sustainable lifestyles. You can join us right now and be part of growing our website, from seed to harvest. We welcome you regardless of your experience, and invite you to be part of our development process. + +%p= link_to 'Learn more', 'http://wiki.growstuff.org/', :class => 'btn btn-primary btn-large' diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 18c40724c..3b51b2ebd 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -1,11 +1,9 @@ -.hero-unit - %h1 - Growstuff - %small development site +.visible-desktop.visible-tablet + .hero-unit + = render :partial => 'blurb' - %p Growstuff is a community of food gardeners working together to build an open source platform to track, share, and discuss edible gardens and sustainable lifestyles. You can join us right now and be part of growing our website, from seed to harvest. We welcome you regardless of your experience, and invite you to be part of our development process. - - %p= link_to 'Learn more', 'http://wiki.growstuff.org/', :class => 'btn btn-primary btn-large' +.visible-phone + = render :partial => 'blurb' .row .span3