Hey, I'm Onurhan 👋
I'm a Software Developer. I'm currently developing things independently.
✨ My personal website built with Next.js, Tailwind, TypeScript, Upstash and Vercel.
Home Page: https://onurhan.dev
Hey, I'm Onurhan 👋
I'm a Software Developer. I'm currently developing things independently.
@karimzade who uses brave browser with 15.6 inch screen and 1920x1080 size sent me the video below.
I did not encounter a similar problem when I tested it on Safari or other browsers at the same screen sizes. It is probably a problem with brave or another extension.
The code for dynamically changing the code block theme works as follows. I follow the data-theme
content and make the relevant part hide or block.
function togglePreStyles(theme: string) {
document.querySelectorAll("pre")?.forEach((el) => {
switch (el.getAttribute("data-theme")) {
case "light":
theme === "dark"
? el.classList.add("hidden")
: el.classList.remove("hidden");
break;
case "dark":
theme === "dark"
? el.classList.remove("hidden")
: el.classList.add("hidden");
break;
default:
el.setAttribute("data-theme", "dark");
}
});
}
However, there is a point I missed here. If the user does not change a theme when he first enters the site, both are visible because that change is undetected. Whatever happens here, a piece of code must be added to hide the theme feature that was not selected in the first step.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.