Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finishing Portfolio Tab #5

Merged
merged 2 commits into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions components/Card.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<template>
<div class="relative mb-4 flex rounded-xl bg-saturate text-gray-900 dark:text-gray-200 bg-clip-border shadow-lg">
<div v-if="imageUrl" class="relative pl-2 md:pl-4 pt-2 md:pt-4 overflow-hidden">
<img :src="imageUrl" alt="logo icon" class="my-auto rounded-xl" :class="imageClass"/>
</div>
<div class="p-2 md:p-4">
<div class="flex items-center justify-between">
<h5 class="block font-sans text-xl font-medium leading-snug tracking-normal antialiased" v-html="title"></h5>
</div>
<a v-if="url" :href="url" class="text-blue-500 mb-1" target="_blank" rel="noreferrer" v-html="extra"></a>
<p v-else class="mb-1" v-html="extra"></p>
<p class="mb-3">{{ date_representation }}</p>
<div class="block font-sans text-base font-light leading-relaxed antialiased">
<ul class="list-disc list-inside">
<li v-for="item in description" v-html="item"></li>
</ul>
</div>
<div class="group mt-4 inline-flex flex-wrap items-center gap-3">
<span v-for="tech in technologies"
class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700">
{{ tech }}
</span>
</div>
</div>
</div>
</template>

<script>
export default {
name: "Card",
props: {
title: String,
description: Array,
imageUrl: {
type: [String, undefined],
default: undefined
},
imageClass: {
type: [String, undefined],
default: undefined
},
extra: {
type: [String, undefined],
default: undefined
},
url: {
type: [String, undefined],
default: undefined
},
startDate: String,
endDate: String,
technologies: {
type: Array,
default: []
},
},
computed: {
date_representation() {
if (this.endDate && this.endDate.length) {
return `${this.startDate} - ${this.endDate}`;
}
return this.startDate;
}
}
}
</script>

<style scoped>

</style>
40 changes: 40 additions & 0 deletions components/FancyBox.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<script>
import { Fancybox } from '@fancyapps/ui';
import '@fancyapps/ui/dist/fancybox/fancybox.css';

export default {
name: "FancyBox",
props: {
options: Object,
},
methods: {
click() {
const node = this.$refs.container.childNodes[0];
if (node === undefined) {return;}
node.click();
}
},
mounted() {
Fancybox.bind(this.$refs.container, '[data-fancybox]', {
...(this.options || {}),
});
},
updated() {
Fancybox.unbind(this.$refs.container);
Fancybox.close();

Fancybox.bind(this.$refs.container, '[data-fancybox]', {
...(this.options || {}),
});
},
unmounted() {
Fancybox.destroy();
},
};
</script>

<template>
<div ref="container">
<slot></slot>
</div>
</template>
66 changes: 46 additions & 20 deletions components/tabs/Contact.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="mx-auto">
<div class="sm:mt-8"></div>
<div class="grid gap-x-10 md:gap-y-6 md:grid-cols-2">
<div class="md:col-span-1 md:px-6 py-3">
<div class="md:col-span-1">
<!--Introduction-->
<div class="mb-4 lg:col-span-2 lg:w-full lg:max-w-7xl lg:gap-x-8">
<div class="lg:pr-4">
Expand All @@ -24,7 +24,7 @@
{{ $t('contact_linkedin_profile') }}
</div>
<a :href="linkedin_url"
class="font-bold text-blue-500 text-xl mb-2"
class="font-bold text-blue-500 text-xl mb-2 wrap-word"
target="_blank"
rel="noreferrer"
aria-label="linkedin url">
Expand All @@ -41,7 +41,7 @@
<div class="font-bold text-gray-900 dark:text-gray-200 text-xl mb-1">
{{ $t('contact_github_profile') }}
</div>
<a :href="$store.getters.GITHUB_PROFILE_URL" class="font-bold text-blue-500 text-xl mb-2"
<a :href="$store.getters.GITHUB_PROFILE_URL" class="font-bold text-blue-500 text-xl mb-2 wrap-word"
target="_blank"
rel="noreferrer"
aria-label="github url">
Expand All @@ -58,7 +58,7 @@
<div class="font-bold text-gray-900 dark:text-gray-200 text-xl mb-1">
{{ $t('contact_phone') }}
</div>
<a :href="tel_phone" class="font-bold text-blue-500 text-xl mb-2">
<a :href="tel_phone" class="font-bold text-blue-500 text-xl mb-2 wrap-word">
{{ phone }}
</a>
</div>
Expand All @@ -72,7 +72,7 @@
<div class="font-bold text-gray-900 dark:text-gray-200 text-xl mb-1">
{{ $t('contact_email') }}
</div>
<a :href="email" class="font-bold text-blue-500 text-xl mb-2"
<a :href="email" class="font-bold text-blue-500 text-xl mb-2 wrap-word"
target="_blank"
rel="noreferrer"
aria-label="email url">
Expand All @@ -82,7 +82,7 @@
</div>
</div>

<div class="md:col-span-1 md:px-6 py-3">
<div class="md:col-span-1">
<div class="mb-4 lg:col-span-2 lg:w-full lg:max-w-7xl lg:gap-x-8">
<div class="lg:pr-4">
<h1 class="mt-2 text-4xl font-bold tracking-tight text-gray-900 dark:text-gray-200">
Expand Down Expand Up @@ -130,19 +130,38 @@
</div>

<div class="flex items-center rounded-full bg-teal-200 text-teal-900 text-sm font-bold px-4 py-3"
role="alert" v-if="sending">
role="alert" v-if="sent">
<font-awesome-icon class="text-teal-500 text-lg mr-2" :icon="['fas', 'check']"/>
<p>{{$t('contact_email_sent')}}</p>
<p>{{ $t('contact_email_sent') }}</p>
</div>
<div class="flex items-center rounded-full bg-red-200 text-red-900 text-sm font-bold px-4 py-3"
role="alert" v-if="error">
<font-awesome-icon class="text-red-500 text-md mr-2" :icon="['fas', 'x']"/>
<p>{{$t('contact_email_sent_error')}}</p>
<p>{{ $t('contact_email_sent_error') }}</p>
</div>

<div class="w-full">
<button class="bg-blue-500 w-100 block text-white p-2 w-full rounded-lg">
{{ $t('contact_email_send') }}
<button class="p-2 w-full rounded-lg"
:disabled="sending"
:class="!sending ? 'bg-blue-500 w-100 block text-white ' :
'text-gray-900 bg-white border-gray-200 dark:bg-gray-800 dark:text-gray-400'">
<span v-if="!sending">{{ $t('contact_email_send') }}</span>
<span v-else>
<svg aria-hidden="true"
role="img"
class="inline w-4 h-4 mr-3 text-gray-200 animate-spin dark:text-gray-100"
viewBox="0 0 100 101"
fill="none"
xmlns="http://www.w3.org/2000/svg">
<path
d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
fill="currentColor"/>
<path
d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
fill="#1C64F2"/>
</svg>
{{ $t('contact_email_sending') }}
</span>
</button>
</div>
</form>
Expand All @@ -165,6 +184,7 @@ export default {
email: '',
message: '',
},
sent: false,
sending: false,
error: false,
}
Expand All @@ -186,18 +206,24 @@ export default {
},
methods: {
send_email() {
this.sending = true;
emailjs.send('portfolio', 'template_portfolio', {
user_name: this.form.name, user_email: this.form.email, message: this.form.message
}, 'u0e_FkHOlD75wLr8g')
.then((_) => {
this.sending = true;
this.clear_email();
setTimeout(() => {this.sending = false}, 5000);
}, (_) => {
this.error = true;
this.clear_email();
setTimeout(() => {this.error = false}, 5000);
});
.then((_) => {
this.sent = true;
this.sending = false;
this.clear_email();
setTimeout(() => {
this.sent = false
}, 5000);
}, (_) => {
this.error = true;
this.sending = false;
setTimeout(() => {
this.error = false
}, 5000);
});
},
clear_email() {
this.form = {
Expand Down
2 changes: 1 addition & 1 deletion components/tabs/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
caret-animation='blink'
></vue-typer>
</p>
<p class="text-sm text-justify text-gray-800 dark:text-gray-200 max-w-xl mx-auto md:text-xl dark:text-white">
<p class="text-xl sm:text-justify text-gray-800 dark:text-gray-200 max-w-xl mx-auto dark:text-white">
{{ $t('profile_description') }}
</p>
<div class="flex mt-2 justify-center md:justify-end">
Expand Down
Loading