Skip to content

Instantly share code, notes, and snippets.

View Tribhuwan-Joshi's full-sized avatar
🌊
water

Tjsm Tribhuwan-Joshi

🌊
water
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">
<link rel="stylesheet" href="learn.css">
<title>Document</title>
</head>
<body>
@Tribhuwan-Joshi
Tribhuwan-Joshi / contact.js
Last active July 30, 2022 10:24
This is index.js to control the main flow
export default function contactPage() {
const main = document.querySelector(".main");
main.innerHTML = `
<div class="content">
<div style="display:flex;justify-content:center;align-items: center;margin-top: 0;">
<h1>Connect with us </h1><img src="../src/call.png" class="contact-img" alt="caller">
</div>
<div class="email"> Email - EatyDeez@gmail.com</div>
import './style.css'
import img from './img.jpeg'
import github from './github.png'
import homePage from '../src/home.js'
import menuPage from '../src/menu.js'
import contactPage from '../src/contact.js'
const gitImg = new Image();
gitImg.src = github;
gitImg.classList.add("github");
@Tribhuwan-Joshi
Tribhuwan-Joshi / domManipulation.js
Created August 20, 2022 11:42
files for TODO app
const format = require('date-fns/format');
const containerAddTask = document.querySelector('.container-addTask');
function renderTask(taskName, taskNote, priorityValue, dueDate) {
const newTask = document.createElement('div');
let priorityColor;
if (priorityValue === 'high') {
priorityColor = 'red';
}
else if (priorityValue === 'medium') {
@Tribhuwan-Joshi
Tribhuwan-Joshi / index.html
Created September 16, 2022 11:26
API to get gifs
<!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>Document</title>
</head>
<body>
<img src="#" alt="gif">
@Tribhuwan-Joshi
Tribhuwan-Joshi / webpack.config.js
Created September 21, 2022 07:20
webpack config with babel , tailwind and eslint
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = {
experiments: {
topLevelAwait: true,
},
mode: "development",
entry: "./src/index.js",
output: {
@Tribhuwan-Joshi
Tribhuwan-Joshi / index.js
Created September 22, 2022 01:27
Weather App
const app = (() => {
function giveData(day) {
const res = {};
res.weather = day.weather[0].main;
res.temp = day.main.temp;
res.feelslike = day.main.feels_like;
res.windSpeed = day.wind.speed;
res.humidity = day.main.humidity;
res.pop = `${day.pop * 100}%`;
res.icon = day.weather[0].icon;
class Node{
constructor(value) {
this.value = value;
this.left = null;
this.right = null;
}
}
class BST{
{
"env": {
"browser": true,
"commonjs": true,
"es2021": true
},
"extends": ["airbnb-base", "prettier"],
"overrides": [{
"files": ["**/*.test.js"],
"env": {
@Tribhuwan-Joshi
Tribhuwan-Joshi / test.js
Created November 12, 2022 09:31
call vs apply vs bind
/* With the call() method, you can write a method that can be used on different objects. */
const person = {
fullName: function() {
return this.firstName + " " + this.lastName;
}
}
const person1 = {
firstName:"John",
lastName: "Doe"
}