-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'pdelfan:main' into main
- Loading branch information
Showing
23 changed files
with
1,188 additions
and
1,975 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
15 changes: 15 additions & 0 deletions
15
src/app/dashboard/user/[handle]/(post)/post/[id]/quotes/layout.tsx
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 @@ | ||
import Layout from "@/containers/Layout"; | ||
import type { Metadata } from "next"; | ||
|
||
export const metadata: Metadata = { | ||
title: "Ouranos — Quotes", | ||
description: "Quotes for this post", | ||
}; | ||
|
||
export default function RepostedByLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
return <Layout>{children}</Layout>; | ||
} |
21 changes: 21 additions & 0 deletions
21
src/app/dashboard/user/[handle]/(post)/post/[id]/quotes/page.tsx
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,21 @@ | ||
import QuotesContainer from "@/containers/thread/QuotesContainer"; | ||
|
||
interface Props { | ||
params: { | ||
id: string; | ||
handle: string; | ||
}; | ||
} | ||
|
||
export default function Page(props: Props) { | ||
const { id, handle } = props.params; | ||
|
||
return ( | ||
<section> | ||
<h2 className="text-skin-base mb-2 px-3 text-2xl font-semibold md:px-0"> | ||
Quotes | ||
</h2> | ||
<QuotesContainer handle={handle} id={id} /> | ||
</section> | ||
); | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { memo } from "react"; | ||
import { MediaPlayer, MediaProvider, Poster } from "@vidstack/react"; | ||
import { | ||
defaultLayoutIcons, | ||
DefaultVideoLayout, | ||
} from "@vidstack/react/player/layouts/default"; | ||
import "@vidstack/react/player/styles/default/theme.css"; | ||
import "@vidstack/react/player/styles/default/layouts/video.css"; | ||
|
||
interface Props { | ||
aspectRatio: string; | ||
playlist: string; | ||
thumbnail?: string; | ||
alt?: string; | ||
} | ||
|
||
const VideoEmbed = memo(function VideoEmbed(props: Props) { | ||
const { aspectRatio, playlist, thumbnail, alt } = props; | ||
|
||
return ( | ||
<div className="aspect-video mt-2 rounded-md hover:brightness-90 hover:cursor-pointer overflow-hidden"> | ||
<MediaPlayer | ||
crossOrigin | ||
playsInline | ||
viewType="video" | ||
className="w-full h-full object-cover" | ||
src={playlist} | ||
poster={thumbnail ?? ""} | ||
onClick={(e) => e.stopPropagation()} | ||
> | ||
<MediaProvider> | ||
{alt && ( | ||
<Poster | ||
src={thumbnail} | ||
alt={alt} | ||
className="absolute inset-0 block bg-skin-overlay opacity-0 transition-opacity data-[visible]:opacity-100 [&>img]:w-full [&>img]:object-contain" | ||
/> | ||
)} | ||
</MediaProvider> | ||
<DefaultVideoLayout thumbnails={thumbnail} icons={defaultLayoutIcons} /> | ||
</MediaPlayer> | ||
</div> | ||
); | ||
}); | ||
|
||
export default VideoEmbed; |
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
Oops, something went wrong.