Skip to content

Commit c01a045

Browse files
committed
style!: migrate from primeflex to TailwindCSS v4
1 parent 61a23bb commit c01a045

File tree

13 files changed

+3523
-345
lines changed

13 files changed

+3523
-345
lines changed

.prettierrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
{}
1+
{
2+
"plugins": ["prettier-plugin-tailwindcss"]
3+
}

app/assets/main.css renamed to app/assets/css/main.css

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
1-
body {
2-
margin: 0;
3-
font-family:
4-
system-ui,
5-
-apple-system,
6-
BlinkMacSystemFont,
7-
"Segoe UI",
8-
Roboto,
9-
Oxygen,
10-
Ubuntu,
11-
Cantarell,
12-
"Open Sans",
13-
"Helvetica Neue",
14-
sans-serif;
15-
}
1+
@import "tailwindcss";
162

17-
a,
18-
a:visited {
19-
color: #424242;
20-
text-decoration: none;
21-
}
3+
@layer base {
4+
body {
5+
margin: 0;
6+
font-family:
7+
system-ui,
8+
-apple-system,
9+
BlinkMacSystemFont,
10+
"Segoe UI",
11+
Roboto,
12+
Oxygen,
13+
Ubuntu,
14+
z Cantarell,
15+
"Open Sans",
16+
"Helvetica Neue",
17+
sans-serif;
18+
}
2219

23-
a:hover {
24-
color: #979797;
20+
a,
21+
a:visited {
22+
color: #424242;
23+
text-decoration: none;
24+
}
25+
a:hover {
26+
color: #979797;
27+
}
2528
}
2629

2730
.text-gradient {

app/components/FooterBar.vue

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
<template>
2-
<div
3-
class="flex justify-content-center footer mt-6 mx-3 pb-6 text-sm text-700"
4-
>
2+
<div class="mx-3 mt-10 flex justify-center pb-6 text-base text-gray-500">
53
🇨🇵🇯🇵❤️ - 2023 ~ Present &#169; Thomas Lamant - 🏠🇩🇰
64
</div>
75
</template>
8-
9-
<style lang="postcss">
10-
.footer {
11-
@media (max-width: 768px) {
12-
margin-top: 2.5rem !important;
13-
}
14-
}
15-
</style>

app/components/HeaderBar.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import logoSrc from "~/assets/logo.svg";
33
</script>
44

55
<template>
6-
<div class="grid justify-content-between align-content-center m-3">
7-
<div class="col-4 flex align-items-center">
6+
<div class="m-3 flex content-center justify-between">
7+
<div class="flex items-center">
88
<NuxtLink to="/"><img :src="logoSrc" width="40" alt="Logo" /></NuxtLink>
99
</div>
10-
<div class="col-4 flex justify-content-end align-items-center">
10+
<div class="flex items-center justify-end">
1111
<NuxtLink to="/links" class="mx-2">Links</NuxtLink>
1212
<a
1313
v-umami="'LinkedIn profile'"

app/components/LinkItem.vue

Lines changed: 16 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -47,40 +47,44 @@ const onEnter = () => {
4747
<template>
4848
<div
4949
:class="[
50-
'col-12 md:col-6 flex p-0 card',
51-
props.column === 'left' ? 'md:justify-content-end' : '',
52-
props.row === 'top' ? 'md:align-items-end' : 'md:align-items-start',
50+
'card md:mt- col-span-2 flex justify-center p-0 not-last-of-type:border-b-1 not-last-of-type:border-b-gray-400 md:col-span-1 not-last-of-type:md:border-b-0',
51+
props.column === 'left' ? 'md:justify-end' : '',
52+
props.row === 'top' ? 'md:items-end' : 'md:items-start',
5353
]"
5454
>
5555
<div
56-
class="card-inner md:mx-2 md:mb-2"
56+
class="card-inner relative w-full md:mx-2 md:mb-2 md:w-[380px] md:border-1 md:border-gray-200 lg:w-[420px]"
5757
@click="onClick"
5858
@mouseenter="onEnter"
5959
@mouseleave="onLeave"
6060
>
6161
<div>
6262
<nuxt-img
63+
class="h-auto w-full"
6364
:src="`/links/${props.id}.png`"
64-
sizes="sm:100vw md:360px lg:400px"
65+
sizes="sm:100vw md:380px lg:420px"
6566
:alt="props.alt"
6667
/>
6768
</div>
6869
<div
69-
class="card-overlay text-white surface-900 px-4 py-2 absolute top-0 left-0 transition-ease-in-out transition-duration-500"
70+
class="card-overlay transition-ease-in-out transition-duration-500 absolute top-0 left-0 h-full bg-gray-900 px-6 py-3 text-white opacity-0 hover:opacity-100"
7071
:class="{
71-
'card-opaque': isOpaque && isClick,
72-
'card-transparent': !isOpaque && isClick,
72+
'opacity-100!': isOpaque && isClick,
73+
'opacity-0!': !isOpaque && isClick,
7374
}"
7475
>
75-
<div class="flex h-full flex-column justify-content-between">
76+
<div class="flex h-full flex-col justify-between text-base">
7677
<div>
77-
<h2>{{ props.title }}</h2>
78+
<h2 class="my-4 text-3xl font-bold">{{ props.title }}</h2>
7879
<slot />
7980
</div>
8081
<div>
8182
<p>
82-
<a :href="props.link" class="explicit-link" target="_blank"
83-
><i class="pi pi-external-link mr-1" /> Go to
83+
<a
84+
:href="props.link"
85+
class="font-normal text-white no-underline visited:text-white hover:text-white"
86+
target="_blank"
87+
><i class="pi pi-external-link mr-1 text-xs" /> Go to
8488
{{ props.linkText ? props.linkText : props.link }}</a
8589
>
8690
</p>
@@ -90,62 +94,3 @@ const onEnter = () => {
9094
</div>
9195
</div>
9296
</template>
93-
94-
<style lang="postcss">
95-
.card {
96-
@media (max-width: 768px) {
97-
justify-content: center;
98-
}
99-
100-
&:not(:last-of-type) {
101-
@media (max-width: 768px) {
102-
border-bottom: #666666 1px solid;
103-
}
104-
}
105-
106-
& .card-inner {
107-
position: relative;
108-
109-
@media (min-width: 769px) {
110-
border: #e0e0e0 1px solid;
111-
}
112-
113-
&:hover .card-overlay {
114-
opacity: 1;
115-
}
116-
117-
& .card-overlay {
118-
opacity: 0;
119-
width: calc(100% - 3rem);
120-
height: calc(100% - 1rem);
121-
122-
& a {
123-
color: #ffffff;
124-
text-decoration: underline;
125-
font-weight: bold;
126-
127-
&.explicit-link {
128-
text-decoration: none;
129-
font-weight: normal;
130-
}
131-
132-
& i {
133-
font-size: 0.8rem;
134-
}
135-
136-
&:hover {
137-
color: #ffffff;
138-
}
139-
}
140-
}
141-
}
142-
}
143-
144-
.card-opaque {
145-
opacity: 1 !important;
146-
}
147-
148-
.card-transparent {
149-
opacity: 0 !important;
150-
}
151-
</style>

app/layouts/cards.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ useSeoMeta({
1111
</script>
1212

1313
<template>
14-
<div
15-
class="flex flex-column h-full w-full md:justify-content-center align-items-center"
16-
>
14+
<div class="flex h-full w-full flex-col items-center md:justify-center">
1715
<main>
1816
<slot />
1917
</main>

app/layouts/default.vue

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,13 @@ useSeoMeta({
1111
</script>
1212

1313
<template>
14-
<div class="flex flex-column h-full w-full absolute">
14+
<div class="absolute flex h-full w-full flex-col">
1515
<HeaderBar />
16-
<div class="flex flex-auto mt-5 content-container justify-content-center">
16+
<div class="mt-0 flex flex-auto justify-center md:mt-5">
1717
<main>
1818
<slot />
1919
</main>
2020
</div>
2121
<FooterBar />
2222
</div>
2323
</template>
24-
25-
<style lang="postcss">
26-
.content-container {
27-
@media (max-width: 768px) {
28-
margin-top: 0 !important;
29-
}
30-
}
31-
</style>

0 commit comments

Comments
 (0)