Advertisement:

Author Topic: Dark theme for this site?  (Read 5120 times)

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 72,651
    • StoryBB/StoryBB on GitHub
Re: Dark theme for this site?
« Reply #40 on: June 18, 2020, 03:39:25 AM »
This is stunningly good work! I switched to Stylus from Stylish, the only issue being that I could not find many public templates for third sites (i.e. github, linkedin).

They’re the same thing, except for one being a fork of the other with all the “report on all your browsing” removed.
Please don’t PM me for paid work, I’m not for hire, and even if I was, I doubt you could afford me.
USD$150 per hour. Typical waiting list 3 months.

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,298
  • Master of BBC Abuse
Re: Dark theme for this site?
« Reply #41 on: June 22, 2020, 06:54:25 AM »
Ok, here's an update of the theme that was posted back here.

Updated version is about as good as I can make it, given what I have to work with. Should be free of bugs (the earlier version had a few) and is a bit more refined in general. Contains even more cunning trickery and eye candy, and even more rampant abuse of !important to shortcut horrendous strings of selectors.

Zip contains a fully formatted CSS file (if you want to mess around with it) and a minified CSS file (if you just want to use the thing) and a readme (which you should read*).

Code can be dropped into Stylus (for Chrome, Firefox and Opera) or Stylem (for Pale Moon).

*(...but probably won't :P ).

Offline spiros

  • Language Moderator
  • SMF Hero
  • *
  • Posts: 1,884
  • Gender: Male
  • A different point of view
    • spiros.doikas on Facebook
    • doikas on LinkedIn
    • @greektranslator on Twitter
    • Greek Translation
Re: Dark theme for this site?
« Reply #42 on: June 22, 2020, 08:37:10 AM »
I wish there was an easy way for people accessing this site (and are not aware of this post) to benefit from this option. Maybe some sort of "dark mode" link?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,302
  • Gender: Male
    • Kindred-999 on GitHub
Re: Dark theme for this site?
« Reply #43 on: June 22, 2020, 10:55:19 AM »
... ... ... already explained why not.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Bloc

  • Full Member
  • ***
  • Posts: 567
  • Gender: Male
    • bloc67 on GitHub
Re: Dark theme for this site?
« Reply #44 on: June 22, 2020, 05:51:41 PM »
Ok, here's an update of the theme that was posted back here.

Updated version is about as good as I can make it, given what I have to work with. Should be free of bugs (the earlier version had a few) and is a bit more refined in general. Contains even more cunning trickery and eye candy, and even more rampant abuse of !important to shortcut horrendous strings of selectors.

Zip contains a fully formatted CSS file (if you want to mess around with it) and a minified CSS file (if you just want to use the thing) and a readme (which you should read*).

Code can be dropped into Stylus (for Chrome, Firefox and Opera) or Stylem (for Pale Moon).

*(...but probably won't :P ).

Darn. Now you got me hooked too. :P

Very nice indeed, genuine dark(ish) version of the site..and even with the distinct top/bottom links added. :D I will need to study the css abit but already tried the target-anywhere option.

Offline Bloc

  • Full Member
  • ***
  • Posts: 567
  • Gender: Male
    • bloc67 on GitHub
Re: Dark theme for this site?
« Reply #45 on: June 22, 2020, 05:56:48 PM »
I wish there was an easy way for people accessing this site (and are not aware of this post) to benefit from this option. Maybe some sort of "dark mode" link?
Its a little work to setup to begin with - but start using Stylus/Stylish and you won't regret it. Used it on some sites that need quick fixes(and using to develop new sites even)..or just for the fun of it. But its always going to be a manual affair, I doubt any site will promote any use of styling their content.

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,298
  • Master of BBC Abuse
Re: Dark theme for this site?
« Reply #46 on: June 22, 2020, 06:11:07 PM »
Target anywhere? Maybe I need more coffee, but I don't understand that at the moment. :)

You won't stay hooked. Trust me on that. The code here is bloody horrible. :D But turning it into a stand-alone custom theme is going to be fun. That's the pay-off. I figured out most of the detailing I want while doing this thing, so the theme is 99% sorted.

Hey funny thing about board index layout. The Mutant Curve uses a max-width of 88em, simply because that suits my preference for a post content area around 1000px max on desktop. I find once it starts getting over that sentences start getting irritatingly long. You can still read them just fine, but there's a subtle niggle compared to shorter ones.

So Mutant's board index layout was developed for that width (and for ease of stacking on narrower screens) and it looks well-balanced at that width. This one uses 104em max-width, because I was using a more traditional board and message index layout (due to not wanting to go full bananas on the CSS) and that looks most balanced around 104em wide. At 88em it looks a tad stunted, while at 104em the Mutant layout looks a tad lost in space.

Sentences in posts are still ok at 104em wrapper width, but are definitely nudging the outer limits. Not that most people will notice, because they're used to it being stupid wide* so will regard the annoyance as a normal web experience.

*Honestly, on a modern 2560 monitor a 90% wrapper width really is stupid. There are other words to describe it, but they're even less polite. :D

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,298
  • Master of BBC Abuse
Re: Dark theme for this site?
« Reply #47 on: June 22, 2020, 06:32:22 PM »
I wish there was an easy way for people accessing this site (and are not aware of this post) to benefit from this option. Maybe some sort of "dark mode" link?

I can always add the thing to the downloads for my Mutant Curve. Or I suppose (if you can talk the team into it) there could even be a sticky in this board for in-browser dark variants, or even for any variants at all. If anyone wants to promote the flexibility of SMF theming this wouldn't be such a bad way of doing it. Provided, of course, that support for said variants was not dumped on the SMF team (who wouldn't want to know about it).

I have even considered using something like Greasemonkey to inject a viewport meta tag into the DOM. That would open up scope for doing genuinely responsive variants on smf.org, although obviously running a custom script is an extra hoop for newbies to jump through, so probably a tad too scary.

Offline Bloc

  • Full Member
  • ***
  • Posts: 567
  • Gender: Male
    • bloc67 on GitHub
Re: Dark theme for this site?
« Reply #48 on: June 22, 2020, 07:39:45 PM »
Target anywhere? Maybe I need more coffee, but I don't understand that at the moment. :)

You won't stay hooked. Trust me on that. The code here is bloody horrible. :D But turning it into a stand-alone custom theme is going to be fun. That's the pay-off. I figured out most of the detailing I want while doing this thing, so the theme is 99% sorted.

Hey funny thing about board index layout. The Mutant Curve uses a max-width of 88em, simply because that suits my preference for a post content area around 1000px max on desktop. I find once it starts getting over that sentences start getting irritatingly long. You can still read them just fine, but there's a subtle niggle compared to shorter ones.

So Mutant's board index layout was developed for that width (and for ease of stacking on narrower screens) and it looks well-balanced at that width. This one uses 104em max-width, because I was using a more traditional board and message index layout (due to not wanting to go full bananas on the CSS) and that looks most balanced around 104em wide. At 88em it looks a tad stunted, while at 104em the Mutant layout looks a tad lost in space.

Sentences in posts are still ok at 104em wrapper width, but are definitely nudging the outer limits. Not that most people will notice, because they're used to it being stupid wide* so will regard the annoyance as a normal web experience.

*Honestly, on a modern 2560 monitor a 90% wrapper width really is stupid. There are other words to describe it, but they're even less polite. :D

target-anywhere as in targeting any attribute of a node..but yes, agreed on 90% width is just plain silly on wide displays. I actually gone another route of applying a padding at the sides of 10vw, going down to 5vw below 1400px and finally staying with 1rem below 1200px, that seems to work out fine for me.

Yes, the code is difficult..but we know that from starting every new theme copying the default code, nothing new under the sun and for me at least, its a code I know very well having mangled it so many times :) Yes, I am still hooked, as in nearly finishing my first ever SMF-site styling for Stylus/Stylish. :)

I wish there was an easy way for people accessing this site (and are not aware of this post) to benefit from this option. Maybe some sort of "dark mode" link?

I can always add the thing to the downloads for my Mutant Curve. Or I suppose (if you can talk the team into it) there could even be a sticky in this board for in-browser dark variants, or even for any variants at all. If anyone wants to promote the flexibility of SMF theming this wouldn't be such a bad way of doing it. Provided, of course, that support for said variants was not dumped on the SMF team (who wouldn't want to know about it).

I have even considered using something like Greasemonkey to inject a viewport meta tag into the DOM. That would open up scope for doing genuinely responsive variants on smf.org, although obviously running a custom script is an extra hoop for newbies to jump through, so probably a tad too scary.

Thats a great idea..well, maybe a tad bit off the top for most users to add in Greasemonkey(or Tampermonkey) to add the needed meta tag..and I guess its a whole new level to tackle when making it phone-friendly.. I think I'll rather change the template too then and then its out of scope for this particular project anyway.

Offline Gwenwyfar

  • Great Wizard's familiar
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,359
  • Gender: Female
Re: Dark theme for this site?
« Reply #49 on: June 27, 2020, 11:58:25 AM »
Quote
*Honestly, on a modern 2560 monitor a 90% wrapper width really is stupid. There are other words to describe it, but they're even less polite. :D
Finally, someone that understands :D

Honestly, this is why we should start using some of that space to add menus or other such things, instead of stacking everything vertically then stretching a 100% width ON-YOUR-FACE image and then adding a title with 3 words that occupies all that space.

People, a site isn't a ******ing billboard. I have taken to using things at 80% size lately to make it more bearable.


And btw, this is looking quite good :)

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,298
  • Master of BBC Abuse
Re: Dark theme for this site?
« Reply #50 on: June 27, 2020, 05:21:38 PM »
Even 80% is too much, IMO. My 2c is max-width is the one to use and % is irrelevant, since what I am primarily wanting to do is keep lines of text to a reasonable length. This is basic typography stuff. Lines of text five miles long are a PITA to read, so size content to a reasonable maximum line length. The most logical unit to use is em (or rem, if you prefer) since that relates to number of characters, which is the relevant thing to measure against. :)

And yes, it is looking quite good. I knew that. :D Icons are a tad sucky, but for general distribution I thought I should stick with default icons (although I did consider loading a folder of custom ones online and calling those).

Offline spiros

  • Language Moderator
  • SMF Hero
  • *
  • Posts: 1,884
  • Gender: Male
  • A different point of view
    • spiros.doikas on Facebook
    • doikas on LinkedIn
    • @greektranslator on Twitter
    • Greek Translation
Re: Dark theme for this site?
« Reply #51 on: June 28, 2020, 08:05:51 AM »
Just an idea to reduce image use in the themes proper you are working on, replacing blockquote image, I implemented FA on Timeless theme:

Code: [Select]
.bbc_standard_quote::before {
    content: "\f10d";
    font-family: 'Font Awesome 5 Free';
    color: gray;
    position: absolute;
    font-weight: 900;
    left: 4px;
    top: 2px;
}

You could use pure css of course:

Code: [Select]
.bbc_standard_quote::before {
    content: "\201C";
    font-family: 'Georgia';
    color: gray;
    position: absolute;
    left: 4px;
    top: 10px;
    font-size: 30px;
}

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,298
  • Master of BBC Abuse
Re: Dark theme for this site?
« Reply #52 on: June 28, 2020, 08:14:13 AM »
That requires calling Font Awesome, which is not part of this site. The idea with these is to run CSS-only on top of this site's code. FA is a whole 'nother ball game. Sure, you can use FA for a custom theme if you want to, but that's not the same thing as these overrides.

And frankly you don't even need FA for basic things like a quote mark. You could do it just with html.
See: https://www.toptal.com/designers/htmlarrows/punctuation/

(TBH I only left the quote mark image in because it was already there. I've never liked it much, and would probably ditch it for my own use.)

Offline spiros

  • Language Moderator
  • SMF Hero
  • *
  • Posts: 1,884
  • Gender: Male
  • A different point of view
    • spiros.doikas on Facebook
    • doikas on LinkedIn
    • @greektranslator on Twitter
    • Greek Translation
Re: Dark theme for this site?
« Reply #53 on: June 28, 2020, 08:38:11 AM »
The 2nd version is pure css. I used FA well, because it was already there as part of the theme.

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,298
  • Master of BBC Abuse
Re: Dark theme for this site?
« Reply #54 on: June 28, 2020, 06:17:30 PM »
Fair enough.

Offline Gwenwyfar

  • Great Wizard's familiar
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,359
  • Gender: Female
Re: Dark theme for this site?
« Reply #55 on: June 29, 2020, 04:30:49 PM »
Even 80% is too much, IMO. My 2c is max-width is the one to use and % is irrelevant, since what I am primarily wanting to do is keep lines of text to a reasonable length. This is basic typography stuff. Lines of text five miles long are a PITA to read, so size content to a reasonable maximum line length. The most logical unit to use is em (or rem, if you prefer) since that relates to number of characters, which is the relevant thing to measure against. :)

And yes, it is looking quite good. I knew that. :D Icons are a tad sucky, but for general distribution I thought I should stick with default icons (although I did consider loading a folder of custom ones online and calling those).
Oh, I mean I'm scaling sites down to 80% scale, not the max width. Got confusing there. I think the readability limit is somewhere around 1200px, which is what I set 2.1 to. I'd prefer smaller, myself.

But pretty much. Not to mention when one thing is in one side and the equivalent thing is on the other side riiiiiight there and you have this effing huge white space in the middle :P

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,298
  • Master of BBC Abuse
Re: Dark theme for this site?
« Reply #56 on: June 29, 2020, 06:34:37 PM »
Yup. My preference is around 1000px max for actual post content, but I'm even perfectly happy with 800px. El Darko Magnifico is set to 1200px post content, which as you say is about the upper limit for anything approaching sanity.

Offline Gwenwyfar

  • Great Wizard's familiar
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,359
  • Gender: Female
Re: Dark theme for this site?
« Reply #57 on: June 30, 2020, 10:06:50 AM »
Pretty much.

I wish cm/mm was a usable unit sometime soon, it would make sense to measure some things according to their (approximate as it may be) real size. Specially as px is getting out of hand with every monitor having a different size.

But it would require screens to report their physical size, and that the browser somehow knows that size and the resolution to calculate it against. So who knows how that's gonna go.

Maybe if it could be made into a manual input... but who's gonna be arsed to grab out a ruler and configure their screen size? :P

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 72,651
    • StoryBB/StoryBB on GitHub
Re: Dark theme for this site?
« Reply #58 on: June 30, 2020, 12:57:57 PM »
It'll go badly because the Windows display API can't get this right. Better on Linux, incidentally.
Please don’t PM me for paid work, I’m not for hire, and even if I was, I doubt you could afford me.
USD$150 per hour. Typical waiting list 3 months.

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,298
  • Master of BBC Abuse
Re: Dark theme for this site?
« Reply #59 on: June 30, 2020, 06:27:50 PM »
I can't see anything wrong with using em and rem. Things on the web are generally sized around making them readable, so em and rem seem like the logical units to use.