Skip to content

Commit d35c43a

Browse files
author
matteo
committed
dynamic ages + minor fix to logo circle
1 parent 8928aec commit d35c43a

File tree

2 files changed

+86
-25
lines changed

2 files changed

+86
-25
lines changed

src/App.vue

+67-19
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,42 @@
11
<template>
22
<div id="app">
33
<span id="logo" class="logo">MM</span>
4-
<MainMenu/>
5-
<HamburgerMenu/>
4+
<MainMenu />
5+
<HamburgerMenu />
66
<full-page :options="options" id="fullpage" ref="fullpage">
77
<div class="section" id="section1">
8-
<HomePage/>
8+
<HomePage />
99
</div>
1010
<div class="section" id="section2">
1111
<div class="slide" data-anchor="/me">
12-
<MainTitle msg="About me"/>
12+
<MainTitle msg="About me" />
1313
<div>
14-
<p>👦🏻 Front-end developer junior with a strong passion for everything related to the technological world</p>
15-
<p>😳 I am curious guy and I never get tired to think of new things to create!</p>
16-
<p>🎓 I graduated in Digital Communication at the University of Milan</p>
14+
<p>
15+
👦🏻 Front-end developer with a strong passion for everything
16+
related to the technological world
17+
</p>
18+
<p>
19+
😳 I am curious guy and I never get tired to think of new things
20+
to create!
21+
</p>
22+
<p>
23+
🎓 I graduated in Digital Communication at the University of Milan
24+
</p>
1725
<p>📸 Photography is my biggest hobby</p>
1826
</div>
1927
</div>
2028
<div class="slide" data-anchor="skills" id="skills">
21-
<SkillsSection/>
29+
<SkillsSection />
2230
</div>
2331
<div class="slide" data-anchor="weather-app">
24-
<!-- <h3>🚧 Under costruction! 😥</h3>-->
25-
<WeatherApp/>
32+
<WeatherApp />
2633
</div>
2734
</div>
2835
<div class="section" id="section3">
29-
<Contacts/>
36+
<Contacts />
3037
</div>
3138
<div class="section fp-auto-height" id="section4">
32-
<Footer/>
39+
<Footer />
3340
</div>
3441
</full-page>
3542
</div>
@@ -63,8 +70,8 @@ export default {
6370
slideSelector: ".slide",
6471
loopHorizontal: true,
6572
slidesNavigation: true,
66-
controlArrows: false,
67-
slidesNavPosition: "bottom"
73+
controlArrows: true,
74+
slidesNavPosition: "bottom",
6875
/* sectionsColor: [
6976
"#FFFFFF",
7077
"#FFFFFF",
@@ -76,20 +83,32 @@ export default {
7683
"#ba5be9",
7784
"#b4b8ab"
7885
] */
79-
}
86+
},
8087
};
8188
},
8289
components: {
83-
HelloWorld,
8490
HomePage,
8591
MainTitle,
8692
MainMenu,
8793
HamburgerMenu,
8894
SkillsSection,
8995
Footer,
9096
Contacts,
91-
WeatherApp
92-
}
97+
WeatherApp,
98+
},
99+
mounted() {
100+
this.addArrowIcon();
101+
},
102+
methods: {
103+
addArrowIcon() {
104+
const arrows = ["prev", "next"];
105+
arrows.forEach((arrow) => {
106+
/* const img = document.createElement("img");
107+
img.src = "img/".concat(arrow).concat(".png");
108+
document.querySelector(".fp-" + arrow).appendChild(img); */
109+
});
110+
},
111+
},
93112
};
94113
</script>
95114

@@ -136,8 +155,14 @@ export default {
136155
-webkit-font-smoothing: antialiased;
137156
-moz-font-smoothing: antialiased;
138157
text-decoration: none;
139-
padding: 10px 9px;
140158
border-radius: 50%;
159+
width: 50px;
160+
height: 50px;
161+
display: flex;
162+
place-items: center;
163+
align-items: center;
164+
align-content: center;
165+
justify-content: center;
141166
}
142167
143168
.img__border--shadow {
@@ -181,4 +206,27 @@ export default {
181206
#section4 {
182207
background: var(--footer-bg);
183208
}
209+
210+
.fp-controlArrow.fp-next img,
211+
.fp-controlArrow.fp-prev img {
212+
height: 100%;
213+
display: block;
214+
}
215+
216+
.fp-controlArrow.fp-prev {
217+
left: 0;
218+
border: none;
219+
width: 50px;
220+
height: 101px;
221+
/* background: url("./assets/prev.svg") no-repeat; */
222+
cursor: pointer;
223+
}
224+
.fp-controlArrow.fp-next {
225+
right: 0;
226+
border: none;
227+
width: 50px;
228+
height: 101px;
229+
/* background: url("./assets/next.png") no-repeat; */
230+
cursor: pointer;
231+
}
184232
</style>

src/components/HomePage.vue

+19-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<template>
22
<div class="row">
33
<div class="col-sm-4">
4-
<img :src="require('../assets/me.png')" alt class="myPictures img__rounded" />
4+
<img
5+
:src="require('../assets/me.png')"
6+
alt
7+
class="myPicture img__rounded"
8+
/>
59
</div>
610

711
<div class="col-sm-8 mt-5">
@@ -10,7 +14,7 @@
1014
I'm Matteo Mazziotti
1115
<br />I'm a creative Front-end Developer
1216
</p>
13-
<b-badge class="p-2 m-1" variant="dark">27 years old</b-badge>
17+
<b-badge class="p-2 m-1" variant="dark">{{ `${age} years old` }}</b-badge>
1418
<b-badge class="p-2 m-1" variant="warning">Milan</b-badge>
1519
<b-badge class="p-2 m-1" variant="danger">Front-end Dev</b-badge>
1620
</div>
@@ -19,16 +23,25 @@
1923

2024
<script>
2125
import MainTitle from "./MainTitle.vue";
26+
import moment from "moment";
2227
2328
export default {
29+
data() {
30+
return {
31+
age: Math.floor(
32+
moment().diff(moment("20011993", "DDMMYYYY")) /
33+
(365 * 60 * 60 * 24 * 1000)
34+
),
35+
};
36+
},
2437
components: {
25-
MainTitle
26-
}
38+
MainTitle,
39+
},
2740
};
2841
</script>
2942

3043
<style>
31-
.myPictures {
44+
.myPicture {
3245
width: 100%;
3346
margin-left: 5em;
3447
}
@@ -37,7 +50,7 @@ export default {
3750
}
3851
3952
@media only screen and (max-width: 575px) {
40-
.myPictures {
53+
.myPicture {
4154
width: 50%;
4255
margin: 0;
4356
}

0 commit comments

Comments
 (0)