diff --git a/src/contents/Counter.tsx b/src/contents/Counter.tsx index 5d097b4..5662087 100644 --- a/src/contents/Counter.tsx +++ b/src/contents/Counter.tsx @@ -85,11 +85,10 @@ function CounterRenderer({ content }: RendererProps) { display: 'flex', alignItems: 'center', justifyContent: 'center', - border: '1px solid black', - fontSize: '20px', + fontSize: content.fontSize, }} > - {content.paused ? 'Paused' : content.count} + {content.count} ); } diff --git a/src/contents/Text.tsx b/src/contents/Text.tsx index 2a3858f..14d6ad6 100644 --- a/src/contents/Text.tsx +++ b/src/contents/Text.tsx @@ -60,7 +60,7 @@ function TextRenderer({ content }: RendererProps) { color: content.color, // textAlign: content.alignment as 'left' | 'center' | 'right', }} - className="flex items-center justify-center border border-gray-300" + className="flex items-center justify-center" > {content.text} diff --git a/src/contents/types.ts b/src/contents/types.ts index 8e62e1f..d809d7e 100644 --- a/src/contents/types.ts +++ b/src/contents/types.ts @@ -3,14 +3,14 @@ export type Position = { top: string; left: string }; // Position coordinates fo export type Size = { width: string; height: string }; // Size dimensions for content // Content Types -export interface BaseContent { - id: string; // Unique identifier for the content - name?: string; // Name of the content - type: 'image' | 'video' | 'audio' | 'text' | 'counter'; // Type of content - show: boolean; // Visibility toggle - position: Position; // Content's position on screen - size: Size; // Dimensions of the content - layout?: any; // for positioning in the controller grid +interface BaseContent { + id: string; + name?: string; + type: 'image' | 'video' | 'audio' | 'text' | 'counter'; + show: boolean; + position: Position; + size: Size; + layout?: any; } export interface ImageContent extends BaseContent { @@ -28,22 +28,24 @@ export interface VideoContent extends BaseContent { export interface AudioContent extends BaseContent { type: 'audio'; - file: string; // Base64-encoded audio file - autoplay?: boolean; // Autoplay toggle - loop?: boolean; // Loop playback toggle - volume: number; // Volume level (0 to 100) + file: string; + autoplay?: boolean; + loop?: boolean; + volume: number; } export interface TextContent extends BaseContent { type: 'text'; - text: string; // The text string to display - fontSize: string; // Font size (e.g., "16px") - color: string; // Font color (e.g., "#000000") + text: string; + fontSize: string; + color: string; } export interface CounterContent extends BaseContent { type: 'counter'; count: number; + fontSize: string; + color: string; paused: boolean; } diff --git a/src/renderer/App.css b/src/renderer/App.css index b5c61c9..1ef2128 100644 --- a/src/renderer/App.css +++ b/src/renderer/App.css @@ -1,3 +1,10 @@ @tailwind base; @tailwind components; @tailwind utilities; + +@font-face { + font-family: 'Mahmood'; + src: url('./Mahmood-Regular.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} diff --git a/src/renderer/App.tsx b/src/renderer/App.tsx index dd4461b..af7e10b 100644 --- a/src/renderer/App.tsx +++ b/src/renderer/App.tsx @@ -1,7 +1,5 @@ import { HashRouter as Router, Routes, Route } from 'react-router-dom'; import './App.css'; -import 'react-grid-layout/css/styles.css'; -import 'react-resizable/css/styles.css'; import { ControllerPanel } from './pages/ControllerPanel'; import { ProjectorPanel } from './pages/ProjectorPanel'; diff --git a/src/renderer/Mahmood-Regular.ttf b/src/renderer/Mahmood-Regular.ttf new file mode 100644 index 0000000..1277204 Binary files /dev/null and b/src/renderer/Mahmood-Regular.ttf differ diff --git a/src/renderer/pages/Controller.css b/src/renderer/pages/Controller.css index 6da5407..786cdea 100644 --- a/src/renderer/pages/Controller.css +++ b/src/renderer/pages/Controller.css @@ -1,3 +1,7 @@ +body { + @apply font-sans; +} + .ctrl-main { display: flex; flex-direction: row; diff --git a/src/renderer/pages/ControllerPanel.tsx b/src/renderer/pages/ControllerPanel.tsx index 95702a5..59bf717 100644 --- a/src/renderer/pages/ControllerPanel.tsx +++ b/src/renderer/pages/ControllerPanel.tsx @@ -9,6 +9,8 @@ import { import { getFileBlob, revokeBlobUrl } from '../../fileUtils'; import { ContentControllerFactory } from '../../contents/ContentControllerFactory'; import type { Content } from '../../contents/types'; +import 'react-grid-layout/css/styles.css'; +import 'react-resizable/css/styles.css'; import './Controller.css'; const getDefaultHeight = (type: string) => { @@ -122,7 +124,7 @@ export const ControllerPanel: React.FC = () => { }; return ( -
+
{/* Top Bar */}
diff --git a/src/renderer/pages/Projector.css b/src/renderer/pages/Projector.css index cfeaef2..30a200d 100644 --- a/src/renderer/pages/Projector.css +++ b/src/renderer/pages/Projector.css @@ -2,11 +2,11 @@ * Projector.css */ body { + @apply font-mahmood; position: relative; background-color: #000; color: white; height: 100vh; - font-family: sans-serif; overflow-y: hidden; display: flex; justify-content: center; @@ -33,7 +33,6 @@ body { display: none; } - .proj-counter-wrapper { /* Positioned absolutely based on inline styles */ padding: 10px; @@ -41,7 +40,7 @@ body { z-index: 10; margin: 10px; padding: 2rem; - background-color: #FFF; + background-color: #fff; text-align: center; } diff --git a/tailwind.config.js b/tailwind.config.js index 08714d6..b1f6fd5 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -2,7 +2,11 @@ module.exports = { content: ['./src/**/*.{html,ts,tsx,js,jsx}'], theme: { - extend: {}, + extend: { + fontFamily: { + mahmood: ['Mahmood', 'sans-serif'], + }, + }, }, plugins: [], };