mirror of https://github.com/codevalet/canary
Handle our URL root path when in production vs. local testing
This commit is contained in:
parent
c8a8d2c1b5
commit
d9d9a843ca
|
@ -1,3 +1,9 @@
|
|||
:ruby
|
||||
@url_root = '/'
|
||||
if ENV['RACK_ENV'] == 'production'
|
||||
@url_root = '/canary/'
|
||||
end
|
||||
|
||||
!!! XML
|
||||
!!!
|
||||
%html
|
||||
|
@ -21,8 +27,8 @@
|
|||
Code Valet - Canary
|
||||
%body
|
||||
%nav.navbar.navbar-inverse.bg-warning.navbar-toggleable
|
||||
%a.navbar-brand{:href => '/canary/'}
|
||||
%img{:src => 'images/songbird-128.png',
|
||||
%a.navbar-brand{:href => @url_root}
|
||||
%img{:src => "#{@url_root}images/songbird-128.png",
|
||||
:width => '50', :height => '50', :alt => 'Grace the Canary in the Code Mine'}/
|
||||
Canary
|
||||
.navbar-collapse
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
.col-md-12
|
||||
%h2
|
||||
Meet Canary
|
||||
%img{:src => 'images/songbird-128.png',
|
||||
%img{:src => "#{@url_root}images/songbird-128.png",
|
||||
:title => 'Grace the Canary in the Code Mine',
|
||||
:align => :right}
|
||||
%p
|
||||
|
|
Loading…
Reference in New Issue