-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/issue 347 challenges side menu (#442)
* Adds side menu with mock data * Adds side menu styling * Updates side menu details, links and styling * Adds left arrow icon * Adds challenge region page side menu partial * Adds logic to display side menu challenge themes and eligible locations * Style GovHack challenge region page side menu * Removes theme filter from challenges side menu * Fixes Back to Challenges Catalogue link position * Makes challenges side menu region links functional * Replaces elligible location arrays with hashes * Fixed during sunday judging test * Updated test reference so tests can run on GitHub * Ran rubocop --------- Co-authored-by: Pamela Glickman <pamela@Pamelas-MacBook-Pro.local>
- Loading branch information
Showing
6 changed files
with
146 additions
and
70 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
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,29 +1,28 @@ | ||
/*========== Mobile First Method ==========*/ | ||
|
||
/* Custom, iPhone Retina */ | ||
@media only screen and (min-device-width: 320px) and (min-width : 320px) { | ||
@media only screen and (min-device-width: 320px) and (min-width: 320px) { | ||
.challenges_list > h2 { | ||
margin-top: 1.5em; | ||
margin-bottom: 0.5em; | ||
} | ||
} | ||
|
||
/* Extra Small Devices, Phones */ | ||
@media only screen and (min-device-width: 480px) and (min-width : 480px) { | ||
|
||
@media only screen and (min-device-width: 480px) and (min-width: 480px) { | ||
} | ||
|
||
/* Small Devices, Tablets */ | ||
@media only screen and (min-width : 768px) { | ||
|
||
@media only screen and (min-width: 768px) { | ||
} | ||
|
||
/* Medium Devices, Desktops */ | ||
@media only screen and (min-width : 992px) { | ||
|
||
@media only screen and (min-width: 992px) { | ||
.challenges_list_container { | ||
display: flex; | ||
} | ||
} | ||
|
||
/* Large Devices, Wide Screens */ | ||
@media only screen and (min-width : 1200px) { | ||
|
||
@media only screen and (min-width: 1200px) { | ||
} |
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,15 @@ | ||
<section class="side_menu"> | ||
<h1><%= yield :title %></h1> | ||
|
||
<p>Browse challenges to solve for GovHack</p> | ||
|
||
<hr/> | ||
|
||
<h3>Filter By State Elegibility</h3> | ||
|
||
<div class="tags"> | ||
<% @eligible_locations.map do |location| %> | ||
<%= link_to location[:label], region_path(location[:path]) %> | ||
<% end %> | ||
</div> | ||
</section> |
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,60 +1,62 @@ | ||
<% content_for :title,"#{@region.name} Challenges" %> | ||
<main class="challenge_index"> | ||
<h1> | ||
<%= yield :title %> | ||
</h1> | ||
<% @challenges.each do |challenge| %> | ||
<%= render 'challenges/challenge_panel', | ||
challenge: challenge, | ||
entry_count: challenge.published_entries.length | ||
%> | ||
<% end %> | ||
<% if @nation_wides.any? %> | ||
<h3>Nation Wide (<%= @national.name %>) Challenges</h3> | ||
<% @nation_wides.each do |challenge| %> | ||
<%= render 'challenges/challenge_panel', | ||
challenge: challenge, | ||
entry_count: challenge.published_entries.length | ||
%> | ||
<% end %> | ||
<% end %> | ||
<% if @national.present? %> | ||
<% unless @region.national? %> | ||
<h3><%= @national.name %> (National) Challenges</h3> | ||
<% @national_challenges.each do |challenge| %> | ||
<section class="challenges_list_container"> | ||
<%= render partial: 'side_menu' %> | ||
<div> | ||
<% @challenges.each do |challenge| %> | ||
<%= render 'challenges/challenge_panel', | ||
challenge: challenge, | ||
entry_count: challenge.published_entries.length | ||
%> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
<% unless @region.international? %> | ||
<h3>International Challenges</h3> | ||
<% @international_challenges.each do |challenge| %> | ||
<%= render 'challenges/challenge_panel', | ||
challenge: challenge, | ||
entry_count: challenge.published_entries.length | ||
%> | ||
<% end %> | ||
<% end %> | ||
<% if @national_regions.any? %> | ||
<h3>National Regions</h3> | ||
<section class="tiles"> | ||
<% @national_regions.each do |region| %> | ||
<% next unless @checker.show?(region) %> | ||
<%= link_to (render 'challenges/region_tile', region: region ), region_path(region) %> | ||
<% if @nation_wides.any? %> | ||
<h3>Nation Wide (<%= @national.name %>) Challenges</h3> | ||
<% @nation_wides.each do |challenge| %> | ||
<%= render 'challenges/challenge_panel', | ||
challenge: challenge, | ||
entry_count: challenge.published_entries.length | ||
%> | ||
<% end %> | ||
<% end %> | ||
</section> | ||
<% end %> | ||
<% if @regions.any? %> | ||
<h3>Regions</h3> | ||
<section class="tiles"> | ||
<% @regions.each do |region| %> | ||
<% next unless @checker.show?(region) %> | ||
<%= link_to (render 'challenges/region_tile', region: region ), region_path(region) %> | ||
<% if @national.present? %> | ||
<% unless @region.national? %> | ||
<h3><%= @national.name %> (National) Challenges</h3> | ||
<% @national_challenges.each do |challenge| %> | ||
<%= render 'challenges/challenge_panel', | ||
challenge: challenge, | ||
entry_count: challenge.published_entries.length | ||
%> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
</section> | ||
<% end %> | ||
<% unless @region.international? %> | ||
<h3>International Challenges</h3> | ||
<% @international_challenges.each do |challenge| %> | ||
<%= render 'challenges/challenge_panel', | ||
challenge: challenge, | ||
entry_count: challenge.published_entries.length | ||
%> | ||
<% end %> | ||
<% end %> | ||
<% if @national_regions.any? %> | ||
<h3>National Regions</h3> | ||
<section class="tiles"> | ||
<% @national_regions.each do |region| %> | ||
<% next unless @checker.show?(region) %> | ||
<%= link_to (render 'challenges/region_tile', region: region ), region_path(region) %> | ||
<% end %> | ||
</section> | ||
<% end %> | ||
<% if @regions.any? %> | ||
<h3>Regions</h3> | ||
<section class="tiles"> | ||
<% @regions.each do |region| %> | ||
<% next unless @checker.show?(region) %> | ||
<%= link_to (render 'challenges/region_tile', region: region ), region_path(region) %> | ||
<% end %> | ||
</section> | ||
<% end %> | ||
<%= link_to 'Back to Challenges Catalogue', challenges_path %> | ||
</div> | ||
</section> | ||
</main> | ||
<%= link_to 'Back to Challenges Catalogue', challenges_path %> |
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