Skip to content

Commit eecbad2

Browse files
committed
Adds a site footer template necessary for bento 🙈
We already had a `site_footer` but it was really a `libraries_footer` so it was renamed. `site_footer` now appears at the bottom of the main content but before the actual `<footer>` tags. This is what bento used to call `about_bento`.
1 parent a60101f commit eecbad2

4 files changed

Lines changed: 34 additions & 27 deletions

File tree

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ If you have local overrides for styles, import them _after_ the shared styles.
3434

3535
You'll want to set `<%= content_for(:title, "SOMETHING") %>` on your views.
3636

37-
You'll want to copy `app/views/layouts/_site_nav.html.erb` into your local repo and make appropriate changes.
37+
You'll want to copy `app/views/layouts/_site_nav.html.erb` into your local
38+
repo and make appropriate changes.
39+
40+
`app/views/layouts/_site_footer.html.erb` is also available if you really need
41+
a third footer above the other two (I'm looking at you bento!).
3842

3943
If you need to make changes to other templates, you can also copy those to your local repo but you should check with others as the main header / footer / etc are probably best left as they are in this gem.
4044

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<div class="wrap-outer-footer layout-band">
2+
<div class="wrap-footer footer-slim">
3+
<div class="footer-main" aria-label="MIT Libraries footer">
4+
<div class="identity">
5+
<div class="wrap-logo-lib">
6+
<a href="https://libraries.mit.edu" class="logo-mit-lib" alt="MIT Libraries Logo">
7+
<span class="sr">MIT Libraries home</span>
8+
<%= image_tag("mitlib-wordmark.svg", :alt => "MIT Libraries logo") %>
9+
</a>
10+
</div>
11+
</div><!-- end .identity -->
12+
<div class="wrap-sitemap">
13+
<nav class="sitemap-libraries-abbrev" aria-label="MIT Libraries site menu">
14+
<h2 class="sr">MIT Libraries navigation</h2>
15+
<a class="item" href="https://libraries.mit.edu/">Home</a>
16+
<a class="item" href="https://libraries.mit.edu/search">Search</a>
17+
<a class="item" href="https://libraries.mit.edu/hours">Hours &amp; locations</a>
18+
<a class="item" href="https://libraries.mit.edu/borrow">Borrow &amp; request</a>
19+
<a class="item" href="https://libraries.mit.edu/research-support">Research support</a>
20+
<a class="item" href="https://libraries.mit.edu/about">About the Libraries</a>
21+
</nav>
22+
</div><!-- end .links-all -->
23+
</div>
24+
</div>
25+
</div>
Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1 @@
1-
<div class="wrap-outer-footer layout-band">
2-
<div class="wrap-footer footer-slim">
3-
<div class="footer-main" aria-label="MIT Libraries footer">
4-
<div class="identity">
5-
<div class="wrap-logo-lib">
6-
<a href="https://libraries.mit.edu" class="logo-mit-lib" alt="MIT Libraries Logo">
7-
<span class="sr">MIT Libraries home</span>
8-
<%= image_tag("mitlib-wordmark.svg", :alt => "MIT Libraries logo") %>
9-
</a>
10-
</div>
11-
</div><!-- end .identity -->
12-
<div class="wrap-sitemap">
13-
<nav class="sitemap-libraries-abbrev" aria-label="MIT Libraries site menu">
14-
<h2 class="sr">MIT Libraries navigation</h2>
15-
<a class="item" href="https://libraries.mit.edu/">Home</a>
16-
<a class="item" href="https://libraries.mit.edu/search">Search</a>
17-
<a class="item" href="https://libraries.mit.edu/hours">Hours &amp; locations</a>
18-
<a class="item" href="https://libraries.mit.edu/borrow">Borrow &amp; request</a>
19-
<a class="item" href="https://libraries.mit.edu/research-support">Research support</a>
20-
<a class="item" href="https://libraries.mit.edu/about">About the Libraries</a>
21-
</nav>
22-
</div><!-- end .links-all -->
23-
</div>
24-
</div>
25-
</div>
1+
<%# This template can be used to place content at the bottom of each page above the libraries and institute footers %>

app/views/layouts/application.html.erb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<%= render partial: "layouts/global_alert" %>
1212

1313
<%= render partial: "layouts/site_header" %>
14+
1415
<%= render partial: "layouts/site_nav" %>
1516

1617
<div class="wrap-outer-content layout-band">
@@ -20,6 +21,7 @@
2021

2122
<%= yield %>
2223

24+
<%= render partial: "layouts/site_footer" %>
2325
</main>
2426
<!-- close content-main -->
2527
</div>
@@ -28,7 +30,7 @@
2830
<script src="https://use.fontawesome.com/38304317ff.js"></script>
2931

3032
<footer>
31-
<%= render partial: "layouts/site_footer" %>
33+
<%= render partial: "layouts/libraries_footer" %>
3234
<%= render partial: "layouts/institute_footer" %>
3335
</footer>
3436
</div>

0 commit comments

Comments
 (0)