Skip to content

Commit fb8b70c

Browse files
committed
Update theme gem and document PLATFORM_NAME variable
Why these changes are being introduced: The GDT project added a feature to the theme gem to conditionally include the platform name in the header if the `PLATFORM_NAME` environment variable is supplied. Relevant ticket(s): https://mitlibraries.atlassian.net/browse/GDT-124 How this addresses that need: This updates the theme gem to the v1.2 tag, which includes the new feature, and documents the PLATFORM_NAME variable. It also hides the title in the navbar if PLATFORM_NAME is present. Side effects of this change: None. The app will continue to use the standard header if PLATFORM_NAME is not supplied.
1 parent d267e10 commit fb8b70c

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ gem 'flipflop'
1010
gem 'graphql'
1111
gem 'jwt'
1212
gem 'lograge'
13-
gem 'mitlibraries-theme', git: 'https://github.com/mitlibraries/mitlibraries-theme', tag: 'v1.1'
13+
gem 'mitlibraries-theme', git: 'https://github.com/mitlibraries/mitlibraries-theme', tag: 'v1.2'
1414
gem 'opensearch-ruby'
1515
gem 'puma'
1616
gem 'rack-attack'

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GIT
22
remote: https://github.com/mitlibraries/mitlibraries-theme
3-
revision: 93b931b802485f9e35a6878f957b3fd88ae3b294
4-
tag: v1.1
3+
revision: bcbe5d3de36a92d275085a045c5c4d8f30f33e62
4+
tag: v1.2
55
specs:
66
mitlibraries-theme (1.0.2)
77
rails (>= 6, < 8)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ locally.
130130
confused.
131131
```
132132

133+
- `PLATFORM_NAME`: The value set is added to the header after the MIT Libraries logo. The logic and CSS for this comes from our theme gem.
133134
- `PREFERRED_DOMAIN` - set this to the domain you would like to to use. Any
134135
other requests that come to the app will redirect to the root of this domain.
135136
This is useful to prevent access to herokuapp.com domains.

app/views/layouts/_site_nav.html.erb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<div class="wrap-outer-header-local layout-band">
22
<div class="wrap-header-local">
3-
<div class="local-identity">
4-
<h2 class="title title-site"><a href="/">TIMDEX</a></h2>
5-
</div>
3+
<% unless ENV['PLATFORM_NAME'] %>
4+
<div class="local-identity">
5+
<h2 class="title title-site"><a href="/">TIMDEX</a></h2>
6+
</div>
7+
<% end %>
68
<div class="wrap-local-nav">
79
<div class="wrap-bar">
810
<nav class="local-nav" aria-label="Main menu">

0 commit comments

Comments
 (0)