Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme support #140

Closed
Just-Insane opened this issue Apr 22, 2020 · 11 comments · Fixed by #450
Closed

Theme support #140

Just-Insane opened this issue Apr 22, 2020 · 11 comments · Fixed by #450

Comments

@Just-Insane
Copy link

It would be nice to have a dark theme or user-selectable theme, or even a night-mode toggle available in the UI.

@Dorson
Copy link

Dorson commented Apr 22, 2020

I had the same issue and coded a working solution.

Works with one CSS file and basic JavaScript functions for the switch and color settings recall on load.

Here is the GitHub Demo page :

https://dorson.github.io/CSS-Dark-Mode-and-color-switch/

Feel free to copy, fork, adopt, port, etc...

@eikek
Copy link
Owner

eikek commented Apr 22, 2020

Thank you for your input @Just-Insane – I can really understand this wish to have a dark theme. I'm using for the time being the dark-reader browser extension. It is obviously not optimal, but works good enough (for a lot of pages). I just found https://semantic-ui-forest.com/themes – maybe it is enough to simply refer to a different css.

@Dorson thank you! I'm going to take a look and see if it can help here. I'm using pre-build semantic-ui css framework, so I'm not sure if I can define color sets without including a customized semantic-ui build.

@Just-Insane
Copy link
Author

These are both awesome solutions!

@eikek i saw those too, but I wasn’t sure where the default css for semantic-hi was called in the source when I was looking at it (changing the sharry.css file does not work).

@eikek
Copy link
Owner

eikek commented Apr 22, 2020

@Just-Insane the semantic css comes in here. I think (not verified), if you put in here a url to a different style, it should work…. Requires recompile and everything, obviously.

@Just-Insane
Copy link
Author

Just to clarify, should that be line 128 or line 123?

Line 123 points to semantic.min.css rather than semantic.min.js.

@eikek
Copy link
Owner

eikek commented Apr 22, 2020

Oh sorry, you are right. It is line 123.

@Just-Insane
Copy link
Author

So, I changed that line to:

        Seq(
          "https://raw.githubusercontent.com/semantic-ui-forest/forest-themes/master/dist/bootswatch/v4/semantic.darkly.min.css",
          s"/app/assets/sharry-webapp/${BuildInfo.version}/sharry.css"
        ),

and ended up with the following:

Screen Shot 2020-04-22 at 11 06 12 AM

Which is not exactly what I was hoping for...

@eikek
Copy link
Owner

eikek commented Apr 22, 2020

That seems to miss the standard semanticui styles. You could try adding this additional to the standard style… I have no clue, really.

@Just-Insane
Copy link
Author

It looks like a dark theme would have to be created manually... this is the closest I've found, but it's missing a lot of the includes (they 404).
https://gist.github.com/Atulin/cb2d52c8165af4d74614be92fe9ec9b0

@eikek
Copy link
Owner

eikek commented Apr 28, 2020

Ah that's too bad, thanks for trying out! Then I guess, this is quite some work. I don't think I can do it in the near future (PRs are welcome, of course). For the far away future :) I'm thinking to maybe migrate the ui to bulma-css, as it seems to be a better fit (no js involved and there are elm packages). If that happens, then I'm going to provide light and dark themes.

@eikek
Copy link
Owner

eikek commented Mar 3, 2021

Update for this: I moved my other project from fomantic to tailwind and it was a very pleasant experience. I'm now thinking about doing the same for sharry. It's also easier to maintain both projects then:-). (for context see eikek/docspell#293.)

@eikek eikek mentioned this issue May 15, 2021
@mergify mergify bot closed this as completed in #450 May 16, 2021
@eikek eikek added this to the Sharry 1.8.0 milestone May 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants