From 78dedd0fc7c8a2c984254c917bd9ce9e957f899a Mon Sep 17 00:00:00 2001 From: Phuoc Nguyen Date: Sun, 21 Aug 2022 19:57:30 +0700 Subject: [PATCH] feat: Add follow block --- components/Follow.tsx | 7 +++++++ layouts/PatternLayout.tsx | 2 ++ styles/blocks/_follow.scss | 11 +++++++++++ styles/index.scss | 1 + 4 files changed, 21 insertions(+) create mode 100644 components/Follow.tsx create mode 100644 styles/blocks/_follow.scss diff --git a/components/Follow.tsx b/components/Follow.tsx new file mode 100644 index 0000000..ab07eec --- /dev/null +++ b/components/Follow.tsx @@ -0,0 +1,7 @@ +import * as React from 'react'; + +export const Follow = () => ( +
+ If you find this site helpful, follow me on Twitter and GitHub to get more useful content like this. +
+); diff --git a/layouts/PatternLayout.tsx b/layouts/PatternLayout.tsx index f485c23..8bf4c64 100644 --- a/layouts/PatternLayout.tsx +++ b/layouts/PatternLayout.tsx @@ -3,6 +3,7 @@ import Head from 'next/head'; import { Heading, Spacer } from '@1milligram/design'; import { Ad } from '../components/Ad'; +import { Follow } from '../components/Follow'; import { Pattern } from '../constants/Pattern'; import { slug } from '../utils/slug'; import { Layout } from './Layout'; @@ -38,6 +39,7 @@ export const PatternLayout: React.FC<{ {children} + diff --git a/styles/blocks/_follow.scss b/styles/blocks/_follow.scss new file mode 100644 index 0000000..6a663b3 --- /dev/null +++ b/styles/blocks/_follow.scss @@ -0,0 +1,11 @@ +.block-follow { + background-color: #0465eb; + border-radius: 0.5rem; + color: #fff; + padding: 1rem; + + a { + color: #fff; + text-decoration: underline; + } +} \ No newline at end of file diff --git a/styles/index.scss b/styles/index.scss index 8619a0d..6d2ac81 100644 --- a/styles/index.scss +++ b/styles/index.scss @@ -5,6 +5,7 @@ @import 'blocks/browser-frame'; @import 'blocks/code'; @import 'blocks/cover'; +@import 'blocks/follow'; @import 'blocks/footer'; @import 'blocks/header'; @import 'blocks/layout';