Basics commands i think these three are the main ones to use. localStorage.setItem() localStorage.getItem() localStorage.removeItem() Examples of setting data into local storage localStorage.setItem(key, value) localStorage.setItem(“this title”, “this is data”) localStorage.setItem(“title”, “title data”) Using instead of using a cookie and storing data on the client side and checking the data when the page loads to make […]
Setting up composer version if you’re wanting to have a certain composer version for your Drupal installation, adding the code below to the config file will do. you can change it to 1 for composer 1. this can be useful for older Drupal website built with composer 1 and the server they run on use […]
Setting up an account. setting up pantheon website to work with Lando What issues were there? composer doesn’t install, when running Lando rebuild composer stated it didn’t run composer install installed composer on main and then ran it seems to allow me to install all the composer files correctly. it Came up with the Drupal […]
The theme structure The Theme Structure Data is scoped to each level and at each level passing down data to the lower levels. As a Page template passes down the sidebar sections and then those pass down to node. A content type can have its own page template which can determine what block sections are […]
Table of Contents Build a menu system Build a Social Media Menu Build Home page Build Site Settings Build a menu system example of the Figma design of what I’m trying to achieve with the menu example of drop down header menu Example of the bottom footer menu Building the menu system by creating a […]
Why use them? WordPress comes with posts and pages, but you may want to isolate out content into its own individual post type. The picture below shows how I’ve created two new custom post types called Services and Case Studies. Using Custom Post types with Gatsby When building a website in Gatsby you can gather […]
What are the rules of creating Hooks? Why use custom hooks? Creating Custom Hook Example 1 What are the rules of creating Hooks? that’s what allows React to correctly preserve the state of Hooks between multiple useState and useEffect calls. https://reactjs.org/docs/hooks-rules.html Rule: Don’t call Hooks inside loops, conditions, or nested functions Rule: Only Call Hooks from React Functions
Table of Contents What are basic commands? What are Tags? What is Stagging? What are basic commands? git commit commit staged changes to repo git status gives an update on git git pull pulls down latest changes git push push your local changes to remote repo git clone used to clone down repos What are […]
Table of Contents Why Type Check? Using typescript in Visual Code Working with Objects Working with Arrays Converting JS files to TS files Why Type Check? Why should projects be using typescript? Using TypeScript in Visual Code Working with Objects Interfaces An interface declaration is another way to name an object type: https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#object-types Setting up an Interface […]
Why i want to use Cypress? Cypress API Commonly used Resources Used Why I want to use Cypress? An animation showing cypress running and going through the tests and whether they pass or fail. Animation of Cypress running several tests, the test runner starts a cypress test is done and results are outputted whether it […]
Table of Contents What are the basics of Gatsby shoplifty? What are the basics of Gatsby and Shopify? Error: Operation gid://shopify/BulkOperation/405840986284 failed with ACCESS_DENIED issues with permission locations must be set to read. changing The queries for Gatsby Cart page
When the data is used in Gatsby by WordPress it will pull in the string variable called. content and that will need to be styled to be able to see the effects of when things are changed in the WordPress block editor. Having a sample page to place several types of blocks to see how […]
Why use Advanced Custom Fields with WordPress? Using it where you need strict content structure, where all the pages needed to be in similar format for example product pages. Blocks are more enjoyable and easier to use for making variations in your content, but ACF is good for adding stricter content. Using Advanced Custom Fields […]
Example of CSS animation using background-color Example of animation using left. Example of CSS animation using background-color This is an example of using CSS animations where the Element background colour is switching between red and yellow. Animation of CSS animation working. Code below is setting up the animation inside an element. The setup of the […]
This is just a basic outline of Gatsby pulling content from the Drupal CMS Getting Drupal CMS ready for Gatsby Connecting to the Drupal CMS Resources Getting Drupal CMS ready for Gatsby Adding the Gatsby module to drupal Making sure this box is ticked so we can connect with gatsby. Connecting to the Drupal CMS […]