Skip to content

Instantly share code, notes, and snippets.

View tausiq2003's full-sized avatar
🎯
Focusing

Tausiq Samantaray tausiq2003

🎯
Focusing
View GitHub Profile
@tausiq2003
tausiq2003 / index.html
Last active January 4, 2026 13:01
How to enable night mode in website if you don't have dark mode
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Night light website</title>
<style>
body{
padding:0;
@tausiq2003
tausiq2003 / onlytemplate.js
Last active January 14, 2024 19:05
This is only.js template, it creates dynamic pages without HTML and CSS files.
const express = require("express");
const { JSDOM } = require("jsdom");
const app = express();
const port = 6969;
app.use(express.static("assets"));
app.get("/", (req, res) => {
const dom = new JSDOM(`<!DOCTYPE html>`);
const doc = dom.window.document;
// Use doc instead of document
@tausiq2003
tausiq2003 / only.js
Created January 14, 2024 18:48
This code generates a static site without HTML and CSS files, guess what it requires Express and jsdom and guess what is this website scroll till end. Thanks.
const express = require("express");
const { JSDOM } = require("jsdom");
const app = express();
const port = 6969;
app.use(express.static("assets"));
app.get("/", (req, res) => {
const dom = new JSDOM(`<!DOCTYPE html>`);
const doc = dom.window.document;
const body = doc.querySelector("body");