Skip to content

Design and development of JAMStack-based marketing websites

License

Notifications You must be signed in to change notification settings

pixel-point/pixelpoint-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pixel Point — Web Design and Development

Follow on Twitter

Gatsby

Table of Contents

Welcome

Hello there! This repo is a home to Pixel Point, a web agency that designs and develops world-class marketing websites. We made this codebase available to open source community so everyone can get something useful out of our expertise, be it for project structure, code patterns or plugins.

Below you will find some basic information about how to work with this project. If you've spotted a bug, a copywriting mistake or just want to suggest some better solution, please, refer to the contribution section.

Getting Started

  1. Clone repository
git clone [email protected]:pixel-point/pixelpoint-website.git
  1. Install dependencies
npm install
  1. Add .env file
cp .env.example .env

Usage

Run the website

npm run start

Build the website

npm run build

Run the built website

npm run serve

Clean Gatsby cache

npm run clean

Project Structure

├── content
│   ├── case-studies
│   └── posts
├── src
│   ├── components
│   │   ├── pages — React components that are being used specifically on a certain page
│   │   └── shared — React components that are being used across the whole website
│   ├── constants
│   ├── hooks
│   ├── images
│   ├── pages
│   ├── styles
│   ├── templates
│   ├── utils
│   └── html.jsx
├── static
│   ├── animations
│   │   ├── pages — Rive animation files that are being used specifically on a certain page
│   │   └── shared — Rive animation files that are being used across the whole website
│   ├── fonts
│   └── images
├── gatsby-browser.js
├── gatsby-config.js
├── gatsby-node.js
├── gatsby-ssr.js
└── tailwind.config.js

Component Folder Structure

Each component includes

  1. Main JavaScript File
  2. Index File

Each component optionally may include

  1. Folder with images and icons
  2. Folder with data

Also, each component may include another component that follows all above listed rules.

Example structure

component
├── nested-component
│  ├── data
│  │  └── nested-component-lottie-data.json
│  ├── images
│  │  ├── nested-component-image.jpg
│  │  ├── nested-component-inline-svg.inline.svg
│  │  └── nested-component-url-svg.svg
│  ├── nested-component.js
│  └── index.js
├── data
│  └── component-lottie-data.json
├── images
│  ├── component-image.jpg
│  ├── component-inline-svg.inline.svg
│  └── component-url-svg.svg
├── component.js
└── index.js

Code Style

ESLint

ESLint helps find and fix code style issues and force developers to follow same rules. Current configuration is based on Airbnb style guide.

Additional commands:

npm run lint

Run it to check the current status of eslint issues across project.

npm run lint:fix

Run it to fix all possible issues.

Prettier

Prettier helps to format code based on defined rules. Difference between Prettier and ESLint.

Additional commands:

npm run format

Run it to format all files across the project.

VS Code

Following extensions required to simplify the process of keeping the same code style across the project:

After installation enable "ESLint on save" by adding to your VS Code settings.json the following line:

"editor.codeActionsOnSave": {
  "source.fixAll.eslint": true
}

You can navigate to settings.json by using Command Pallete (CMD+Shift+P) and then type "Open settings.json".

To enable Prettier go to Preferences -> Settings -> type "Format". Then check that you have esbenp.prettier-vscode as default formatter, and also enable "Format On Save".

Reload VS Code and auto-format will work for you.

Tips & Tricks

In order to generate a poster for a video you can use ffmpeg tool. Modify 00:00:01.000 timecode option to get a desired poster quality.

ffmpeg -i https://pixel-point-website.s3.amazonaws.com/posts/2022-06-20-motion-morning-3/9.mp4 -ss 00:00:01.000 -vframes 1 video-cover-1.jpg

Contribution

Contribution is highly welcomed!

If there is a bug you've encountered, an occasional typo or just want to ask something, don't hesitate to raise and issue or even make a PR.

There are no special contribution guidelines, just use your common sense, keep your changes cohesive with the overall code style and leverage the project info above.

When raising an issue or making a pull request, please do use appropriate labels.

Thank you!

License

All assets and code are under the MIT LICENSE and in the public domain unless specified otherwise.

The client logos are trademarks of their respective companies and are under their terms and license.