Custom Site Theme Picker Tutorial #1 - Intro & Setup

Net Ninja · Beginner ·🌐 Frontend Engineering ·3y ago

Key Takeaways

This video tutorial introduces a custom site theme picker project, focusing on HTML, JavaScript, and CSS, with the goal of creating a theming system that allows users to customize the site's appearance.

Full Transcript

when somebody lands on your blog or website how are you going to get them to stick well one of the things you can do is provide some customization that kind of makes them feel like they're a part of what you're building so here I've got a basic blog and it's pretty basic overall we've got some nice shiny colors but down here I've got some custom site settings where you can like round all the radiuses of the buttons you can actually change it to a system or dark mode or even better still a '90s theme or maybe Dracula or material and then choose your custom kind of accent color all of this is what we're going to be building out in this project now this isn't so much about theming as much as it is about thinking through CSS and how you can make it more adaptable to things you might want to adjust That's The Power of a theming system it's a new way of thinking about writing CSS and interacting with user input with JavaScript hey what's up my name is Chris and a huge thanks to Sean for having me on the channel I have my own channel over at coding in public and if you enjoy this kind of thinking I do this kind of stuff a lot on my channel now a couple things you need to know before before we get started number one it would be good for you to have a pretty basic understanding of HTML CSS and JavaScript I will try to explain it in a way that's helpful for you but you do need to have a starting knowledge of all those three second we're going to focus primarily on HTML and JavaScript to start with so just getting the functionality working and then at the end of the series we'll look at CSS how to basically make these customized toggles and switches in fact we're going to hold off on the '90s the Dracula and the material theme until the last the 10th lesson in the series now in addition to having a basic understanding of HTML CSS and Java JavaScript you also need to have node.js on your machine you need to have at least 14.18 or higher or 16 or higher if you don't have that you can come in here and download it from nodejs.org and uh then you should be set and ready to go now I've tried to build this project out so that even if you're more advanced in your understanding of CSS and JavaScript there are several new kind of Concepts or ways of doing stuff that I think will be beneficial to you and if you're just beginning I hope this will still be accessible to you as we work through it all right so let's go ahead and get you started so that next lesson we can start actually templating out the HT for this right here all right what you're going to do is jump to the link in the description at custom site theming this is on my repo here and then just make sure you're on the main branch all you'll have to do then at that point is come to the code the green code button and click download zip that's your download that zip file to your computer and then let me open it up for you all right so I've got my folder open up here here's the custom site theming now you can rightclick and actually open this in vs code or whatever code editor you want to use or you can go the other way around where you open vs code first and then open up this folder I'm just going to right click and open this up all right and it just opened it up here in vs code you can see that I've got my index.html page a style.css page postcss and a package.json now let me just really briefly walk you through this if you're not familiar with the structure here but basically I've got a Dev script here we're using vit as our Builder you don't really need to understand how it works just to let you know what's going on and then we've got these Dev dependencies which will essentially help us with our CSS making it more accessible to people who visit the site but you shouldn't have to interact with really any of these now these are all kind of pushed through this postcss config file and that will take care of a lot of that minifying and auto prefixing and all the stuff you won't have to think about in this project what I'm going to do is open up this terminal down here which you can do from the menu or in this case I just hit control and the Tia key and then the first thing I need to do is with no. JS installed which again needs to be like 16 or higher or 14.18 or higher and if you're not sure what you're running you can do node-- version like this and it will actually tell you so here I'm running 20.2 but whatever you're running as long as it's higher than what I mentioned you should be set to go then I'm just going to type mpm install that will install my Dev dependencies and get me up and running okay so just like that all I need to do now is type mpm run Dev and that was one of our package.json scripts right here and when I do that it will actually run vit which will spin up that Dev server for me all right and just like that I've got Port 5173 up and running your code should look something just like this now all the files like assets like the mp3s the fabcon the headshots all that stuff lives in your public directory you shouldn't have to tach to this we're just going to be interacting with this index.html page the CSS page and then eventually we will create a Javascript file as well but now that we've got this up and running you should be ready to go as long as you're seeing this screen you're set if you have any trouble leave a comment in the description and I'll try to make sure I can help you out or others will as well now one other thing to mention quickly is if you ever get stuck you can always come over here to the GitHub Link in the description find the lesson that you got stuck on and then look at the finished code for that lesson if you have any questions about anything feel free to let me know in the description once again I'm really excited to build this out with you I can't wait for you to add this kind of theming to whatever sites you're building where you want people to have that level of control a huge thanks again to Sean for letting me do this on his channel let's go ahead and jump in to Liston two by the way if you want to watch this entire course now without YouTube adverts you can do it's all up on the net ninja website net ninja. deev you can buy the course for $2 to get instant access to all of it or you can sign up to net Ninja Pro and get instant access to all of my courses without adverts as well as premium courses not found on YouTube including my Udi ones that's $9 a month and you can get your first month half price when you use this promo code right here so I'm going to leave this link Down Below in the video description for you to sign up and I really hope you enjoy this series and please do not forget to share subscribe and like the videos that really helps a lot and I'm going to see you in the very next lesson

Original Description

🚀🥷🏼Get early access to this entire course now on Net Ninja Pro: https://netninja.dev/p/custom-site-ui-theming-tutorial 🌟🥷🏼 Check out the Coding in Public channel for similar tutorials: https://www.youtube.com/c/codinginpublic 📂🥷🏼 Access the course files on GitHub: https://github.com/coding-in-public/custom-site-theming 🌐🥷🏼 Live demo of the finished site: https://codinginpublic.dev/projects/custom-site-theming/ 💻🥷🏼 HTML & CSS Crash Course: On Net Ninja Pro - https://netninja.dev/p/html-css-crash-course On YouTube - https://www.youtube.com/watch?v=hu-q2zYwEYs&list=PL4cUxeGkcC9ivBf_eKCPIAYXWzLlPAm6G 🔗🥷🏼 VS Code - https://code.visualstudio.com/
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Net Ninja · Net Ninja · 0 of 60

← Previous Next →
1 Regular Expressions (RegEx) Tutorial #14 - Matching a Username
Regular Expressions (RegEx) Tutorial #14 - Matching a Username
Net Ninja
2 Regular Expressions (RegEx) Tutorial #15 - Email RegEx Pattern
Regular Expressions (RegEx) Tutorial #15 - Email RegEx Pattern
Net Ninja
3 Regular Expressions (RegEx) Tutorial #16 - Finishing Touches
Regular Expressions (RegEx) Tutorial #16 - Finishing Touches
Net Ninja
4 GraphQL Tutorial #1 - Introduction to GraphQL
GraphQL Tutorial #1 - Introduction to GraphQL
Net Ninja
5 GraphQL Tutorial #2 - A Birdseye View of GraphQL
GraphQL Tutorial #2 - A Birdseye View of GraphQL
Net Ninja
6 GraphQL Tutorial #3 - Project (stack) Overview
GraphQL Tutorial #3 - Project (stack) Overview
Net Ninja
7 GraphQL Tutorial #4 - Making Queries (front-end preview)
GraphQL Tutorial #4 - Making Queries (front-end preview)
Net Ninja
8 GraphQL Tutorial #5 - Express App Setup
GraphQL Tutorial #5 - Express App Setup
Net Ninja
9 GraphQL Tutorial #6 - Setting up GraphQL
GraphQL Tutorial #6 - Setting up GraphQL
Net Ninja
10 GraphQL Tutorial #7 - GraphQL Schema
GraphQL Tutorial #7 - GraphQL Schema
Net Ninja
11 GraphQL Tutorial #8 - Root Query
GraphQL Tutorial #8 - Root Query
Net Ninja
12 GraphQL Tutorial #9 - The Resolve Function
GraphQL Tutorial #9 - The Resolve Function
Net Ninja
13 GraphQL Tutorial #10 - Testing Queries in Graphiql
GraphQL Tutorial #10 - Testing Queries in Graphiql
Net Ninja
14 GraphQL Tutorial #11 - GraphQL ID Type
GraphQL Tutorial #11 - GraphQL ID Type
Net Ninja
15 GraphQL Tutorial #12 - Author Type
GraphQL Tutorial #12 - Author Type
Net Ninja
16 GraphQL Tutorial #13 - Type Relations
GraphQL Tutorial #13 - Type Relations
Net Ninja
17 GraphQL Tutorial #14 - GraphQL Lists
GraphQL Tutorial #14 - GraphQL Lists
Net Ninja
18 GraphQL Tutorial #15 - More on Root Queries
GraphQL Tutorial #15 - More on Root Queries
Net Ninja
19 GraphQL Tutorial #16 - Connecting to mLab
GraphQL Tutorial #16 - Connecting to mLab
Net Ninja
20 GraphQL Tutorial #17 - Mongoose Models
GraphQL Tutorial #17 - Mongoose Models
Net Ninja
21 GraphQL Tutorial #18 - Mutations
GraphQL Tutorial #18 - Mutations
Net Ninja
22 GraphQL Tutorial #19 - More on Mutations
GraphQL Tutorial #19 - More on Mutations
Net Ninja
23 GraphQL Tutorial #20 - Updating the Resolve Functions
GraphQL Tutorial #20 - Updating the Resolve Functions
Net Ninja
24 GraphQL Tutorial #21 - GraphQL NonNull
GraphQL Tutorial #21 - GraphQL NonNull
Net Ninja
25 GraphQL Tutorial #22 - Adding a Front-end
GraphQL Tutorial #22 - Adding a Front-end
Net Ninja
26 GraphQL Tutorial #23 - Create React App
GraphQL Tutorial #23 - Create React App
Net Ninja
27 GraphQL Tutorial #24 - Book List Component
GraphQL Tutorial #24 - Book List Component
Net Ninja
28 GraphQL Tutorial #25 - Apollo Client Setup
GraphQL Tutorial #25 - Apollo Client Setup
Net Ninja
29 GraphQL Tutorial #26 - Making Queries from React
GraphQL Tutorial #26 - Making Queries from React
Net Ninja
30 GraphQL Tutorial #27 - Rendering Data in a Component
GraphQL Tutorial #27 - Rendering Data in a Component
Net Ninja
31 GraphQL Tutorial #28 - Add Book Component
GraphQL Tutorial #28 - Add Book Component
Net Ninja
32 GraphQL Tutorial #29 - External Query File
GraphQL Tutorial #29 - External Query File
Net Ninja
33 GraphQL Tutorial #30 - Updating Component State
GraphQL Tutorial #30 - Updating Component State
Net Ninja
34 GraphQL Tutorial #31 - Composing Queries
GraphQL Tutorial #31 - Composing Queries
Net Ninja
35 GraphQL Tutorial #32 - query variables
GraphQL Tutorial #32 - query variables
Net Ninja
36 GraphQL Tutorial #33 - Re-fetching Queries
GraphQL Tutorial #33 - Re-fetching Queries
Net Ninja
37 GraphQL Tutorial #34 - Book Details Component
GraphQL Tutorial #34 - Book Details Component
Net Ninja
38 GraphQL Tutorial #36 - Styling the App
GraphQL Tutorial #36 - Styling the App
Net Ninja
39 GraphQL Tutorial #35 - Making a Single Query
GraphQL Tutorial #35 - Making a Single Query
Net Ninja
40 Build Apps with Vue & Firebase - Udemy Course
Build Apps with Vue & Firebase - Udemy Course
Net Ninja
41 Updated Vue & Firebase Course (Udemy)
Updated Vue & Firebase Course (Udemy)
Net Ninja
42 Vue & Firebase Real-time Chat (Preview) #1 - Intro
Vue & Firebase Real-time Chat (Preview) #1 - Intro
Net Ninja
43 Vue & Firebase Real-time Chat (Preview) #2 - Project Structure
Vue & Firebase Real-time Chat (Preview) #2 - Project Structure
Net Ninja
44 Vue & Firebase Real-time Chat (Preview) #3 - Firestore Setup
Vue & Firebase Real-time Chat (Preview) #3 - Firestore Setup
Net Ninja
45 Vue & Firebase Real-time Chat (Preview) #4 - Welcome Screen
Vue & Firebase Real-time Chat (Preview) #4 - Welcome Screen
Net Ninja
46 Vue & Firebase Real-time Chat (Preview) #5 - Props in Routes
Vue & Firebase Real-time Chat (Preview) #5 - Props in Routes
Net Ninja
47 Vue & Firebase Real-time Chat (Preview) #6 - Route Guards
Vue & Firebase Real-time Chat (Preview) #6 - Route Guards
Net Ninja
48 Vue & Firebase Real-time Chat (Preview) #7 - Chat Window
Vue & Firebase Real-time Chat (Preview) #7 - Chat Window
Net Ninja
49 Vue & Firebase Real-time Chat (Preview) #8 - New Message Component
Vue & Firebase Real-time Chat (Preview) #8 - New Message Component
Net Ninja
50 Object Oriented JavaScript Tutorial #1 - Introduction
Object Oriented JavaScript Tutorial #1 - Introduction
Net Ninja
51 Object Oriented JavaScript Tutorial #2 - Object Literals
Object Oriented JavaScript Tutorial #2 - Object Literals
Net Ninja
52 Object Oriented JavaScript Tutorial #3 - Updating Properties
Object Oriented JavaScript Tutorial #3 - Updating Properties
Net Ninja
53 Object Oriented JavaScript Tutorial #4 - Classes
Object Oriented JavaScript Tutorial #4 - Classes
Net Ninja
54 Object Oriented JavaScript Tutorial #5  - Class Constructors
Object Oriented JavaScript Tutorial #5 - Class Constructors
Net Ninja
55 Object Oriented JavaScript Tutorial #6 - Class Methods
Object Oriented JavaScript Tutorial #6 - Class Methods
Net Ninja
56 Object Oriented JavaScript Tutorial #7 - Method Chaining
Object Oriented JavaScript Tutorial #7 - Method Chaining
Net Ninja
57 Object Oriented JavaScript Tutorial #8 - Class Inheritance
Object Oriented JavaScript Tutorial #8 - Class Inheritance
Net Ninja
58 Object Oriented JavaScript Tutorial #9 - Constructors (under the hood)
Object Oriented JavaScript Tutorial #9 - Constructors (under the hood)
Net Ninja
59 Object Oriented JavaScript Tutorial #10 - Prototype
Object Oriented JavaScript Tutorial #10 - Prototype
Net Ninja
60 Object Oriented JavaScript Tutorial #11 - Prototype Inheritance
Object Oriented JavaScript Tutorial #11 - Prototype Inheritance
Net Ninja

This tutorial introduces a custom site theme picker project, covering the setup and basics of HTML, JavaScript, and CSS. The goal is to create a theming system that allows users to customize the site's appearance.

Key Takeaways
  1. Download the project files from GitHub
  2. Install Node.js and required dependencies
  3. Run the development server using Vite
  4. Open the project in a code editor
  5. Explore the project structure and files
💡 Creating a theming system requires thinking about CSS and JavaScript in a new way, focusing on adaptability and user input.

Related Reads

📰
Inside the Wayfair Frontend SDE-2 Interview: A Complete Breakdown
Learn how to prepare for a Frontend SDE-2 interview at Wayfair, including online assessments, machine coding, and system design.
Medium · Programming
📰
I Spent Two Years Maintaining a React SPA. HTMX Rebuilt It in a Week
Learn how HTMX rebuilt a React SPA in a week, replacing 2 years of maintenance work, and discover the benefits of this alternative approach
Medium · Programming
📰
The 5 Levels of Front End Engineering (And Where Most Developers Get Stuck)
Learn the 5 levels of front end engineering to improve your skills and avoid getting stuck in a career rut
Medium · Programming
📰
Browser-Based PDF Editing with Vue 3 and pdf-lib
Learn to build a browser-based PDF editor using Vue 3 and pdf-lib, enabling users to edit PDFs directly in the browser
Dev.to · sunshey
Up next
How to Use Semrush Keyword Magic Tool with ChatGPT to Make Money
Grow with Will - SEO, Sales & Entrepreneurship
Watch →