Skip to content

Commit 2516a20

Browse files
committed
add youtube links
1 parent 72e100d commit 2516a20

File tree

5 files changed

+100
-12
lines changed

5 files changed

+100
-12
lines changed

contents/blogs/01-06-2020-stream-mobile-games/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ title: Stream PUBG or Call Of Duty mobile games to Instagram Live with OBS Studi
77
description: Learn how to stream your mobile gaming sessions of PUBG, Call of duty from Android device to Instagram Live using OBS Studio and Streamon easily.
88
author: Musthaq Ahamad
99
username: haxzie
10+
youtube: https://www.youtube.com/watch?v=TyyuMCTpjNY
1011
keywords:
1112
- instagram
1213
- OBS studio
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from "react"
2+
import styles from "./styles.module.scss"
3+
import PlayButton from "../../images/play-button.svg"
4+
5+
export default function WatchOnYouTubeCard({ link }) {
6+
return (
7+
<div className={styles.watchOnYouTubeCard}>
8+
<img className={styles.playIcon} src={PlayButton} />
9+
10+
<p>
11+
This tutorial is available as a video. <a target="_blank" rel="noopener" href={link}>Watch this tutorial on YouTube</a>
12+
</p>
13+
</div>
14+
)
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
@import "../../styles/setup/mixins";
2+
3+
.watchOnYouTubeCard {
4+
display: flex;
5+
flex-direction: row;
6+
align-items: center;
7+
background-color: #fdad0231;
8+
border-radius: 5px;
9+
margin: 10px 20px;
10+
padding: 15px;
11+
12+
@include respond-below(sm) {
13+
flex-direction: column;
14+
align-items: flex-start;
15+
}
16+
17+
.playIcon {
18+
width: 30px;
19+
height: 30px;
20+
margin: 0 15px 0 0;
21+
22+
@include respond-below(sm) {
23+
margin: 0 0 15px 0;
24+
}
25+
}
26+
27+
p {
28+
color: #e48314;
29+
margin: 0;
30+
31+
a {
32+
color: #a33807;
33+
34+
&:hover {
35+
cursor: pointer;
36+
}
37+
}
38+
}
39+
}

src/images/play-button.svg

+27
Loading

src/templates/BlogTemplate/index.jsx

+18-12
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Layout from "../../components/Layout"
33
import styles from "./styles.module.scss"
44
import GatsbyImage from "gatsby-image"
55
import SEO from "../../components/seo"
6+
import WatchOnYouTubeCard from "../../components/WatchOnYouTubeCard"
67

78
export default function BlogTemplate({ data }) {
89
const { html: contents, frontmatter } = data.markdownRemark
@@ -14,18 +15,16 @@ export default function BlogTemplate({ data }) {
1415
image={frontmatter.cover_image.publicURL}
1516
author={frontmatter.author}
1617
twitterCardType={`summary_large_image`}
17-
meta={
18-
[
19-
{
20-
name: "keywords",
21-
content: frontmatter.keywords.join(',')
22-
},
23-
{
24-
name: "robots",
25-
content: "index, follow"
26-
}
27-
]
28-
}
18+
meta={[
19+
{
20+
name: "keywords",
21+
content: frontmatter.keywords.join(","),
22+
},
23+
{
24+
name: "robots",
25+
content: "index, follow",
26+
},
27+
]}
2928
/>
3029
<div className={styles.blogContainer}>
3130
<h1 className={styles.title}>{frontmatter.title}</h1>
@@ -34,6 +33,12 @@ export default function BlogTemplate({ data }) {
3433
className={styles.cover}
3534
fluid={frontmatter.cover_image.childImageSharp.fluid}
3635
/>
36+
{frontmatter.youtube ? (
37+
<WatchOnYouTubeCard link={frontmatter.youtube} />
38+
) : (
39+
<></>
40+
)}
41+
3742
<div
3843
className={styles.blogContents}
3944
dangerouslySetInnerHTML={{ __html: contents }}
@@ -57,6 +62,7 @@ export const query = graphql`
5762
date(formatString: "DD / MM / YYYY")
5863
author
5964
keywords
65+
youtube
6066
cover_image {
6167
publicURL
6268
childImageSharp {

0 commit comments

Comments
 (0)