Permalink
Browse files

buttons to filter the Dancefloor to Open Source only and to Dancer 2 …

…only
  • Loading branch information...
1 parent 117c9a6 commit 9da4653af43fa0de384b5f96ec1ba800ca570f92 @szabgab szabgab committed Jan 23, 2015
Showing with 33 additions and 3 deletions.
  1. +11 −0 public/css/style.css
  2. +17 −2 public/javascripts/perlDancer.js
  3. +5 −1 views/dancefloor-display.tt
View
@@ -399,3 +399,14 @@ ul.spacy li {
.dancefloor-site IMG { margin: auto }
.dancefloor-site P>B { margin: auto }
+.dancefloor-button {
+ margin: 20px;
+ background-color: #DDDDDD;
+ padding: 10px;
+ -moz-border-radius: 15px;
+ -webkit-border-radius: 15px;
+ border-radius: 15px;
+}
+
+
+
@@ -4,8 +4,23 @@ $(function() {
setHeight('.col');
+ $('#show_open_source').click(function() {
+ $('.dancefloor-site').hide();
+ $('.opensource').show();
+ });
+
+ $('#show_all').click(function() {
+ $('.dancefloor-site').show();
+ });
+
+ $('#show_dancer2').click(function() {
+ $('.dancefloor-site').hide();
+ $('.dancer2').show();
+ });
+
});
-
+
+
var maxHeight = 0;
function setHeight(col) {
@@ -17,4 +32,4 @@ function setHeight(col) {
});
col.height(maxHeight);
};
-
+
@@ -5,7 +5,11 @@
written a website with Dancer and want it to be listed here, please
<a href="/about">contact us</a></em>
</p>
-
+<p>
+<button class="dancefloor-button" id="show_all">Show All</button>
+<button class="dancefloor-button" id="show_open_source">Open Source</button>
+<button class="dancefloor-button" id="show_dancer2">Dancer 2</button>
+</p>
<% FOREACH site = sites %>
<div class="dancefloor-site <% IF site.source %>opensource<% END %> <% IF site.dancer == 2 %>dancer2<% END %>">
<div align="center">

0 comments on commit 9da4653

Please sign in to comment.