archwiki-viewer icon indicating copy to clipboard operation
archwiki-viewer copied to clipboard

Dark theme?

Open krompus opened this issue 8 years ago • 13 comments

I'd really like to have a toggle for a dark theme; AMOLED would be nice.

krompus avatar Jun 06 '17 04:06 krompus

This would be nice, would you want to try and help out with this?

kevinhinterlong avatar Jun 06 '17 04:06 kevinhinterlong

I'll look into it! I've not looked at the code yet. I'm excited that the app has finally been adopted. :)

krompus avatar Jun 06 '17 04:06 krompus

Sweet! Let me know if you need any help and I can give some info tomorrow about where to start with working on this.

kevinhinterlong avatar Jun 06 '17 04:06 kevinhinterlong

Ok so pretty much you're going to want to make a new darkstyle.css file copying the original in app/src/main/assets/style.css and then download any page from the wiki to the same folder as the darkstyle.css.

Once you've downloaded it, you're going to want to edit the page and replace

<head>
<!-- all the stuff in between -->
</head>

with this

<head>
<link rel='stylesheet' href='darkstyle.css' /><meta name='viewport' content='width=device-width, initial-scale=1.0, user-scalable=no' />
</head>

Then open the locally saved page in your browser and start playing around with the hex color values until you find something which looks nice.

Alternatively, you could set up android studio, edit the colors, and then run the app on your phone to view the changes.

Let me know if you get stuck/need anything.

kevinhinterlong avatar Jun 07 '17 00:06 kevinhinterlong

Thanks for the tips; I'll give it a go! We might also make "normal" text size a little bigger; I believe it was set when devices had lower average PPI, and it's a big jump from "normal" to "larger".

I'm good for the CSS, but I've no idea how to add the toggle for theme in the preferences menu.

krompus avatar Jun 10 '17 15:06 krompus

Yea the way we set the text size is actually deprecated, I was planning to add a slider for the text size in #37 so I'll play around with the default there.

I can set up the toggle, but the easiest thing would be to change the file names. It uses whatever is in style.css so you could rename it like this so it only uses the dark theme.

  1. style.css --> anything.css
  2. darkstyle.css --> style.css

kevinhinterlong avatar Jun 10 '17 16:06 kevinhinterlong

Big +1 for Dark mode, please! I would highly prefer a dark gray instead of amoled, I find it strains my eyes reading on amoled black. So maybe 3 different options (light, dark, amoled/black) would be nice.

seniorm0ment avatar Jan 26 '20 06:01 seniorm0ment

Would be cool to see wiki updated :)

seniorm0ment avatar Jun 10 '20 03:06 seniorm0ment

Is there any status update to dark theme, since this issue was added 3.5 years ago?

birdietheowl avatar Jan 12 '21 21:01 birdietheowl

Hey @birdietheowl unfortunately I haven't been keeping up with Android development/archwiki for awhile now. I'd still be open to reviewing it if someone wanted to take over this issue, but I have no plans to complete it

kevinhinterlong avatar Jan 14 '21 04:01 kevinhinterlong

@kevinhinterlong okay, no worries. Was just curious. Completely understand.

birdietheowl avatar Jan 14 '21 06:01 birdietheowl

@kevinhinterlong can I take over?

killertofus avatar Oct 12 '22 04:10 killertofus

@killertofus Yea feel free to take over

kevinhinterlong avatar Oct 12 '22 13:10 kevinhinterlong