Skip to content

Commit 4c19665

Browse files
authored
Merge pull request #8 from m-mattia-m/develop
refactor: CV
2 parents 5fa4024 + 1ae7619 commit 4c19665

34 files changed

+5979
-7455
lines changed

.github/workflows/deploy.yaml

+27-73
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,44 @@
1-
# Sample workflow for building and deploying a Nuxt site to GitHub Pages
2-
#
3-
# To get started with Nuxt see: https://nuxtjs.org/docs/get-started/installation
4-
#
5-
name: Deploy Nuxt site to Pages
6-
1+
# https://github.com/actions/deploy-pages#usage
2+
name: Deploy to GitHub Pages
73
on:
8-
# # Runs on pushes targeting the default branch
9-
# push:
10-
# branches: ["main"]
11-
12-
# Allows you to run this workflow manually from the Actions tab
134
workflow_dispatch:
14-
15-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
16-
permissions:
17-
contents: read
18-
pages: write
19-
id-token: write
20-
21-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
22-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
23-
concurrency:
24-
group: "pages"
25-
cancel-in-progress: false
26-
5+
pull_request:
6+
branches:
7+
- main
8+
push:
9+
branches:
10+
- main
2711
jobs:
28-
# Build job
2912
build:
3013
runs-on: ubuntu-latest
3114
steps:
32-
- name: Checkout
33-
uses: actions/checkout@v3
34-
- name: Detect package manager
35-
id: detect-package-manager
36-
run: |
37-
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
38-
echo "manager=yarn" >> $GITHUB_OUTPUT
39-
echo "command=install" >> $GITHUB_OUTPUT
40-
exit 0
41-
elif [ -f "${{ github.workspace }}/package.json" ]; then
42-
echo "manager=npm" >> $GITHUB_OUTPUT
43-
echo "command=ci" >> $GITHUB_OUTPUT
44-
exit 0
45-
else
46-
echo "Unable to determine package manager"
47-
exit 1
48-
fi
49-
- name: Setup Node
50-
uses: actions/setup-node@v3
15+
- uses: actions/checkout@v3
16+
- run: corepack enable
17+
- uses: actions/setup-node@v3
5118
with:
52-
node-version: "16"
53-
cache: ${{ steps.detect-package-manager.outputs.manager }}
54-
- name: Setup Pages
55-
uses: actions/configure-pages@v3
56-
with:
57-
# Automatically inject router.base in your Nuxt configuration file and set
58-
# target to static (https://nuxtjs.org/docs/configuration-glossary/configuration-target/).
59-
#
60-
# You may remove this line if you want to manage the configuration yourself.
61-
static_site_generator: nuxt
62-
- name: Restore cache
63-
uses: actions/cache@v3
64-
with:
65-
path: |
66-
dist
67-
.nuxt
68-
key: ${{ runner.os }}-nuxt-build-${{ hashFiles('dist') }}
69-
restore-keys: |
70-
${{ runner.os }}-nuxt-build-
71-
- name: Install dependencies
72-
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
73-
- name: Static HTML export with Nuxt
74-
run: ${{ steps.detect-package-manager.outputs.manager }} run generate
19+
node-version: "20"
20+
# Pick your own package manager and build script
21+
- run: npm install
22+
- run: npx nuxt build --preset github_pages
7523
- name: Upload artifact
76-
uses: actions/upload-pages-artifact@v2
24+
uses: actions/upload-pages-artifact@v3
7725
with:
78-
path: .output/public
79-
26+
path: ./.output/public
8027
# Deployment job
8128
deploy:
29+
# Add a dependency to the build job
30+
needs: build
31+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
32+
permissions:
33+
pages: write # to deploy to Pages
34+
id-token: write # to verify the deployment originates from an appropriate source
35+
# Deploy to the github_pages environment
8236
environment:
83-
name: github-pages
37+
name: github_pages
8438
url: ${{ steps.deployment.outputs.page_url }}
39+
# Specify runner + deployment step
8540
runs-on: ubuntu-latest
86-
needs: build
8741
steps:
8842
- name: Deploy to GitHub Pages
8943
id: deployment
90-
uses: actions/deploy-pages@v2
44+
uses: actions/deploy-pages@v4

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ logs
2222
.env
2323
.env.*
2424
!.env.example
25+
/.vscode/settings.json

README.md

+4-82
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,7 @@
1-
# Nuxt 3 Minimal Starter
1+
# CV - mattiamueggler.ch
22

3-
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
3+
This repository includes the CV of Mattia Müggler. You can reach this CV by entering [cv.mattiamueggler.ch](https://cv.mattiamueggler.ch) (EN and DE).
44

5-
## Publish
5+
## Publishing
66

7-
> Deploy it with `npm run generate`
8-
9-
> and publish it with `npm run deploy`
10-
11-
> you have to add your custom domain after you published your changes -> repository - settings - page - domain (cv.mattiamueggler.ch)
12-
13-
[Inspiration](https://github.com/lucpotage/nuxt-github-pages)
14-
15-
## Setup
16-
17-
Make sure to install the dependencies:
18-
19-
```bash
20-
# npm
21-
npm install
22-
23-
# pnpm
24-
pnpm install
25-
26-
# yarn
27-
yarn install
28-
29-
# bun
30-
bun install
31-
```
32-
33-
## Development Server
34-
35-
Start the development server on `http://localhost:3000`:
36-
37-
```bash
38-
# npm
39-
npm run dev
40-
41-
# pnpm
42-
pnpm run dev
43-
44-
# yarn
45-
yarn dev
46-
47-
# bun
48-
bun run dev
49-
```
50-
51-
## Production
52-
53-
Build the application for production:
54-
55-
```bash
56-
# npm
57-
npm run build
58-
59-
# pnpm
60-
pnpm run build
61-
62-
# yarn
63-
yarn build
64-
65-
# bun
66-
bun run build
67-
```
68-
69-
Locally preview production build:
70-
71-
```bash
72-
# npm
73-
npm run preview
74-
75-
# pnpm
76-
pnpm run preview
77-
78-
# yarn
79-
yarn preview
80-
81-
# bun
82-
bun run preview
83-
```
84-
85-
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
7+
To publish a new version, you have to go to the "Actions" tab in GitHub, select the workflow "Deploy Nuxt site to Pages" and run it manually.

app.vue

+18-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
11
<template>
2-
<div class="w-full h-full font">
2+
<div class="w-full h-full font scroll-smooth focus:scroll-auto">
33
<NuxtPage />
44
</div>
55
</template>
66

77
<style scoped>
8+
@font-face {
9+
font-family: "IBM-3270";
10+
src: url(/assets/fonts/IBM-3270/3270-Regular.ttf) format("truetype");
11+
}
12+
813
.font {
9-
font-family: "IBM 3270", serif;
14+
font-family: "IBM-3270", serif;
15+
white-space: pre-line;
16+
}
17+
18+
::-moz-selection {
19+
background-color: #ba9eb0;
20+
color: #ffffff;
21+
}
22+
23+
::selection {
24+
background-color: #ba9eb0;
25+
color: #ffffff;
1026
}
1127
</style>

assets/css/main.css

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
@tailwind base;
22
@tailwind components;
33
@tailwind utilities;
4-
5-
@font-face {
6-
font-family: Underground;
7-
font-weight: 400;
8-
src: url('~assets/fonts/IBM-3270/3270-Regular.woff') format('woff'),
9-
url('~assets/fonts/IBM-3270/3270-Regular.woff') format('woff');
10-
}

components/awards.vue

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<script lang="ts" setup></script>
2+
3+
<template>
4+
<div class="w-full flex items-center">
5+
<div>
6+
<h1 class="text-5xl text-dark dark:text-light pb-12 mt-64">
7+
{{ $t("awards.title") }}
8+
</h1>
9+
<div
10+
class="w-full flex flex-col justify-center md:justify-around items-center py-8 text-dark dark:text-light"
11+
>
12+
<div
13+
v-for="award in $tm('awards.content')"
14+
class="flex flex-col md:flex-col h-full mb-16"
15+
>
16+
<h2 class="text-3xl mb-4">{{ award.title }}</h2>
17+
<div class="flex flex-col md:flex-row h-full">
18+
<div
19+
class="w-full h-full md:w-1/2 md:mr-8 flex items-center justify-center"
20+
>
21+
<Carousel :autoplay="4000" :wrap-around="true" class="w-full">
22+
<Slide v-for="(image, index) in award.images" :key="index">
23+
<img :alt="award.name" :src="image" class="object-fill" />
24+
</Slide>
25+
<template #addons>
26+
<Navigation />
27+
<Pagination />
28+
</template>
29+
</Carousel>
30+
</div>
31+
<div class="w-full md:w-1/2">
32+
<p class="mb-4">{{ award.description }}</p>
33+
<ul
34+
class="w-full list-disc text-base underline underline-offset-2"
35+
>
36+
<li
37+
v-for="mention in award.mentions"
38+
class="w-full list-['\25A1'] -indent-2.5 ml-2.5 pl-3 my-1"
39+
>
40+
<NuxtLink :to="mention.url" class="pl-2" target="_blank">{{
41+
mention.title
42+
}}</NuxtLink>
43+
</li>
44+
</ul>
45+
</div>
46+
</div>
47+
</div>
48+
</div>
49+
</div>
50+
</div>
51+
</template>
52+
53+
<style scoped>
54+
/* this classes are for the carousel*/
55+
.carousel__prev,
56+
.carousel__next {
57+
@apply text-white;
58+
@apply active:text-white;
59+
@apply hover:text-white;
60+
}
61+
</style>

0 commit comments

Comments
 (0)