Skip to content

Commit 4e4d74f

Browse files
halivertclaude
andauthored
refactor(projects): redesign cards UI and update project data (#97)
* refactor: remove toggle behavior from project cards, always show content Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: remove unused projects * chore: update screenshot and description * chore: update laravel-js-routes project link * chore: update description --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b5f6ad6 commit 4e4d74f

8 files changed

Lines changed: 39 additions & 78 deletions

File tree

Lines changed: 29 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script setup lang="ts">
2-
import { ref } from "vue"
32
import { getLangFromUrl, useTranslations } from "@/i18n/utils"
43
import type { Project } from "@/types/project"
54
@@ -14,58 +13,42 @@ const props = defineProps<{
1413
const lang = getLangFromUrl(props.url)
1514
const t = useTranslations(lang)
1615
17-
const showLinks = ref(false)
18-
1916
function getTranslation(key: TranslationProp): string {
2017
return props.project.data.translations[lang]?.[key] ?? ""
2118
}
2219
</script>
2320

2421
<template>
2522
<article
26-
class="relative rounded-md overflow-hidden"
27-
@click="showLinks = !showLinks"
23+
class="rounded-md overflow-hidden border border-background-200 dark:border-background-800 flex flex-col"
2824
>
29-
<label :for="project.id">
30-
<figure class="cursor-pointer">
31-
<slot />
32-
33-
<figcaption class="mt-1 text-center italic text-sm">
34-
{{ getTranslation("title") }}
35-
</figcaption>
36-
</figure>
37-
</label>
38-
39-
<Transition>
40-
<div
41-
v-show="showLinks"
42-
class="absolute inset-0 bg-background-200/90 dark:bg-background-950/90 flex flex-col gap-2 px-4 py-2"
43-
>
44-
<strong class="text-center">{{ getTranslation("title") }}</strong>
45-
<span class="flex-1">{{ getTranslation("description") }}</span>
46-
<p class="flex items-center justify-center gap-3 text-sm">
47-
<a
48-
v-if="project.data.live"
49-
@click.stop
50-
class="underline text-accent-100 bg-accent-800 py-1 px-3 rounded"
51-
:href="project.data.live"
52-
rel="noopener noreferrer"
53-
target="_blank"
54-
>
55-
{{ t("Sitio") }}
56-
</a>
57-
<a
58-
v-if="project.data.repo"
59-
@click.stop
60-
class="underline text-accent-100 bg-accent-800 py-1 px-3 rounded"
61-
:href="project.data.repo"
62-
rel="noopener noreferrer"
63-
target="_blank"
64-
>
65-
{{ t("Código") }}
66-
</a>
67-
</p>
68-
</div>
69-
</Transition>
25+
<figure>
26+
<slot />
27+
</figure>
28+
29+
<div class="flex flex-col gap-2 px-4 py-3 flex-1">
30+
<strong>{{ getTranslation("title") }}</strong>
31+
<p class="flex-1 text-sm">{{ getTranslation("description") }}</p>
32+
<p class="flex gap-2 text-sm">
33+
<a
34+
v-if="project.data.live"
35+
class="text-accent-100 bg-accent-800 py-1 px-3 rounded"
36+
:href="project.data.live"
37+
rel="noopener noreferrer"
38+
target="_blank"
39+
>
40+
{{ t("Sitio") }}
41+
</a>
42+
<a
43+
v-if="project.data.repo"
44+
class="border border-accent-800 dark:border-accent-300 text-accent-800 dark:text-accent-300 py-1 px-3 rounded"
45+
:href="project.data.repo"
46+
rel="noopener noreferrer"
47+
target="_blank"
48+
>
49+
{{ t("Código") }}
50+
</a>
51+
</p>
52+
</div>
7053
</article>
7154
</template>
-109 KB
Binary file not shown.

src/content/projects/bookmark-landing-page.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.
20.5 KB
Loading
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
order: 100
22
repo: "https://github.com/halivert/laravel-js-routes"
3-
live: "https://github.com/halivert/laravel-js-routes"
3+
live: "https://packagist.org/packages/halivert/laravel-js-routes"
44
image: "./laravel-js-routes.png"
55
translations:
66
es-419:
7-
title: "Rutas de Laravel en JS"
8-
description: "Paquete composer para utilizar rutas de Laravel en archivos JS. Archivado - el problema que resolvía fue solucionado en un paquete oficial."
7+
title: "laravel-js-routes"
8+
description: >
9+
Paquete composer para utilizar rutas de Laravel en archivos JS. Más de 11
10+
mil descargas en Packagist. Archivado - paquete sugerido tightenco/ziggy.
911
imageAlt: "Screenshot del repo de laravel-js-routes"
1012
en:
11-
title: "Laravel routes in JS"
12-
description: "Composer package to use Laravel routes on JS with a command. Archived - the problem solved was addressed by an official package."
13+
title: "laravel-js-routes"
14+
description: >
15+
Composer package to use Laravel routes on JS with a command. 11k+ installs
16+
on Packagist. Archived - succeeded by tightenco/ziggy.
1317
imageAlt: "laravel-js-routes repository screenshot"
-71.2 KB
Binary file not shown.

src/content/projects/weakest-record.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/pages/projects.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function getTranslation(project: Project, key: TranslationProp): string {
2626
<section class="grid lg:grid-cols-3 sm:grid-cols-2 grid-cols-1 gap-4">
2727
{
2828
projects.map((project) => (
29-
<ProjectThumbnail client:load url={Astro.url} project={project}>
29+
<ProjectThumbnail url={Astro.url} project={project}>
3030
{project.data.image ? (
3131
<Image
3232
class="rounded-md w-full object-cover"

0 commit comments

Comments
 (0)