-
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.
This adds a responsive footer to the page that had the standard DCE version displayed at the bottom. This also changes the header to include an SVG logo, which is the first part of adding a logo, but it will need a PNG fallback. Connected to UCLALibrary/ursus#10 Connected to UCLALibrary/amalgamated-samvera#132
- Loading branch information
Showing
10 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,3 +1,7 @@ | ||
@import 'ursus/fonts'; | ||
@import 'ursus/colors'; | ||
@import 'ursus/buttons'; | ||
@import 'ursus/navbar'; | ||
@import 'ursus/facets'; | ||
@import 'ursus/footer'; | ||
@import 'ursus/body'; |
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,9 @@ | ||
body { | ||
display: flex; | ||
flex-direction: column; | ||
min-height: 100vh; | ||
} | ||
|
||
#main-container { | ||
flex: 1; | ||
} |
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,5 @@ | ||
@import 'colors'; | ||
|
||
.facet-values { | ||
display: inline-flex; | ||
} |
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,11 @@ | ||
.footer { | ||
background-color: $ucla-secondary-blue-dark; | ||
height: 100px; | ||
} | ||
|
||
.version { | ||
color: snow; | ||
float: right; | ||
margin: 1em; | ||
margin-top: 2em; | ||
} |
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,7 @@ | ||
@import 'colors'; | ||
|
||
.navbar-brand { | ||
margin-top: 1em; | ||
margin-left: 0 !important; | ||
background: transparent image_url('logo.svg') no-repeat top left !important; | ||
} |
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,8 @@ | ||
<footer class="footer" | ||
<div class="container"> | ||
|
||
<div class="text"> | ||
<span class="version">Version <span title="<%= GIT_SHA %>"><%= BRANCH %> updated <%= LAST_DEPLOYED %></span></span> | ||
</div> | ||
</div> | ||
</footer> |
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,26 @@ | ||
revisions_logfile = "/opt/#{ENV['PROJECT_NAME']}/revisions.log" | ||
GIT_SHA = | ||
if Rails.env.production? && File.exist?(revisions_logfile) | ||
`tail -1 #{revisions_logfile}`.chomp.split(" ")[3].gsub(/\)$/, '') | ||
elsif Rails.env.development? || Rails.env.test? | ||
`git rev-parse HEAD`.chomp | ||
else | ||
"Unknown SHA" | ||
end | ||
|
||
BRANCH = | ||
if Rails.env.production? && File.exist?(revisions_logfile) | ||
`tail -1 #{revisions_logfile}`.chomp.split(" ")[1] | ||
elsif Rails.env.development? || Rails.env.test? | ||
`git rev-parse --abbrev-ref HEAD`.chomp | ||
else | ||
"Unknown branch" | ||
end | ||
|
||
LAST_DEPLOYED = | ||
if Rails.env.production? && File.exist?(revisions_logfile) | ||
deployed = `tail -1 #{revisions_logfile}`.chomp.split(" ")[7] | ||
Date.parse(deployed).strftime("%d %B %Y") | ||
else | ||
"Not in deployed environment" | ||
end |