-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #234 from challengepost/new_nav_2025
New nav, 2025
- Loading branch information
Showing
16 changed files
with
435 additions
and
140 deletions.
There are no files selected for viewing
14 changes: 8 additions & 6 deletions
14
app/assets/javascripts/reimagine2/accessible_global_nav.coffee
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,18 +1,20 @@ | ||
# Addresses the impossibility to reach the dropdown menus in | ||
# the global nav bar with the keyboard (using tab) | ||
@Reimagine2.accessibleGlobalNav = -> | ||
$dropDown = $('#global-nav-user-dropdown') | ||
$dropDown = $('nav.top-bar .has-dropdown') | ||
|
||
$dropDown.on 'focus', 'a', -> | ||
$dropDown.on 'focus', 'a', (e) -> | ||
$currentDropdown = $(e.currentTarget).closest('.has-dropdown') | ||
# Foundation4's top-bar styles support the class | ||
# hover to open the menu | ||
$dropDown.addClass('hover') | ||
$currentDropdown.addClass('hover') | ||
|
||
$dropDown.on 'blur', 'a', -> | ||
$dropDown.on 'blur', 'a', (e) -> | ||
$currentDropdown = $(e.currentTarget).closest('.has-dropdown') | ||
# need to delay this until after the new element has been focused | ||
setTimeout( -> | ||
# if the newly focused element is not inside the dropdown | ||
if $(':focus').closest('#global-nav-user-dropdown').length == 0 | ||
if $(':focus').parents().filter($currentDropdown).length == 0 | ||
# hide the menu | ||
$dropDown.removeClass('hover') | ||
$currentDropdown.removeClass('hover') | ||
, 15) |
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
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
23 changes: 23 additions & 0 deletions
23
app/views/reimagine2/devpost/global_nav/_host_a_hackathon_by_use_case_section.html.erb
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,23 @@ | ||
<% arrow_icon = '<i class="fa-arrow-right fas" aria-hidden="true" aria-label="Arrow icon"></i>'.html_safe %> | ||
|
||
<%= content_tag :div, class: ["panel-section", local_assigns[:panel_classes]] do %> | ||
<div class="panel-content"> | ||
<p class="title bold">By use case</p> | ||
|
||
<% | ||
entries = [ | ||
['AI hackathons', 'https://info.devpost.com/product/ai-hackathons'], | ||
['Customer hackathons', 'https://info.devpost.com/product/customer-hackathons'], | ||
['Employee hackathons', 'https://info.devpost.com/product/devpost-for-teams'], | ||
['Public hackathons', 'https://info.devpost.com/product/public-hackathons'], | ||
] | ||
%> | ||
|
||
<% entries.each do |entry| %> | ||
<% link_copy, link_url = entry %> | ||
<%= link_to link_url do %> | ||
<%= link_copy %> <%= arrow_icon %> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
<% end %> |
17 changes: 17 additions & 0 deletions
17
app/views/reimagine2/devpost/global_nav/_host_a_hackathon_devpost_section.html.erb
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,17 @@ | ||
<% arrow_icon = '<i class="fa-arrow-right fas" aria-hidden="true" aria-label="Arrow icon"></i>'.html_safe %> | ||
|
||
<div class="panel-section"> | ||
<a class="panel-product panel-product-content" href="https://info.devpost.com/product/public-hackathons"> | ||
<%= image_tag 'reimagine2/devpost-logo-mobile.svg', alt: 'Devpost' %> | ||
<div> | ||
<p class="title bold">Devpost</p> | ||
<p class="subtitle">Grow your developer ecosystem and promote your platform</p> | ||
</div> | ||
</a> | ||
|
||
<div class="panel-content with-icon-offset"> | ||
<%= link_to "https://info.devpost.com/product/public-hackathons" do %> | ||
Host a public hackathon <%= arrow_icon %> | ||
<% end %> | ||
</div> | ||
</div> |
17 changes: 17 additions & 0 deletions
17
app/views/reimagine2/devpost/global_nav/_host_a_hackathon_dft_section.html.erb
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,17 @@ | ||
<% arrow_icon = '<i class="fa-arrow-right fas" aria-hidden="true" aria-label="Arrow icon"></i>'.html_safe %> | ||
|
||
<div class="panel-section"> | ||
<a class="panel-product panel-product-content" href="https://info.devpost.com/product/devpost-for-teams"> | ||
<%= image_tag 'reimagine2/dft-logo-mobile.svg', alt: 'Devpost for Teams logo' %> | ||
<div> | ||
<p class="title bold">Devpost for Teams</p> | ||
<p class="subtitle">Drive innovation, collaboration, and retention within your organization</p> | ||
</div> | ||
</a> | ||
|
||
<div class="panel-content with-icon-offset"> | ||
<%= link_to "https://info.devpost.com/product/devpost-for-teams" do %> | ||
Host an internal hackathon <%= arrow_icon %> | ||
<% end %> | ||
</div> | ||
</div> |
Oops, something went wrong.