-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding stand alone goal for hurricane sandy.
- Loading branch information
1 parent
5cf45a3
commit dd42350
Showing
6 changed files
with
100 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
@import "colors"; | ||
|
||
#mini-goal { | ||
width: 460px; | ||
height: 110px; | ||
|
||
.goal { | ||
|
||
margin: 10px 0; | ||
padding: 24px 0 18px 0; | ||
border-top: solid 1px $grey; | ||
border-bottom: solid 1px $grey; | ||
|
||
h1, h2 { | ||
color: $black; | ||
} | ||
|
||
.sold { | ||
float: left; | ||
width: 230px; | ||
} | ||
|
||
.reset { | ||
clear: both; | ||
} | ||
|
||
.em { | ||
font-size: 20px; | ||
} | ||
|
||
.shirts_sold { | ||
float: left; | ||
width: 230px; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<div class="goal"> | ||
<div class="sold"> | ||
<h1><%= @goal.shirts_sold %></h1> | ||
shirts sold | ||
</div> | ||
|
||
<div class="progress"> | ||
<h1>$<%= @goal.dollars_raised %></h1> | ||
dollars raised | ||
</div> | ||
<div class="reset"></div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
<div class="goal"> | ||
<div class="sold"> | ||
<h1><%= @goal.shirts_sold %></h1> | ||
<h1>93</h1> | ||
shirts sold | ||
</div> | ||
|
||
<div class="progress"> | ||
<h1>$<%= @goal.dollars_raised %></h1> | ||
<h1>$2325</h1> | ||
dollars raised | ||
</div> | ||
|
||
<div class="reset"></div> | ||
|
||
<div class="meter"> | ||
<div class="fill" style="width:<%=@goal.shirts_sold_as_percentage%>%"> </div> | ||
<div class="fill" style="width:124%"> </div> | ||
</div> | ||
|
||
<div class="shirts_sold"> | ||
<span class="em"><%= number_to_percentage(@goal.shirts_sold_as_percentage, :precision => 0)%></span> of <%= @goal.total_shirt_goal %> shirt goal | ||
<span class="em">124%</span> of 75 shirt goal | ||
</div> | ||
<div class="days_to_go"> | ||
<span class="em"><%= @goal.days_left_in_campaign%></span> days to go | ||
<span class="em">0</span> days to go | ||
</div> | ||
<div class="reset"></div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Goal</title> | ||
|
||
<script type="text/javascript"> | ||
(function() { | ||
var config = { | ||
kitId: 'sog7buz', | ||
scriptTimeout: 3000 | ||
}; | ||
var h=document.getElementsByTagName("html")[0];h.className+=" wf-loading";var t=setTimeout(function(){h.className=h.className.replace(/(\s|^)wf-loading(\s|$)/g," ");h.className+=" wf-inactive"},config.scriptTimeout);var tk=document.createElement("script"),d=false;tk.src='//use.typekit.net/'+config.kitId+'.js';tk.type="text/javascript";tk.async="true";tk.onload=tk.onreadystatechange=function(){var a=this.readyState;if(d||a&&a!="complete"&&a!="loaded")return;d=true;clearTimeout(t);try{Typekit.load(config)}catch(b){}};var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(tk,s) | ||
})(); | ||
</script> | ||
|
||
<%= stylesheet_link_tag "application", :media => "all" %> | ||
<%= csrf_meta_tags %> | ||
|
||
<!-- google analytics --> | ||
<script type="text/javascript"> | ||
var _gaq = _gaq || []; | ||
_gaq.push(['_setAccount', 'UA-35895415-1']); | ||
_gaq.push(['_trackPageview']); | ||
|
||
(function() { | ||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | ||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | ||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | ||
})(); | ||
</script> | ||
</head> | ||
<body> | ||
|
||
<div id="mini-goal" class="content"> | ||
<%= yield %> | ||
</div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
|
||
end | ||
|
||
match '/special/guct' => 'home#guct' | ||
match '/goal' => 'goals#show' | ||
|
||
root :to => 'home#index' | ||
end |