├── .env.development ├── .github └── FUNDING.yml ├── .gitignore ├── .prettierignore ├── .prettierrc ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── gatsby-browser.js ├── gatsby-config.js ├── gatsby-node.js ├── package.json ├── src ├── assets │ ├── _base.scss │ ├── _general.scss │ ├── _reset.scss │ ├── _vars.scss │ ├── images │ │ └── home.png │ └── main.scss ├── components │ ├── Article_page │ │ ├── MainBlog.jsx │ │ ├── Post.jsx │ │ ├── Share.jsx │ │ └── Sidebar.jsx │ ├── Footer.js │ ├── Head.js │ ├── Header.js │ ├── Layout.js │ ├── Loader.js │ ├── Mode.js │ ├── Subscribe.js │ └── main_page │ │ ├── Articles.jsx │ │ ├── LatestPost.jsx │ │ ├── MainPage.jsx │ │ └── Sidebar.jsx ├── context.js ├── pages │ ├── 404.js │ └── index.js ├── posts │ └── intro_to_the_react │ │ ├── react.md │ │ └── stdt.jpg └── templates │ └── blog.js └── static └── favicon.ico /.env.development: -------------------------------------------------------------------------------- 1 | GATSBY_GRAPHQL_IDE=playground -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: patreon:ckbhatia 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: ko_fi:ckbhatia 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: issuehunt:@ckbhatia 11 | otechie: # Replace with a single Otechie username 12 | custom: ['paypal.me/ckbhatia'] 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (http://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # Typescript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # dotenv environment variables file 55 | .env 56 | 57 | # gatsby files 58 | .cache/ 59 | public 60 | 61 | # Mac files 62 | .DS_Store 63 | 64 | # Yarn 65 | yarn-error.log 66 | .pnp/ 67 | .pnp.js 68 | yarn.lock 69 | 70 | # Yarn Integrity file 71 | .yarn-integrity 72 | 73 | # others 74 | package-lock.json 75 | .env.development 76 | .env.production 77 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .cache 2 | package.json 3 | package-lock.json 4 | public 5 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "endOfLine": "lf", 3 | "semi": true, 4 | "singleQuote": false, 5 | "tabWidth": 2, 6 | "trailingComma": "es5" 7 | } 8 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Ck gatsby blog starter Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at chetansain86@gmail.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to CK gatsby blog starter 2 | 3 | If you would like to contribute code you can do so through GitHub by staring and forking the repository and sending a pull request. 4 | When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. 5 | 6 | You are bound to follow code of conduct of this project when you contribute to this project or repo. So, please refer to that first: [CODE OF CONDUCT](https://github.com/Ckbhatia/Ck-gatsby-blog/CODE_OF_CONDUCT.md) 7 | 8 | ## Reporting issues & features requests 9 | If you notice any bugs in the app, see some code that can be improved, or have features you would like to be added, please create a bug report or a feature request! 10 | 11 | If you want to open a PR that fixes a bug or adds a feature, then we can't thank you enough! It is definitely appreciated if an issue has been created before-hand so it can be discussed first. 12 | 13 | ## Working on issues 14 | 15 | Please feel free to take on any issue that's currently open. Feel free to resolve any issue that you would enjoy working on even if it happens to be a low priority. 16 | 17 | ## Submitting a PR 18 | - For every PR there should be an accompanying issue which the PR solves 19 | - The PR itself should only contain code which is the solution for the given issue 20 | - If you are a first time contributor check if there is a [suitable issue](https://github.com/Ckbhatia/Ck-gatsby-blog/labels/good%20first%20issue) for you 21 | 22 | ## Financial contributions 23 | We also welcome financial contributions. If we get enough fund. We could fund most issues that people want to fix or build. It help us to grow better and faster. 24 | 25 | ## License 26 | 27 | By contributing your code, you agree to license your contribution under the terms of the [MIT](https://github.com/Hexworks/zircon/blob/master/LICENSE) license. 28 | All files are released with the MIT license. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 gatsbyjs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | Ck Gatsby 4 | 5 |

6 |

7 | Ck Gatsby blog starter 8 |

9 | 10 |

A beautiful and featureful gatsby blog starter for bloggers!

11 |   12 | 13 |
14 | 15 | [![Build Status](https://travis-ci.org/athityakumar/colorls.svg?branch=master)](https://travis-ci.org/athityakumar/colorls) 16 | [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=shields)](https://github.com/Ckbhatia/Ck-gatsby-blog/pulls) 17 | [![License](https://img.shields.io/github/license/day8/re-frame.svg)](license.txt) 18 | [![Live Demo](https://img.shields.io/badge/demo-online-green.svg)](https://chetanblog.netlify.com) 19 | 20 |
21 | 22 | landing page 23 | 24 |   25 | 26 | ## Table of contents 27 | + [Features](http://github.com/ckbhatia/Ck-gatsby-blog#features) 28 | + [Quick Start](http://github.com/ckbhatia/Ck-gatsby-blog#quick-start) 29 | + [Set-up contentful CMS](http://github.com/ckbhatia/Ck-gatsby-blog#set-up) 30 | + [Deploy with Netlify](http://github.com/ckbhatia/Ck-gatsby-blog#deploy-with-netlify) 31 | + [Contributing](#contributing) 32 | + [Folder Structure](http://github.com/ckbhatia/Ck-gatsby-blog#folder-structure) 33 | + [License](http://github.com/ckbhatia/Ck-gatsby-blog#license) 34 | 35 | ## Features 36 | + Beautiful layout 37 | + Dark Mode 38 | + Beautiful typography 39 | + Code highlighting 40 | + Filter by topics ( upcoming ) 41 | + Search articles ( upcoming ) 42 | + Pagination support ( upcoming ) 43 | + Mobile-Support 44 | + [Contentful CMS](http://contentful.com) support 45 | 46 | **Request** to users, contributors and visitors. Please :star: star the repo to increase its reach. 47 | It will help us to reach more users and contributors. So, they can support this beautiful project. 48 | 49 | 50 | ## Quick Start 51 | 52 | #### Create a Gatsby site 53 | 54 | Use the Gatsby CLI to create a new site, specifying the Ck gatsby starter. 55 | 56 | ```sh 57 | # Create a new Gatsby blog site using the Ck blog gatsby starter 58 | gatsby new https://github.com/Ckbhatia/Ck-gatsby-blog 59 | ``` 60 | 61 | #### Start Developing 62 | 63 | Navigate into your new site’s directory and start it up. 64 | 65 | ```sh 66 | cd blog 67 | gatsby develop 68 | ``` 69 | 70 | #### Open the source code and start editing! 71 | 72 | Your site is now running at `http://localhost:8000`! 73 | 74 | Note: You'll also see a second link: `http://localhost:8000/___graphql`. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the [Gatsby tutorial](https://www.gatsbyjs.org/tutorial/part-five/#introducing-graphiql). 75 | 76 | #### Access Locally 77 | ``` 78 | $ git clone https://github.com/[GITHUB_USERNAME]/[REPO_NAME].git 79 | $ cd [REPO_NAME] 80 | $ yarn 81 | $ npm run develop 82 | ``` 83 | 84 | ## Set-up contentful CMS 85 | 86 | It's optional to set-up contentful CMS. 87 | 88 | You can use any other CMS or create MDX files in this app. 89 | 90 | Note: You need to modify config for other CMS or MDX else set-up contentful CMS to use this project. 91 | 92 | - Create an account on contentful.com 93 | - Navigate to the content model; click on add content type. 94 | - Name it anything, for ex: blog. 95 | - Click on Add field, create fields one by one. 96 | 97 | There are seven types of fields required. 98 | 99 | | Name | Field ID | Appearance | Other | 100 | |---|---|:-:|---| 101 | | Title | title | Short Text | Entry File | 102 | | Slug | slug | Short | 103 | | Thumbnail | thumbnail | Media | 104 | | Topic | topic | Short Text | 105 | | Author | author | Short Text | 106 | | Published | published | Date & Time | 107 | | Body | body | Rich Text | 108 | 109 | Note: Field ID is case sensitive. 110 | 111 | You can also use this pre-built [content model](https://gist.github.com/Ckbhatia/c8f85f2b9c0a842f344c9f48a08bb836) 112 | 113 | ### Config contentful 114 | 115 | - Go to settings of contentful.com and click on API Key. 116 | - Click on "Example Key 1", you can rename this. 117 | - Copy Space ID and Content Delivery API - access token. 118 | - Now, Navigate to your local copy of this repo. 119 | - Create .env.development and .env.production file. 120 | - Put these variables inside and save the file. 121 | ``` 122 | CONTENTFUL_SPACE_ID= 123 | CONTENTFUL_ACCESS_TOKEN= 124 | ``` 125 | 126 | For Demo app: 127 | ``` 128 | CONTENTFUL_SPACE_ID=zorf8a5obm1d 129 | CONTENTFUL_ACCESS_TOKEN=v4WRlGF6fTfBUrP54Hbaiava6VjPgKbW8mFEOgzEiPY 130 | ``` 131 | 132 | Note: contributors can use these credentials and skip to set-up their own contentful CMS. 133 | 134 | ### Publishing article with contentful 135 | - Navigate to content on contentful.com 136 | - Click on Add Blog Post button to create a post. 137 | - Write your article and fill all the required fields. 138 | - Publish your blog and deploy or re-deploy your own copy of this repo. 139 | 140 | 141 | ## Deploy with Netlify 142 | 143 | Click the button below to build and deploy your own copy of the repository: 144 | 145 | Deploy to Netlify 146 | 147 | # Contributing 148 | 149 | Your contributions are always welcome! Please have a look at the [contribution guidelines](CONTRIBUTING.md) first. :tada: 150 | 151 | ## Folder Structure 152 | 153 | ``` 154 | └── Public 155 | └── static 156 | └── favicon 157 | └── src 158 | ├── assets 159 | │ ├── _base 160 | │ ├── _general 161 | │ ├── _reset 162 | │ ├── _vars 163 | │ └── main 164 | ├── components 165 | │ ├── Article_page 166 | | | ├── MainBlog 167 | | | ├── Post 168 | | | ├── Share 169 | | | └── Sidebar 170 | | ├── Main_page 171 | | | ├── Article 172 | | | ├── LatestPost 173 | | | ├── MainPage 174 | | | └── Sidebar 175 | │ ├── Footer 176 | │ ├── Head 177 | │ ├── Header 178 | │ ├── Layout 179 | │ ├── Loader 180 | │ ├── Mode 181 | │ └── Subscribe 182 | ├── Pages 183 | │ ├── 404 184 | │ └── Index 185 | ├── Posts 186 | ├── templates 187 | │ └── blog 188 | └── Context 189 | 190 | ``` 191 | 192 | ## License 193 | The MIT License (MIT) 194 | 195 | Copyright (c) 2020 Chetan Kumar 196 | -------------------------------------------------------------------------------- /gatsby-browser.js: -------------------------------------------------------------------------------- 1 | require("prismjs/themes/prism-solarizedlight.css"); -------------------------------------------------------------------------------- /gatsby-config.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config({ 2 | path: `.env.${process.env.NODE_ENV}`, 3 | }); 4 | 5 | module.exports = { 6 | siteMetadata: { 7 | title: "Chetan", 8 | author: "Chetan Kumar", 9 | }, 10 | plugins: [ 11 | "gatsby-plugin-react-helmet", 12 | { 13 | resolve: "gatsby-source-contentful", 14 | options: { 15 | spaceId: process.env.CONTENTFUL_SPACE_ID, 16 | accessToken: process.env.CONTENTFUL_ACCESS_TOKEN, 17 | }, 18 | }, 19 | `gatsby-plugin-sass`, 20 | `gatsby-plugin-styled-components`, 21 | { 22 | resolve: `gatsby-source-filesystem`, 23 | options: { 24 | name: `posts`, 25 | path: `${__dirname}/src/posts/`, 26 | }, 27 | }, 28 | "gatsby-plugin-sharp", 29 | { 30 | resolve: "gatsby-transformer-remark", 31 | options: { 32 | plugins: [ 33 | { 34 | resolve: "gatsby-remark-images", 35 | options: { 36 | maxWidth: 750, 37 | linkImagesToOriginal: false, 38 | }, 39 | }, 40 | { 41 | resolve: "gatsby-remark-prismjs", 42 | }, 43 | ], 44 | }, 45 | }, 46 | ], 47 | }; 48 | -------------------------------------------------------------------------------- /gatsby-node.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | 3 | module.exports.createPages = async ({ graphql, actions }) => { 4 | const { createPage } = actions; 5 | const blogTemplate = path.resolve("./src/templates/blog.js"); 6 | const res = await graphql(` 7 | query { 8 | allContentfulBlogPost { 9 | edges { 10 | node { 11 | slug 12 | } 13 | } 14 | } 15 | } 16 | `); 17 | 18 | res.data.allContentfulBlogPost.edges.forEach(edge => { 19 | createPage({ 20 | component: blogTemplate, 21 | path: `/blog/${edge.node.slug}`, 22 | context: { 23 | slug: edge.node.slug, 24 | }, 25 | }); 26 | }); 27 | }; 28 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Ck-gatsby-blog-starter", 3 | "private": true, 4 | "description": "An attractive and full of features gatsby blog starter with ck newsletter integration", 5 | "version": "1.0.0", 6 | "license": "MIT", 7 | "scripts": { 8 | "build": "gatsby build", 9 | "develop": "env-cmd -f .env.production gatsby develop", 10 | "format": "prettier --write \"**/*.{js,jsx,json,md}\"", 11 | "start": "npm run develop", 12 | "serve": "gatsby serve", 13 | "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing \"", 14 | "predeploy": "yarn run build", 15 | "deploy": "gh-pages -d build" 16 | }, 17 | "dependencies": { 18 | "@contentful/rich-text-react-renderer": "^13.4.0", 19 | "babel-plugin-styled-components": "^1.10.7", 20 | "bootstrap": "^4.4.1", 21 | "gatsby": "^2.13.73", 22 | "gatsby-cli": "^2.12.102", 23 | "gatsby-image": "^2.4.20", 24 | "gatsby-plugin-react-helmet": "3.0.12", 25 | "gatsby-plugin-sass": "^2.1.26", 26 | "gatsby-plugin-sharp": "^2.3.13", 27 | "gatsby-plugin-styled-components": "^3.1.19", 28 | "gatsby-remark-images": "^3.1.42", 29 | "gatsby-remark-prismjs": "^3.5.15", 30 | "gatsby-remark-relative-images": "^0.2.3", 31 | "gatsby-source-contentful": "^2.1.84", 32 | "gatsby-source-filesystem": "^2.1.46", 33 | "gatsby-transformer-remark": "^2.8.37", 34 | "gh-pages": "^2.2.0", 35 | "jquery": "^3.4.1", 36 | "node-sass": "^4.13.0", 37 | "popper.js": "^1.15.0", 38 | "prismjs": "^1.21.0", 39 | "react": "^16.9.0", 40 | "react-bootstrap": "^1.0.0-beta.16", 41 | "react-dom": "^16.9.0", 42 | "react-helmet": "5.2.0", 43 | "react-icons": "^3.8.0", 44 | "styled-components": "^5.0.1" 45 | }, 46 | "devDependencies": { 47 | "env-cmd": "^10.0.1", 48 | "prettier": "^1.18.2" 49 | }, 50 | "repository": { 51 | "type": "git", 52 | "url": "https://github.com/Ckbhatia/Ck-gatsby-blog" 53 | }, 54 | "bugs": { 55 | "url": "https://github.com/Ckbhatia/Ck-gatsby-blog/issues" 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/assets/_base.scss: -------------------------------------------------------------------------------- 1 | // ================================ 2 | // General style 3 | // ================================ 4 | 5 | // Root Element 6 | html { 7 | font-size: 14px; 8 | font-family: $font-family; 9 | letter-spacing: 0.04em; 10 | line-height: 1.5; 11 | scroll-behavior: smooth; 12 | } 13 | 14 | // Align items 15 | .text-center { 16 | text-align: center; 17 | } 18 | .text-right { 19 | text-align: right; 20 | } 21 | .text-left { 22 | text-align: left; 23 | } 24 | 25 | // Form elements 26 | .form-control { 27 | display: block; 28 | width: 100%; 29 | padding: 0.8rem 0.8rem; 30 | border: 0; 31 | border-radius: 4px; 32 | font-size: 1rem; 33 | font-weight: 300; 34 | letter-spacing: 0.05em; 35 | } 36 | 37 | // Responsive image 38 | .img-responsive { 39 | display: block; 40 | max-width: 100%; 41 | height: auto; 42 | } 43 | 44 | // Center Elemets within its parent 45 | .center-child { 46 | display: grid; 47 | place-items: center; 48 | } 49 | 50 | // Bacground colors for sections 51 | .bg-primary { 52 | background: $secondary_background; 53 | } 54 | 55 | // cleafix, cotaining floats 56 | .clearfix { 57 | *zoom: 1; 58 | &:before, 59 | &:after { 60 | display: table; 61 | content: ""; 62 | line-height: 0; 63 | } 64 | &:after { 65 | clear: both; 66 | } 67 | } 68 | 69 | // basic flexbox class 70 | .flex-between { 71 | @extend %flex-between; 72 | } 73 | 74 | .flex-center { 75 | @extend %flex-center; 76 | } 77 | 78 | .flex-start { 79 | @extend %flex-start; 80 | } 81 | 82 | @media all and (max-width: 992px) { 83 | html { 84 | font-size: 14px; 85 | } 86 | } 87 | 88 | @media all and (max-width: 768px) { 89 | html { 90 | font-size: 12px; 91 | } 92 | } 93 | 94 | @media all and (max-width: 600px) { 95 | html { 96 | font-size: 10px; 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /src/assets/_general.scss: -------------------------------------------------------------------------------- 1 | *, 2 | *::before, 3 | *::after { 4 | box-sizing: border-box; 5 | } 6 | .wrapper { 7 | width: 100%; 8 | max-width: 1120px; 9 | margin: 0 auto; 10 | padding: 0 1rem; 11 | } 12 | 13 | /** Custom CSS **/ 14 | 15 | // Container background 16 | .container-bg-light { 17 | background-color: secondary_background; 18 | } 19 | 20 | .container-bg-dark { 21 | // background-color: $background-dark; 22 | background-color: #232129; 23 | } 24 | 25 | // Just headers 26 | .header-text-light { 27 | color: $text_light_dark; 28 | } 29 | 30 | .header-text-dark { 31 | color: $secondary_light; 32 | } 33 | 34 | // It is for all type of headings ( light mode ) 35 | .heading-light { 36 | color: $text_color; 37 | } 38 | 39 | .heading-dark { 40 | color: $text-color-secondary; 41 | } 42 | 43 | // Sub heading 44 | .sub-heading-text-light { 45 | color: $text_light_dark; 46 | } 47 | 48 | .sub-heading-text-dark { 49 | color: $secondary_light; 50 | } 51 | 52 | // Just for paragraph text 53 | .para-text-light { 54 | color: $text_light_dark; 55 | } 56 | 57 | .para-text-dark { 58 | color: $text_color_secondary; 59 | } 60 | 61 | // Just for text 62 | .text-light { 63 | color: $text_light_dark !important; 64 | } 65 | 66 | .text-dark { 67 | color: $text_color_secondary !important; 68 | } 69 | 70 | // Buttons 71 | .btn-light { 72 | color: $dark_black; 73 | } 74 | 75 | .btn-dark { 76 | color: $primary_white; 77 | } 78 | 79 | // Footer 80 | .footer-bg-light { 81 | background-color: #f1f2fa; 82 | } 83 | 84 | .footer-bg-dark { 85 | // background-color: $background-secondary; 86 | background-color: #2a2731; 87 | } 88 | 89 | .read-more-btn-light{ 90 | background: white; 91 | color: #627af1; 92 | box-shadow: 0px 0px 5px 2px rgba(0, 0, 255,0.07); 93 | 94 | } 95 | .read-more-btn-light:hover{ 96 | box-shadow: 0px 0px 5px 2px rgba(0, 0, 255,0.10); 97 | } 98 | .read-more-btn-dark{ 99 | background: #f1f2fc; 100 | color: #8189a9; 101 | box-shadow: 0px 0px 5px 2px rgba(255, 255, 255,0.40); 102 | 103 | } 104 | .read-more-btn-dark:hover{ 105 | box-shadow: 0px 0px 5px 2px rgba(255, 255, 255,0.55); 106 | } -------------------------------------------------------------------------------- /src/assets/_reset.scss: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ 2 | v2.0 | 20110126 3 | License: none (public domain) 4 | */ 5 | 6 | html, 7 | body, 8 | div, 9 | span, 10 | applet, 11 | object, 12 | iframe, 13 | h1, 14 | h2, 15 | h3, 16 | h4, 17 | h5, 18 | h6, 19 | p, 20 | blockquote, 21 | pre, 22 | a, 23 | abbr, 24 | acronym, 25 | address, 26 | big, 27 | cite, 28 | code, 29 | del, 30 | dfn, 31 | em, 32 | img, 33 | ins, 34 | kbd, 35 | q, 36 | s, 37 | samp, 38 | small, 39 | strike, 40 | strong, 41 | sub, 42 | sup, 43 | tt, 44 | var, 45 | b, 46 | u, 47 | i, 48 | center, 49 | dl, 50 | dt, 51 | dd, 52 | ol, 53 | ul, 54 | li, 55 | fieldset, 56 | form, 57 | label, 58 | legend, 59 | table, 60 | caption, 61 | tbody, 62 | tfoot, 63 | thead, 64 | tr, 65 | th, 66 | td, 67 | article, 68 | aside, 69 | canvas, 70 | details, 71 | embed, 72 | figure, 73 | figcaption, 74 | footer, 75 | header, 76 | hgroup, 77 | menu, 78 | nav, 79 | output, 80 | ruby, 81 | section, 82 | summary, 83 | time, 84 | mark, 85 | audio, 86 | video { 87 | margin: 0; 88 | padding: 0; 89 | border: 0; 90 | font-size: 100%; 91 | font: inherit; 92 | vertical-align: baseline; 93 | } 94 | /* HTML5 display-role reset for older browsers */ 95 | article, 96 | aside, 97 | details, 98 | figcaption, 99 | figure, 100 | footer, 101 | header, 102 | hgroup, 103 | menu, 104 | nav, 105 | section { 106 | display: block; 107 | } 108 | // body { 109 | // line-height: 1; 110 | // } 111 | ol, 112 | ul { 113 | list-style: none; 114 | } 115 | blockquote, 116 | q { 117 | quotes: none; 118 | } 119 | blockquote:before, 120 | blockquote:after, 121 | q:before, 122 | q:after { 123 | content: ""; 124 | content: none; 125 | } 126 | table { 127 | border-collapse: collapse; 128 | border-spacing: 0; 129 | } 130 | -------------------------------------------------------------------------------- /src/assets/_vars.scss: -------------------------------------------------------------------------------- 1 | // ========================= 2 | // Variables 3 | // ========================= 4 | 5 | $font_family: "Roboto", sans-serif; 6 | $primary_color: #12ab87; 7 | $secondary_color: #ffffff; 8 | $background-dark: #131217; 9 | $background-secondary: #232129; 10 | $text_color: #2b2d38; 11 | $text_color_secondary: rgba(245, 245, 245, 0.9); 12 | $text_color_teritiary: #777777; 13 | $secondary_background: #f7f7f7; 14 | $dark_black: #080808; 15 | $primary_white: #fff; 16 | $secondary_light: #dddddd; 17 | $secondary_dark: #1c1e29; 18 | $text_light_dark: #3b3e4d; 19 | $textDark: #080808; 20 | 21 | // ========================= 22 | // Mixins 23 | // ========================= 24 | 25 | %flex-between { 26 | display: -webkit-box; 27 | display: -ms-flexbox; 28 | display: flex; 29 | -webkit-box-pack: justify; 30 | -ms-flex-pack: justify; 31 | justify-content: space-between; 32 | -webkit-box-align: center; 33 | -ms-flex-align: center; 34 | align-items: center; 35 | } 36 | 37 | %flex-start { 38 | display: -webkit-box; 39 | display: -ms-flexbox; 40 | display: flex; 41 | justify-content: flex-start; 42 | -webkit-box-align: center; 43 | -ms-flex-align: center; 44 | align-items: center; 45 | } 46 | 47 | %flex-center { 48 | display: -webkit-box; 49 | display: -ms-flexbox; 50 | display: flex; 51 | -webkit-box-pack: center; 52 | -ms-flex-pack: center; 53 | justify-content: center; 54 | -webkit-box-align: center; 55 | -ms-flex-align: center; 56 | align-items: center; 57 | } 58 | -------------------------------------------------------------------------------- /src/assets/images/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ckbhatia/Ck-gatsby-blog/e5fa1aa430109c41fc381c9a0e8696393db2a550/src/assets/images/home.png -------------------------------------------------------------------------------- /src/assets/main.scss: -------------------------------------------------------------------------------- 1 | @import "reset"; 2 | @import "vars"; 3 | @import "base"; 4 | @import "general"; 5 | 6 | .main-blog-container { 7 | height: 100%; 8 | display: grid; 9 | grid-template-columns: repeat(12, 8.33%); 10 | grid-template-rows: 20% 15% 70%; 11 | 12 | @media screen and (max-width: 768px) { 13 | grid-template-rows: 15% 17% 70%; 14 | } 15 | } 16 | 17 | .post-container { 18 | grid-row: 1 / span 3; 19 | grid-column: 3 / span 8; 20 | } 21 | 22 | .post-sidebar-container { 23 | grid-row-start: 1; 24 | grid-column: 1 / span 2; 25 | } 26 | 27 | .post-social-share-container { 28 | grid-row-start: 2; 29 | } 30 | 31 | @media screen and (max-width: 768px) { 32 | .post-container { 33 | grid-row-start: 1; 34 | grid-column: 2 / span 10; 35 | } 36 | .post-sidebar-container { 37 | margin: 1rem 0 !important; 38 | grid-gap: 10px !important; 39 | grid-row-start: 2; 40 | grid-column: 2 / span 10; 41 | 42 | grid-template-rows: 100% !important; 43 | grid-template-columns: 100% !important; 44 | } 45 | .post-info-container { 46 | // padding: 1rem 1rem; 47 | border-radius: 4px; 48 | 49 | // grid-row-start: 2; 50 | grid-gap: 0 !important; 51 | display: grid; 52 | grid-template-columns: repeat(4, max-content); 53 | justify-items: start; 54 | align-items: center; 55 | } 56 | .post-extra-info-container { 57 | margin-left: 1rem; 58 | } 59 | // .post-dark { 60 | // background-color: #0e0e0e; 61 | // } 62 | // .post-light { 63 | // background-color: #f5f5f5; 64 | // } 65 | .post-social-share-container { 66 | grid-row: 3; 67 | grid-column: 2 / 12; 68 | align-self: end; 69 | } 70 | .social-icon-container { 71 | grid-template-columns: repeat(4, 25%); 72 | justify-items: center !important; 73 | } 74 | } 75 | 76 | @media screen and (max-width: 440px) { 77 | .post-container { 78 | grid-row-start: 1; 79 | grid-column: 1 / span 12; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/components/Article_page/MainBlog.jsx: -------------------------------------------------------------------------------- 1 | import React, { useContext, useState, useLayoutEffect } from "react"; 2 | import Context from "../../context"; 3 | import Sidebar from "./Sidebar"; 4 | import Post from "./Post"; 5 | import styled from "styled-components"; 6 | import Layout from "../Layout"; 7 | import Articles from "../main_page/Articles"; 8 | import Subscribe from "../Subscribe"; 9 | import Share from "./Share"; 10 | 11 | const MainBlog = ({ data }) => { 12 | const { isDay } = useContext(Context); 13 | const [width, updateWidth] = useState(0); 14 | 15 | const { 16 | title, 17 | published, 18 | author, 19 | topic, 20 | body, 21 | thumbnail, 22 | } = data.contentfulBlogPost; 23 | 24 | useLayoutEffect(() => { 25 | window.addEventListener("resize", updateWidth(window.innerWidth)); 26 | 27 | return () => { 28 | window.removeEventListener("resize", updateWidth(window.innerWidth)); 29 | }; 30 | }, []); 31 | 32 | return ( 33 | 34 |
35 | {/* Only shows to devices with this or below width */} 36 | {width >= 769 && ( 37 | 38 | )} 39 | {/* Note: temp not needed */} 40 | {/* */} 41 | 49 |
50 | 51 |
52 |

57 | Related Articles 58 |

59 | 60 |
61 |
62 | 63 |
64 |
65 |
66 | ); 67 | }; 68 | 69 | export default MainBlog; 70 | 71 | const Div = styled.div` 72 | // display: grid; 73 | // grid-template-columns: 17% 65%; 74 | // // grid-template-columns: 70%; 75 | // @media screen and (max-width: 768px) { 76 | // grid-template-columns: 5% 75%; 77 | // grid-template-rows: 95% 5%; 78 | // } 79 | `; 80 | 81 | const ExtraCont = styled.div` 82 | .related-articles { 83 | margin: 4rem 0; 84 | } 85 | .subscribe-container { 86 | margin: 8rem 0; 87 | } 88 | .related-articles-heading { 89 | font-size: 1.4rem; 90 | margin: 3rem 0; 91 | } 92 | `; 93 | -------------------------------------------------------------------------------- /src/components/Article_page/Post.jsx: -------------------------------------------------------------------------------- 1 | import React, { useContext, useState, useLayoutEffect } from "react"; 2 | import Img from "gatsby-image"; 3 | import { documentToReactComponents } from "@contentful/rich-text-react-renderer"; 4 | import Context from "../../context"; 5 | import styled from "styled-components"; 6 | import Sidebar from "./Sidebar"; 7 | 8 | export default function Post({ 9 | title, 10 | author, 11 | published, 12 | topic, 13 | body, 14 | thumbnail, 15 | }) { 16 | const { isDay } = useContext(Context); 17 | const [width, updateWidth] = useState(0); 18 | 19 | const options = { 20 | renderNode: { 21 | "embedded-asset-block": node => { 22 | const alt = node.data.target.fields.title["en-US"]; 23 | const url = node.data.target.fields.file["en-US"].url; 24 | return {alt}; 25 | }, 26 | }, 27 | }; 28 | 29 | useLayoutEffect(() => { 30 | window.addEventListener("resize", updateWidth(window.innerWidth)); 31 | 32 | return () => { 33 | window.removeEventListener("resize", updateWidth(window.innerWidth)); 34 | }; 35 | }, []); 36 | 37 | return ( 38 |
39 |
40 |

41 | {title} 42 |

43 |
44 |
45 | {"post 46 |
47 | {/* Only shows to devices with this or below width */} 48 | {width <= 768 && ( 49 | 50 | )} 51 |
56 | {documentToReactComponents(body.json, options)} 57 |
58 |
59 | ); 60 | } 61 | 62 | const Article = styled.article` 63 | margin: 2rem 0; 64 | .post-heading-container { 65 | margin: 2rem 0; 66 | } 67 | .post-heading { 68 | font-size: 2.4rem; 69 | font-weight: 700; 70 | line-height: 1.6; 71 | letter-spacing: 0.01rem; 72 | text-align: center; 73 | } 74 | .post-image-container { 75 | margin: 0 auto; 76 | .post-image { 77 | width: 100%; 78 | border-radius: 10px; 79 | } 80 | } 81 | 82 | picture > img { 83 | border-radius: 10px; 84 | } 85 | 86 | .post-paragraph-container { 87 | margin: 1rem 0; 88 | p { 89 | font-size: 1.3rem; 90 | font-weight: 400; 91 | margin-top: 2rem; 92 | } 93 | code { 94 | display: block; 95 | padding: 20px; 96 | margin: 4rem 0; 97 | border-radius: 6px; 98 | } 99 | img { 100 | width: 100%; 101 | margin-top: 1rem; 102 | margin-bottom: 1rem; 103 | } 104 | } 105 | 106 | // code 107 | .para-cont-light code { 108 | color: rgba(0, 0, 0, 0.84); 109 | background: rgba(0, 0, 0, 0.05) none repeat scroll 0% 0%; 110 | box-shadow: 3px 3px 12px 0px rgba(202, 202, 202, 0.15); 111 | } 112 | 113 | .para-cont-dark code { 114 | color: rgb(179, 185, 197); 115 | background: rgb(58, 58, 58) none repeat scroll 0% 0%; 116 | box-shadow: 2px 4px 25px rgba(0,0,0,.15); 117 | } 118 | // Text items color 119 | .para-cont-dark > h3, 120 | h4, 121 | h5, 122 | p, 123 | span, 124 | li { 125 | // color: #d9d7e0; 126 | color: #b3b9c5; 127 | font-family: Helvetica Neue, Inter, -apple-system, BlinkMacSystemFont, 128 | Helvetica, Arial, sans-serif; 129 | } 130 | 131 | .para-cont-light > h3, 132 | .para-cont-light > h4, 133 | .para-cont-light > h5, 134 | .para-cont-light > p, 135 | .para-cont-light > span, 136 | .para-cont-light li { 137 | color: #36313d; 138 | } 139 | 140 | .post-paragraph-container li { 141 | font-size: 1.3rem; 142 | } 143 | 144 | h1, h2, h3, h4, h5, h6 { 145 | margin-top: 4rem; 146 | margin-bottom: 0.5rem; 147 | } 148 | 149 | h2 { 150 | font-size: 2.1rem; 151 | font-weight: 600; 152 | } 153 | 154 | h3 { 155 | font-size: 1.9rem; 156 | font-weight: 600; 157 | } 158 | 159 | h4 { 160 | font-size: 1.7rem; 161 | font-weight: 600; 162 | } 163 | 164 | h5 { 165 | font-size: 1.5rem; 166 | font-weight: 600; 167 | } 168 | `; 169 | -------------------------------------------------------------------------------- /src/components/Article_page/Share.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from "react"; 2 | import styled from "styled-components"; 3 | import { FaTwitter, FaLinkedinIn, FaFacebookF } from "react-icons/fa"; 4 | import { MdEmail } from "react-icons/md"; 5 | 6 | export default function Share({ author, topic, title }) { 7 | const [location, setLocation] = useState(null); 8 | 9 | useEffect(() => { 10 | setLocation(window.location.href); 11 | }, []); 12 | 13 | return ( 14 | 58 | ); 59 | } 60 | 61 | const Aside = styled.aside` 62 | .social-icon-container { 63 | display: grid; 64 | justify-items: start; 65 | grid-row-gap: 15px; 66 | } 67 | .social-icon { 68 | display: block; 69 | background-color: #f1f2fc; 70 | border-radius: 50px; 71 | padding: 0.6rem; 72 | cursor: pointer; 73 | &:hover { 74 | background-color: #ffffff; 75 | -webkit-box-shadow: 0px 0px 1px 1px rgba(255, 255, 255, 1); 76 | -moz-box-shadow: 0px 0px 1px 1px rgba(255, 255, 255, 1); 77 | box-shadow: 0px 0px 1px 1px rgba(255, 255, 255, 1); 78 | } 79 | } 80 | .social-icon > svg { 81 | font-size: 1.4rem; 82 | fill: #8189a9; 83 | } 84 | a { 85 | text-decoration: none; 86 | } 87 | `; 88 | -------------------------------------------------------------------------------- /src/components/Article_page/Sidebar.jsx: -------------------------------------------------------------------------------- 1 | import React, { useContext } from "react"; 2 | import { Link } from "gatsby"; 3 | import styled from "styled-components"; 4 | import Context from "../../context"; 5 | 6 | export default function Sidebar({ author, published, topic, title }) { 7 | const { isDay } = useContext(Context); 8 | 9 | return ( 10 | 42 | ); 43 | } 44 | 45 | const Aside = styled.aside` 46 | display: grid; 47 | // grid-template-columns: 75%; 48 | grid-template-rows: 40px 80px; 49 | margin: 14rem 0; 50 | .post-info-container { 51 | height: 100%; 52 | display: grid; 53 | justify-items: space-evenly; 54 | grid-gap: 25%; 55 | // Auth 56 | .author-image-container { 57 | width: 100%; 58 | .author-image { 59 | width: 5rem; 60 | border-radius: 50%; 61 | border: 2px solid #4c7af1; 62 | padding: 2px; 63 | } 64 | } 65 | } 66 | .post-author-text { 67 | font-size: 1rem; 68 | font-weight: 600; 69 | margin-right: 0.5rem; 70 | } 71 | 72 | .text-light { 73 | color: #2b2d38 !important; 74 | } 75 | .text-dark { 76 | color: rgba(245, 245, 245, 0.9) !important; 77 | } 78 | .post-time-text { 79 | width: 60%; 80 | font-size: 0.9rem; 81 | font-weight: 600; 82 | line-height: 1; 83 | color: darkgray; 84 | } 85 | .post-cate-text { 86 | font-size: 0.9rem; 87 | font-weight: 600; 88 | color: #8189a9; 89 | margin-top: 0.4rem; 90 | } 91 | .social-icon-container { 92 | display: grid; 93 | justify-items: start; 94 | grid-row-gap: 15px; 95 | } 96 | .social-icon { 97 | display: block; 98 | background-color: #f1f2fc; 99 | border-radius: 50px; 100 | padding: 0.6rem; 101 | cursor: pointer; 102 | &:hover { 103 | background-color: #ffffff; 104 | -webkit-box-shadow: 0px 0px 1px 1px rgba(255, 255, 255, 1); 105 | -moz-box-shadow: 0px 0px 1px 1px rgba(255, 255, 255, 1); 106 | box-shadow: 0px 0px 1px 1px rgba(255, 255, 255, 1); 107 | } 108 | } 109 | .social-icon > svg { 110 | font-size: 1.4rem; 111 | fill: #8189a9; 112 | } 113 | a { 114 | text-decoration: none; 115 | } 116 | `; 117 | -------------------------------------------------------------------------------- /src/components/Footer.js: -------------------------------------------------------------------------------- 1 | import React, { useContext } from "react"; 2 | import { useStaticQuery, graphql } from "gatsby"; 3 | import styled from "styled-components"; 4 | import Context from "../context"; 5 | 6 | export default function Footer() { 7 | const { isDay } = useContext(Context); 8 | 9 | const data = useStaticQuery(graphql` 10 | query { 11 | site { 12 | siteMetadata { 13 | author 14 | } 15 | } 16 | } 17 | `); 18 | 19 | return ( 20 | 23 |
24 | 25 | 2020 @ {data.site.siteMetadata.author}'s blog 26 | 27 |
28 |
29 | ); 30 | } 31 | 32 | const FooterElement = styled.footer` 33 | display: flex; 34 | align-items: center; 35 | justify-content: center; 36 | min-height: 6rem; 37 | .footer-text { 38 | font-size: 1rem; 39 | color: #a6adc9; 40 | } 41 | `; 42 | -------------------------------------------------------------------------------- /src/components/Head.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Helmet } from "react-helmet"; 3 | import { useStaticQuery, graphql } from "gatsby"; 4 | 5 | export default function Head({ title }) { 6 | const data = useStaticQuery(graphql` 7 | query { 8 | site { 9 | siteMetadata { 10 | title 11 | } 12 | } 13 | } 14 | `); 15 | return ; 16 | } 17 | -------------------------------------------------------------------------------- /src/components/Header.js: -------------------------------------------------------------------------------- 1 | import React, { useContext } from "react"; 2 | import { graphql, useStaticQuery } from "gatsby"; 3 | import { 4 | Navbar, 5 | Nav, 6 | NavDropdown, 7 | Form, 8 | Button, 9 | FormControl, 10 | } from "react-bootstrap"; 11 | import "../assets/main.scss"; 12 | import { GoSearch } from "react-icons/go"; 13 | import { MdWbSunny } from "react-icons/md"; 14 | import { IoIosMoon } from "react-icons/io"; 15 | import styled from "styled-components"; 16 | import Context from "../context"; 17 | 18 | export default function Header() { 19 | const { isDay, toggleDay } = useContext(Context); 20 | 21 | const data = useStaticQuery(graphql` 22 | query { 23 | site { 24 | siteMetadata { 25 | title 26 | } 27 | } 28 | } 29 | `); 30 | 31 | const handleClick = () => { 32 | localStorage.setItem("day", JSON.stringify(isDay)); 33 | toggleDay(() => !isDay); 34 | }; 35 | 36 | return ( 37 |
38 | 39 | 40 |

45 | {data.site.siteMetadata.title}'s{" "} 46 | blog 47 |

48 |
49 | {/* TEMP BlOCK */} 50 | {/* */} 53 | {/* */} 54 | 67 |
68 | 71 | 76 | 77 |
78 | {isDay ? ( 79 | 87 | ) : ( 88 | 96 | )} 97 |
98 | {/*
*/} 99 |
100 |
101 | ); 102 | } 103 | 104 | const Div = styled.div` 105 | margin: 0 2rem; 106 | @media screen and (max-width: 440px) { 107 | // Reset margin 108 | margin: 0; 109 | } 110 | .navbar-main-heading-text { 111 | font-family: "Roboto", sans-serif; 112 | // font-family: "Source Serif Pro", serif; 113 | font-size: 1.5rem; 114 | letter-spacing: 0.01rem; 115 | font-weight: 700; 116 | text-transform: lowercase; 117 | .header-blog-text { 118 | color: #12ab87; 119 | } 120 | } 121 | 122 | // TEMP HIDDEN 123 | #basic-navbar-nav, 124 | .nav-dropdown, 125 | .basic-navbar, 126 | .form-control, 127 | .search-btn { 128 | display: none; 129 | } 130 | 131 | .navbar-light .navbar-toggler { 132 | background-color: #fafafc; 133 | border-color: transparent; 134 | border-radius: 5px; 135 | } 136 | 137 | .dropdown-menu { 138 | font-size: 0.8rem; 139 | text-transform: uppercase; 140 | .dropdown-item { 141 | padding-bottom: 0.4rem; 142 | padding-top: 0.4rem; 143 | } 144 | } 145 | 146 | // Drop down toggle 147 | .text-light > .dropdown-toggle { 148 | color: rgba(0, 0, 0, 0.5); 149 | } 150 | 151 | .text-dark > .dropdown-toggle { 152 | color: #dddddd; 153 | &:hover, 154 | &:focus { 155 | color: #fff; 156 | } 157 | } 158 | 159 | .nav-link { 160 | font-family: "Roboto", sans-serif; 161 | font-size: 0.9rem; 162 | font-weight: 700; 163 | text-transform: uppercase; 164 | } 165 | 166 | .btn-outline-success { 167 | color: #3b3e4d; 168 | border: none; 169 | outline: 0; 170 | &:hover { 171 | color: darkgrey; 172 | background-color: transparent; 173 | } 174 | &:focus { 175 | background-color: transparent; 176 | // RESET 177 | box-shadow: 0 0 0; 178 | } 179 | } 180 | 181 | .form-control { 182 | // RESET 183 | box-shadow: 0 0 0; 184 | border: none; 185 | font-size: 1rem; 186 | font-weight: 700; 187 | &:focus { 188 | border: 1px solid #89898b; 189 | } 190 | } 191 | 192 | .form-dark { 193 | background-color: #131217; 194 | color: white; 195 | } 196 | 197 | // Toggle Button 198 | .mode-toggle-btn { 199 | background-color: transparent; 200 | border: none; 201 | outline: none; 202 | margin: 0.8rem 0; 203 | &:focus { 204 | outline: none; 205 | box-shadow: none; 206 | border: none; 207 | } 208 | } 209 | `; 210 | -------------------------------------------------------------------------------- /src/components/Layout.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Header from "./Header"; 3 | import Footer from "./Footer"; 4 | 5 | export default function Layout(props) { 6 | return ( 7 | <> 8 |
9 | {props.children} 10 |