diff --git a/lib/atomic/feed.ex b/lib/atomic/feed.ex index c2693d621..3ba69ceea 100644 --- a/lib/atomic/feed.ex +++ b/lib/atomic/feed.ex @@ -27,6 +27,20 @@ defmodule Atomic.Feed do |> Repo.paginate(cursor_fields: [:inserted_at, :id], limit: @posts_limit) end + def list_organization_posts_paginated(organization_id, opts \\ []) do + Post + |> join(:left, [p], a in assoc(p, :activity)) + |> join(:left, [p, a], an in assoc(p, :announcement)) + |> where( + [p, a, an], + (not is_nil(a.id) and a.organization_id == ^organization_id) or + (not is_nil(an.id) and an.organization_id == ^organization_id) + ) + |> apply_filters(opts) + |> preload(activity: :organization, announcement: :organization) + |> Repo.paginate(cursor_fields: [:inserted_at, :id], limit: @posts_limit) + end + def list_next_posts_paginated(cursor_after, opts \\ []) do Post |> apply_filters(opts) diff --git a/lib/atomic_web/components/page.ex b/lib/atomic_web/components/page.ex index 78b0bb309..439b4ad1e 100644 --- a/lib/atomic_web/components/page.ex +++ b/lib/atomic_web/components/page.ex @@ -18,7 +18,7 @@ defmodule AtomicWeb.Components.Page do def page(assigns) do ~H""" - <%= render_slot(@header) %> + {render_slot(@header)}
@@ -27,14 +27,14 @@ defmodule AtomicWeb.Components.Page do

- <%= @title %> + {@title}

- <%= @description %> + {@description}

- <%= render_slot(@actions) %> + {render_slot(@actions)}
diff --git a/lib/atomic_web/components/tabs.ex b/lib/atomic_web/components/tabs.ex index 12c733b29..3f6b4912d 100644 --- a/lib/atomic_web/components/tabs.ex +++ b/lib/atomic_web/components/tabs.ex @@ -19,7 +19,7 @@ defmodule AtomicWeb.Components.Tabs do ]} aria-label="Tabs" > - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)} """ end diff --git a/lib/atomic_web/live/department_live/show.html.heex b/lib/atomic_web/live/department_live/show.html.heex index c0b799d7d..5cea38939 100644 --- a/lib/atomic_web/live/department_live/show.html.heex +++ b/lib/atomic_web/live/department_live/show.html.heex @@ -75,13 +75,13 @@ color={:white} icon="hero-user-plus-solid" > - <%= gettext("Collaborate") %> + {gettext("Collaborate")} <% end %> <% else %> <%= if ! @current_collaborator.accepted do %> <.button color={:white} icon="hero-user-plus-solid" aria-label={gettext("You have requested to collaborate with this department. Please wait for the department owner to accept your request.")} disabled> - <%= gettext("Collaborate") %> + {gettext("Collaborate")} <% end %> <% end %> @@ -103,17 +103,17 @@ <%= if @current_view == "show" do %>
-

<%= gettext("Recent Activity") %>

+

{gettext("Recent Activity")}

<.link class="mt-4 flex flex-col items-center justify-center" navigate={~p"/organizations/#{@organization.id}"}> <.avatar class="mb-4 p-1" type={:organization} color={:white} size={:lg} name={@organization.name} src={Uploaders.Logo.url({@organization.logo, @organization}, :original)} /> -

<%= gettext("This department doesn't have any recent activity.") %>

-

<%= gettext("In the meantime, check out %{organization_name}.", organization_name: @organization.name) %>

+

{gettext("This department doesn't have any recent activity.")}

+

{gettext("In the meantime, check out %{organization_name}.", organization_name: @organization.name)}

@@ -141,9 +141,9 @@

Collaborators

<.table items={@collaborators} meta={@meta} filter={[]}> - <:col :let={collaborator} label="Name" field={:string}><%= collaborator.user.name %> - <:col :let={collaborator} label="Email" field={:string}><%= collaborator.user.email %> - <:col :let={collaborator} label="Phone number" field={:string}><%= collaborator.user.phone_number %> + <:col :let={collaborator} label="Name" field={:string}>{collaborator.user.name} + <:col :let={collaborator} label="Email" field={:string}>{collaborator.user.email} + <:col :let={collaborator} label="Phone number" field={:string}>{collaborator.user.phone_number} <:col :let={collaborator} label="Accepted" field={:string}> @@ -167,8 +167,8 @@
<.avatar name={collaborator.user.name} />
-

<%= collaborator.user.name %>

-

@<%= collaborator.user.slug %>

+

{collaborator.user.name}

+

@{collaborator.user.slug}

diff --git a/lib/atomic_web/live/organization_live/components/about.ex b/lib/atomic_web/live/organization_live/components/about.ex index 5f036de7d..20c68b758 100644 --- a/lib/atomic_web/live/organization_live/components/about.ex +++ b/lib/atomic_web/live/organization_live/components/about.ex @@ -10,50 +10,50 @@ defmodule AtomicWeb.OrganizationLive.Components.About do def about(assigns) do ~H"""
-

<%= gettext("Description") %>

-

<%= @organization.description %>

+

{gettext("Description")}

+

{@organization.description}

-

<%= gettext("Location") %>

-

<%= @organization.location %>

+

{gettext("Location")}

+

{@organization.location}

-

<%= gettext("Socials") %>

+

{gettext("Socials")}

  • <.link href={@organization.socials.website} target="_blank" class="group flex items-center space-x-1"> - <.icon name="hero-link" class="size-4" /> -

    <%= @organization.socials.website %>

    + <.icon name="hero-link" class="size-4" /> +

    {@organization.socials.website}

  • <.link href={Socials.link(:facebook, @organization.socials.facebook)} target="_blank" class="group flex items-center space-x-1"> - <%= Socials.icon(:facebook) |> raw() %> -

    <%= @organization.socials.facebook %>

    + {Socials.icon(:facebook) |> raw()} +

    {@organization.socials.facebook}

  • <.link href={Socials.link(:instagram, @organization.socials.instagram)} target="_blank" class="group flex items-center space-x-1"> - <%= Socials.icon(:instagram) |> raw() %> -

    <%= @organization.socials.instagram %>

    + {Socials.icon(:instagram) |> raw()} +

    {@organization.socials.instagram}

  • <.link href={Socials.link(:x, @organization.socials.x)} target="_blank" class="group flex items-center space-x-1"> - <%= Socials.icon(:x) |> raw() %> -

    <%= @organization.socials.x %>

    + {Socials.icon(:x) |> raw()} +

    {@organization.socials.x}

  • <.link href={Socials.link(:linkedin, @organization.socials.linkedin)} target="_blank" class="group flex items-center space-x-1"> - <%= Socials.icon(:linkedin) |> raw() %> -

    <%= @organization.socials.linkedin %>

    + {Socials.icon(:linkedin) |> raw()} +

    {@organization.socials.linkedin}

diff --git a/lib/atomic_web/live/organization_live/components/membership_banner.ex b/lib/atomic_web/live/organization_live/components/membership_banner.ex index d789add3b..52674c2de 100644 --- a/lib/atomic_web/live/organization_live/components/membership_banner.ex +++ b/lib/atomic_web/live/organization_live/components/membership_banner.ex @@ -14,9 +14,9 @@ defmodule AtomicWeb.OrganizationLive.Components.MembershipBanner do ~H"""
-

<%= gettext("Lifetime membership") %>

+

{gettext("Lifetime membership")}

-

<%= gettext("What’s included") %>

+

{gettext("What’s included")}

@@ -39,13 +39,13 @@ defmodule AtomicWeb.OrganizationLive.Components.MembershipBanner do
-

<%= gettext("Pay once, be a member forever") %>

+

{gettext("Pay once, be a member forever")}

10€ EUR

- <.button icon="hero-banknotes" class="mt-10 text-sm"><%= gettext("Request your membership") %> -

<%= gettext("Payments should be made within our location.") %> <%= @organization.location %>

+ <.button icon="hero-banknotes" class="mt-10 text-sm">{gettext("Request your membership")} +

{gettext("Payments should be made within our location.")} {@organization.location}

diff --git a/lib/atomic_web/live/organization_live/components/memberships_table.ex b/lib/atomic_web/live/organization_live/components/memberships_table.ex index ee794170f..c15793f15 100644 --- a/lib/atomic_web/live/organization_live/components/memberships_table.ex +++ b/lib/atomic_web/live/organization_live/components/memberships_table.ex @@ -17,9 +17,9 @@ defmodule AtomicWeb.OrganizationLive.Components.MembershipsTable do - - - + + + @@ -29,13 +29,13 @@ defmodule AtomicWeb.OrganizationLive.Components.MembershipsTable do
<.avatar name={member.user.name} size={:sm} color={:light_zinc} class="ring-1 ring-white" />
-
<%= member.user.name %>
-
<%= member.user.email %>
+
{member.user.name}
+
{member.user.email}
- - + +
<%= gettext("Name") %><%= gettext("Role") %><%= gettext("Joined At") %>{gettext("Name")}{gettext("Role")}{gettext("Joined At")}
<%= capitalize_first_letter(member.role) %><%= relative_datetime(member.inserted_at) %>{capitalize_first_letter(member.role)}{relative_datetime(member.inserted_at)}
diff --git a/lib/atomic_web/live/organization_live/components/organization_card.ex b/lib/atomic_web/live/organization_live/components/organization_card.ex index 7799a6a24..ae642acfa 100644 --- a/lib/atomic_web/live/organization_live/components/organization_card.ex +++ b/lib/atomic_web/live/organization_live/components/organization_card.ex @@ -36,22 +36,22 @@ defmodule AtomicWeb.OrganizationLive.Components.OrganizationCard do

- <%= @organization.name %> + {@organization.name}

<%!-- TODO: Maybe show button when there's no current user, but with a must login warning? --%> <%= if @current_user do %> <%= if Organizations.user_following?(@current_user.id, @organization.id) do %> - <.button icon="hero-star-solid"><%= gettext("Following") %> + <.button icon="hero-star-solid">{gettext("Following")} <% else %> - <.button icon="hero-star"><%= gettext("Follow") %> + <.button icon="hero-star">{gettext("Follow")} <% end %> <% end %>

- <%= @organization.long_name %> + {@organization.long_name}

@@ -60,7 +60,7 @@ defmodule AtomicWeb.OrganizationLive.Components.OrganizationCard do <.icon name="hero-users" class="size-4" /> <%= if @organization.follower_count != 1 do %>

- <%= @organization.follower_count %> followers + {@organization.follower_count} followers

<% else %>

@@ -71,14 +71,14 @@ defmodule AtomicWeb.OrganizationLive.Components.OrganizationCard do

  • <.icon name="hero-map-pin" class="size-4" /> -

    <%= @organization.location %>

    +

    {@organization.location}

  • <.link href={@organization.socials.website} target="_blank" class="flex items-center space-x-1"> <.icon name="hero-link" class="size-4" /> -

    <%= @organization.socials.website %>

    +

    {@organization.socials.website}

    diff --git a/lib/atomic_web/live/organization_live/components/partners_grid.ex b/lib/atomic_web/live/organization_live/components/partners_grid.ex new file mode 100644 index 000000000..61729e136 --- /dev/null +++ b/lib/atomic_web/live/organization_live/components/partners_grid.ex @@ -0,0 +1,51 @@ +defmodule AtomicWeb.OrganizationLive.Components.PartnersGrid do + @moduledoc """ + Internal organization-related component for displaying its partners. + """ + use AtomicWeb, :component + + alias Atomic.Organizations.{Organization, Partner} + alias Atomic.Repo + import AtomicWeb.Components.Avatar + import Ecto.Query + + attr :organization, Organization, + required: true, + doc: "The organization whose partners to display" + + def partners_grid(assigns) do + ~H""" +
    + <%= for partner <- list_partners(@organization) do %> + <.link navigate={~p"/organizations/#{@organization.id}/partners/#{partner.id}"}> + <.partner_card partner={partner} /> + + <% end %> +
    + """ + end + + defp list_partners(%Organization{id: organization_id}) do + from(p in Partner, + where: p.organization_id == ^organization_id and not p.archived + ) + |> Repo.all() + end + + defp partner_card(assigns) do + ~H""" +
    +
    +
    + <.avatar color={:light_zinc} name={@partner.name} src={Uploaders.PartnerImage.url({@partner.image, @partner}, :original)} type={:company} size={:sm} /> +
    +
    +

    {@partner.name}

    +

    <.icon name="hero-map-pin" class="size-5 mb-1 text-zinc-400" /> {@partner.location.name}

    +
    +
    +

    {@partner.description}

    +
    + """ + end +end diff --git a/lib/atomic_web/live/organization_live/index.html.heex b/lib/atomic_web/live/organization_live/index.html.heex index 3556b59b0..703891e5a 100644 --- a/lib/atomic_web/live/organization_live/index.html.heex +++ b/lib/atomic_web/live/organization_live/index.html.heex @@ -2,7 +2,7 @@ <:actions> <%= if not @empty? and @has_permissions? do %> <.button navigate={~p"/organizations/new"} icon="hero-plus"> - <%= gettext("New") %> + {gettext("New")} <% end %> @@ -15,9 +15,9 @@ ]} > <:wrapper> - diff --git a/lib/atomic_web/live/organization_live/show.ex b/lib/atomic_web/live/organization_live/show.ex index 1a46d5404..ee043571b 100644 --- a/lib/atomic_web/live/organization_live/show.ex +++ b/lib/atomic_web/live/organization_live/show.ex @@ -1,39 +1,55 @@ defmodule AtomicWeb.OrganizationLive.Show do use AtomicWeb, :live_view - alias Atomic.{Accounts, Organizations, Departments, Activities} + alias Atomic.{Accounts, Organizations, Departments, Activities, Partners} + alias Atomic.Uploaders.Logo + alias Atomic.Feed + import AtomicWeb.LiveHelpers + import String + import AtomicWeb.PartnerLive.Index - import AtomicWeb.Components.{Gradient, Tabs} + import AtomicWeb.Components.{Avatar, Activity, Announcement, Empty, Gradient, Pagination, Tabs} import AtomicWeb.OrganizationLive.Components.{ About, DepartmentsGrid, + PartnersGrid, MembershipsTable, MembershipBanner } @impl true - def mount(_params, _session, socket) do - {:ok, socket} + def mount(%{"id" => organization_id} = _params, _session, socket) do + %{entries: entries, metadata: metadata} = + Feed.list_organization_posts_paginated(organization_id, + order_by: [desc: :inserted_at, desc: :id] + ) + + {:ok, + socket + |> stream(:posts, entries) + |> assign(:metadata, metadata)} end @impl true def handle_params(%{"id" => organization_id} = params, _, socket) do organization = Organizations.get_organization!(organization_id) - members = maybe_list_members(organization.id, params["tab"]) + tab = current_tab(socket, params) + members = maybe_list_members(organization.id, tab) member_count = Organizations.count_memberships(organization.id) + partners = list_all_partners(organization_id, params) {:noreply, socket |> assign(:page_title, organization.name) - |> assign(:current_page, :organization) - |> assign(:current_tab, current_tab(socket, params)) + |> assign(:current_page, :organizations) + |> assign(:current_tab, tab) |> assign(:organization, organization) |> assign(:members, members) |> assign(:member_count, member_count) |> assign(:people, Organizations.list_organizations_members(organization)) + |> assign(:partners, partners) |> assign(:current_page, :organizations) - |> assign(:organization, organization) |> assign(:departments, Departments.list_departments_by_organization_id(organization_id)) |> assign(list_activities(organization_id)) |> assign(:followers_count, Organizations.count_followers(organization_id)) @@ -104,7 +120,8 @@ defmodule AtomicWeb.OrganizationLive.Show do end defp maybe_put_following(socket, organization) do - Organizations.member_of?(socket.assigns.current_user, organization) + socket.assigns.current_user && + Organizations.member_of?(socket.assigns.current_user, organization) end defp maybe_list_members(organization_id, "members"), diff --git a/lib/atomic_web/live/organization_live/show.html.heex b/lib/atomic_web/live/organization_live/show.html.heex index 1cd0c6929..ce5d46040 100644 --- a/lib/atomic_web/live/organization_live/show.html.heex +++ b/lib/atomic_web/live/organization_live/show.html.heex @@ -1,90 +1,191 @@ -<.page title={@page_title} description="@cesium"> +<.page title={} description={}> <:header> -
    - <%!-- FIXME: Add banner support --%> - <%!-- <%= if @organization.banner do %> + <%!-- + <%= if @organization.banner do %> - <% else %> --%> - <.gradient seed={@organization.id} class="object-cover" /> - <%!-- <% end %> --%> -
    + <% else %> + --%> + <.gradient seed={@organization.id} class="max-h-36 w-full select-none rounded-b-lg object-cover" /> + <%!-- <% end %> --%> - <:actions> - <%= if @has_permissions? do %> -

    <%= gettext("Edit") %>

    - <.button icon="hero-pencil-solid" color={:white} /> - <% end %> +
    +
    + <.avatar name={@organization.name} type={:organization} src={Logo.url({@organization.logo, @organization}, :original)} size={:xl} color={:light_zinc} /> +
    +

    {@organization.name}

    + + @{String.downcase(@organization.name)} +
    + {@followers_count} + {gettext("Followers")} +
    +
    +
    -

    <%= gettext("Contact") %>

    - <.link href={"mailto:#{@organization.email}"} target="_blank"> - <.button icon="hero-envelope-solid" color={:white} /> - +
    + <%= if @has_permissions? do %> + <.link patch={~p"/organizations/#{@organization}/edit"}> + <.button icon="hero-pencil-solid" color={:white}> + {gettext("Edit")} + + + <%= link to: "#", phx_click: "delete", phx_value_id: @organization.id, data: [confirm: "Are you sure?"] do %> + <.button icon="hero-trash-solid" color={:white}> + {gettext("Delete")} + + <% end %> + <% end %> - <%= if @current_user && Organizations.user_following?(@current_user.id, @organization.id) do %> - <%!-- TODO: Dropdown with unfollow option --%> - <.button icon="hero-star-solid" color={:white}><%= gettext("Following") %> - <% else %> - <%!-- TODO: Follow functionality --%> - <.button phx-click={(!@current_user && "must-login") || "follow"} icon="hero-star"><%= gettext("Follow") %> - <% end %> - + <.link href={"mailto:#{@organization.email}"} target="_blank"> + <.button icon="hero-envelope-solid" color={:white}> + {gettext("Contact")} + + + + <%= if @current_user && @following? do %> + <.button icon="hero-star-solid" class="h-min" color={:white}> + {gettext("Following")} + + <% else %> + <.button phx-click={(!@current_user && "must-login") || "follow"} icon="hero-star" class="h-min"> + {gettext("Follow")} + + <% end %> +
    +
    <.tabs class="scrollbar-hide flex overflow-scroll px-4 sm:px-6 lg:px-8"> <.link patch="?tab=about" replace={false}> <.tab id="about-tab" active={@current_tab == "about"}> <.icon name="hero-information-circle" class="size-5 mr-2" /> - <%= gettext("About") %> + {gettext("About")} - <.link patch="?tab=posts" replace={false}> + <.link navigate="?tab=posts" replace={true}> <.tab id="posts-tab" active={@current_tab == "posts"}> <.icon name="hero-newspaper" class="size-5 mr-2" /> - <%= gettext("Posts") %> + {gettext("Posts")} <.link patch="?tab=departments" replace={false}> - <.tab id="department-tab" active={@current_tab == "departments"}> + <.tab id="departments-tab" active={@current_tab == "departments"}> <.icon name="hero-cube" class="size-5 mr-2" /> - <%= gettext("Departments") %> + {gettext("Departments")} <.link patch="?tab=partners" replace={false}> <.tab id="partners-tab" active={@current_tab == "partners"}> <.icon name="tabler-heart-handshake" class="size-5 mr-2" /> - <%= gettext("Partners") %> + {gettext("Partners")} + <%!-- <.link patch="?tab=members" replace={false}> - <.tab id="members-tab" active={@current_tab == "members"} number={@member_count}> + <.tab id="members-tab" active={@current_tab == "members"} number={@member_count}> <.icon name="hero-user-group" class="size-5 mr-2" /> <%= gettext("Members") %> + --%> -
    -
    - <.about organization={@organization} /> -
    +
    +
    +
    +

    Description

    +

    + <%= @organization.description %> +

    +
    -
    - <.departments_grid organization={@organization} /> -
    +
    +

    Location

    +

    <%= @organization.location || "Não disponível" %>

    +
    + +
    +

    Socials

    +
    + <%= if @organization.socials.website do %> + + + {@organization.socials.website} + + <% end %> + + <%= if @organization.socials.facebook do %> + + + {@organization.socials.facebook} + + <% end %> -
    - <.membership_banner organization={@organization} /> + <%= if @organization.socials.instagram do %> + + + {@organization.socials.instagram} + + <% end %> + + <%= if @organization.socials.x do %> + + + {@organization.socials.x} + + <% end %> + + <%= if @organization.socials.linkedin do %> + + + {@organization.socials.linkedin} + + <% end %> +
    +
    - -
    -
    - - <.memberships_table members={@members} /> +
    + +
    +
      +
    • + <%= if post.type == :activity do %> + <.link navigate={~p"/activities/#{post.activity}"}> + <.activity activity={post.activity} /> + + <% else %> + <.link navigate={~p"/announcements/#{post.announcement}"}> + <.announcement announcement={post.announcement} /> + + <% end %> +
    • +
    +
    + +
    + <.departments_grid organization={@organization} /> +
    + +
    + <.partners_grid organization={@organization} /> +
    + + <%!-- Members tab (disabled) +
    + <.membership_banner organization={@organization} /> +
    + <.memberships_table members={@members} /> +

    <%= gettext("People") %>

    +
    + <%= for person <- @people do %> + <.avatar name={person.name} size={:sm} color={:light_zinc} /> + <% end %>
    + <%= gettext("View all") %>
    + --%> diff --git a/lib/atomic_web/live/partner_live/index.ex b/lib/atomic_web/live/partner_live/index.ex index ec73fc5e1..326200f12 100644 --- a/lib/atomic_web/live/partner_live/index.ex +++ b/lib/atomic_web/live/partner_live/index.ex @@ -2,6 +2,7 @@ defmodule AtomicWeb.PartnerLive.Index do use AtomicWeb, :live_view import AtomicWeb.Components.{Avatar, Button, Empty, Pagination, Tabs} + import AtomicWeb.OrganizationLive.Components.PartnersGrid import AtomicWeb.LiveHelpers alias Atomic.Accounts diff --git a/lib/atomic_web/live/partner_live/index.html.heex b/lib/atomic_web/live/partner_live/index.html.heex index b7d477c6a..cf4c2a7e1 100644 --- a/lib/atomic_web/live/partner_live/index.html.heex +++ b/lib/atomic_web/live/partner_live/index.html.heex @@ -33,38 +33,7 @@ <.empty_state url={~p"/organizations/#{@organization}/partners/new"} placeholder="partner" />
    <% else %> -
      - <%= for partner <- @partners do %> - <.link navigate={~p"/organizations/#{@organization}/partners/#{partner}"} class="block hover:bg-zinc-50"> -
    • -
      -
      - <.avatar color={:light_zinc} name={partner.name} src={Uploaders.PartnerImage.url({partner.image, partner}, :original)} type={:company} size={:sm} /> -
      -
      -

      {partner.name}

      - <%= if partner.location do %> -
      - <.icon name="hero-map-pin" class="size-5 text-zinc-400" /> -

      {partner.location.name}

      -
      - <% end %> -

      - <%= Enum.map(String.split(partner.benefits, "\n"), fn phrase -> %> - <%= if String.length(phrase) < 150 do %> - {phrase}
      - <% else %> - {String.slice(phrase, 0..150) <> "..."}
      - <% end %> - <% end) %> -

      -
      -
      -
    • - - <% end %> -
    - - <.pagination items={@partners} meta={@meta} params={@params} class="mt-2 flex w-full items-center justify-between" /> + <.partners_grid organization={@organization} /> <% end %> + <.pagination items={@partners} meta={@meta} params={@params} class="mt-2 flex w-full items-center justify-between" /> diff --git a/lib/atomic_web/live/partner_live/show.html.heex b/lib/atomic_web/live/partner_live/show.html.heex index c303d2b6d..c93dbb621 100644 --- a/lib/atomic_web/live/partner_live/show.html.heex +++ b/lib/atomic_web/live/partner_live/show.html.heex @@ -1,7 +1,7 @@ <.page title={@page_title}> <:actions :if={@has_permissions?}> <.button navigate={~p"/organizations/#{@organization}/partners/#{@partner}/edit"} icon="hero-pencil"> - <%= gettext("Edit Partner") %> + {gettext("Edit Partner")} @@ -15,12 +15,12 @@

    - <%= @partner.name %> + {@partner.name}

    <.link :if={@partner.location} href={Location.link(@partner.location)} target="_blank" class="group flex flex-row items-center space-x-1"> <.icon name={:map_pin} class="size-4" /> -

    <%= @partner.location.name %>

    +

    {@partner.location.name}

    <%= if @partner.socials do %> @@ -55,13 +55,13 @@
    -
    +
    <.icon name="hero-signal" class="size-5 mb-2" />

    Benefits

    <%= Enum.map(String.split(@partner.benefits, "\n"), fn phrase -> %> - <%= maybe_slice_string(phrase, 300) %> + {maybe_slice_string(phrase, 300)} <% end) %>
    diff --git a/lib/atomic_web/templates/layout/root.html.heex b/lib/atomic_web/templates/layout/root.html.heex index 02e0169a0..1e6f90e59 100644 --- a/lib/atomic_web/templates/layout/root.html.heex +++ b/lib/atomic_web/templates/layout/root.html.heex @@ -10,6 +10,7 @@ <.live_title> {assigns[:page_title] || "Atomic"} + diff --git a/priv/static/images/clip.svg b/priv/static/images/clip.svg new file mode 100644 index 000000000..8b8f12109 --- /dev/null +++ b/priv/static/images/clip.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/priv/static/images/facebook.svg b/priv/static/images/facebook.svg index a3471f59c..3af0981a4 100644 --- a/priv/static/images/facebook.svg +++ b/priv/static/images/facebook.svg @@ -1 +1,4 @@ - \ No newline at end of file + + + + \ No newline at end of file diff --git a/priv/static/images/instagram.svg b/priv/static/images/instagram.svg index d45560194..c483545e1 100644 --- a/priv/static/images/instagram.svg +++ b/priv/static/images/instagram.svg @@ -1 +1,6 @@ - \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/priv/static/images/linkedin.svg b/priv/static/images/linkedin.svg new file mode 100644 index 000000000..02530e75a --- /dev/null +++ b/priv/static/images/linkedin.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file