-
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
Showing
7 changed files
with
196 additions
and
89 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script> | ||
export let data = { | ||
author: '', | ||
author_link: '', | ||
author_avatar: '' | ||
}; | ||
</script> | ||
|
||
<div class="flex items-center gap-3"> | ||
<a href={`${data.author_link}`}> | ||
<img src={data.author_avatar} alt="" class="w-7 rounded-full" /> | ||
</a> | ||
|
||
<a href={`${data.author_link}`}> {data.author}</a> | ||
</div> |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<script lang="ts"> | ||
import type { Repository } from '$lib/types/repository'; | ||
import Marquee from './marquee.svelte'; | ||
import MarqueeCard from './marquee-card.svelte'; | ||
export let data: Repository[] = []; | ||
let firstRow = data.slice(0, data.length / 2); | ||
let secondRow = data.slice(data.length / 2); | ||
</script> | ||
|
||
<div | ||
class="relative flex h-full w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background py-5 mb-5 md:shadow-xl" | ||
> | ||
<h2 | ||
class="mt-5 scroll-m-20 border-b pb-4 md:text-3xl text-center font-semibold tracking-tight transition-colors first:mt-0" | ||
> | ||
Open 10 source projects in Nigeria | ||
</h2> | ||
<Marquee pauseOnHover class="[--duration:20s]"> | ||
{#each firstRow as item} | ||
<MarqueeCard {...item} /> | ||
{/each} | ||
</Marquee> | ||
<Marquee reverse pauseOnHover class="[--duration:20s]"> | ||
{#each secondRow as item} | ||
<MarqueeCard {...item} /> | ||
{/each} | ||
</Marquee> | ||
<div | ||
class="pointer-events-none absolute inset-y-0 left-0 w-1/3 bg-gradient-to-r from-white dark:from-background" | ||
></div> | ||
<div | ||
class="pointer-events-none absolute inset-y-0 right-0 w-1/3 bg-gradient-to-l from-white dark:from-background" | ||
></div> | ||
</div> |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<script lang="ts"> | ||
import { cn } from '$lib/utils'; | ||
export let author_avatar: string; | ||
export let name: string; | ||
export let author: string; | ||
export let description: string; | ||
</script> | ||
|
||
<figure | ||
class={cn( | ||
'relative w-72 cursor-pointer overflow-hidden rounded-2xl border p-4', | ||
// light styles | ||
'border-gray-950/[.1] bg-gray-950/[.01] hover:bg-gray-950/[.05]', | ||
// dark styles | ||
'dark:border-gray-50/[.1] dark:bg-gray-50/[.10] dark:hover:bg-gray-50/[.15]' | ||
)} | ||
> | ||
<div class="flex flex-row items-center gap-2"> | ||
<img class="rounded-full" width="32" height="32" alt="" src={author_avatar} /> | ||
<div class="flex flex-col"> | ||
<!-- svelte-ignore a11y-structure --> | ||
<figcaption class="text-sm font-medium dark:text-white"> | ||
{name} | ||
</figcaption> | ||
<p class="text-xs font-medium dark:text-white/40">{author}</p> | ||
</div> | ||
</div> | ||
<blockquote class="mt-2 text-sm">{description}</blockquote> | ||
</figure> |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<script lang="ts"> | ||
import { cn } from '$lib/utils'; | ||
export let pauseOnHover: boolean = false; | ||
export let vertical: boolean = false; | ||
export let repeat: number = 4; | ||
export let reverse: boolean = false; | ||
let className: any = ''; | ||
export { className as class }; | ||
</script> | ||
|
||
<div | ||
class={cn( | ||
'group flex overflow-hidden p-2 [--duration:2s] [--gap:1rem] [gap:var(--gap)]', | ||
{ | ||
'flex-row': !vertical, | ||
'flex-col': vertical | ||
}, | ||
className | ||
)} | ||
> | ||
{#each { length: repeat } as _, i (i)} | ||
<div | ||
class={cn('flex shrink-0 justify-around [gap:var(--gap)]', { | ||
'animate-marquee flex-row': !vertical, | ||
'animate-marquee-vertical flex-col': vertical, | ||
'group-hover:[animation-play-state:paused]': pauseOnHover, | ||
'[animation-direction:reverse]': reverse | ||
})} | ||
> | ||
<slot>Default</slot> | ||
</div> | ||
{/each} | ||
</div> |
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
Oops, something went wrong.