My name is Kenneth Cruz, I'm a plant dad 🍀 , dog dad 🐶, and aquarium enthusiast 🐠. And yes I love using emojis, it adds color and tone to these boring md files 🤷♂️
I'm from native New Yorker, I'm a graphic designer and software engineer. This is the source code for my personal portfolio, it provides a collection of my work, sculpture, print work, branding, UX/UI work and developer work.
I love JavaScript! React is my main go-to tool. So I decided to work with Gatsby to showcase my work's collection.
Gatsby is a React framework that serves up static files for the client.
Benefits:
- Loads data from site's source using GraphQL to generate static assets
- Performance tuning
- example: you have a 1000px * 1000px image Gatsby will worry about serving up the best version of that image for small screens, to desktop size and resolution
- Static assents lets you deploy to any CDN
- This static site will Re-hydrate into a React app in any Browser! 😈
🏛️ In this section I'll be walking through the design architecture
🍬
-
This folder holds a data.json
- This holds all my works in an array of objects to later use in my
works/index.js
component
- This holds all my works in an array of objects to later use in my
-
icons
- This folder holds my logo in a svg file for the site's favicon.
- It also holds the favicon log in black.
-
Images
- This folder has been ignored in the .gitignore. All images are at print quality (300ppi) and should not exist on github.
- landing
- logo
- self
- posters
- This folder has been ignored in the .gitignore. All images are at print quality (300ppi) and should not exist on github.
Collection of Reusable components + SCSS files
layout.js
- this has a staticQuery to get the SiteMetaData for the title of the browser tab + allFile query for the logo to be passed to header.js
- Passes data => Header
- loads {children} in main
- NOTE: loads layout.scss for to set consistent font, colors, and font size
header.js
- This header loads logo
- Calls for Nav.js
nav.js
- Uses react-bootstrap Navbar
- uses Nav.Link for react/Gatsby loading routing
posters.js
- uses Image from react-bootstrap, takes in prop of the poster images
- this component is called from the posters page
seo.js
- This file is for Search Engine Optimization
- this came built in from the Gatsby source code
works.js
Fonts used
- This is a folder for my preferred font for this site. OperatorMono for paragraphs.
- NOTE: loading Roboto from google fonts in the layout.scss
index.js
- This is the landing page
- staticQuery for json obj for the landing carrousel
- json object provides links to those featured projects through the work's title and image.
404.js
- This is built in from Gatsby source code.
- 404.js is for when a user wanders off into a stange route and the site cannot serve this static site
about.js
- StaticQuery from Images to find
self
- Gives an About me.
contact.js
🍬
- Helps load bootstrap onto the react-app
- now rendered a root wrapper for themeContext.
- Will later implement a provider for project data
This is where the 💰 is. Plugins is Gatsby uses to load, transpile, improve performance and also sets the favicon for the site.
NOTE: When plugins DONT require options the plugin can just be passed in the array
NOTE: when the plugin NEEDS or you WANT to pass it viable options you pass it as an object
🍬
gatsby-plugin-sass
transpiles into css for the browsergatsby-plugin-react-helmet
gatsby-transformer-json
, this helps GraphiQL to parse JSON into GraphQL refer togatsby-source-filesystem
gatsby-transformer-sharp
this allows us to query one high res image and create SVGs, JPEGs, PNGs, in many sizes for the screen resolution your screen will needgatsby-plugin-sharp
this works in partnership with it's transformer.gatsby-source-filesystem
this plugin is called twice. once for the json file and the second time for the images folder. this tells Gatsby where to plug in it's GraphQL db.gatsby-plugin-manifest
this plug in comes with gatsby built in, this sets a preset theme, start URL, and favicon.