UI overhaul for Hacker News. Adds Dark mode, no light mode support yet.
Modern Hacker News by dantelin2009
Details
Authordantelin2009
LicenseCreative Commons Attribution Share Alike 4.0 International
Categorynews.ycombinator.com/
Created
Updated
Size25 kB
Statistics
Learn how we calculate statistics in the FAQ.
Failed to fetch stats.
Description
Notes
v 0.5
new new new things
- Collapsing comments button that isn't ugly
- More icons
- More tooltips
- Zero images. Material Icons FTW!!
v 0.4
new new new new things
- No more Discord CDN dependency!! This should result in faster load time for custom assets, and less traffic used overall. It also theoretically improves performance, but it's negligible.
- UPVOTE ANIMATION!!! Now it went from old site to trendy site 😎😎
- Fixed some random strings that weren't capitalized for some reason
- I'm always open for suggestions, please contact me if you have good ideas (heladeradragon on discord)
v 0.3
new new new things
- I perfected the entire thing. Fixed a LOT of bugs, so now even pages that I haven't found will render fine. This is officially a good way to browse Hacker News. You're welcome.
v 0.2
new new things:
- comments are better
- custom upvote icon
- visited links now have different color
- user page isn't as fucked up anymore
- page you're in is now highlighted in the sidebar
- fixed alignment some places
- many bug fixes
- now using inter font
- better colors
- added a tooltip for the upvote icon! i plan to use this for other elemtns that aare kind of confusing
- very few pages should be broken now
- now somewhat usable!!!
new things:
- dark mode
- somewhat modern ui
- good font
- fixed top bar
- sick links
- no more 10pt text! (actually readable now)
- i changed the logo oops
- reasonable padding
- the content doesn't stretch to the edges of the screen anymore if your screen is larger than 1024 pixels, so now it looks reasonable in a somewhat modern display
- buttons don't look like fucking garbge
- i adjusted the letter spacing in the comments a bit to make it actually readable without me looking like a grandma
- i still don't know that much about this website so if there's something wrong please tell me in discord: "@heladeradragon"
- added icons haha get fucked
- sick animations
Source code
Source code has over 10K characters, so we truncated it. You can inspect the full source code on install link./* ==UserStyle==
@name Modern Hacker News
@version 20230728.00.34
@namespace userstyles.world/user/dantelin2009
@description UI overhaul for Hacker News. Adds Dark mode, no light mode support yet.
@author dantelin2009
@license Creative Commons Attribution Share Alike 4.0 International
==/UserStyle== */
@-moz-document domain("news.ycombinator.com") {
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined");
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');
:root{
--fonts: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted", "Segoe UI", "Liberation Sans", sans-serif;
--primary-text: #eee;
--secondary-text: rgba(255, 255, 255, .8);
--dark-text: rbga(255, 255, 255, 0.65);
--disabled: rgba(255, 255, 255, .5);
--vibrant-orange: #FF5200;
--muted-orange: #FFA992;
--tinted-white: #ffd8c6;
--transparent-orange: #ff660026;
--thin-layer: rgba(255, 255, 255, 0.06);
--layer: rgba(255, 255, 255, 0.12);
--divider: rgba(255, 255, 255, 0.12);
--popup: #111;
--popup-shadow: 0px 4px 10px #0000000f;
--tooltip-f-size: 13px;
}
.material-symbols-outlined {
font-variation-settings:
'FILL' 0,
'wght' 400,
'GRAD' 0,
'opsz' 48
}
body{
background: #1e1e1e;
margin: 0px;
padding: 0px;
box-sizing: border-box;
color: white;
}
a:link{
text-decoration: none;
border-bottom: none;
}
a > u{
color: var(--vibrant-orange);
text-decoration: none!important;
}
a:link, a:visited {
color: var(--muted-orange);
}
b{
color: var(--primary-text);
}
#hnmain {
background: #1e1e1e;
width: 100%;
box-sizing: border-box;
}
div[style="margin-left:36px; margin-top:6px; margin-bottom:14px"]{
width: 100%;
max-width: 1024px;
margin: 0 auto !important;
padding-left: 52px;
padding-bottom: 24px;
}
#pagespace{
margin-top: 72px !important;
min-width: 1px;
background: #f000;
height: 0px !important;
display: block;
}
#hnmain > tbody > tr:not(:first-child) > td > table{
width: 100%;
max-width: 1024px;
margin: 0 auto;
padding: 24px;
}
#hnmain > tbody > tr:first-child > td > table{
height: 52px;
background: #272727;
position: fixed;
z-index: 2;
color: white;
font-size: 16px;
}
#hnmain > tbody > tr:first-child > td > table > tbody > tr > td:first-child{
padding-left: 24px;
padding-right: 6px !important;
}
#hnmain > tbody > tr:first-child > td > table > tbody > tr > td:last-child{
padding-left: 24px;
padding-right: 24px !important;
}
.hnname{
display: none;
}
.comhead > a.hnuser{
color: var(--vibrant-orange);
}
span.onstory > a{
color: var(--muted-orange) !important;
}
td[style="line-height:12pt; height:10px;"] .pagetop{
position: absolute;
top: 2px;
left: 50%;
transform: translateX(-50%);
}
.pagetop > a{
color: white !important;
line-height: 48px;
text-transform: capitalize;
background: none;
padding: 4px;
border-radius: 4px;
margin-inline: 4px;
padding-inline: 0px;
transition: 0.1s background ease-out, 0.1s padding ease-out, 0.1s margin ease-out;
z-index: 9999;
}
.pagetop > a:hover{
background: var(--transparent-orange);
padding-inline: 4px;
margin-inline: 0px;
}
* {
box-sizing: border-box;
}
*, textarea, input, button, td, tr{
font-family: var(--fonts);
}
.commtext{
color: #ccc;
font-size: 14.5px;
line-height: 1.4;
letter-spacing: 0.1px;
}
.c00, .c00 a:link {
color: var(--primary-text);
font-size: 14.5px;
letter-spacing: 0.1px;
}
.c5a, .c5a a:link, .c5a a:visited {
color: #9e9e9e;
font-size: 14.5px;
letter-spacing: 0.1px;
}
.titleline > a{
color: var(--vibrant-orange);
}
.titleline > a:visited {
color: var(--muted-orange);
}
.spacer{
display: block;
background: #00f0;
opacity: 1;
width: 0px;
height: 8px !important;
}
span.titleline{
font-size: 17px;
}
span.sitebit.comhead{
font-size: 14px;
}
span.rank{
font-size: 16px;
font-family: monospace;
}
span.subline{
font-size: 14px;
width: 100%;
display: block;
padding-bottom: 0px;
}
td.subtext{
font-size: 14px;
border-bottom: 1px solid var(--divider);
width: 100%;
display: block;
padding-bottom: 12px;
}
.pagetop {
font-family: var(--fonts);
font-size: 14px;
color: var(--transparent-orange);
line-height: 18px;
}
a[href="https://news.ycombinator.com"] > img{
width: 32px !important;
height: 32px !important;
border: none !important;
border-radius: 4px;
object-fit: contain;
content: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTU2IiBoZWlnaHQ9IjMyIiB2aWV3Qm94PSIwIDAgMTU2IDMyIiBmaWxsPSJub25lIiB4bWxucz0iaHR0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