2022-08-09 19:13:22 -04:00
|
|
|
<script setup lang="ts">
|
2022-08-09 21:07:18 -04:00
|
|
|
import type { Project } from "@/data/projects";
|
2022-08-10 20:12:06 -04:00
|
|
|
import { unref as _unref } from "vue";
|
2023-01-28 15:32:48 -05:00
|
|
|
const props = defineProps<{
|
2022-08-09 21:07:18 -04:00
|
|
|
project: Project;
|
|
|
|
reverse?: boolean;
|
2022-08-09 19:13:22 -04:00
|
|
|
}>();
|
2022-08-09 21:07:18 -04:00
|
|
|
|
2023-01-28 15:32:48 -05:00
|
|
|
const imgUrl = props.project.img
|
|
|
|
? `url(/images/projects/${props.project.img})`
|
|
|
|
: "none";
|
2022-08-09 19:13:22 -04:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-08-09 21:07:18 -04:00
|
|
|
<a :href="project.href" class="no-underline project-anchor">
|
|
|
|
<div class="card flex items-center justify-between">
|
2022-08-09 22:17:02 -04:00
|
|
|
<div class="card-text h-full px-4 py-2">
|
|
|
|
<div class="h-full flex flex-col justify-between">
|
|
|
|
<div>
|
2023-02-25 12:33:30 -05:00
|
|
|
<h3 class="m-0 font-bold font-sans">{{ project.name }}</h3>
|
2022-08-09 22:17:02 -04:00
|
|
|
<div class="flex gap-1 items-center flex-nowrap">
|
|
|
|
<img
|
|
|
|
class="h-5 w-5 m-0"
|
2022-08-09 22:23:24 -04:00
|
|
|
:src="`/images/langs/${lang}.svg`"
|
2022-08-09 22:17:02 -04:00
|
|
|
v-for="(lang, index) in project.langs"
|
|
|
|
:key="index"
|
|
|
|
/>
|
|
|
|
<span
|
|
|
|
class="text-xs text-gray-500 dark:text-gray-300 whitespace-nowrap"
|
|
|
|
>· {{ project.license ?? "no license" }}</span
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="flex flex-col justify-between grow">
|
|
|
|
<p
|
|
|
|
class="desc-text text-gray-600 dark:text-gray-200 mt-3 mb-0 text-left text-sm"
|
|
|
|
>
|
|
|
|
{{ project.description }}
|
|
|
|
</p>
|
|
|
|
<p
|
|
|
|
class="desc-text text-gray-600 dark:text-gray-200 text-left text-sm m-0 whitespace-nowrap"
|
2022-08-09 21:07:18 -04:00
|
|
|
>
|
2022-08-09 22:17:02 -04:00
|
|
|
{{ project.longDescription }}
|
|
|
|
</p>
|
2022-08-09 21:07:18 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-08-10 20:22:37 -04:00
|
|
|
<div class="card-img h-full p-4 flex" :style="{ '--imgurl': imgUrl }" />
|
2022-08-09 19:13:22 -04:00
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<style scoped>
|
2022-08-09 21:07:18 -04:00
|
|
|
.project-anchor {
|
|
|
|
display: inline-block;
|
|
|
|
width: 100%;
|
2022-08-09 19:13:22 -04:00
|
|
|
}
|
|
|
|
|
2023-01-28 15:59:29 -05:00
|
|
|
.project-anchor:hover h3 {
|
|
|
|
@apply text-blue-700 dark:text-blue-400;
|
|
|
|
}
|
|
|
|
|
2022-08-09 19:13:22 -04:00
|
|
|
.card {
|
|
|
|
border: 0.2rem solid pink;
|
2022-08-09 21:07:18 -04:00
|
|
|
background: white;
|
|
|
|
border-radius: 1.5rem 0 1.5rem 0;
|
2022-08-09 19:13:22 -04:00
|
|
|
height: 12rem;
|
|
|
|
line-height: 1.25;
|
|
|
|
transition: all 0.2s ease;
|
2022-08-09 21:07:18 -04:00
|
|
|
box-shadow: 0 0.1rem 0.5rem 0 gray;
|
2022-08-09 19:13:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
html.dark .card {
|
|
|
|
border: 0.2rem solid rgb(126, 93, 98);
|
2022-08-09 22:17:02 -04:00
|
|
|
background: #444;
|
2022-08-09 21:07:18 -04:00
|
|
|
box-shadow: 0 0.1rem 0.5rem 0 black;
|
2022-08-09 19:13:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
.card:hover,
|
|
|
|
.card:active {
|
2022-08-09 21:07:18 -04:00
|
|
|
transform: scale(1.03);
|
|
|
|
}
|
|
|
|
|
|
|
|
.card-text {
|
|
|
|
width: 25%;
|
2022-08-09 22:17:02 -04:00
|
|
|
background: white;
|
2022-08-09 21:07:18 -04:00
|
|
|
border-radius: 1.5rem 0 0 0;
|
2022-08-09 21:18:17 -04:00
|
|
|
transition: width 0.2s ease;
|
2022-08-09 21:07:18 -04:00
|
|
|
}
|
|
|
|
|
2022-08-09 22:17:02 -04:00
|
|
|
html.dark .card-text {
|
|
|
|
background: #444;
|
|
|
|
}
|
|
|
|
|
2022-08-09 21:07:18 -04:00
|
|
|
.card-img {
|
|
|
|
width: 75%;
|
2022-08-10 20:12:06 -04:00
|
|
|
background: var(--imgurl);
|
2022-08-09 21:07:18 -04:00
|
|
|
background-color: rgb(255, 237, 241);
|
|
|
|
background-position: right 90% top 15%;
|
2022-08-09 21:18:17 -04:00
|
|
|
background-size: cover;
|
|
|
|
background-repeat: no-repeat;
|
2022-08-09 21:07:18 -04:00
|
|
|
border-radius: 0 0 1.5rem 100%;
|
2022-08-09 21:18:17 -04:00
|
|
|
transition: width 0.2s ease;
|
2022-08-09 19:13:22 -04:00
|
|
|
}
|
|
|
|
|
2022-08-09 22:17:02 -04:00
|
|
|
html.dark .card-img {
|
|
|
|
background-color: rgb(180, 136, 143);
|
|
|
|
}
|
|
|
|
|
2022-08-09 19:13:22 -04:00
|
|
|
.desc-text {
|
2022-08-09 22:17:02 -04:00
|
|
|
width: 139%;
|
|
|
|
/* 140% is too close */
|
|
|
|
transition: width 0.2s ease;
|
2022-08-09 19:13:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
a.unclickable {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
2022-08-09 21:18:17 -04:00
|
|
|
|
|
|
|
@media screen and (max-width: 720px) {
|
|
|
|
.card-text {
|
|
|
|
width: 30%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.card-img {
|
|
|
|
width: 70%;
|
|
|
|
}
|
2022-08-09 22:17:02 -04:00
|
|
|
|
|
|
|
.desc-text {
|
|
|
|
width: 135%;
|
|
|
|
}
|
2022-08-09 21:18:17 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
@media screen and (max-width: 540px) {
|
|
|
|
.card-text {
|
2022-08-09 22:17:02 -04:00
|
|
|
width: 45%;
|
2022-08-09 21:18:17 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
.card-img {
|
2022-08-09 22:17:02 -04:00
|
|
|
width: 55%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.desc-text {
|
|
|
|
width: 120%;
|
|
|
|
font-size: 0.72rem;
|
2022-08-09 21:18:17 -04:00
|
|
|
}
|
|
|
|
}
|
2022-08-09 19:13:22 -04:00
|
|
|
</style>
|