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

Support for Darcula theme #21

Closed
bodiam opened this issue Nov 22, 2014 · 7 comments
Closed

Support for Darcula theme #21

bodiam opened this issue Nov 22, 2014 · 7 comments
Assignees

Comments

@bodiam
Copy link
Contributor

bodiam commented Nov 22, 2014

The preview screen uses a template which doesn't take into account the user preferences regarding themes. In effect, this means that the preview window will have a white background, which doesn't look to nice on a Darcula theme.

A custom CSS will be created with some initial support for Darcula.

@bodiam
Copy link
Contributor Author

bodiam commented Nov 22, 2014

Current update:

  • Initial support for Darcula is in.

The preview now uses it's own Darcula CSS, but some of the colors/fonts might not be ideal. Any ideas for improvements welcome.

Also, code blocks are a bit tricky, since code blocks seem to use hardcoded coloring (I guess this might be different per source code highlighter, but this is how coderay seems to do it).

Like I said, improvements welcome, but IMO, this looks much better than the white preview screen, and is a good step ahead.

@mojavelinux
Copy link
Member

👍 Integrating into the natural environment is a great way for authors to feel "at home".

Eventually, we could change the stylesheets based on the user's theme selection.

code blocks are a bit tricky, since code blocks seem to use hardcoded coloring (I guess this might be different per source code highlighter, but this is how coderay seems to do it).

Simple fix. Just remove the coderay-css attribute and add a stylesheet named coderay-asciidoctor.css stylesheet (using any CSS you want) to the same directory as the asciidoctor.css.

Here's the line that needs to be changed:

https://github.com/asciidoctor/idea-asciidoc/blob/master/src/main/java/vietj/intellij/asciidoc/AsciiDoc.java#L56

@bodiam
Copy link
Contributor Author

bodiam commented Nov 26, 2014

screen shot 2014-11-26 at 14 12 24

This is the initial support. Comments welcome!

@bodiam
Copy link
Contributor Author

bodiam commented Nov 26, 2014

Initial support is in. If you want to propose changes, etc, please make a new issue.

@bodiam bodiam closed this as completed Nov 26, 2014
@mojavelinux
Copy link
Member

Really nice start!

Darcula!!! 👿

@bodiam
Copy link
Contributor Author

bodiam commented Nov 26, 2014

Thanks, but as discussed, the code blocks are still an issue, and some of the headers might need some improvement. I'm not a designer however, so... improvements more than welcome :)

@mojavelinux
Copy link
Member

@bodiam Another option is to use highlight.js instead of Coderay and then use one of the themes on this page: https://highlightjs.org/static/demo/. Just set the source-highlighter attribute to highlight.js and the highlightjs-theme attribute (e.g., highlightjs-theme=dark). However, you'd have to then add the highlight.js URL explicitly to the HTML since the plugin currently only generates the body content. (See the chrome extension for an example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants