TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Edison Bulb Night Mode

74 pointsby dguoover 1 year ago

13 comments

_nalplyover 1 year ago
What if there was a real Edison bulb having a night mode?<p>I imagined it having a circuit to dim it during the night, like a night light. For example having a few filaments inside a bulb and switching between parallel for more light and serial for less light.<p>Our home was not well insulated and in a corner of our sleeping room we had condensing moisture (it was unavoidable because in the corner the temperature was way too low,the lowest I had was 9°C or 48°F). I thought about putting some nichrome wire (for example terrarium heating wires) in the corners and having a switch between parallel and serial as a means for two different power levels. The idea is a parallel switch. If you turn the switch, multiple contacts are connected and disconnected. If you connect the wires cleverly, you can switch between parallel and serial. Luckily our landlord found a permanent solution for this problem after I showed him the measurement I made, so I didn&#x27;t need to build this.<p>So that&#x27;s why I started to get a picture of an Edison bulb that has such a switch inside its base.
评论 #38138949 未加载
评论 #38140257 未加载
cfjover 1 year ago
I like this a lot. I had a similar idea for my own site[0], but I leaned a bit more heavily into the actual cord behavior of the thing.<p>[0] <a href="https:&#x2F;&#x2F;svarden.se&#x2F;post&#x2F;the-worlds-most-satisfying-toggle" rel="nofollow noreferrer">https:&#x2F;&#x2F;svarden.se&#x2F;post&#x2F;the-worlds-most-satisfying-toggle</a>
评论 #38157216 未加载
josephwegnerover 1 year ago
Really great article, and the site looks great! One small piece of feedback:<p>&gt; the server-rendered HTML will always default to light mode. This creates a flicker for night owls<p>You might consider switching this - render the dark-mode version by default, and have the flicker be from dark-to-light. For users operating mostly in dark mode, a bright flash of white can be painful. The same is not true for users operating in light mode - they will barely notice a moment of dark.
评论 #38141043 未加载
评论 #38157202 未加载
CGamesPlayover 1 year ago
Two improvements that could be made:<p>1. My dark mode preferences change throughout the day. Caching the value in localStorage means that it will require manual updates twice a day. Add a behavior that automatically <i>unsets</i> the localStorage key whenever it would set it to the currently system-preferred value.<p>2. Apply the override using a CSS class on the body element calculated from a synchronous JavaScript block to avoid the flash.
评论 #38157232 未加载
seanosaurover 1 year ago
Very cool! Love the little cord pull.<p>&gt; ...the server-rendered HTML will always default to light mode. This creates a flicker for night owls...<p>I played with this a bit and yes, that flicker is harsh. I appreciate the fade-in, but maybe have the initial color on load be somewhere between light and dark and then fade it to whichever is set by the client.
评论 #38157246 未加载
adaml_623over 1 year ago
Regarding the local storage Vs server side defaults I don&#x27;t understand why you wouldn&#x27;t use a web cookie to store the on&#x2F;off state? Am I missing something
评论 #38139259 未加载
评论 #38161606 未加载
mindhunterover 1 year ago
If he’d run the dark mode JavaScript in the head and control the style through a css class, it would not flash.
dfeeover 1 year ago
Cute bulb and effect. I like that your dark mode isn’t so harsh, as well. I feel they’re often max contrast, which is the last thing my eyes want to see. This is more of a … solarized?
p1mrxover 1 year ago
Generally, pulling down on a light bulb only turns it off once.
eternityforestover 1 year ago
I love the landscape at the bottom of the page! It really gives a sense of the page being <i>a place</i>. I might have to steal that page bottom concept! I&#x27;ve never actually seen it before.<p>The bulb is a really nice detail, and the color schemes are both really nice.
评论 #38161656 未加载
CSSerover 1 year ago
This looks nice and all, but this doesn’t work on mobile devices due to pull to refresh.
评论 #38137513 未加载
评论 #38161630 未加载
评论 #38137743 未加载
runlevel1over 1 year ago
That&#x27;s one classy looking personal page.
lloydatkinsonover 1 year ago
Ironically dragging doesn’t work on mobile