From fe34e7f8d72d0d9aaf6806fd1c3712e72003cc70 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Sun, 22 Aug 2021 15:36:03 +0200 Subject: [PATCH] Add video detail page --- components/md-renderer/mdx-components/a.tsx | 2 +- .../md-renderer/mdx-components/iframe.tsx | 26 +++++++++++---- .../md-renderer/mdx-components/index.tsx | 8 +++-- components/md-renderer/mdx-components/li.tsx | 14 ++++++++ components/md-renderer/mdx-components/ul.tsx | 14 ++++++++ content/videos/system-design-101.md | 20 ++++++++++++ pages/watch/[video].jsx | 32 +++++++++++++++++++ 7 files changed, 106 insertions(+), 10 deletions(-) create mode 100644 components/md-renderer/mdx-components/li.tsx create mode 100644 components/md-renderer/mdx-components/ul.tsx create mode 100644 content/videos/system-design-101.md create mode 100644 pages/watch/[video].jsx diff --git a/components/md-renderer/mdx-components/a.tsx b/components/md-renderer/mdx-components/a.tsx index b2cf16984..3a2601927 100644 --- a/components/md-renderer/mdx-components/a.tsx +++ b/components/md-renderer/mdx-components/a.tsx @@ -11,7 +11,7 @@ export default function EnrichedLink(props: EnrichedLinkProps) { const isExternalUrl = /(^http(s)?:\/\/)|(\.(png|svg|jpeg|jpg)$)/.test(props.href); return ( - + {props.children} ); diff --git a/components/md-renderer/mdx-components/iframe.tsx b/components/md-renderer/mdx-components/iframe.tsx index ae19fda39..d1036eb7b 100644 --- a/components/md-renderer/mdx-components/iframe.tsx +++ b/components/md-renderer/mdx-components/iframe.tsx @@ -1,8 +1,20 @@ -import styled from 'styled-components'; +import { AspectRatio } from '@chakra-ui/react'; -export const IFrame = styled.iframe` - display: block; - width: 100%; - border: none; - margin: 30px auto; -`; \ No newline at end of file +type IFrameProps = { + title: string; + src: string; +}; + +export default function IFrame(props: IFrameProps) { + return ( + +