Skip to content

Commit 6e76471

Browse files
committed
Initial commit (with half of the website done)
0 parents  commit 6e76471

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+22551
-0
lines changed

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/.nuxt
2+
/.output
3+
/node_modules
4+
5+
.env
6+
.gitignore
7+
README.md

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Nuxt dev/build outputs
2+
.output
3+
.data
4+
.nuxt
5+
.nitro
6+
.cache
7+
dist
8+
9+
# Node dependencies
10+
node_modules
11+
12+
# Logs
13+
logs
14+
*.log
15+
16+
# Misc
17+
.DS_Store
18+
.fleet
19+
.idea
20+
21+
# Local env files
22+
.env
23+
.env.*
24+
!.env.example

Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM node:23-slim AS builder
2+
3+
WORKDIR /app
4+
5+
COPY package*.json ./
6+
RUN npm install
7+
8+
COPY . .
9+
RUN npm run build
10+
11+
# Stage de production
12+
FROM node:23-slim
13+
14+
WORKDIR /app
15+
16+
# Copier uniquement les fichiers nécessaires depuis le stage de build
17+
COPY --from=builder /app/.output ./.output
18+
COPY --from=builder /app/package*.json ./
19+
20+
EXPOSE 4000
21+
ENV PORT=4000
22+
23+
CMD ["node", "./.output/server/index.mjs"]

README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Nuxt Minimal Starter
2+
3+
Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
4+
5+
## Setup
6+
7+
Make sure to install dependencies:
8+
9+
```bash
10+
# npm
11+
npm install
12+
13+
# pnpm
14+
pnpm install
15+
16+
# yarn
17+
yarn install
18+
19+
# bun
20+
bun install
21+
```
22+
23+
## Development Server
24+
25+
Start the development server on `http://localhost:3000`:
26+
27+
```bash
28+
# npm
29+
npm run dev
30+
31+
# pnpm
32+
pnpm dev
33+
34+
# yarn
35+
yarn dev
36+
37+
# bun
38+
bun run dev
39+
```
40+
41+
## Production
42+
43+
Build the application for production:
44+
45+
```bash
46+
# npm
47+
npm run build
48+
49+
# pnpm
50+
pnpm build
51+
52+
# yarn
53+
yarn build
54+
55+
# bun
56+
bun run build
57+
```
58+
59+
Locally preview production build:
60+
61+
```bash
62+
# npm
63+
npm run preview
64+
65+
# pnpm
66+
pnpm preview
67+
68+
# yarn
69+
yarn preview
70+
71+
# bun
72+
bun run preview
73+
```
74+
75+
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.

app.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<template>
2+
<NuxtLayout>
3+
<NuxtPage />
4+
</NuxtLayout>
5+
</template>

assets/css/main.css

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
@import "tailwindcss";
2+
3+
@theme {
4+
--font-rubik: "Rubik", sans-serif;
5+
--font-gilroy: "Gilroy", sans-serif;
6+
--font-space-grotesk: "Space Grotesk", sans-serif;
7+
--font-manrope: "Manrope", sans-serif;
8+
--font-pixelify: "Pixelify", sans-serif;
9+
}
10+
11+
@layer base {
12+
body {
13+
@apply bg-white dark:bg-slate-800 text-white
14+
}
15+
}
16+
17+
@layer components {
18+
.emoji {
19+
@apply h-7.5
20+
}
21+
22+
.outline-text {
23+
@apply font-space-grotesk font-extrabold text-transparent [-webkit-text-stroke-width:3px] [-webkit-text-stroke-color:#00000060] dark:[-webkit-text-stroke-color:#ffffff60];
24+
}
25+
26+
.header-link {
27+
@apply text-black dark:text-white p-2.5 rounded-lg relative overflow-hidden transition-all duration-300 hover:scale-[1.02]! hover:backdrop-filter hover:backdrop-blur-sm hover:px-4 hover:rounded-lg hover:transition-all hover:duration-300 hover:overflow-hidden hover:bg-[#00000010]! dark:hover:bg-[#ffffff10]!;
28+
}
29+
30+
.header-link-index {
31+
@apply bg-gradient-to-b from-gray-400/60 to-gray-400 border-gray-400 dark:from-slate-700/60 dark:to-slate-700 dark:border-slate-700 relative transition-all duration-200 px-7.5 py-5 rounded-b-[4px];
32+
}
33+
34+
35+
.animated-link {
36+
@apply relative inline-block transition-all duration-500 hover:pl-6.25 hover:transition-all hover:duration-500 before:absolute before:opacity-0 before:size-6 before:font-black before:-left-0.5 before:transition-opacity before:duration-500 before:ease-in before:hover:left-0 before:hover:opacity-100;
37+
38+
/* &::before {
39+
background-image: url("data:image/svg+xml,%3Cpath fill=%5C'currentColor%5C' d=%5C'M512 256a256 256 0 1 0-512 0a256 256 0 1 0 512 0M271 135c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-87 87l87 87c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L167 273c-9.4-9.4-9.4-24.6 0-33.9z%5C'/%3E");
40+
} */
41+
}
42+
43+
.dissolve {
44+
@apply transform translate-y-[-150px] [mask-image:linear-gradient(to_bottom,rgba(0,0,0,0.7),rgba(0,0,0,0))] [-webkit-mask-image:-webkit-gradient(linear,left_top,left_bottom,from(rgba(0,0,0,0.7)),to(rgba(0,0,0,0)))] dark:[mask-image:linear-gradient(to_bottom,rgba(0,0,0,0.2),rgba(0,0,0,0))] dark:[-webkit-mask-image:-webkit-gradient(linear,left_top,left_bottom,from(rgba(0,0,0,0.2)),to(rgba(0,0,0,0)))]
45+
}
46+
47+
.blur {
48+
@apply absolute top-0 left-0 size-7.5 hidden z-0 pointer-events-none rounded-[50%] bg-white blur-sm opacity-3 scale-400 translate-full
49+
}
50+
51+
.cmoc-bg {
52+
background: url('/img/cmoc-bg.png') no-repeat center center / cover;
53+
background-color: rgba(32, 41, 58, 0.6);
54+
55+
@media (prefers-color-scheme: dark) {
56+
& {
57+
background-color: rgba(32, 41, 58, 0.8); /* Darker for dark mode */
58+
background-blend-mode: multiply; /* Different blend mode for dark mode */
59+
box-shadow:
60+
0px 0px 120px #9bd7330d, /* Dark mode shadow, slightly more visible */
61+
0px 0px 90px #c33ed20d, /* Slightly lighter and smaller */
62+
0px 0px 70px #7ba7dd0d, /* Even lighter and smaller */
63+
0px 0px 50px #eb7f1b0d, /* Lighter still */
64+
0px 0px 30px #7ba7dd0d;
65+
}
66+
}
67+
}
68+
69+
.btn {
70+
@apply p-4 pl-8 pr-8 border-2 border-gray-200 bg-gray-200 hover:bg-gray-300 hover:border-gray-500 dark:border-slate-800 dark:bg-slate-600 dark:hover:bg-slate-700 text-black transition-all;
71+
}
72+
73+
.bg-gold {
74+
@apply bg-[linear-gradient(145deg,_#ffd70020,_#ffdf0030,_#ffd70030)] border border-[1px_solid_#ffd70030] p-3 rounded-xl
75+
}
76+
77+
.bg-silver {
78+
@apply bg-[linear-gradient(145deg,_#c0c0c020,_#dcdcdc30,_#c0c0c030)] border border-[1px_solid_#dcdcdc30] p-3 rounded-xl
79+
}
80+
81+
.bg-bronze {
82+
@apply bg-[linear-gradient(145deg,_#cd7f3220,_#e07a2d30,_#cd7f3230)] border border-[1px_solid_#e07a2d30] p-3 rounded-xl
83+
}
84+
}
85+
86+
@layer utilities {
87+
.container {
88+
@apply max-w-screen-xl mx-auto px-3 sm:px-5 md:px-10 lg:px-16 overflow-hidden;
89+
}
90+
}

components/ArtisanCard.vue

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
<script setup lang="ts">
2+
import { onMounted, computed, ref } from 'vue'
3+
import type { Artisan } from '@/types'
4+
import { renderMii } from '@/backend'
5+
import { countries } from '@/countries'
6+
7+
const props = defineProps<Artisan>()
8+
const mii_img = await renderMii(props.mii_data)
9+
const country_flag = computed(() => countries[props.country_id]?.flag)
10+
const twemoji = ref(null)
11+
12+
// Import twemoji from the CDN
13+
onMounted(() => {
14+
const script = document.createElement('script')
15+
script.src = 'https://cdn.jsdelivr.net/npm/@twemoji/api@latest/dist/twemoji.min.js'
16+
script.crossOrigin = 'anonymous'
17+
script.onload = () => {
18+
twemoji.value = window.twemoji
19+
}
20+
document.head.appendChild(script)
21+
})
22+
23+
// Use twemoji to render the country flag
24+
const countryFlagHtml = computed(() => {
25+
if (twemoji.value && country_flag.value) {
26+
return twemoji.value.parse(country_flag.value)
27+
}
28+
return ''
29+
})
30+
31+
const isMaster = computed(() => {
32+
if (props.is_master) {
33+
return true
34+
} else {
35+
return false
36+
}
37+
})
38+
</script>
39+
40+
<template>
41+
<li
42+
@mousemove="handleMouseMove"
43+
@mouseleave="resetTransform"
44+
:class="rankingClass, { 'bg-yellow-600/30 dark:bg-yellow-600/30 border-yellow-300/50 dark:border-yellow-300/50': isMaster}"
45+
class="p-3 rounded-xl border flex flex-col justify-between relative z-20 dark:border-slate-600/60 dark:bg-slate-700/60 dark:text-white hover:shadow-xl transition-shadow overflow-hidden backdrop-blur-md bg-opacity-50"
46+
ref="card"
47+
>
48+
<RouterLink :to="`/artisans/${artisan_id}`" class="hover:no-underline">
49+
<span
50+
v-if="isMaster"
51+
class="w-full text-7xl font-bold opacity-30 z-0 absolute select-none -ml-0 mb-[9.75rem] text-yellow-500 -rotate-6"
52+
><i class="fa-solid fa-crown"></i></span
53+
>
54+
<div class="z-10 flex flex-col w-full items-center justify-between">
55+
<span class="self-end text-2xl" v-html="countryFlagHtml"></span>
56+
<img class="w-28 h-30 bottom-3 relative" :src="mii_img" :alt="`${name}'s Mii`"/>
57+
<h1 class="text-3xl relative bottom-5 text-center text-black">{{ name }}</h1>
58+
</div>
59+
<div class="blur"></div>
60+
</RouterLink>
61+
<span class="w-full text-2xl flex items-center justify-between gap-3 flex-wrap"
62+
><span><i class="fa-solid fa-thumbs-up"></i> {{ total_likes }}</span
63+
><span>{{ number_of_posts }} <i class="fa-solid fa-user"></i></span></span
64+
>
65+
</li>
66+
</template>
67+
68+
<style>
69+
.emoji {
70+
height: 30px !important;
71+
}
72+
73+
.blur {
74+
position: absolute;
75+
top: 0;
76+
left: 0;
77+
width: 30px;
78+
height: 30px;
79+
transform: translate(100%, 100%) scale(400%);
80+
filter: blur(8px) opacity(0.03);
81+
background: rgb(255, 255, 255);
82+
border-radius: 50%;
83+
pointer-events: none;
84+
z-index: 0;
85+
display: none;
86+
}
87+
88+
.bg-gold {
89+
background: linear-gradient(145deg, #ffd70020, #ffdf0030, #ffd70030);
90+
border: 1px solid #ffd70030;
91+
grid-column: span 2;
92+
}
93+
94+
.bg-silver {
95+
background: linear-gradient(145deg, #c0c0c020, #dcdcdc30, #c0c0c030);
96+
border: 1px solid #dcdcdc30;
97+
}
98+
99+
.bg-bronze {
100+
background: linear-gradient(145deg, #cd7f3220, #e07a2d30, #cd7f3230);
101+
border: 1px solid #e07a2d30;
102+
}
103+
</style>
104+
105+
<script lang="ts">
106+
export default {
107+
data() {
108+
return {
109+
// Your existing data properties
110+
}
111+
},
112+
methods: {
113+
handleMouseMove(event) {
114+
const card = this.$refs.card
115+
const blur = card.querySelector('.blur')
116+
const { width, height, left, top } = card.getBoundingClientRect()
117+
const mouseX = event.clientX - left - width / 2
118+
const mouseY = event.clientY - top - height / 2
119+
120+
// Adjust these values to control the rotation sensitivity
121+
const rotateY = (mouseX / width) * 20 // Rotation around the Y axis
122+
const rotateX = (-mouseY / height) * 20 // Rotation around the X axis
123+
124+
card.style.transform = `perspective(800px) rotateY(${rotateY}deg) rotateX(${rotateX}deg) scale(1.05)`
125+
126+
// Use the card's rect for positioning the blur element
127+
const rect = card.getBoundingClientRect()
128+
blur.style.left = event.clientX - rect.left - 50 + 'px'
129+
blur.style.top = event.clientY - rect.top - 50 + 'px'
130+
blur.style.display = 'block'
131+
},
132+
resetTransform() {
133+
const card = this.$refs.card
134+
const blur = card.querySelector('.blur')
135+
card.style.transform = 'perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1)'
136+
blur.style.display = 'none'
137+
}
138+
}
139+
}
140+
</script>
141+

0 commit comments

Comments
 (0)