From c8ac396d29655f2517377f77ba3ba93105ff9bf3 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Wed, 6 Oct 2021 11:29:24 +0200 Subject: [PATCH] Exercise stuff --- wesweb01/contacts_SLIM_practiceht21/main.rb | 3 +++ .../views/grillkorv.slim | 16 ++++++++++++++++ .../contacts_SLIM_practiceht21/views/layout.slim | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/wesweb01/contacts_SLIM_practiceht21/main.rb b/wesweb01/contacts_SLIM_practiceht21/main.rb index fbdc839..e2e262c 100755 --- a/wesweb01/contacts_SLIM_practiceht21/main.rb +++ b/wesweb01/contacts_SLIM_practiceht21/main.rb @@ -7,6 +7,9 @@ get("/") do # 1: Hämta alla data ifrån "data/user_data.csv" lines = File.readlines("data/user_data.csv") + lines2 = File.readlines("data/user_data2.csv") + + lines = lines.concat lines2 # 2: Gör om datastrukturen till en ny dubbelarray double_array = lines.map do | human_string | diff --git a/wesweb01/contacts_SLIM_practiceht21/views/grillkorv.slim b/wesweb01/contacts_SLIM_practiceht21/views/grillkorv.slim index e69de29..b9c4d2a 100644 --- a/wesweb01/contacts_SLIM_practiceht21/views/grillkorv.slim +++ b/wesweb01/contacts_SLIM_practiceht21/views/grillkorv.slim @@ -0,0 +1,16 @@ +- banankey.each do |person| + article.user-card + .profile-img + img alt="#{person[:name]}" src="img/#{person[:image_src]}.jpg" + + ul + li + p #{person[:name]} + li + p #{person[:mail]} + li + p #{person[:phone]} + li + p #{person[:department]} + + diff --git a/wesweb01/contacts_SLIM_practiceht21/views/layout.slim b/wesweb01/contacts_SLIM_practiceht21/views/layout.slim index 279f5c4..003e649 100644 --- a/wesweb01/contacts_SLIM_practiceht21/views/layout.slim +++ b/wesweb01/contacts_SLIM_practiceht21/views/layout.slim @@ -3,7 +3,7 @@ html lang="en" head meta charset="UTF-8"/ meta name="viewport" content="width=device-width, initial-scale=1.0"/ - title Ewil Corp. + title Evil Corp. link rel="stylesheet" href="css/style.css"/ body .wrapper