theenglishway (time) 2 vuotta sitten
vanhempi
commit
d0395324dc
3 muutettua tiedostoa jossa 6 lisäystä ja 9 poistoa
  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>
   <body>
     <div id="basics">
     <div id="basics">
-      <Basics.basics basics={@basics} />
+      <Basics.basics name={@basics.name} title={@basics.label} />
     </div>
     </div>
 
 
     <div id="work">
     <div id="work">

+ 4 - 8
lib/views/basics.ex

@@ -1,17 +1,13 @@
 defmodule CvGenView.Basics do
 defmodule CvGenView.Basics do
   use Phoenix.Component
   use Phoenix.Component
 
 
-  attr(:basics, :map)
+  attr(:name, :string, required: true)
+  attr(:title, :string, required: true)
 
 
   def basics(assigns) do
   def basics(assigns) do
     ~H"""
     ~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
   end
 
 

+ 1 - 0
lib/views/layout.ex

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