Skip to content

Commit d9b52fa

Browse files
committed
Merge branch 'dev'
2 parents 73ea4a0 + 78f2620 commit d9b52fa

File tree

19 files changed

+917
-55
lines changed

19 files changed

+917
-55
lines changed

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<link rel="preload" href="src/assets/fonts/MonaspaceKrypton.ttf" as="font" type="font/ttf" crossorigin>
1010
<link rel="manifest" href="/site.webmanifest">
1111
<link rel="canonical" href="https://hfidelis.github.io">
12+
<meta name="theme-color" content="#2b3439" />
1213
<meta name="viewport" content="width=device-width, initial-scale=1.0">
1314
<meta name="author" content="Heitor Fidelis">
1415
<meta name="description" content="Personal portfolio website from Heitor Fidelis a.k.a hfidelis">

package-lock.json

Lines changed: 48 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"@jamescoyle/vue-icon": "^0.1.2",
2121
"@mdi/js": "^7.4.47",
2222
"@vueuse/core": "^10.8.0",
23+
"floating-vue": "^5.2.2",
2324
"sass": "^1.71.0",
2425
"vue": "^3.4.15",
2526
"vue-i18n": "^9.9.1",

public/site.webmanifest

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"description": "Portfolio website from Heitor Fidelis a.k.a hfidelis",
55
"start_url": "/",
66
"display": "standalone",
7+
"background_color": "#2b3439",
8+
"theme_color": "#2b3439",
79
"icons": [
810
{
911
"src": "/android-chrome-192x192.png",

src/assets/flags/en-US.png

7.42 KB
Loading

src/assets/flags/pt-BR.png

11 KB
Loading

src/assets/images/404.svg

Lines changed: 677 additions & 0 deletions
Loading

src/components/Header/HeaderComponent.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import {
1111
1212
import { useDark } from '@vueuse/core'
1313
14+
import { RouterLink } from 'vue-router'
15+
1416
import isMobile from '@/helpers/isMobile'
1517
import LocaleSelect from '@/components/LocaleSelect/LocaleSelect.vue'
1618
import ThemeToggle from '@/components/ThemeToggle/ThemeToggle.vue'
@@ -45,12 +47,11 @@ watch(
4547
>
4648
~/
4749
</span>
48-
<a
49-
href="https://github.com/hfidelis"
50-
target="_blank"
50+
<RouterLink
51+
to="/"
5152
>
5253
hfidelis
53-
</a>
54+
</RouterLink>
5455
<span
5556
class="logo__thick"
5657
>
@@ -162,7 +163,7 @@ watch(
162163
}
163164
164165
.logo__prefix {
165-
background-image: linear-gradient(90deg,$green,$dark-green);
166+
background-image: linear-gradient(90deg,$cyan,$dark-cyan);
166167
background-clip: text;
167168
-webkit-text-fill-color: transparent;
168169
-webkit-background-clip: text;
@@ -201,7 +202,7 @@ watch(
201202
position: absolute;
202203
width: 100%;
203204
height: 100%;
204-
background-color: $dark-green;
205+
background-color: $dark-cyan;
205206
animation: fadeInOut 1.2s infinite ease;
206207
}
207208
}

src/components/LocaleSelect/LocaleOption/LocaleOption.vue

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ const props = defineProps({
1313

1414
<template>
1515
<div class="locale__option">
16-
<span class="locale__flag">
17-
{{ props.option.flag }}
18-
</span>
16+
<img
17+
:src="props.option.flag"
18+
:alt="`${props.option.value} flag image`"
19+
class="locale__flag"
20+
/>
1921
<span class="locale__value">
2022
{{ props.option.value }}
2123
</span>
@@ -27,5 +29,10 @@ const props = defineProps({
2729
.locale__option {
2830
@include flex(row, center, start, 0.4rem, nowrap);
2931
font-weight: 600;
32+
33+
> .locale__flag {
34+
width: 1rem;
35+
height: 0.8rem;
36+
}
3037
}
3138
</style>

src/components/LocaleSelect/LocaleSelect.vue

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import Locale from '@/types/i18n/Locale'
77
import LocaleOption from '@/components/LocaleSelect/LocaleOption/LocaleOption.vue'
88
import LocaleValueType from '@/types/components/LocaleSelect/LocaleValueType'
99
10+
import ptBRFlag from '@/assets/flags/pt-BR.png'
11+
import enUSFlag from '@/assets/flags/en-US.png'
12+
1013
export default {
1114
components: {
1215
VueMultiselect,
@@ -15,14 +18,14 @@ export default {
1518
data() {
1619
const isDark = useDark()
1720
18-
const selectedLocale: LocaleValueType = {
19-
value: this.$i18n.locale as Locale,
20-
flag: '🇧🇷',
21+
const countryFlags: { [key in Locale]: string } = {
22+
'pt-BR': ptBRFlag,
23+
'en-US': enUSFlag,
2124
} as const;
2225
23-
const countryFlags: { [key in Locale]: string } = {
24-
'pt-BR': '🇧🇷',
25-
'en-US': '🇺🇸',
26+
const selectedLocale: LocaleValueType = {
27+
value: this.$i18n.locale as Locale,
28+
flag: countryFlags[this.$i18n.locale as Locale],
2629
} as const;
2730
2831
const locales = this.$i18n.availableLocales.map((k): LocaleValueType => {
@@ -55,7 +58,6 @@ export default {
5558
:class="isDark ? 'dark__select' : 'light__select'"
5659
>
5760
<VueMultiselect
58-
:aria-hidden="true"
5961
:aria-label="$t('components.localeSelect.ariaLabel')"
6062
:options="locales"
6163
:selectLabel="''"

src/components/ThemeToggle/ThemeToggle.vue

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -33,28 +33,11 @@ const toggleDark = useToggle(isDark)
3333
>
3434
{{ $t('components.themeToggle.label') }}
3535
</span>
36-
<Transition name="toggle__transition">
37-
<template
38-
v-if="isDark"
39-
>
40-
<SvgIcon
41-
:aria-hidden="true"
42-
:path="mdiWeatherSunny"
43-
type="mdi"
44-
size="30"
45-
/>
46-
</template>
47-
<template
48-
v-else
49-
>
50-
<SvgIcon
51-
:aria-hidden="true"
52-
:path="mdiWeatherNight"
53-
type="mdi"
54-
size="30"
55-
/>
56-
</template>
57-
</Transition>
36+
<SvgIcon
37+
:path="isDark ? mdiWeatherSunny : mdiWeatherNight"
38+
type="mdi"
39+
size="30"
40+
/>
5841
</button>
5942
</template>
6043

@@ -95,14 +78,4 @@ const toggleDark = useToggle(isDark)
9578
color: $primary-dark;
9679
}
9780
}
98-
99-
.toggle__transition-enter-active {
100-
transition: all 0.5s ease-out;
101-
}
102-
103-
.toggle__transition-enter-from,
104-
.toggle__transition-leave-to {
105-
transform: translateX(1.2rem);
106-
opacity: 0;
107-
}
10881
</style>

src/helpers/isMobile.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import { ref, watch, readonly } from 'vue'
22

3-
const isMobile = ref(false)
4-
5-
const windowWidth = ref(window.innerWidth)
3+
const windowWidth = ref<number>(window.innerWidth)
64

75
window.addEventListener('resize', () => {
86
windowWidth.value = window.innerWidth
97
})
108

9+
const isMobile = ref<boolean>(windowWidth.value < 768)
10+
1111
watch(
1212
() => windowWidth.value,
1313
() => {
14-
isMobile.value = windowWidth.value < 768
14+
isMobile.value = (windowWidth.value < 768)
1515
},
1616
)
1717

src/locales/en-US.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
"home": {
1515
"title": "Under construction...",
1616
"subtitle": "Soon you will be able to find here some info about me and possibly some posts."
17+
},
18+
"notFound": {
19+
"title": "Oops! It looks like this page doesn't exists...",
20+
"subtitle": "Maybe you typed the wrong address or the page has been removed.",
21+
"back": "Back to home page"
1722
}
1823
}
1924
}

src/locales/pt-BR.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
"home": {
1515
"title": "Em construção...",
1616
"subtitle": "Em breve você poderá encontrar por aqui informações sobre mim e possivelmente algumas postagens."
17+
},
18+
"notFound": {
19+
"title": "Ops! Parece que esta página não existe...",
20+
"subtitle": "Talvez você tenha digitado o endereço errado ou a página foi removida.",
21+
"back": "Voltar para a página inicial"
1722
}
1823
}
1924
}

src/main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import '@/styles/app.scss'
22

3+
import 'floating-vue/dist/style.css'
4+
35
import SvgIcon from '@jamescoyle/vue-icon'
6+
import FloatingVue from 'floating-vue'
47

58
import { createApp } from 'vue'
69
import App from '@/App.vue'
@@ -10,5 +13,6 @@ import i18n from '@/i18n'
1013
createApp(App)
1114
.use(router)
1215
.use(i18n)
16+
.use(FloatingVue)
1317
.component('SvgIcon', SvgIcon)
1418
.mount('#app')

src/router/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ const router = createRouter({
88
name: 'Home',
99
component: () => import('@/views/HomeView/HomeView.vue')
1010
},
11+
{
12+
path: '/:pathMatch(.*)*',
13+
name: 'ErrorView',
14+
component: () => import('@/views/NotFoundView/NotFound.vue'),
15+
}
1116
]
1217
})
1318

src/styles/app.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@font-face {
99
font-family: 'Monaspace Krypton', monospace;
1010
src: url('../assets/fonts/MonaspaceKrypton.ttf') format('truetype');
11-
font-display: optional;
11+
font-display: block;
1212
}
1313

1414
* {
@@ -19,4 +19,8 @@
1919

2020
html, body {
2121
min-height: 100dvh;
22+
}
23+
24+
body {
25+
overflow-x: hidden;
2226
}

src/styles/variables.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ $text-lg: 1.50rem;
2020
$text-xl: 1.75rem;
2121
$text-xxl: 2rem;
2222

23-
$green: #10d910;
24-
$dark-green: #1c8c1c;
23+
$cyan: #27debf;
24+
$dark-cyan: #21ac95;
25+
$darker-cyan: #166e60;
2526

2627
$header-height: 10vh;
2728
$header-item-width: 8.3rem;

0 commit comments

Comments
 (0)