Skip to content

Commit bcbe5d3

Browse files
authored
Merge pull request #58 from MITLibraries/gdt-124-platform-name-in-header
Allow for optional platform names in header
2 parents 93b931b + 54b822e commit bcbe5d3

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

app/views/layouts/_site_header.html.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
<span class="sr">MIT Libraries home</span>
88
<img src="https://cdn.libraries.mit.edu/files/branding/local/mitlib-wordmark.svg" height="35" alt="MIT Libraries logo">
99
</a>
10+
<% if ENV['PLATFORM_NAME'] %>
11+
<a href="/" class="platform-name"><%= ENV.fetch('PLATFORM_NAME') %></a>
12+
<% end %>
1013
</h1>
1114
</div>
1215
<div class="wrap-header-supp">

vendor/assets/stylesheets/elements/_header.scss

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,21 @@
4040
}
4141
}
4242

43+
.platform-name {
44+
color: #fff;
45+
font-size: 2.8rem;
46+
text-decoration: none;
47+
vertical-align: middle;
48+
border-left: 1px solid #fff;
49+
padding-left: 2rem;
50+
margin-left: 2rem;
51+
52+
&:hover,
53+
&:focus {
54+
text-decoration: underline;
55+
}
56+
}
57+
4358
.link-logo-mit {
4459
color: $white;
4560

@@ -53,6 +68,21 @@
5368
}
5469
}
5570

71+
@media (max-width: $bp-screen-md) {
72+
.wrap-header {
73+
.platform-name {
74+
border-left: none;
75+
padding: 0;
76+
margin: 2rem 0 0 0;
77+
display: block;
78+
}
79+
}
80+
81+
.wrap-header-supp {
82+
vertical-align: top;
83+
}
84+
}
85+
5686
// local header and nav
5787
.wrap-outer-header-local {
5888
border-bottom: 1px solid $gray-l2;

0 commit comments

Comments
 (0)