Skip to content

Commit

Permalink
feat: setup who am i and download CV
Browse files Browse the repository at this point in the history
  • Loading branch information
batleforc committed Aug 15, 2024
1 parent 754e6f4 commit e3e3d45
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 12 deletions.
1 change: 1 addition & 0 deletions apps/front/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export {}
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
Panel: typeof import('primevue/panel')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
}
Expand Down
12 changes: 7 additions & 5 deletions apps/front/src/component/Hero/Hero.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ const indexStore = useIndexStore();
</template>

<style lang="scss">
@import '../../var.scss';
.coverPage {
height: 100vh;
background-color: #1b203a;
color: #f2f4f3;
background-color: $color-bgCover;
color: $color-textCover;
display: flex;
flex-direction: column;
justify-content: center;
Expand All @@ -56,9 +58,9 @@ const indexStore = useIndexStore();
.ico-cover {
font-size: 38px;
color: #f2f4f3;
color: $color-textCover;
border-radius: 50%;
border: 1px solid #f2f4f3;
border: 1px solid $color-textCover;
padding: 5px;
margin: 5px;
}
Expand All @@ -72,6 +74,6 @@ const indexStore = useIndexStore();
margin-right: auto;
width: 30px;
font-size: 30px;
color: #f2f4f3;
color: $color-textCover;
}
</style>
4 changes: 4 additions & 0 deletions apps/front/src/helper/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
export const AreWeHome = () =>
window.location.pathname === '/' ? true : false;

export const getMediaApiUrl = (path: string) => {
return `${import.meta.env.VITE_API_URL as string}/api/media?path=${path}`;
};
2 changes: 1 addition & 1 deletion apps/front/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import './styles.scss';
import { createApp, markRaw } from 'vue';
import { createPinia } from 'pinia';
import type { Router } from 'vue-router';
Expand All @@ -7,7 +8,6 @@ import Aura from '@primevue/themes/aura';
import App from './views/App.vue';
import router from './router';
import { client } from '@portfolio/api-client';
import './styles.scss';

client.setConfig({
baseURL: import.meta.env.VITE_API_URL as string,
Expand Down
4 changes: 3 additions & 1 deletion apps/front/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
@tailwind components;
@tailwind utilities;

@import './var.scss';

html, body, #root {
margin: 0;
}
Expand All @@ -23,4 +25,4 @@ html{
.ico-template {
font-size: 32px;
color: black;
}
}
23 changes: 23 additions & 0 deletions apps/front/src/var.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Color

$color-bgCover: #1b203a;
$color-bgCoverTransparent: #1b203a8a;
$color-bgCoverLighter: #21284d ;
$color-textCover: #f2f4f3;
$color-textCoverDarker: #b5bdb9;

// Breakpoint

$md: 768px;

// Nav position
$anime-timer: 0.3s;
$anime-timerBurger: 0.3s;
$spinInDeg: 180deg;
$spinOutDeg: 0deg;

$inPosition: 3%;
$outPosition: -50%;

$margin: 5%;
$size: 80%;
37 changes: 33 additions & 4 deletions apps/front/src/views/HomeView.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,38 @@
<script setup lang="ts">
import { useIndexStore } from '../stores';
import { getMediaApiUrl } from '../helper/index.ts';
import IcoOrMedia from '../component/helper/IcoOrMedia.vue';
const indexStore = useIndexStore();
</script>

<template>
<div class="container">
<h1 v-for="truc in [...Array(100).keys()]" :key="truc">Home {{ truc }}</h1>
<div v-if="indexStore.inited" class="homePageContainer">
<Panel header="Qui suis je ?">
<p class="m-0">{{ indexStore.homeContent.presentation }}</p>
</Panel>
<div class="homePageCvContainer">
<a :href="getMediaApiUrl(indexStore.homeContent.cvUrl)" target="_blank" rel="noreferrer" class="homePageCV">
Mon CV
<IcoOrMedia media="ico#download" className="ml-2" />
</a>
</div>
</div>
</template>
</template>

<style lang="scss">
@import '../var.scss';
.homePageContainer {
@apply flex justify-center flex-col;
}
.homePageCV {
@apply border-2 rounded-full px-5 py-2;
background-color: $color-bgCover;
color: $color-textCover;
}
.homePageCvContainer {
@apply my-8 flex justify-center;
}
</style>
2 changes: 1 addition & 1 deletion folio_content/content/home.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ coverTitle:
- Architecture.
- Too much coffee.
- And lot's more.
cvUrl: /media/cv.pdf
cvUrl: cv.pdf
url:
- name: GitHub
url: https://github.com/batleforc
Expand Down
Binary file added folio_content/media/cv.pdf
Binary file not shown.

0 comments on commit e3e3d45

Please sign in to comment.