Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lucky-kashyap/front-end-domination-create-anything-with-code

Start with Front-End Journey with Sheryians Coding School (Front-End Domination: Create-Anything-with-Code)
https://github.com/lucky-kashyap/front-end-domination-create-anything-with-code

advance-javascript api context-api css css-animation css-flexbox css-grid-layout framer- gsap gsap-react html javascript javascript-dom-manipulation locomotive react-hooks react-js react-router-dom responsive-web-design scrolltrigger tailwind-css

Last synced: 1 day ago
JSON representation

Start with Front-End Journey with Sheryians Coding School (Front-End Domination: Create-Anything-with-Code)

Awesome Lists containing this project

README

        

# Front-End-Domination-Create-Anything-with-Code

Start with Front-End Journey with Sheryians Coding School (Front-End Domination: Create-Anything-with-Code)

### Essentials - So you don;t fail

Embark on an insightful journey as we unravel the intricacies of our learning platform. Navigate uncertainties with proven techniques, ensuring a smooth learning experience. This video serves as your guide, equipping you to confidently resolve doubts and make the most of your educational adventure.

### Getting Started With Basics | Installation Guides

Dive into the essentials! This video serves as your gateway to the world of programming. From laying the foundation with basics to providing a step-by-step installation guide, it's your go-to resource for a smooth start on your coding journey.

### HTML - Making Architecture

Embark on the HTML adventure! This video introduces you to the building blocks of web development. Uncover the power of HTML as we demystify its essentials, setting the stage for your journey into the fascinating world of coding.

- HTMl level 1
Craft a robust coding foundation with HTML! This video guides you through the essentials, ensuring you build a sturdy base for your web development journey. From tags to structure, master the art of creating solid HTML structures.
- HTML Level 2
Dive into HTML mastery! This video breaks down the magic of HTML tags. Unlock the power of these building blocks, understanding how each tag contributes to the creation of dynamic and structured web content.

### HTML-5: Semantic

Demystifying HTML5 Semantic Elements! Learn what they are and how to wield them effectively. This video offers insights into utilizing HTML5 Semantic Elements to enhance website
structure and accessibility.

### CSS Basics - Styling things UP

CSS, or Cascading Style Sheets, is the language used to control the presentation and layout of web pages. It allows you to define the visual style of HTML elements, including fonts, colors, spacing, and more.

### CSS Grid Layout

Uncover the power of layout design! Dive into 'CSS Grid: A Complete Guide to CSS Grid' and master the art of creating dynamic, responsive layouts. Explore the versatility of CSS Grid for modern web design.

Create Navbar Using CSS Grid :

![screencapture-127-0-0-1-5500-index-html-2023-12-01-15_25_39](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/b7253a10-5895-449b-bdca-e8237d7059a5)

Block Create Using Grid:

html code :









CSS Code:

.main {
width: 100%;
height: 100%;
background-color: #ededed;
display: grid;
grid-template-columns: 20% 20% 20% 20% 20% 20%;
grid-template-rows: 20% 20% 20% 20% 20% 20%;
}
.elem {
border: 3px solid #000;
background-color: crimson;
}
.elem1 {
background-color: violet;
/* grid-column-start: 1;
grid-column-end: 4;
grid-row-start: 1;
grid-row-end: 3; */
grid-column: 1/4;
grid-row: 1/3;
}

CSS Grid: Making Project Using CSS Grid:

Desktop UI:

![screencapture-127-0-0-1-5500-index-html-2023-12-01-16_51_36](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/21b4f725-d660-4a0f-9d8e-e78a75ce0fd5)

![ezgif com-video-to-gif](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/f9abcc80-2179-48ce-9be2-dae9aa71c261)

Mobile UI:

![screencapture-127-0-0-1-5500-index-html-2023-12-01-16_52_16](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/9d7d8eb4-edca-443c-80a4-8111249bf75a)

### CSS Projects: Elevate Your Design Skills

This section introduces you to practical CSS projects. You'll apply your CSS skills to create real-world designs and layouts. These projects will put your knowledge to the test and help you gain hands-on experience in using CSS for web development.

-Project 1 Design link : https://pin.it/5QrO8cz

![screencapture-file-D-Sheryians-FrontEnd-Domination-CSS-Projects-Elevate-Your-Design-Skills-project-1-practice-index-html-2023-11-29-21_02_51](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/fbf1ed7f-b35c-4524-8e54-a76decb61f81)

-Source Code link : https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/tree/main/CSS%20Projects%20-%20Elevate%20Your%20Design%20Skills/Project%201

-Project 2 Design link : https://pin.it/5jlUvw1

![screencapture-file-D-Sheryians-FrontEnd-Domination-CSS-Projects-Elevate-Your-Design-Skills-project-2-cotton-weave-index-html-2023-11-29-21_03_03](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/3f607285-cda4-467a-9512-5938eca2a37b)

-Source Code link : https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/tree/main/CSS%20Projects%20-%20Elevate%20Your%20Design%20Skills/project%202%20cotton%20weave

-Project 3 Design link : https://pin.it/6tU5NgO

![screencapture-file-D-Sheryians-FrontEnd-Domination-CSS-Projects-Elevate-Your-Design-Skills-project-3-trendline-index-html-2023-11-29-21_03_30](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/5ecef9b3-65ce-43e0-a691-fdd91bdc358a)

-Source Code link : https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/tree/main/CSS%20Projects%20-%20Elevate%20Your%20Design%20Skills/project%203%20trendline

### Responsive Web Development

Responsive web development is all about creating websites that adapt to various screen sizes and devices. In this topic, you'll get a fundamental introduction to the principles and techniques behind building web pages that look great on everything from large desktop monitors to tiny mobile screens.

Responsive website using HTML and CSS

--> Understanding Units - px - % - vw,vh - vmax,vmin - em,rem

--> Layout of website - absolute vs flex

--> flexbox - Display flex - aligning items in x and y axis - flex direction - flex wrap

--> CSS Media Queries - min height, min width - min width, max width

--> Key points to keep in mind to make website responsive

1. CSS flexbox
2. CSS Units
3. Responsive Typography
4. Mobile-First Approach
5. Flexible Images and Media

Practice! Practice! Practice!

### CSS Animations : Styling things Up

Unlock the world of captivating web design! Dive into 'Introduction to CSS Animations' and discover the magic of breathing life into your websites. Learn the basics of CSS animations, from transitions to keyframes, and embark on a journey to create visually stunning and dynamic web experiences!

Real Life Use Case :

![ezgif com-video-to-gif](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/83b7a9fa-9ef5-415a-ac62-558b9a55d25e)

-Before & After psuedo Selector

Master the art of CSS wizardry! Delve into 'CSS Animations: Enhancing Design with ::before and ::after' to wield the power of pseudo-elements. Learn to craft captivating designs and elevate your web creations using these versatile tools in CSS animation.

Bringing Websites to life:

![ezgif com-video-to-gif (1)](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/a3272a30-f79e-4bce-9fe9-a51ec629061d)

Learn Advanced Animation:

![ezgif com-video-to-gif (2)](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/69d610be-0177-48d2-8afb-31aee9e68503)

### CSS Responsive Project

The CSS Responsive Project is a hands-on exploration of creating a responsive web project. In this introduction, you'll get an overview of what to expect in this project and the importance of making web content adaptable to various screen sizes.

Use Marquee Tag for Scrolling images in horizontal or vertical direction

Another way to scroll images in vertical direction : use animation for scrolling :

@keyframes anime {
from {
transform: translateX(0);
}

to {
transform: translateX(-100%);
}
}

-Project ScreenShot:

![screencapture-127-0-0-1-5500-index-html-2023-11-29-22_20_59](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/b4801c89-650c-4631-8a5b-902f1d057a75)

![screencapture-127-0-0-1-5500-2023-11-30-18_06_45](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/257b0a48-7fe3-4da1-9dae-7ba8e71c90fd)

-Project Design link : https://www.pinterest.ca/pin/650559108696368140/

### CSS Bonus Project

Unlock creativity in action! Discover 'Introduction to CSS Bonus Project' and embark on a hands-on journey. Elevate your skills by diving into this project, applying foundational CSS knowledge to create a captivating web masterpiece.

-Project : https://dribbble.com/

### JavaScript: Every about JavaScript

JavaScript is a versatile and essential programming language for web development. This topic serves as your entry point into the world of JavaScript, providing an overview of its role in web development and its significance in creating interactive web pages.

-JS the language

-JS Developer - breiden eich

-Managed by ECMA

-JS the DOM - creating

-Basics

-Error check in console

-Inbult features

-variables constants

-compilers & interpreters

-window
types

-conditionals
loops

-functions
return

-undefined not defined null

-arrays
objects
questions

-prototypes
prototypal inheritance

-asynchronous synchronous js

-es6 climax
-questions

-miscellaneous switch case and ternary do-while forin forof

-interview prep

-call apply bind
this
prototypal inheritance

### Advance JavaScript : God Level JavaScript

Master advanced JavaScript concepts in a single session! Dive into an intensive guide covering the breadth of advanced JavaScript topics. Elevate your skills and deepen your understanding of complex JavaScript functionalities.

-Prototypal Inheritance

-Closures

-Event Delegation

-Higher-Order Functions

-Error Handling (try...catch blocks)

-Custom Events

-Understanding this

-call apply bind

### Asynchronous JavaScript

Unlocking Asynchronous JavaScript: Navigate the world of async programming. Understand promises, async/await, and callbacks, mastering the art of handling asynchronous tasks in JavaScript.

- ASYNC JS
- setTimeout

setTimeout(() => {
console.log("Timeout runs !!!");

}, 1000);

- setInterval

setInterval(() => {
console.log("Interval runs !!!");

}, 1000);

- Fetch API (AJAX API request)

fetch("https://randomuser.me/api")
.then((data) => data.json())
.then((res) => console.log(res));

- Axios (or other HTTP libraries)

- use CDN for using axios

axios
.get("https://randomuser.me/api")
.then((res) => console.log(res.data.results[0]));

- callbacks

function abcd(a, b) {
b();
}

abcd(1, function () {
console.log("abcd runs");
});

- Promises

const promise1 = new Promise(function (resolve, reject) {
let a = 10;

if (a == 10) {
resolve("value match");
} else {
reject("value does not match");
}
});

promise1
.then((result) => {
console.log(result);
})
.catch((err) => {
console.log(err);
});

- Async/Await

async function abcd() {
const data = await fetch(`https://randomuser.me/api`);

const result = await data.json();

console.log(result.results[0]);

console.log(result.results[0].name.first);
}

abcd();

- Event Loop : It checks whether main stack is empty or not and perform asynchronous tasks according to it

#### These terms store aysnc task

- callback Queue
- Microtask Queue
- Web APIs

- Callbacks vs Promises vs Async/Await

#### Question: https://randomuser.me/api is url se data lekar aao and usey console par show karo

- using callback

function dataFetch(url, callback) {
fetch(url)
.then((res) => res.json())
.then((result) => {
callback(result);
});
}

dataFetch(`https://randomuser.me/api`, function (data) {
console.log(data);
});

- using promises

function dataFetch(url) {
const data = new Promise((resolve, reject) => {
fetch(url)
.then((raw) => raw.json())
.then((res) => resolve(res));
});
return data;
}

dataFetch(`https://randomuser.me/api`).then((res) => console.log(res));

- using async await

async function dataFetch(url) {
const data = await fetch(url);

const result = await data.json();

return result;
}

async function dataPrint(url) {
const data = await dataFetch(url);

console.log(data);
}

dataPrint(`https://randomuser.me/api`);

- Generators

// aap program ke flow ko pause kr skte ho (execution) and bol sakte ab agla step karo

// function* printNum() {
// console.log("started");
// yield 1;
// console.log("pehle chl chuka hai");
// yield 2;
// console.log("dusra chl chuka");
// yield 3;
// console.log("chotha chl chuka");
// yield 4;
// }

// const ans = printNum();

// console.log(ans.next().value);
// console.log(ans.next().value);
// console.log(ans.next().value);

- question - 10print

function* allNums() {
for (let i = 1; i < 11; i++) {
yield i;
}
}

// allNums().next();
// console.log(allNums().next().value);

const gen = allNums();

console.log(gen.next());
console.log(gen.next());

- Error Handling in Asynchronous Code (try,catch,finally)

- Web Workers

- usually humara code single thead par chlta hai par kai baar kuchh bade calculations perform karne pad jate hai jiski wajah se aapka main thread busy ho jaata hai yaa fir wo kaafi jaada loaded ho jaata hai aur aapke baki tasks ki performance kam ho jaati hai

- ap chaaho to apna koi task web worker ko bhej sakte ho jo ki doosre thread mein usko perform karega and aapka main thread efficiently baaki cheejo ko handle kar paayega

- aap apni main js file se data send kr skte ho and aap worker file data accept karoge and jo perform karna hai karoge and waha se data waapis main file bhejoge and main file main waapis accept kroge

// add numbers

const nums = Array.from({ length: 10000 }, (_, b) => b + 1);

const worker = new Worker("worker.js");

// data send

worker.postMessage(nums);

worker.onmessage = function (data) {
console.log(data.data);
};

- worker.js file

onmessage = function (data) {
// console.log(data.data);

const sum = data.data.reduce((acc, item) => item + acc, 0);

// console.log(sum);

postMessage(sum);

};

### JS Animations - DOM Functionality Adding Interactivity

JavaScript animations are a dynamic way to bring life and interactivity to your web projects. This topic serves as your introduction to the world of JavaScript animations, explaining their importance and how they can enhance user experiences on your website.

-content

-DOM

-DOM Manipulation

-Accessing Elements:

document.querySelector()

-Modifying Elements:

innerHTMl, textContent

-Manipulating Styles and Classes:

style
classList

-Creating and Deleting Elements:

createElement()
appendChild()
removeChild()

-Event Handling:

addEventListener()

-Event Object

### JS Tasks - Mastering practical development challenges

Embark on mastery! Join 'Introduction to JS Practice Like Hell Series' to dive into intense JavaScript practice sessions. Level up your skills with hands-on challenges, solidifying your expertise in JavaScript programming.

1. Create an HTML page with a button. When the button is clicked, change the text of a paragraph element.

![ezgif com-video-to-gif](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/46c90887-f663-4ae2-aaa7-a8d6c1af4415)

2. Create a page with two images and a button. When the button is clicked, swap the source attribute of the images.

![ezgif com-video-to-gif (1)](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/4cd74d3e-294b-4cd9-affb-cae83938d2c1)

3. Create a form with input fields and a submit button. Use JavaScript to validate the form and display an error message if the input is invalid.

![ezgif com-video-to-gif (2)](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/0f789aee-a54c-403b-acdf-4058e7bfe604)

4. Create an unordered list. Allow users to add and remove list items dynamically using buttons.

![ezgif com-video-to-gif (3)](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/f6a80fa3-7dab-4398-b0c1-e2b14ec69d6e)

5. Build a countdown timer that starts when a button is clicked and updates the display in real-time.

![ezgif com-video-to-gif (4)](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/b25d549c-f960-4d60-8d01-a2a86d969ecd)

6. Create a tabbed interface where clicking on tabs displays different content sections without page reload.

![ezgif com-video-to-gif (5)](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/0bc7f509-66a8-455e-a108-602e22913696)

7. Display a progress bar that updates in real-time, showing the progress of a task, download, or form submission.

![ezgif com-video-to-gif (6)](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/782cbe27-31a5-4f1e-804d-41b087d470ed)

8. Create a search bar that displays live search results as users type, updating the results without requiring a full page reload.

![ezgif com-video-to-gif](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/a8509be6-df05-44d0-be3c-403075eefd46)

9. Build a character counter for a text area or input field, which updates real-time as the user types and enforces a character limit.

![ezgif com-video-to-gif (8)](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/18b38019-ae94-4a91-adae-2f70847ae44e)

10. Show a progress bar which shows how much page has been scrolled.

![ezgif com-video-to-gif (9)](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/b18db4d6-4b20-4428-ba28-f919aa5253e8)

### Real Life Developer Problems

- Developer Problems: Problem 1

- DEVELOPER PROBLEMS

- Debugging a TypeError: Cannot read property 'X' of undefined:

let obj = {};

obj.name; // no error
obj.name.age; // error

// Uncaught TypeError: Cannot read properties of undefined (reading 'age')

- Use optional chaining

obj?.name;
obj?.name?.age;

- Developer Problems: Problem 2

- Working with Local Storage

- local Storage ek aisa space hai browser ke pass jismein tum data store kardo to data stored hi rehta hai, aap chaahe to browser band krdo, refresh krdo ya kuchh bhi karo aapka data stored rahega jab tak aap khud usey delete naa kar de

- local storage poore browser ka hota hai ya website ka, ls hota to browser ka part hai par data store ye website ke naam se karta hai

localStorage.setItem("name", "Lucky Kashyap");

localStorage.setItem("age", 23);

localStorage.setItem('block',true);

- web site open or not if block true or false

- ek button banao jisse aap user block kardo ab jab bhi wo website khole use screen par blocked dikhey, nahi to website show ho and ek button jisse wo unblock ho

- Developer Problems: Problem 3

- Handling Asynchronous Operations
- ek button banao and us button ke click par aapko ek user lekar aana hai random tareeke se and usey add karna hai DOM mein

call Api
// random user api

function getNewCard() {
fetch(`https://randomuser.me/api`)
.then((raw) => raw.json())
.then((result) => {
// console.log(result.results[0]);
const { name, email, gender, picture } = result.results[0];

// console.log(name, email, gender);

document.querySelector(
"#parent"
).innerHTML += `



card-image

${name.first}


${gender}

${email}

Lorem ipsum dolor sit amet consectetur, adipisicing elit.
Repellat voluptates omnis doloribus perferendis?


`;

// return result;
});
}

document.querySelector("button").addEventListener("click", () => {
getNewCard();
});

- Developer Problems: Problem 4

- blocking scroll until something happens

document.querySelector("#hide").addEventListener("click", () => {
document.body.classList.toggle("overflow-hidden");
});

- Developer Problems: Problem 5

- custom tooltip

document.querySelector("#hide").addEventListener("mouseenter", () => {
document.querySelector(".tooltip").style.display = "initial";
});

document.querySelector("#hide").addEventListener("mouseleave", () => {
document.querySelector(".tooltip").style.display = "none";
});

### GSAP, ScrollTrigger, Locomotive - Fun Stuff

This introductory topic sets the stage for an exciting journey into advanced web animation techniques. GSAP (GreenSock Animation Platform), ScrollTrigger, Locomotive, and other tools are introduced as powerful resources for creating dynamic and engaging web animations.

-GSAP Basics:

![ezgif com-video-to-gif (3)](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/1ce64067-7d66-436e-a13e-3f8b30353814)

GSAP Project :

![screencapture-file-D-Sheryians-FrontEnd-Domination-GSAP-ScrollTrigger-Locomotive-Fun-Stuff-GSAP-Project-index-html-2023-11-29-21_03_52](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/a4c285b1-90fc-4e0b-9f42-039c23e768aa)

![ezgif com-video-to-gif (4)](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/e2262de6-02c2-4f91-a70b-dc24ffbd625c)

Include GSAP Using CDN link

gsap.to('selector',{properties})

gsap.from(".nav h3", {y: -50, opacity: 0,duration: 1,delay: 0.5,stagger: 1,});

ScrollTrigger UseCase :

![ezgif com-video-to-gif (5)](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/54f1157c-96d7-4823-aa08-98d0136237c4)

### GSAP - Understanding Pin Property in ScrollTrigger

gsap.to(".page2 img", {
width: "100%",
scrollTrigger: {
trigger: ".page2",
scroller: "body",
markers: true,
start: "top 0",
end: "top -100%",
scrub: 2,
pin:true
},
});

Project ShowCase :

![ezgif com-optimize](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/a07de365-5e8c-421d-9cf4-5cb715a559aa)

- Text Scroll Effect

gsap.to(".page2 h1", {
transform: "translateX(-125%)",
scrollTrigger: {
trigger: ".page2",
scroller: "body",
scrub: 2,
pin: true,
start: "top 0",
end: "top -100%",
},
});

Project ShowCase:

![ezgif com-video-to-gif-converted (2)](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/8d0a1dc2-1241-463a-9b03-827bd7b2aa56)

### Locomotive- All in One Video

- Learning Smooth Scrolling Effects
- Include CDN links to index.html file

// CSS file

// locomotive JS File

- In script.js file :

// locomotive scrolling

import LocomotiveScroll from "locomotive-scroll";

const scroll = new LocomotiveScroll({
el: document.querySelector(".main"),
smooth: true,
});

- It applies smooth scrolling

### GSAP, ScrollTrigger, Locomotive Configure

Include CDN Links :



- To Apply Locomotive Don't give width & height to wrapper/container

- Locomotive Smooth Scrolling :

![ezgif com-video-to-gif-converted (4)](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/7c0f1ee0-1624-4bc0-96f5-0aa51970b4a3)

- To use scrolltrigger with locomotive you need include some JS Code

gsap.registerPlugin(ScrollTrigger);

// Using Locomotive Scroll from Locomotive https://github.com/locomotivemtl/locomotive-scroll

const locoScroll = new LocomotiveScroll({
el: document.querySelector(".main"),
smooth: true,
});
// each time Locomotive Scroll updates, tell ScrollTrigger to update too (sync positioning)
locoScroll.on("scroll", ScrollTrigger.update);

// tell ScrollTrigger to use these proxy methods for the ".main" element since Locomotive Scroll is hijacking things
ScrollTrigger.scrollerProxy(".main", {
scrollTop(value) {
return arguments.length
? locoScroll.scrollTo(value, 0, 0)
: locoScroll.scroll.instance.scroll.y;
}, // we don't have to define a scrollLeft because we're only scrolling vertically.
getBoundingClientRect() {
return {
top: 0,
left: 0,
width: window.innerWidth,
height: window.innerHeight,
};
},
// LocomotiveScroll handles things completely differently on mobile devices - it doesn't even transform the container at all! So to get the correct behavior and avoid jitters, we should pin things with position: fixed on mobile. We sense it by checking to see if there's a transform applied to the container (the LocomotiveScroll-controlled element).
pinType: document.querySelector(".main").style.transform
? "transform"
: "fixed",
});

// each time the window updates, we should refresh ScrollTrigger and then update LocomotiveScroll.
ScrollTrigger.addEventListener("refresh", () => locoScroll.update());

// after everything is set up, refresh() ScrollTrigger and update LocomotiveScroll because padding may have been added for pinning, etc.
ScrollTrigger.refresh();

gsap.from(".page1 .box", {
scale: 0,
duration: 1,
delay: 1,
opacity: 0,
rotate: 360,
});

gsap.from(".page2 .box", {
scale: 0,
duration: 1,
// delay: 1,
opacity: 0,
rotate: 360,
scrollTrigger: {
trigger: ".page2 .box",
scroller: ".main",
start: "top 50%",
markers: true,
},
});

Use Locomotive & GSAP ScrollTrigger Both:

![ezgif com-video-to-gif-converted (3)](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/ead1266b-a0c0-4c81-8f9e-f50678b1f24b)

### GSAP: Bonus Project!!

Unlock GSAP's Potential: Delve into the 'Bonus Project' and explore the extra dimensions of GSAP. Unleash creativity and mastery as you apply advanced techniques to create captivating animations and interactions.

- Text Scrolling Effect From (Hotel Odesej Website) [[https://hotelodisej.com/]]
- Apply Smooth Scrolling

// function to split text

let headings = document.querySelectorAll(".page2 h1");

function textSplitting() {
headings.forEach((elem) => {
let clutter = "";
let h1Text = elem.textContent;

let splitedText = h1Text.split("");

splitedText.forEach((e) => {
clutter += `${e}`;
});
// console.log(h1Text);

elem.innerHTML = clutter;

// console.log(elem);
});
}

- Apply GSAP, ScrollTrigger & Locomotive

function gsapAnimation() {
gsap.to(".page2 h1 span", {
color: "#e3e3c4",
stagger: 0.1,
// opacity: 0.5,
scrollTrigger: {
trigger: ".page2 h1",
scroller: ".main",
markers: true,
start: "top 50%",
end: "top -15%",
scrub: 3,
},
});
}

Text Effect on Scroll :

![ezgif com-video-to-gif-converted (5)](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/536a9603-6e77-49c8-9071-bdd41fc21624)

### Final Project - Obys Agency Clone

Embark on our final projectβ€”a polished clone of obys.agency, showcasing everything you've learned in the course. We've poured our hearts into making the website and videos as simple as possible, a testament to our dedication and hard work. This website isn't just visually appealing; it's a showcase of seamless design and captivating animations. Dive into six engaging videos, each offering a glimpse behind the scenes. The introduction video sets the tone, giving you a sneak peek into the inspiration. Join me in celebrating the beauty of simplicity and skill in this front-end development masterpiece! πŸš€βœ¨

# Tailwind CSS

### Learn Tailwind CSS in One Video

Master Tailwind CSS in a single session! Dive into a comprehensive guide covering the entire spectrum of Tailwind CSS. Elevate your skills and streamline your workflow with this powerful utility-first framework.

## create Landing Page Using Tailwind CSS:

![Screenshot (3247)](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/ffdfb37c-1419-4a04-bf2d-9d30568de40f)

# React JS

- JavaScript Library for creating user interfaces.

### Introduction To React JS

Embark on the React JS journey! Discover the essentials in 'Introduction to React JS'. Uncover the basics and get started with this popular JavaScript library for building user interfaces.

- UI Library
- for solving the real time problem (facebook build this cool library)
- for notification update on real time basically (2013).

### React JS Theory & History

Understanding React JS: Delve into its theory and historical roots. Explore the foundational aspects and historical development of React JS

- react -> lang X
- react -> framework X
- react -> technology X

- react -> library

- facebook - 2013

- 2015 - open source

#### Virtual DOM

- Copy of real DOM

jab websites par khhob sare change hote hai to khoob saara repaint hota hai wo bhi wo elements jo badle bhi nahi, aur ye website ko slow down kar deta hai, is cheej se bhi bachne ke liyein facebook ne react create ki gyi

- likes count, notification count side by side (change/update)

- when ever there is change in UI the DOM repaint or rerender things
- This is not the case with virtual DOM or with React. React solves this problem of not repaint Those part which was not updated or changed only re render things which are updated.

### React JS - Essentials - Everything you need to learn

Core Foundations of React JS: 'Essentials - Everything You Need to Learn'. Delve into essential components, foundational concepts, and crucial skills required to master React JS in this comprehensive guide

- array objects destructuring import and export

- map filter arrow fncs (implicit return) spread operator

- Copy array using spread operator

let arr = [1, 2, 3, 4];

// real copy

let arr2 = [...arr];

arr.pop();

console.log(arr, arr2);

// object copy

let state = { name: "lucky", age: 23 };

let stateCopy = { ...state };

state.name = "HArsh";

console.log(state, stateCopy);

- Object Destructuring

let obj = { name: "lucky", age: 23 };

let { name, age } = obj;

console.log(name);
console.log(age);

- Array Destructuring

let arr = [12, function () {}];

let [first, sec] = arr;

console.log(first);
console.log(sec);

- import export

- hum log component banaate hai, component matlab page ka hissaa

- navbar sidebar cart home landing page second page, ab dikkat yeh aati hai har hissa alag alag component hai aur components ko hum log alag alag files mein rakhte hai, to inko last mein jodna bhi padta hai, jodne ke liyein use hota hai import & export

- navbar - export

- sidebar - export

- cart - import navbar sidebar

- main - import navbar

function Cart() {}

export default Cart;

export function Cart(){

}

import Cart from "./script";
import { Cart } from ".script.js";

- arrow functions

let sum = (a, b) => a + b;

console.log(sum(10, 12));

- impicit return

let value = val=>val+10;

console.log(value(20));

- map filter

- dono hi array pe chlte hai, aur dono kaa kaam hai array par kuchh perform krna hand "ek naya array return karna"

let arr = [1, 2, 3, 4, 5];

- map - har element par kuch karo aur naye array mein rakho

let arr2 = arr.map((item) => item * 10);

console.log(arr2);

let state = [11, 22, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14];

let greaterFive = state.map((elem) => (elem > 5 ? elem + 5 : elem));

console.log(greaterFive);

- map filter mein ek hi farak hai, map saare bande lautata hai matlab ki count kam nahi hoga, filter bando ko kam kar skta hai

- ek array mein sabhi nums jo ki 5 se bade hai unmein 10 add kro

- jab originl array ka size kam naa hona ho waha map use hota hai

- jab original array ka size kam krna ho toh wha filter use hota hai

- ek array mein se saare wo nums hata do jo ki 5 se chhote hai

- filter

let arr = [1, 2, 3, 4, 5, 6];

let filterArr = arr.filter((elem) => elem > 5);

console.log(filterArr);

### Section 1: System Setup and Basics

Extensions:

- tabnine
- prettier

Download :

- node js
- use vite vs create react app

npm create vite@latest

vite project : setup

cd setup
npm i
npm run dev

#### Understanding JSX

- jsx -> jsx is actually a very similar looking structure like HTMl but with super powers

- jsx sirf dikhta hai HTML ki trah par hota nhi

- It converted into React.createElement

- jsx is very similar to HTML but with superpowers

- conversion to javascript

{login ? 'profile':'login'}

Hey {2 + 2}

// output Hey 4

#### Making App

- Component

- React "react" when changes occurs

function App(){

return (


App Component



)
}

- Component is a reusable code

### Section 2: Building Components

- Header

import React from "react";

const Header = () => {
return (


Header




);
};

export default Header;

- Configure Tailwind CSS

- Creating Card Component

### Section 3: Reusable Components

- Use Array map method.

const data = ["ajay", "rahul", "sachin", "udesh"];

{data.map((item, index) => (

{item}


))}

- Showing Card With Data

- Create Array of data

const data = [
{
image:'',
name:'',
desc:''
}
]

- and use map method to use different data with card.

#### React Fragments

- unnecessary div creation stop
- Enclosed all elements in one wrapper without creating div or other element use React Fragment

<>
>

### Section 4: Conditional Rendering

- Instock Check

{item.inStock ? "InStock" : "Out Of Stock"}

- Handling Events:

console.log("download song")}
>
Download Now

// seperatae function

const handleClick = () => {

console.log("mouse over event");
};

### Section 5: Managing State and Understanding the State Hook

- state variable takes care of react updation

- It will take care of react changes

- state ek data hota hai, react is data ka khayaal rkhta hai, jab bhi ye data change hota hai react page ko update karta hai

- state koi bhi data ho skta hai, jaise ki score = 0

const [score,setScore] = useState(0);

// onClick par apply krdo

const handleScore = () => {

setScore(score + 1);
};

- Based on Previous Value

onClick={() => setVal((prev) => prev + 1)}

- Use object data in useState

const [data,setData] = useState({name:'Lucky',isBanned:false});

onClick={() => setData({ name: "Divyanshu", isBanned: true })}

onClick={() => setData({ ...data, isBanned: !data.isBanned })}

#### Section 6 : Mastering the useState() hook

- useState not update synchronously

- add object property to useState

- useState state ko turant update nahi karta, wo useState state ko update karta hai apne hisaab se function completion ke baad to fix performance issue

const [val, setVal] = useState({ name: "lucky",age: 23 });

Name : {val.name}


Age : {val.age}


Role : {val.gender}

{setVal({ ...val, gender: "Male" })

console.log(val);
}

}
>
Click

- Use Array in useState

{val.map((item, index) => (

{item}


))}

setVal(() => val.filter((item, index) => index != 2))}
// onClick={() =>
// setVal(() => {
// return val.filter((item, index) => index != val.length - 1);
// })
// }
className="px-3 py-1 text-md bg-blue-500 rounded-full text-white"
>
Change

- Remove even values from an Array

onClick={() =>
setVal(() => val.filter((item, index) => item % 2 !== 0))
}

- Arrays Addition

onClick={() => setVal([...val, 10])}

- Change array of an object

const [val, setVal] = useState([

{ name: "lucky", age: 23 },
{ name: "Shivam", age: 34 },
{ name: "golu", age: 25 },
]);

onClick={() =>
setVal(() =>
val.map((item, index) =>
item.name === "Shivam" ? { name: "Shivam", age: 55 } : item
)
)
}

#### Section 7 : useState() Hooks

- Solve small-small questions

- print bahar jaao if val is false and print mat jao iv val is true

{data === false ? "BAHAR JAO" : "MAT JAO"}

- Use React icons

npm i react-icons --save

- switch Images:


card
card
setVal(() => !val)}
className="w-10 h-10 bg-[#dadada8b] flex items-center justify-center rounded-full absolute bottom-[0%] left-1/2 -translate-x-[50%] -translate-y-[50%]"
>


#### Section 8 : Passing Data via Props

- Pass Data via prop

- props use hote hai aapke components ko reuable bnane ke liyein consider karo aapke pass ek button hai and aapko us button ko alag alag jagah daalna hai app mein, to aap ek button ek mein baaneyin aur uska data hard coded karne ki jagah parent component se send karde and child component par use kar le



{btn}

- Array of object change via props functions

const handleFriendsBtn = (index) => {
setRealData((prev) => {
return prev.map((item, ind) => {
if (ind === index) {
return { ...item, friends: !item.friends };
}
return item;
});
});
};

- Dynamic class change

handleFriendsBtn(index)}
className={`px-3 mt-4 py-1 text-sm text-white ${
friends ? "bg-green-600" : "bg-blue-500"
} font-semibold rounded-md`}
>
{friends ? "Add Friend" : "Friend"}
{/* {friends ? "ADD FRIEND" : "Friends"} */}

#### Section 9 : Props and State Exercise

- Create card add build feature Add To favourites

const [song, setSong] = useState(data);
const [favouritesCount, setFavouritesCount] = useState(0);

const handleFavourites = (index) => {
setSong((prev) => {
return prev.map((item, indx) => {
if (indx === index) {
return { ...item, favourites: !item.favourites };
}

return item;
});
});

setFavouritesCount((prev) => prev + 1);
};




{song.map((item, indx) => (

))}

##### React Styled Componnets

- CSS Modules - jismein aap kabhi kisi website ka code dekhte ho aur wha par aapko css classes ka naam bada aada teda dikhta hai

- UI library- tailwind css, material UI,bootstrap,Chakra UI

- create file style.module.css

.a{
color:'red';
}

#### Section : 10 Form Handling

- Form Handling
- form basic nature or we can say default nature is to get submmitted but react says no page reload
- website submit ho jaati hai form submit krne par.

- How react handle things in Form
- React prevents Form Submission

- use Ref - is trike mein hum har input ko select kar lete hai and unki value tab nikaalte hai jab form submit hota hai

- use ref ke through html input ko select kar skte hai

const name = useRef(null);

const password = useRef(null);

const handleSubmit = (e) => {
e.preventDefault();
console.log(name.current.value,
password.current.value);

};

- controlled components

const [username, setName] = useState({ name: "", age: "" });

const handleSubmit = (e) => {
e.preventDefault();

console.log(username);
};


setName({ ...username, name: e.target.value })}
/>
setName({ ...username, age: e.target.value })}
/>

- react hook form

- install react-form-hook package

npm i react-hook-form

import React from "react";
import { useForm } from "react-hook-form";

const ReactForm = () => {
const { register, handleSubmit } = useForm();

// console.log(register());
return (


console.log(data))}>
{" "}


{" "}


{" "}


{" "}


{" "}



{" "}






);
};

export default ReactForm;

#### Section 11 : Form Handling Exercise

- Form Handle Exercise

- App - Cards - Card - Form

- Add form Data into Card component

const [users, setUsers] = useState([]);

const addFormData = (data) => {
setUsers([...users, data]);
};

- Reset Input Values

// provided by react-hook-form

reset()

- Remove Elements From Card

const handleRemove = (id) => {
setUsers(() => users.filter((item, index) => index != id));
};

#### Section 12 : React JS Routing and Beyond

- Configure react router to use react-routing

- React Uses single page approach in application i.e. no page reload after page changes, for this we use react routing.

- To move From one Page to another without reloading the website, so that website is called Web Application (for not reloading whole page).

npm i react-router-dom

- Wrap Main Container main.jsx



- Create Navbar


Home
User
Home
services

// Implement Routing


} />
} />
} />
} />

- Use navigate hook for back to particular route

const navigate = useNavigate();

const back = () => {
navigate("/");
// console.log("hey");
};

- Use NavLink to active & de-Activate class

{
console.log(e);
}}
to="/"
>
Home

- Change color three ways :

- through style

style={(e) => {
return { color: e.isActive ? "tomato" : "" };
}}

- Through className :

{
return [
e.isActive ? "text-red-300" : "",
e.isActive ? "font-semibold text-xl" : "",
].join(" ");
}}
to="/about"

>

About

- Inside Child Component


{(e) => {
return (

User

);
}}
{/* User */}

### Section 14 : How to integrate API in REACT JS

- The concept for connecting frontEnd With Backend is called AJAX (Asynchronous JavaScript XML) & which implements this communication is through fetch/axois.

- API is an communication medium to build relation

- API allow the communication with each other using requests and responses.

- Using FETCH/AXIOS Method we can access third party API.

- Connect frontEnd with Backend through an API

import axios from "axios";
import "./App.css";
import { useState } from "react";

function App() {
const [products, setProducts] = useState([]);

const getProducts = () => {
const api = "https://fakestoreapi.com/products";

axios
.get(api)
.then((products) => {
// console.log(products);
setProducts(products.data);
})
.catch((err) => console.log(err.message));
};

const addProducts = () => {
const api = "https://fakestoreapi.com/products";

axios
.post(api, {
title: "test product",
price: 13.5,
description: "lorem ipsum set",
image: "https://i.pravatar.cc",
category: "electronic",
})
.then((products) => {
console.log(products);
})
.catch((err) => console.log(err.message));
};
return (


App


Get Products


Add Products




    {products.length > 0
    ? products.map((item, index) => (

  • Product Name: {item.title}

  • ))
    : "Loading....!!"}


);
}

export default App;

- LifeCycle Method name useEffect in functional Component:(Three Types of LifeCycle Methods)

- Component Mounting - creation
- Component Updating - updation (when useState is Changed or changes in view)
- Component UnMounting - deletion/destroy

- Component Creation

useEffect(()=>{
console.log('Component Creation');

return ()=>{
console.log('Component Deletion From DOM');
}
})

useEffect(() => {
console.log("SErvices Run");

return () => {
console.log("SErvice Destroyed");
};
});

#### Section 15 : useEffect() on State Change

- Hook - useEffect() on state change

- Refresh : Component Deletion + Component Updation

- Update : Component Deletion + Component Creation

const [first, setFirst] = useState("This is normal data");
const [second, setSecond] = useState("This is very Large Data");

useEffect(() => {
console.log("SErvices Run");

return () => {
console.log("SErvice Destroyed");
};
}, [second]);

- Call API When component is loaded using useEffect HOOk we call it.

useEffect(() => {
const api = "https://fakestoreapi.com/products";

axios
.get(api)
.then((products) => {
// console.log(products);
setProducts(products.data);
})
.catch((err) => console.log(err.message));
}, []);

- OutSourcing the Code

- writing import axois from 'axios' causes sometimes problem & write this line in 10 20 30 40 .. components is lengthy & create issue for Us

- While requesting to the API - the Header information, cookies,authorization,token, many things generated & for this we have to take of this to not to call an API when other component is added

- Login - profile, timeline , chats enabled

- Call one time & reference call everytime (create one time object).

- Not call axios everytime.

import axios from "axios";

// export { axios };

const instance = axios.create({
baseURL: "https://fakestoreapi.com",
});

axios
.get("/users")
.then((users) => {
console.log(users);
// setProducts(users.address);
})
.catch((err) => console.log(err.message));

export default instance;

#### Section 16 : React Context API

- It solves Prop Drilling Problem

- Prop Drilling means sharing data between one component to another & another to another means parent to child to son

- From Parent to Child Data Pass only .

- Wrap Application via context

- create context & create UserContext

import React, { createContext, useState } from "react";

export const UserContext = createContext();

const Context = (props) => {
// console.log(props);

const [users, setUser] = useState([
{
id: 0,
username: "John Doe",
city: "USA",
},
{
id: 1,
username: "Lucky",
city: "Delhi",
},
{
id: 2,
username: "Harsh",
city: "Bhopal",
},
]);

return (
<>

{props.children}

>
);
};

export default Context;

- use data via components

const { users, setUser } = useContext(UserContext);

- use navigate hook for go back

const navigate= useNavigate();

// apply on go back button

const handleBack =()=>{
navigate('/user');
}

#### React JS: Project 1

- Building Basic CRUD with ReactJS: Engage in a project integrating CRUD functionality and Context API. Learn to create, read, update, and delete operations within a ReactJS project using Context API for seamless data management.

#### React JS: Project - Refokus Clone

- Replicating Refokus: Dive into 'ReactJS: Project 2 Refokus Clone' and explore the creation of a Refokus-like project using ReactJS. Apply your skills to build a similar platform, honing your abilities in the process.

##### Component Structure:

- App

- Navbar
- button component
- Work
- Stripes

- Stripe

- Products
- Product
- Marquee
- Blocks
- Block
- Footer

### Design Navbar :

![screencapture-localhost-5173-2024-04-12-23_02_32](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/564c6d0d-fb1c-468e-bf05-ed5c3edffdf0)

### Stripes Component :

![screencapture-localhost-5173-2024-04-13-22_19_50](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/12accfe6-3eef-4328-836a-cf131ecd945a)

### Products Component :

![screencapture-localhost-5173-2024-04-14-13_28_12v](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/c1b8bf7f-41dd-416e-9171-694e1a8a1296)

### Marquees Component :

![Capture](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/f0043705-32c3-46c1-8d46-a4a96160415d)

### Cards Component :

![screencapture-localhost-5173-2024-04-14-14_55_48](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/c8f4342e-6330-480f-b715-5e08c8ccbf35)

### Footer Component :

![foo](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/c7a44e91-6292-48b6-b9e4-b010f3e87821)

## Refokus UI :

![screencapture-localhost-5173-2024-04-14-15_33_50](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/4974dd27-1cac-47f4-b54e-7c3b752dfd4a)

##### Use Locomotive JS

- Handle smoothness via locomotive js

#### Use Framer motion

- Animation of work component
- For Scrolling Work component images appears

#### Redux

##### Everything you Need to Know About Redux

- Essential Redux Insights: Gain a comprehensive understanding of Redux. This guide covers everything you need to know about Redux, offering key insights into state management for robust React applications.

## ExoApe - Let's Build it: [[https://www.exoape.com/]]

- UI project with scrolling animations

#### GSAP X Reactjs

##### Introduction and Setup: GSAP X React.js for Stunning Animations

- Install neccessary packages

npm i gsap
npm i @gsap/react

- Two ways to create GSAP Animation

- useRef()
- useGSAP(()=>{
gsap.to(selector,{}) })

- using useRef:

const boxRef = useRef();

useGSAP(() => {
gsap.to(boxRef.current, {
x: 600,
y: 200,
});
});



- Using normal useGSAP & pass selector

useGSAP(() => {
gsap.to(".box", {
x: 1000,
delay: 1,
duration: 2,
rotate: 360,
backgroundColor: "blue",
});
});

##### IMAGE PREVIEW:

![ViteReact-GoogleChrome2024-06-1512-58-10-ezgif com-video-to-gif-converter](https://github.com/Lucky-Kashyap/Front-End-Domination-Create-Anything-with-Code/assets/88204554/439d2bca-634e-4252-8a48-3a8046354b40)

##### GSAP Timeline: Animate Like a Pro

- define timeline

const tl = gsap.timeline();
useGSAP(() => {

tl.to(boxRef.current, {
x: 1200,
rotate: 360,
borderRadius: "50%",
duration: 2,
delay: 1,
});
tl.to(circleRef.current, {
x: 1200,
rotate: 360,
borderRadius: "10px",
duration: 2,
});
});

useGSAP(
() => {
gsap.to(".box", {
rotate: 360,
duration: 1.5,
delay: 1,
});
},
{ scope: ".container1" }
);

##### IMAGE PREVIEW:

![ViteReact-GoogleChrome2024-09-1021-51-51-ezgif com-video-to-gif-converter](https://github.com/user-attachments/assets/4b53a7ab-2df2-451a-ad7e-7ae62538f2ce)
![ViteReact-GoogleChrome2024-09-1022-01-53-ezgif com-video-to-gif-converter](https://github.com/user-attachments/assets/283a2310-7ea8-47df-abd4-cbbaf9a78291)

# FrontEnd Domination

Embarking on a journey to become a proficient frontend developer is an exciting and rewarding endeavor.

# Thanks to Sheryians Coding School For bringing this Course

# Mentor : Harsh Sharma

Happy Learning! ✨

Made with β˜•οΈ by Divyanshu Kashyap