Browse Source

Style basics

theenglishway (time) 2 years ago
parent
commit
d0395324dc
3 changed files with 6 additions and 9 deletions
  1. 1 1
      lib/templates/cv.html.heex
  2. 4 8
      lib/views/basics.ex
  3. 1 0
      lib/views/layout.ex

+ 1 - 1
lib/templates/cv.html.heex

@@ -52,7 +52,7 @@
 
   <body>
     <div id="basics">
-      <Basics.basics basics={@basics} />
+      <Basics.basics name={@basics.name} title={@basics.label} />
     </div>
 
     <div id="work">

+ 4 - 8
lib/views/basics.ex

@@ -1,17 +1,13 @@
 defmodule CvGenView.Basics do
   use Phoenix.Component
 
-  attr(:basics, :map)
+  attr(:name, :string, required: true)
+  attr(:title, :string, required: true)
 
   def basics(assigns) do
     ~H"""
-    <h1><%= @basics.name %></h1>
-    <h2><%= @basics.label %></h2>
-
-    <dl>
-      <dt class="location">Lieu</dt>
-      <dd><%= @basics.location.city %></dd>
-    </dl>
+    <h1><%= @name %></h1>
+    <h2><%= @title %></h2>
     """
   end
 

+ 1 - 0
lib/views/layout.ex

@@ -67,6 +67,7 @@ defmodule CvGenView.Layout do
 
     #basics {
       grid-area: basics;
+      border-bottom: lightgray solid 0.1em;
     }
     #work {
       grid-area: work;