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

Add metatag to style header bar on Android #39

Closed
digitalcraftsman opened this issue Jul 23, 2016 · 5 comments

Comments

@digitalcraftsman
Copy link

commented Jul 23, 2016

With Chrome v39 (for Anroid) websites are able to change the color of the header bar like native apps on their smartphones and tablets.

You've to add the following one-liner:

<meta name="theme-color" content="PRIMARY THEME COLOR">

For more information take a look at this info page about the new feature.

@squidfunk

This comment has been minimized.

Copy link
Owner

commented Jul 24, 2016

Great idea, thanks! If I add the style in master - can you verify it, take a screenshot and post it here. I'm an Apple kid ;-)

@digitalcraftsman

This comment has been minimized.

Copy link
Author

commented Jul 24, 2016

If I add the style in master - can you verify it, take a screenshot and post it here.

Sure. Let's do it.

@squidfunk squidfunk added this to the 0.2.5 milestone Jul 24, 2016

@squidfunk squidfunk self-assigned this Jul 24, 2016

@squidfunk

This comment has been minimized.

Copy link
Owner

commented Jul 24, 2016

Hmm the problem is that, practically, I don't have the color values which are set in the SCSS, so one would have to define it in the mkdocs.yml to integrate it into the HTML. That's not very sexy. I have to think about it first and will come back to you.

@squidfunk squidfunk modified the milestones: 1.0.0, 0.2.5 Sep 4, 2016

@squidfunk

This comment has been minimized.

Copy link
Owner

commented Dec 26, 2016

I regret, it's not possible to do it easily without compromising the clean encapsulation that is currently present in the theme. The color values are defined in the CSS which is compiled, meaning afterwards the values are lost.

However, it can easily be solved by extending the template and adding the meta tag which is really easy in mkdocs 0.16: http://www.mkdocs.org/user-guide/configuration/#extra_templates

I will close this issue for now, since there is nothing we can do about it.

@squidfunk

This comment has been minimized.

Copy link
Owner

commented Jun 13, 2018

Finally implemented, see #795

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.