basic video section
6 files changed, +34 -15
+1-0twench_landing_page/app/globals.css
| @@ -5,6 +5,7 @@ | ||
| 5 | 5 | :root { |
| 6 | 6 | --background: black; |
| 7 | 7 | --foreground: white; |
| 8 | + --primary: #688c65; | |
| 8 | 9 | --ts-small: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, |
| 9 | 10 | 2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000; |
| 10 | 11 | --ts-medium: 4px 4px 0 #000, -4px -4px 0 #000, 4px -4px 0 #000, |
+12-0twench_landing_page/components/VideoSection/VideoSection.css
| @@ -1,3 +1,15 @@ | ||
| 1 | 1 | .VideoSection { |
| 2 | 2 | @apply w-full h-0 relative; |
| 3 | 3 | } |
| 4 | + | |
| 5 | +.VideoSection .Preview { | |
| 6 | + @apply w-[300px] h-[180px] bg-black border-4 border-primary rounded-md left-1/2 absolute transform -rotate-12 -translate-y-1/2 -translate-x-1/2; | |
| 7 | +} | |
| 8 | + | |
| 9 | +.VideoSection .Preview button { | |
| 10 | + background: url("/svgs/play.svg") no-repeat center center; | |
| 11 | + background-size: cover; | |
| 12 | + @apply w-12 h-12 left-1/2 top-1/2 absolute transform -translate-x-1/2 -translate-y-1/2; | |
| 13 | + filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) | |
| 14 | + contrast(100%); | |
| 15 | +} |
+3-9twench_landing_page/components/VideoSection/VideoSection.tsx
| @@ -3,16 +3,10 @@ import "./VideoSection.css"; | ||
| 3 | 3 | |
| 4 | 4 | const VideoSection: React.FC = () => { |
| 5 | 5 | return ( |
| 6 | - <div className="VideoSection relative w-full"> | |
| 7 | - <div className="Preview absolute left-1/2 transform -translate-x-1/2 -rotate-[20] w-96 h-32"> | |
| 8 | - <div className="PlayButton absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-16 h-16 bg-white rounded-full flex justify-center items-center"> | |
| 9 | - <div className="Triangle w-6 h-6 border-t-2 border-r-2 border-black transform rotate-45"></div> | |
| 10 | - </div> | |
| 6 | + <div className="VideoSection"> | |
| 7 | + <div className="Preview"> | |
| 8 | + <button></button> | |
| 11 | 9 | </div> |
| 12 | - <video className="hidden" controls> | |
| 13 | - <source src="/videos/v2.mp4" type="video/mp4" /> | |
| 14 | - Your browser does not support the video tag. | |
| 15 | - </video> | |
| 16 | 10 | </div> |
| 17 | 11 | ); |
| 18 | 12 | }; |
+11-0twench_landing_page/package-lock.json
| @@ -13,6 +13,7 @@ | ||
| 13 | 13 | "react-dom": "^18" |
| 14 | 14 | }, |
| 15 | 15 | "devDependencies": { |
| 16 | + "@tailwindcss/aspect-ratio": "^0.4.2", | |
| 16 | 17 | "@types/node": "^20", |
| 17 | 18 | "@types/react": "^18", |
| 18 | 19 | "@types/react-dom": "^18", |
| @@ -483,6 +484,16 @@ | ||
| 483 | 484 | "tslib": "^2.4.0" |
| 484 | 485 | } |
| 485 | 486 | }, |
| 487 | + "node_modules/@tailwindcss/aspect-ratio": { | |
| 488 | + "version": "0.4.2", | |
| 489 | + "resolved": "https://registry.npmjs.org/@tailwindcss/aspect-ratio/-/aspect-ratio-0.4.2.tgz", | |
| 490 | + "integrity": "sha512-8QPrypskfBa7QIMuKHg2TA7BqES6vhBrDLOv8Unb6FcFyd3TjKbc6lcmb9UPQHxfl24sXoJ41ux/H7qQQvfaSQ==", | |
| 491 | + "dev": true, | |
| 492 | + "license": "MIT", | |
| 493 | + "peerDependencies": { | |
| 494 | + "tailwindcss": ">=2.0.0 || >=3.0.0 || >=3.0.0-alpha.1" | |
| 495 | + } | |
| 496 | + }, | |
| 486 | 497 | "node_modules/@types/json5": { |
| 487 | 498 | "version": "0.0.29", |
| 488 | 499 | "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", |
+6-5twench_landing_page/package.json
| @@ -9,18 +9,19 @@ | ||
| 9 | 9 | "lint": "next lint" |
| 10 | 10 | }, |
| 11 | 11 | "dependencies": { |
| 12 | + "next": "14.2.15", | |
| 12 | 13 | "react": "^18", |
| 13 | - "react-dom": "^18", | |
| 14 | - "next": "14.2.15" | |
| 14 | + "react-dom": "^18" | |
| 15 | 15 | }, |
| 16 | 16 | "devDependencies": { |
| 17 | - "typescript": "^5", | |
| 17 | + "@tailwindcss/aspect-ratio": "^0.4.2", | |
| 18 | 18 | "@types/node": "^20", |
| 19 | 19 | "@types/react": "^18", |
| 20 | 20 | "@types/react-dom": "^18", |
| 21 | + "eslint": "^8", | |
| 22 | + "eslint-config-next": "14.2.15", | |
| 21 | 23 | "postcss": "^8", |
| 22 | 24 | "tailwindcss": "^3.4.1", |
| 23 | - "eslint": "^8", | |
| 24 | - "eslint-config-next": "14.2.15" | |
| 25 | + "typescript": "^5" | |
| 25 | 26 | } |
| 26 | 27 | } |
+1-1twench_landing_page/tailwind.config.ts
| @@ -12,7 +12,7 @@ const config: Config = { | ||
| 12 | 12 | colors: { |
| 13 | 13 | background: "var(--background)", |
| 14 | 14 | foreground: "var(--foreground)", |
| 15 | - primary: "#394b37", | |
| 15 | + primary: "var(--primary)", | |
| 16 | 16 | }, |
| 17 | 17 | screens: { |
| 18 | 18 | xs: "456px", |