Skip to content
This repository was archived by the owner on Nov 7, 2022. It is now read-only.

Commit d916f96

Browse files
new header
1 parent d24dd52 commit d916f96

File tree

6 files changed

+73
-29
lines changed

6 files changed

+73
-29
lines changed

assets/cv.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,12 @@ person:
1313
first: Luka
1414
last: Harambasic
1515
# information:
16-
# - German
17-
# - 03.09.2000
18-
# - Oppau
19-
# - mehr
20-
# - mehr
16+
# - Musterstraße 7
17+
# - 68161 Mannheim
18+
# - Germany
2119
address:
22-
street: Mustermannstr.
23-
housenumber: 7
24-
zip: 67066
25-
city: Oppau
20+
street: Mustermannstr. 7
21+
city: 67066 Oppau
2622
country: Germany
2723

2824
company:
@@ -33,10 +29,8 @@ company:
3329
first: Maximiliane
3430
last: Mustermann
3531
address:
36-
street: Mustermanstr.
37-
housenumber: 7
38-
zip: 67066
39-
city: Oppau
32+
street: Mustermanstr. 7
33+
city: 67066 Walldorf
4034
country: Germany
4135

4236
coverletter:

components/CoverletterHeader.vue

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<template>
2+
<header>
3+
<span
4+
v-if="address.street"
5+
v-text="address.street" />
6+
<span
7+
v-if="address.city"
8+
v-text="address.city" />
9+
<span
10+
v-if="address.country"
11+
v-text="address.country" />
12+
</header>
13+
</template>
14+
15+
<script>
16+
export default {
17+
name: 'CoverletterHeader',
18+
props: {
19+
address: {
20+
required: true,
21+
type: Object
22+
}
23+
}
24+
}
25+
</script>
26+
27+
<style lang="scss" scoped>
28+
header {
29+
position: absolute;
30+
top: 0;
31+
left: 0;
32+
width: 100%;
33+
text-align: center;
34+
background: $c-primary;
35+
color: $c-secondary;
36+
display: flex;
37+
flex-flow: row nowrap;
38+
align-items: center;
39+
justify-content: center;
40+
padding: $s-s 0;
41+
border-radius: $radius $radius 0 0;
42+
> span {
43+
margin: 0 $s-xxs 0 0;
44+
&::after {
45+
content: ',';
46+
}
47+
&:last-of-type {
48+
margin: 0 0 0 0;
49+
&::after {
50+
content: '';
51+
}
52+
}
53+
}
54+
}
55+
</style>

components/CoverletterInformation.vue

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,8 @@
2222
<span
2323
v-if="information.address"
2424
v-text="information.address.street" />
25-
<span
26-
v-if="information.address"
27-
v-text="information.address.housenumber" />
2825
</div>
29-
<div class="zipCity">
30-
<span
31-
v-if="information.address"
32-
v-text="information.address.zip" />
26+
<div class="city">
3327
<span
3428
v-if="information.address"
3529
v-text="information.address.city" />
@@ -67,7 +61,7 @@
6761
<style lang="scss" scoped>
6862
address {
6963
width: 100%;
70-
margin: 0 0 ($s * 3) 0;
64+
margin: $s 0 ($s * 3) 0;
7165
font-style: normal;
7266
}
7367
</style>

components/Page.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<template>
22
<div
33
class="page"
4-
:class="{ first: isFirst}">
4+
:class="{ first: isFirstCv }">
55
<slot />
66
<page-footer
77
:links="footer"
8-
:isFirst="isFirst"
8+
:isFirst="isFirstCv"
99
:showLogo="settings.showLogo" />
1010
</div>
1111
</template>
@@ -18,7 +18,7 @@ export default {
1818
PageFooter
1919
},
2020
props: {
21-
isFirst: {
21+
isFirstCv: {
2222
type: Boolean,
2323
default: false
2424
},

components/PageFooter.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ footer {
103103
width: $s * 3;
104104
height: $s * 3;
105105
margin-top: - ($s * 1.5);
106-
margin-right: $s;
106+
margin-right: $s * 3;
107107
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
108108
border-radius: 50%;
109109
transition: all 0.7s ease;
@@ -149,7 +149,6 @@ footer {
149149
text-decoration: none;
150150
border-bottom: 1px transparent solid;
151151
&:hover {
152-
opacity: 0.9;
153152
border-bottom-color: $c-secondary;
154153
}
155154
}

pages/index.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<page
44
:settings="cv.settings"
55
:footer="cv.footer">
6-
<coverletter-information
7-
:information="cv.person"/>
6+
<coverletter-header
7+
:address="cv.person.address"/>
88
<coverletter-information
99
:information="cv.company"/>
1010
<coverletter-text
@@ -13,7 +13,7 @@
1313
:coverletter="cv.coverletter" />
1414
</page>
1515
<page
16-
:isFirst="true"
16+
:isFirstCv="true"
1717
:settings="cv.settings"
1818
:footer="cv.footer">
1919
<page-header
@@ -56,6 +56,7 @@
5656
<script>
5757
import Page from '~/components/Page.vue'
5858
import PageHeader from '~/components/PageHeader.vue'
59+
import CoverletterHeader from '~/components/CoverletterHeader.vue'
5960
import CoverletterInformation from '~/components/CoverletterInformation.vue'
6061
import CoverletterText from '~/components/CoverletterText.vue'
6162
import List from '~/components/List.vue'
@@ -67,6 +68,7 @@ export default {
6768
components: {
6869
Page,
6970
PageHeader,
71+
CoverletterHeader,
7072
CoverletterInformation,
7173
CoverletterText,
7274
List,

0 commit comments

Comments
 (0)