added copyright footer

This commit is contained in:
Adam Piontek 2021-04-06 19:17:24 -04:00
parent c7ef111ebe
commit 2ea85a86a9
4 changed files with 23 additions and 2 deletions

View file

@ -99,6 +99,13 @@ a {
.fs-smaller { .fs-smaller {
font-size: smaller; font-size: smaller;
} }
.footer73k {
position: fixed !important;
font-size: 10px !important;
border-top-left-radius: 0.3rem !important;
padding-top: 2px;
padding-bottom: 2px;
}
/* social icons */ /* social icons */
#social-icons .link-light { #social-icons .link-light {

View file

@ -1,6 +1,6 @@
<main class="container-fluid d-flex justify-content-center align-items-center"> <main class="container-fluid d-flex justify-content-center align-items-center">
<div class="d-flex flex-column mt-5"> <div class="d-flex flex-column mt-5 pb-3 mb-5">
<div class="col-auto justify-content-start"> <div class="col-auto justify-content-start">

View file

@ -29,5 +29,12 @@
<%= @inner_content %> <%= @inner_content %>
<%#= if footer_absolute?(@conn) do %>
<footer class="footer73k footer bottom-0 end-0 bg-dark">
<div class="px-2 px-sm-3">
<span class="text-gray-400">&copy; Copyright <%= Date.utc_today |> Map.get(:year) %> Adam Piontek</span>
</div>
</footer>
</body> </body>
</html> </html>

View file

@ -2,7 +2,14 @@ defmodule Home73kWeb.LayoutView do
use Home73kWeb, :view use Home73kWeb, :view
def navbar_fixed?(conn) do def navbar_fixed?(conn) do
[Routes.home_path(conn, :index), Routes.home_path(conn, :folio)] [:index, :folio]
|> Enum.map(&Routes.home_path(conn, &1))
|> Enum.member?(Phoenix.Controller.current_path(conn))
end
def footer_absolute?(conn) do
[:index, :folio, :resume]
|> Enum.map(&Routes.home_path(conn, &1))
|> Enum.member?(Phoenix.Controller.current_path(conn)) |> Enum.member?(Phoenix.Controller.current_path(conn))
end end