commit | author | age
|
f31b9e
|
1 |
<template> |
498b47
|
2 |
<section> |
CM |
3 |
<header> |
|
4 |
<h1>My friends</h1> |
|
5 |
</header> |
|
6 |
<ul> |
|
7 |
<friend-contact |
c4371d
|
8 |
v-for="friend in friends" |
CM |
9 |
:key="friend.id" |
|
10 |
:name="friend.name" |
|
11 |
:phone-number="friend.phone" |
|
12 |
:email-address="friend.email" |
|
13 |
:is-favorite="true" |
498b47
|
14 |
></friend-contact> |
CM |
15 |
</ul> |
|
16 |
</section> |
f31b9e
|
17 |
</template> |
CM |
18 |
|
|
19 |
<script> |
|
20 |
export default { |
498b47
|
21 |
data() { |
CM |
22 |
return { |
|
23 |
friends: [ |
|
24 |
{ |
|
25 |
id: "manuel", |
|
26 |
name: "Manuel Lorenz", |
|
27 |
phone: "01234 5678 991", |
|
28 |
email: "manuel@localhost.com", |
|
29 |
}, |
|
30 |
{ |
|
31 |
id: "julie", |
|
32 |
name: "Julie Jones", |
|
33 |
phone: "09876 543 221", |
|
34 |
email: "julie@localhost.com", |
|
35 |
}, |
|
36 |
], |
|
37 |
} |
|
38 |
}, |
f31b9e
|
39 |
}; |
f54162
|
40 |
</script> |
CM |
41 |
|
|
42 |
<style> |
498b47
|
43 |
@import url('https://fonts.googleapis.com/css2?family=Jost&display=swap'); |
f54162
|
44 |
|
CM |
45 |
* { |
|
46 |
box-sizing: border-box; |
|
47 |
} |
|
48 |
|
|
49 |
html { |
|
50 |
font-family: 'Jost', sans-serif; |
|
51 |
} |
|
52 |
|
|
53 |
body { |
|
54 |
margin: 0; |
|
55 |
} |
|
56 |
|
|
57 |
header { |
|
58 |
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26); |
|
59 |
margin: 3rem auto; |
|
60 |
border-radius: 10px; |
|
61 |
padding: 1rem; |
|
62 |
background-color: #58004d; |
|
63 |
color: white; |
|
64 |
text-align: center; |
|
65 |
width: 90%; |
|
66 |
max-width: 40rem; |
|
67 |
} |
|
68 |
|
|
69 |
#app ul { |
|
70 |
margin: 0; |
|
71 |
padding: 0; |
|
72 |
list-style: none; |
|
73 |
} |
|
74 |
|
|
75 |
#app li { |
|
76 |
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26); |
|
77 |
margin: 1rem auto; |
|
78 |
border-radius: 10px; |
|
79 |
padding: 1rem; |
|
80 |
text-align: center; |
|
81 |
width: 90%; |
|
82 |
max-width: 40rem; |
|
83 |
} |
|
84 |
|
|
85 |
#app h2 { |
|
86 |
font-size: 2rem; |
|
87 |
border-bottom: 4px solid #ccc; |
|
88 |
color: #58004d; |
|
89 |
margin: 0 0 1rem 0; |
|
90 |
} |
|
91 |
|
|
92 |
#app button { |
|
93 |
font: inherit; |
|
94 |
cursor: pointer; |
|
95 |
border: 1px solid #ff0077; |
|
96 |
background-color: #ff0077; |
|
97 |
color: white; |
|
98 |
padding: 0.05rem 1rem; |
|
99 |
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.26); |
|
100 |
} |
|
101 |
|
|
102 |
#app button:hover, |
|
103 |
#app button:active { |
|
104 |
background-color: #ec3169; |
|
105 |
border-color: #ec3169; |
|
106 |
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.26); |
|
107 |
} |
|
108 |
</style> |