From 3bec2a70d65027ac30ad3513c2f5ac76bbfee512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Weng?= Date: Tue, 30 Mar 2021 22:23:03 +0200 Subject: [PATCH] Add Base component --- src/layout/Meta.tsx | 55 ------- src/pages/index.tsx | 213 +------------------------- src/templates/Base.tsx | 5 + src/templates/Main.tsx | 74 --------- src/utils/{AppConfig.ts => Config.ts} | 2 +- 5 files changed, 8 insertions(+), 341 deletions(-) delete mode 100644 src/layout/Meta.tsx create mode 100644 src/templates/Base.tsx delete mode 100644 src/templates/Main.tsx rename src/utils/{AppConfig.ts => Config.ts} (84%) diff --git a/src/layout/Meta.tsx b/src/layout/Meta.tsx deleted file mode 100644 index b94d5653c..000000000 --- a/src/layout/Meta.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import React from 'react'; - -import { NextSeo } from 'next-seo'; -import Head from 'next/head'; - -import { AppConfig } from '../utils/AppConfig'; - -type IMetaProps = { - title: string; - description: string; - canonical?: string; -}; - -const Meta = (props: IMetaProps) => ( - <> - - - - - - - - - - -); - -export { Meta }; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 9eeb256bc..76baca2b6 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,216 +1,7 @@ import React from 'react'; -import { Meta } from '../layout/Meta'; -import { Main } from '../templates/Main'; +import { Base } from '../templates/Base'; -const Index = () => ( -
- )} - > - - Nextjs starter banner - -

- Boilerplate code for your Nextjs project with Tailwind CSS -

-

- - 🚀 - - {' '} - Next.js Boilerplate is a starter code for your Next js project by putting developer experience - first . - {' '} - - ⚡️ - - {' '} - Made with - {' '} - - Next.js - - , - {' '} - - ESLint - - , - {' '} - - Prettier - - , - {' '} - - PostCSS - - , - {' '} - - Tailwind CSS - - . -

-

Next js Boilerplate Features

-

Developer experience first:

-
    -
  • - - 🔥 - - {' '} - - Next.js - - {' '} - for Static Site Generator -
  • -
  • - - 🎨 - - {' '} - Integrate with - {' '} - - Tailwind CSS - -
  • -
  • - - 💅 - - {' '} - - PostCSS - - {' '} - for processing - {' '} - - Tailwind CSS - -
  • -
  • - - 🎉 - - {' '} - Type checking Typescript -
  • -
  • - - ✏️ - - {' '} - Linter with - {' '} - - ESLint - -
  • -
  • - - 🛠 - - {' '} - Code Formatter with - {' '} - - Prettier - -
  • -
  • - - 🦊 - - {' '} - SEO metadata, - {' '} - - JSON-LD - - {' '} - and - {' '} - - Open Graph - - {' '} - tags with - {' '} - Next SEO -
  • -
  • - - 🌈 - - {' '} - Include a FREE minimalist theme -
  • -
  • - - 💯 - - {' '} - Maximize lighthouse score -
  • -
-

Built-in feature from Next.js:

-
    -
  • - - ☕ - - {' '} - Minify HTML & CSS -
  • -
  • - - 💨 - - {' '} - Live reload -
  • -
  • - - ✅ - - {' '} - Cache busting -
  • -
-

Our Stater code Philosophy

-
    -
  • Minimal code
  • -
  • SEO-friendly
  • -
  • - - 🚀 - - {' '} - Production-ready -
  • -
-

- Check our GitHub project for more information about - {' '} - Nextjs Boilerplate - . -

-
-); +const Index = () => ; export default Index; diff --git a/src/templates/Base.tsx b/src/templates/Base.tsx new file mode 100644 index 000000000..d1ca59809 --- /dev/null +++ b/src/templates/Base.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +const Base = () =>
; + +export { Base }; diff --git a/src/templates/Main.tsx b/src/templates/Main.tsx deleted file mode 100644 index 262a485a4..000000000 --- a/src/templates/Main.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import React, { ReactNode } from 'react'; - -import Link from 'next/link'; - -import { AppConfig } from '../utils/AppConfig'; - -type IMainProps = { - meta: ReactNode; - children: ReactNode; -}; - -const Main = (props: IMainProps) => ( -
- {props.meta} - -
-
-
-
{AppConfig.title}
-
{AppConfig.description}
-
-
- -
-
- -
{props.children}
- -
- © Copyright - {' '} - {new Date().getFullYear()} - {' '} - {AppConfig.title} - . Powered with - {' '} - - ♥ - - {' '} - by - {' '} - CreativeDesignsGuru - {/* - * PLEASE READ THIS SECTION - * We'll really appreciate if you could have a link to our website - * The link doesn't need to appear on every pages, one link on one page is enough. - * Thank you for your support it'll mean a lot for us. - */} -
-
-
-); - -export { Main }; diff --git a/src/utils/AppConfig.ts b/src/utils/Config.ts similarity index 84% rename from src/utils/AppConfig.ts rename to src/utils/Config.ts index be5516bcc..ddde5210d 100644 --- a/src/utils/AppConfig.ts +++ b/src/utils/Config.ts @@ -1,4 +1,4 @@ -export const AppConfig = { +export const Config = { site_name: 'Starter', title: 'Nextjs Starter', description: 'Starter code for your Nextjs Boilerplate with Tailwind CSS',