basics.ex 476 B

123456789101112131415161718192021222324252627282930
  1. defmodule CvGenView.Basics do
  2. use Phoenix.Component
  3. attr(:basics, :map)
  4. def basics(assigns) do
  5. ~H"""
  6. <h1><%= @basics.name %></h1>
  7. <h2><%= @basics.label %></h2>
  8. <dl>
  9. <dt class="location">Lieu</dt>
  10. <dd><%= @basics.location.city %></dd>
  11. </dl>
  12. """
  13. end
  14. def css(),
  15. do: """
  16. #basics {
  17. display: grid;
  18. justify-items: center;
  19. }
  20. #basics>h1,
  21. #basics>h2 {
  22. text-transform: uppercase;
  23. }
  24. """
  25. end