Just a regular gatsby landing page for now :)
Set up the basic gatsby framework by following this guide
Implemented Typescript according to this guide
Provided with gatsby-plugin-root-import & tsconfig.json
-
Install the package
npm install gatsby-plugin-root-import
-
Add the following lines to your gatsby-config.js, under your plugins:
{ resolve: `gatsby-plugin-root-import`, options: { ["@src"]: `${__dirname}/src`, ["@pages"]: `${__dirname}/src/pages`, ["@components"]: `${__dirname}/src/components`, ["@assets"]: `${__dirname}/src/assets` } }
Implemented according to this guide
Head over to icomoon.io.
-
Create new empty set
-
Upload your svg or select icons you intend to use
-
(optional) Position and resize your SVG
-
Press 'Generate Font' & Download the ZIP
-
Unzip it locally
-
Copy the files in the fonts folder to your project
-
add a fonts.css file in the same folder with the following content
@font-face { font-family: "icomoon"; src: url("./icomoon.eot?u9xe6o"); src: url("./icomoon.eot?u9xe6o#iefix") format("embedded-opentype"), url("./icomoon.ttf?u9xe6o") format("truetype"), url("./icomoon.woff?u9xe6o") format("woff"), url("./icomoon.svg?u9xe6o#icomoon") format("svg"); font-weight: normal; font-style: normal; font-display: block; }
-
(optional) bind the path in your gatsby paths & restart gatsby
-
Bind it in your project by importing the related css file on top of your page or component like so
import "../assets/fonts/fonts.css"
Under gatsby-config.js find gatsby-plugin-manifest and change the icon option to match the path to the SVG or PNG containing your logo
Inspired by the Arwes Project. Using the fonts, text-shadow and coloring. Base components are based on material-ui due to their extensive and feature rich support.
The circle animation is implemented based on the pure CSS loader at loading.io
Install gatsby-background-image
npm i gatsby-background-image -S
- Set up a static query to retrieve the contents from graphql
- Check your graphql to generate your query. Should be under localhost:8000/__graphql
- you can browse allFile -> edges -> node -> relativePath to see which images you have available
- Point towards the location of your background image
useStaticQuery <
Background >
graphql`
query BACKGROUND_QUERY {
file(
relativePath: {
eq: "flight-through-deep-space-nebula-footage-077483924_prevstill.webp"
}
) {
childImageSharp {
fluid(quality: 90, maxWidth: 1920) {
srcWebp
}
}
}
}
`
- Pass it as an argument to useStyles().
- Point towards the path in your background url like so:
background: ({ fileName }: StyleProps) => `url(${fileName})`
This step is optional, and mainly intended to keep your links up to date with the pages you have created You may use this with page links, but the same technique will work for blog posts as well
- Set up a query for the site pages
- Filter out the system pages, such as '404' and '/'
- Return an object of title & path, to separate the lable from the href.
- Remove special characters such as '-' and '/' from the title property
- Capitalize the title in it's usage
textTransform: 'capitalize'
Enjoy the ride!