|
@@ -16,21 +16,24 @@ defmodule CvGenView.Basics do
|
|
|
<p><%= @summary %></p>
|
|
<p><%= @summary %></p>
|
|
|
"""
|
|
"""
|
|
|
|
|
|
|
|
- def contact(assigns),
|
|
|
|
|
- do: ~H"""
|
|
|
|
|
|
|
+ def contact(assigns) do
|
|
|
|
|
+ supported_profiles = [:linked_in] |> Map.new(&{&1, nil})
|
|
|
|
|
+
|
|
|
|
|
+ flat_profiles =
|
|
|
|
|
+ assigns.profiles |> Map.new(&{&1.network |> Macro.underscore() |> String.to_atom(), &1.url})
|
|
|
|
|
+
|
|
|
|
|
+ assigns = assigns |> Map.merge(supported_profiles) |> Map.merge(flat_profiles)
|
|
|
|
|
+
|
|
|
|
|
+ ~H"""
|
|
|
<dl>
|
|
<dl>
|
|
|
<dt class="location">📍</dt>
|
|
<dt class="location">📍</dt>
|
|
|
<dd class="location"><%= @location.city %></dd>
|
|
<dd class="location"><%= @location.city %></dd>
|
|
|
<dt class="mail">📧</dt>
|
|
<dt class="mail">📧</dt>
|
|
|
<dd class="mail"><a href={"mailto: #{@email}"}><%= @email %></a></dd>
|
|
<dd class="mail"><a href={"mailto: #{@email}"}><%= @email %></a></dd>
|
|
|
- <dt class="profiles"></dt>
|
|
|
|
|
- <dd class="profiles">
|
|
|
|
|
- <ul>
|
|
|
|
|
- <%= for profile <- @profiles do %>
|
|
|
|
|
- <li><a href={profile.url}><%= profile.network %></a></li>
|
|
|
|
|
- <% end %>
|
|
|
|
|
- </ul>
|
|
|
|
|
- </dd>
|
|
|
|
|
|
|
+ <%= if @linked_in do %>
|
|
|
|
|
+ <dt class="linked_in">LinkedIn</dt>
|
|
|
|
|
+ <dd class="linked_in"><a href={@linked_in}><%= @linked_in %></a></dd>
|
|
|
|
|
+ <% end %>
|
|
|
</dl>
|
|
</dl>
|
|
|
"""
|
|
"""
|
|
|
|
|
|