Skip to content

Commit

Permalink
Homepage url (#166)
Browse files Browse the repository at this point in the history
* fixes #160 - Link 'home' button to marketing site

* add -

* new logic to redirect to home based on the application
  • Loading branch information
dquach217 authored and sman591 committed Jun 18, 2019
1 parent 8057801 commit 07f5782
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/views/layouts/_header.html.haml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
- homepage_url = HackathonConfig['homepage_url'].presence || root_path
.header
.header__wrapper.account-nav__wrapper
- if HackathonConfig['logo_asset'].present?
.header-logo
= link_to root_path do
= link_to homepage_url do
= image_tag HackathonConfig['logo_asset'], id: 'logo', alt: "#{HackathonConfig['name']} logo", title: HackathonConfig['name'], class: 'header-logo__image'
- else
.header-nav
= btn_link_to "Home", root_path
= btn_link_to "Home", homepage_url
.header-nav
- if user_signed_in?
- if current_user.admin?
Expand Down
1 change: 1 addition & 0 deletions config/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ defaults: &defaults
agreement_pdf_asset: agreement.pdf
email_from: '"HackFoo" <hello@example.com>'
default_page_title: HackFoo - Jan 1-2, 2017
homepage_url: ""

disabled_fields: ""
disclaimer_message: ""
Expand Down

0 comments on commit 07f5782

Please sign in to comment.