Skip to content

Instantly share code, notes, and snippets.

View code08-ind's full-sized avatar
:octocat:
Working from home

Aryan Garg code08-ind

:octocat:
Working from home
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Personal Blog</title>
</head>
@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@800&family=Montserrat:wght@500&family=Oswald:wght@500&family=Quicksand&family=Ubuntu:wght@500&display=swap");
* {
padding: 0;
margin: 0;
box-sizing: border-box;
scroll-behavior: smooth;
}
body {
let heading = document.getElementById("heading");
let head2 = document.getElementById("head2");
let para = document.getElementById("para");
let four = document.getElementById("four");
let five = document.getElementById("five");
let six = document.getElementById("six");
let btn1 = document.getElementById("btn1");
let btn2 = document.getElementById("btn2");
let rows = document.getElementById("rows");
let image = document.getElementById("image");
import React from 'react';
import Calculator from './Calculator';
import Navbar from './Navbar';
const App = () => {
return (
<>
<Navbar />
<Calculator />
</>
import React from 'react';
import '../node_modules/bootstrap/dist/css/bootstrap.min.css';
import '../node_modules/bootstrap/dist/js/bootstrap.bundle';
const Navbar = () => {
return (
<>
<nav className="navbar navbar-expand-lg navbar-light">
<div className="container-fluid">
<a className="navbar-brand" href="/">Navbar</a>
import React from 'react';
import Button from '@material-ui/core/Button';
import '../node_modules/bootstrap/dist/css/bootstrap.min.css';
import '../node_modules/bootstrap/dist/js/bootstrap.bundle';
const Calculator = () => {
return (
<>
<div className="container">
<h1>Hello World</h1>
import React, { useState } from 'react';
import Button from '@material-ui/core/Button';
import AddIcon from '@material-ui/icons/Add';
import '../node_modules/bootstrap/dist/css/bootstrap.min.css';
import '../node_modules/bootstrap/dist/js/bootstrap.bundle';
const Calculator = () => {
const [add, setAdd] = useState(0);
const increment = () => {
setAdd(add + 1);
import React, { useState, useEffect } from 'react';
import '../node_modules/bootstrap/dist/css/bootstrap.min.css';
import '../node_modules/bootstrap/dist/js/bootstrap.bundle';
const Calculator = () => {
const [width, setWidth] = useState(window.screen.width);
useEffect(() => {
window.addEventListener('resize', changeWidth);
console.log("Your Width Is Changed To " + width);
return () => {
import React, { createContext } from 'react';
import ComponentA from './ComponentA';
const FirstName = createContext();
const LastName = createContext();
const UseContext = () => {
return (
<>
import React from 'react';
import ComponentB from './ComponentB';
const ComponentA = () => {
return (
<>
<ComponentB/>
</>
);
}