Exercise stuff

master
E. Almqvist 3 years ago
parent a155b1c8d7
commit c8ac396d29
  1. 3
      wesweb01/contacts_SLIM_practiceht21/main.rb
  2. 16
      wesweb01/contacts_SLIM_practiceht21/views/grillkorv.slim
  3. 2
      wesweb01/contacts_SLIM_practiceht21/views/layout.slim

@ -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 |

@ -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]}

@ -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

Loading…
Cancel
Save