Skip to content

Commit

Permalink
feat: footer
Browse files Browse the repository at this point in the history
  • Loading branch information
joaodiaslobo committed Oct 17, 2024
1 parent 0b6b80b commit 30adc37
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/safira_web/components/layouts.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule SafiraWeb.Layouts do
use SafiraWeb, :html

import SafiraWeb.Components.Sidebar
import SafiraWeb.Landing.Components.Navbar
import SafiraWeb.Landing.Components.{Footer, Navbar}

embed_templates "layouts/*"
end
1 change: 1 addition & 0 deletions lib/safira_web/components/layouts/landing.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
<main>
<%= @inner_content %>
</main>
<.footer />
</body>
</html>
55 changes: 55 additions & 0 deletions lib/safira_web/live/landing/components/footer.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
defmodule SafiraWeb.Landing.Components.Footer do

Check warning on line 1 in lib/safira_web/live/landing/components/footer.ex

View workflow job for this annotation

GitHub Actions / Code Quality (27.x, 1.17.x)

Modules should have a @moduledoc tag.
use SafiraWeb, :component
import SafiraWeb.Landing.Components.Socials

def footer(assigns) do
~H"""
<footer>
<div class="flex flex-col justify-between gap-16 py-10 lg:flex-row">
<div class="flex select-none items-start justify-center lg:justify-start">
<img src="/images/sei-logo.svg" width={100} height={100} alt="SEI Logo" />
<p class="pl-6 text-white font-semibold lg:flex-1">
Semana da <br /> Engenharia <br /> Informática
</p>
</div>
<div class="flex-2">
<div class="grid select-none grid-rows-2 justify-items-center gap-8 whitespace-nowrap font-iregular text-sm text-white lg:grid-cols-2 lg:justify-items-start">
<%= for link <- footer_links() do %>
<.link href={link.url} class="hover:underline">
<%= link.title %>
</.link>
<% end %>
</div>
<div class="flex justify-center lg:justify-end">
<div class="pt-10 lg:pt-5 text-white lg:mt-0">
<.socials />
</div>
</div>
</div>
</div>
</footer>
"""
end

def footer_links do
[
%{
title: "Previous Edition",
url: "https://2024.seium.org/"
},
%{
title: "Report a Problem",
url: "https://cesium.link/f/safira-bugs"
},
%{
title: "Survival Guide",
url: "/docs/survival.pdf"
},
%{
title: "General Regulation",
url: "/docs/regulation.pdf"
}
]
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ defmodule SafiraWeb.Landing.HomeLive.Components.Sponsors do
src={Uploaders.Company.url({sponsor.logo, sponsor}, :original)}
/>
<% else %>
<p class="text-2xl">
<p class="text-2xl text-center p-2">
<%= sponsor.name %>
</p>
<% end %>
Expand Down

0 comments on commit 30adc37

Please sign in to comment.