Skip to content

Commit

Permalink
adds responsive footer component
Browse files Browse the repository at this point in the history
  • Loading branch information
sdellis committed Feb 24, 2025
1 parent b52dcff commit b33c7aa
Show file tree
Hide file tree
Showing 3 changed files with 137 additions and 1 deletion.
25 changes: 25 additions & 0 deletions lib/dpul_collections_web/components/footer_component.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# lib/my_app_web/components/header_component.ex
defmodule DpulCollectionsWeb.FooterComponent do
use DpulCollectionsWeb, :html
import DpulCollectionsWeb.Gettext

def footer(assigns) do
~H"""
<footer class="text-white flex flex-wrap sm:flex-row gap-10 items-center bg-gray-700 px-6 py-6 sm:py-10 sm:px-8 lg:px-10">
<div class="footer-links flex-none w-32 sm:w-60">
<ul class="text-xs">
<li class="py-1"><a href="https://library.princeton.edu/about/policies/copyright-and-permissions-policies">Copyright Policy</a></li>
<li class="py-1"><a href="https://www.princeton.edu/privacy-notice">Privacy Notice</a></li>
<li class="py-1"><a href="https://accessibility.princeton.edu/help">Accessibility Help</a></li>
</ul>
</div>
<div class="app_name sm:flex-1 flex-none text-center">
© 2025 The Trustees of Princeton University
</div>
<div class="university-logo flex-none w-24 sm:w-48">
<img src={~p"/images/university-logo.svg"} alt="Princeton University Logo" />
</div>
</footer>
"""
end
end
2 changes: 1 addition & 1 deletion lib/dpul_collections_web/components/layouts/root.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<div class="flex-1">
<%= @inner_content %>
</div>
<%= DpulCollectionsWeb.LuxComponents.footer(assigns) %>
<%= DpulCollectionsWeb.FooterComponent.footer(assigns) %>
</div>
</body>
</html>
Loading

0 comments on commit b33c7aa

Please sign in to comment.