mirror of
https://git.aramjonghu.dev/AramJonghu/aramjonghu-site.git
synced 2026-09-06 15:33:29 +02:00
Merge branch 'alt-stream'
This commit is contained in:
@@ -1,4 +1,14 @@
|
|||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
const streams = [
|
||||||
|
{ id: "aramstream", label: "Aram" },
|
||||||
|
{ id: "generalstream", label: "General" },
|
||||||
|
{ id: "gueststream", label: "Guest" },
|
||||||
|
];
|
||||||
|
|
||||||
export default function Stream() {
|
export default function Stream() {
|
||||||
|
const [activeStream, setActiveStream] = useState("aramstream");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="text-ctp-text flex flex-col min-h-screen px-4 py-6">
|
<div className="text-ctp-text flex flex-col min-h-screen px-4 py-6">
|
||||||
<div className="w-full text-center flex flex-col flex-1">
|
<div className="w-full text-center flex flex-col flex-1">
|
||||||
@@ -6,12 +16,27 @@ export default function Stream() {
|
|||||||
Stream
|
Stream
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
<div className="flex justify-center gap-2 mb-4">
|
||||||
|
{streams.map((s) => (
|
||||||
|
<button
|
||||||
|
key={s.id}
|
||||||
|
onClick={() => setActiveStream(s.id)}
|
||||||
|
className={
|
||||||
|
activeStream === s.id
|
||||||
|
? "ui-btn bg-ctp-surface0 text-ctp-text"
|
||||||
|
: "ui-btn ui-btn:hover"
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{s.label}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="stream-frame w-full mx-auto flex-1 max-h-[85vh]">
|
<div className="stream-frame w-full mx-auto flex-1 max-h-[85vh]">
|
||||||
<iframe
|
<iframe
|
||||||
src="https://stream.aramjonghu.nl"
|
src={`https://stream.aramjonghu.nl/${activeStream}`}
|
||||||
title="Stream"
|
title={activeStream}
|
||||||
allow="autoplay; fullscreen; picture-in-picture"
|
allow="autoplay; fullscreen; picture-in-picture"
|
||||||
loading="lazy"
|
|
||||||
className="w-full h-full border-0 rounded-lg"
|
className="w-full h-full border-0 rounded-lg"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user