diff --git a/content/projects/sample.yml b/content/projects/sample.yml
index aad90ae2..44b5b792 100644
--- a/content/projects/sample.yml
+++ b/content/projects/sample.yml
@@ -108,6 +108,10 @@ content:
controls: true
muted: true
+ - type: embed
+ content:
+ code: ''
+
- type: text
theme: dark
content:
diff --git a/src/components/Projects/Section/sections/Embed/index.tsx b/src/components/Projects/Section/sections/Embed/index.tsx
new file mode 100644
index 00000000..31b207e3
--- /dev/null
+++ b/src/components/Projects/Section/sections/Embed/index.tsx
@@ -0,0 +1,10 @@
+import React from 'react'
+
+import { IEmbed } from '../../types'
+import { Wrapper } from './styled'
+
+const Embed = (props: IEmbed) => {
+ return
+}
+
+export default Embed
diff --git a/src/components/Projects/Section/sections/Embed/styled.ts b/src/components/Projects/Section/sections/Embed/styled.ts
new file mode 100644
index 00000000..42c9fa19
--- /dev/null
+++ b/src/components/Projects/Section/sections/Embed/styled.ts
@@ -0,0 +1,15 @@
+import styled from '@theme'
+
+export const Wrapper = styled.div`
+ position: relative;
+ padding-bottom: 56.25%; /* 16:9 */
+ height: 0;
+
+ iframe {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ }
+`
diff --git a/src/components/Projects/Section/sections/index.ts b/src/components/Projects/Section/sections/index.ts
index 30cba1da..893920d2 100644
--- a/src/components/Projects/Section/sections/index.ts
+++ b/src/components/Projects/Section/sections/index.ts
@@ -10,3 +10,4 @@ export { default as waterfall } from './Waterfall'
export { default as testimonial } from './Testimonial'
export { default as sticky } from './Sticky'
export { default as highlight } from './Highlight'
+export { default as embed } from './Embed'
diff --git a/src/components/Projects/Section/types.ts b/src/components/Projects/Section/types.ts
index c8b3580f..e79eeef2 100644
--- a/src/components/Projects/Section/types.ts
+++ b/src/components/Projects/Section/types.ts
@@ -111,6 +111,11 @@ export interface IStickyImage extends IStickyBase {
export type ISticky = IStickyVideo | IStickyImage
+// Embed
+export interface IEmbed {
+ code: string
+}
+
// Highlight
export interface IHighlight {
text: string
@@ -128,6 +133,7 @@ export type sectionTypes =
| 'testimonial'
| 'sticky'
| 'highlight'
+ | 'embed'
export type SectionContent =
| IText
| IImage
@@ -139,6 +145,7 @@ export type SectionContent =
| ITestimonial
| ISticky
| IHighlight
+ | IEmbed
export interface ISection {
type: sectionTypes
diff --git a/src/components/Projects/Section/utils.ts b/src/components/Projects/Section/utils.ts
index 24339e7e..096919b2 100644
--- a/src/components/Projects/Section/utils.ts
+++ b/src/components/Projects/Section/utils.ts
@@ -19,6 +19,7 @@ const defaultValues: { [K in sectionTypes]: layoutTypes } = {
video: 'normal',
waterfall: 'large',
highlight: 'normal',
+ embed: 'normal',
}
const getProjectSectionWidth = (type: sectionTypes, layout?: layoutTypes) => {
diff --git a/src/templates/project.tsx b/src/templates/project.tsx
index 74a57262..60d11365 100644
--- a/src/templates/project.tsx
+++ b/src/templates/project.tsx
@@ -322,6 +322,9 @@ export const query = graphql`
# Highlight
#text
+
+ # Embed
+ code
}
}
}