-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f3a137
commit fad3629
Showing
5 changed files
with
64 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
<script lang="ts"> | ||
export let project; | ||
export let project; | ||
let slug = project.redirect ? project.redirect : `projects/${project.slug}`; | ||
let isHovered: boolean; | ||
</script> | ||
|
||
<a | ||
href={project.redirect ? project.redirect : `projects/${project.slug}`} | ||
class="flex flex-row {project.image ? 'h-auto' : 'h-40'} p-4 bg-secondary rounded-md shadow-2xl font-poppins mb-4 lg:h-40 w-full max-w-xl items-center hover:scale-[1.01] active:scale-[0.99] transition-all" | ||
class="flex flex-shrink-0 flex-row text-white min-h-24 font-poppins relative gap-2" | ||
href={slug} | ||
onmouseenter={() => (isHovered = true)} | ||
onmouseleave={() => (isHovered = false)} | ||
> | ||
{#if project.image} | ||
<img | ||
src={project.image} | ||
alt={project.title} | ||
class="bg-cover rounded-md h-32 w-32 flex-shrink-0 mr-4 transition-all" | ||
/> | ||
{/if} | ||
<div class="flex flex-col w-full items-start"> | ||
<h2 class="font-bold text-white text-3xl">{project.title}</h2> | ||
<p class="text-white font-semibold {project.image ? 'text-sm lg:text-base' : 'text-xl'}">{project.description}</p> | ||
{#if project.lang} | ||
<p class="text-white {project.image ? 'text-xs lg:text-sm' : 'text-lg md:text-xl'}">{project.lang}</p> | ||
{/if} | ||
<p class="text-white {project.image ? 'text-xs lg:text-sm' : 'text-xl'}">{project.date}</p> | ||
</div> | ||
</a> | ||
{#if project.image} | ||
<img src={project.image} class="h-32 w-32 rounded-md flex-shrink-0 flex" alt={project.title} /> | ||
{/if} | ||
|
||
<div class="flex flex-shrink items-start justify-center flex-col w-full"> | ||
<p class="text-xl font-bold">{project.title}</p> | ||
<p>{project.description}</p> | ||
</div> | ||
|
||
<p class="absolute -bottom-2 w-full bg-white h-1 flex {isHovered ? "opacity-100" : "opacity-0"} transition-all"></p> | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters