Skip to content

Commit

Permalink
feat: studio-clock-obs block
Browse files Browse the repository at this point in the history
  • Loading branch information
resir014 committed Jan 19, 2025
1 parent 50eb266 commit a6eee1f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
25 changes: 19 additions & 6 deletions src/modules/studio-clock/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ import {
} from './components/studio-clock-interface';
import Document from '../_document.astro';
type Props = {
isFullScreen?: boolean;
};
const { searchParams } = Astro.url;
const { isFullScreen } = Astro.props;
const clockProps: StudioClockInterfaceProps = {
uiFont: parseString(searchParams.get('uiFont')),
Expand All @@ -18,12 +23,20 @@ const clockProps: StudioClockInterfaceProps = {

<Document>
<OverlayWrapper>
<div>
<StudioClockInterface {...clockProps} client:only="react">
<slot name="fallback">
<StudioClockInterface {...clockProps} />
</slot>
</StudioClockInterface>
<div
class:list={[
...(isFullScreen
? ['flex w-full h-screen items-center justify-center bg-chungking-black']
: []),
]}
>
<div class:list={[...(isFullScreen ? ['scale-50'] : [])]}>
<StudioClockInterface hideTimezone={isFullScreen} {...clockProps} client:only="react">
<slot name="fallback">
<StudioClockInterface hideTimezone={isFullScreen} {...clockProps} />
</slot>
</StudioClockInterface>
</div>
</div>
</OverlayWrapper>
</Document>
5 changes: 5 additions & 0 deletions src/pages/blocks/studio-clock-obs.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
import StudioClockPage from '~/@studio-clock/index.astro';
---

<StudioClockPage isFullScreen />

0 comments on commit a6eee1f

Please sign in to comment.