From dd912267173da72bf741f0686bd213fedc5c6a70 Mon Sep 17 00:00:00 2001 From: Korbs Date: Thu, 2 Jan 2025 00:17:02 -0500 Subject: [PATCH] Create new Presnetation mode --- src/Presentation/Player.astro | 127 ++++++++++++++++++++++++++++++++++ src/Styles/Presentation.scss | 30 ++++++++ 2 files changed, 157 insertions(+) create mode 100644 src/Presentation/Player.astro create mode 100644 src/Styles/Presentation.scss diff --git a/src/Presentation/Player.astro b/src/Presentation/Player.astro new file mode 100644 index 0000000..41e8c9a --- /dev/null +++ b/src/Presentation/Player.astro @@ -0,0 +1,127 @@ +--- +// Properties +const { + PlayerName, + Video, + Position = "RightBottom", + Inset, + Theme = "255, 255, 255, 0.5", + ThemeBorder = "White", + Loop +} = Astro.props + +// Icons and Styles +import '../Styles/Presentation.scss' +import '../Styles/Iconoir.css' +--- + +
+ + +
+ + + + + +{Inset ? + + : + null +} + +{ + ()=> { + if (Position === "LeftTop") { + return + } + else if (Position === "RightTop") { + return + } + else if (Position === "LeftBottom") { + return + } + else if (Position === "CenterBottom") { + return + } + else if (Position === "RightBottom") { + return + } + } +} \ No newline at end of file diff --git a/src/Styles/Presentation.scss b/src/Styles/Presentation.scss new file mode 100644 index 0000000..302ffa2 --- /dev/null +++ b/src/Styles/Presentation.scss @@ -0,0 +1,30 @@ +.presentation-container { + position: relative; + .video-controls, video { + border-radius: 12px; + } + *:focus-visible { + outline: none; + background: rgba(255, 255, 255, 0.5) !important; + transition: 1s background; + } + video { + width: 100%; + height: 100%; + object-fit: contain; + z-index: 1; + pointer-events: none; + } +} + +#pc-playpause { + position: absolute; + margin: 24px; + color: white; + border: 2px solid; + border-radius: 3rem; + aspect-ratio: 1; + backdrop-filter: blur(6px) contrast(0.8); + cursor: pointer; + padding: 12px; +} \ No newline at end of file