diff --git a/lib/decentralised_book_index_web/components/layouts/app.html.heex b/lib/decentralised_book_index_web/components/layouts/app.html.heex index 53636d7..c68571d 100644 --- a/lib/decentralised_book_index_web/components/layouts/app.html.heex +++ b/lib/decentralised_book_index_web/components/layouts/app.html.heex @@ -8,3 +8,5 @@ {@inner_content} + +<.partial_footer /> \ No newline at end of file diff --git a/lib/decentralised_book_index_web/components/my_partials.ex b/lib/decentralised_book_index_web/components/my_partials.ex index bfc3dc6..930d6ed 100644 --- a/lib/decentralised_book_index_web/components/my_partials.ex +++ b/lib/decentralised_book_index_web/components/my_partials.ex @@ -4,6 +4,7 @@ defmodule DecentralisedBookIndexWeb.Components.MyPartials do defmacro __using__(_) do quote do import MyPartials.Navbar, only: [partial_navbar: 1] + import MyPartials.Footer, only: [partial_footer: 1] end end end diff --git a/lib/decentralised_book_index_web/components/my_partials/footer.ex b/lib/decentralised_book_index_web/components/my_partials/footer.ex new file mode 100644 index 0000000..5e4a250 --- /dev/null +++ b/lib/decentralised_book_index_web/components/my_partials/footer.ex @@ -0,0 +1,22 @@ +defmodule DecentralisedBookIndexWeb.Components.MyPartials.Footer do + use Phoenix.Component + + def partial_footer(assigns) do + ~H""" + + """ + end + + def selected_navbar_link_css(page_title, active_title) do + if active_title =~ page_title do + "block py-2 pr-4 pl-3 text-black dark:text-white rounded bg-primary-700 lg:bg-transparent lg:text-primary-700 lg:p-0 dark:text-white" + else + "block py-2 pr-4 pl-3 text-gray-700 border-b border-gray-100 hover:bg-gray-50 lg:hover:bg-transparent lg:border-0 lg:hover:text-primary-700 lg:p-0 dark:text-gray-400 lg:dark:hover:text-white dark:hover:bg-gray-700 dark:hover:text-white lg:dark:hover:bg-transparent dark:border-gray-700" + end + end +end