homepage redesign

This commit is contained in:
Lee Lawlor
2014-05-08 20:01:41 -04:00
parent e5570ec3af
commit ac83280b68
57 changed files with 569 additions and 328 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

View File

@ -0,0 +1,25 @@
// when the dom is ready
$(document).ready(function() {
// if the cheerlights row exists
if ($('#cheerlights_row').length > 0) {
// get the initial update
cheerlightsUpdate();
// check for new updates
setInterval('cheerlightsUpdate()', 15000);
}
});
// cheerlights update
function cheerlightsUpdate() {
// get the data with a webservice call
$.getJSON('https://api.thingspeak.com/channels/1417/feed/last.json', function(data) {
// if the field1 has data update the page
if (data.field1) {
if (data.field1 == "warmwhite") {data.field1 = "oldlace"}
$("#cheerlights_row").css("background-color", data.field1);
}
});
}

View File

@ -20,5 +20,10 @@ $(document).ready(function() {
$('#talkback_command_add_form').removeClass('hide');
});
// toggle contact form
$('#contact_link').click(function() {
$('#contact_form').toggle();
});
});

View File

@ -1,6 +1,4 @@
/*
*= require ./bootstrap_custom.min.css
*= require ./bootstrap_overrides.css
*= require ./jquery-ui-1.8.24.custom.css
*= require ./custom.css
*= require ./status.css

View File

@ -1,14 +1,29 @@
/* bootstrap overrides */
code { word-wrap: break-word; white-space: normal; }
.navbar-collapse { max-height: 350px; }
.breadcrumb { margin-top: 10px; margin-bottom: 20px; } /* margins to make sure breadcrumb and h4.breadcrumb line up properly */
.table td { word-break: break-word; }
/* homepage */
#home-motto { font-size: 2em; padding-top: 100px; }
#home-motto h1 { font-size: 2em; color: #fff; }
#home-top { height: 500px; width: 100%; background: url('<%= asset_path("thingspeak_stars_bg.jpg") %>') no-repeat; background-size: 100% 500px; text-align: center; color: #fff; }
#home-top a { color: #fff; }
.panel-home { min-height: 180px; }
/* misc */
body { padding-top: 70px; }
#cheerlights_row { text-align: center; height: 180px; }
#cheerlights_row img { margin-top: 40px; }
.break-word { word-break: break-word; }
.col-pad { padding: 0 15px; }
.dismiss { float: right; cursor: pointer; position: relative; top: -12px; left: 7px; }
/* contact form */
#contact_form { display: none; }
#contact_link { cursor: pointer; }
#contact_link:hover { text-decoration: none; }
/* multiline forms */
.form-horizontal .multiline-label { margin-top: -10px; }
@ -305,11 +320,6 @@ input#upload_csv { padding-top:5px;margin:20px 0;}
/* form styling */
input.video_narrow {width:100px; }
/* home page */
#feature_signup {}
#feature_signup a {border-bottom: 3px solid #d62020; text-decoration: none; font-weight: bold;}
#feature_signup a:hover {text-decoration: none;}
/* jQuery Nav */
#nav { list-style: none; padding:0 10px 0 92px; margin: 0;}