mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Added source links to docs
This commit is contained in:
parent
71e9b1d745
commit
66c939265f
@ -16,7 +16,7 @@ fit your brand identity by using [CSS variables][2].
|
|||||||
|
|
||||||
### Color scheme
|
### Color scheme
|
||||||
|
|
||||||
> Default: `default`
|
[:octicons-file-code-24: Source][3] · :octicons-tools-24: Default: `default`
|
||||||
|
|
||||||
Material for MkDocs supports two _color schemes_: a light mode, which is just
|
Material for MkDocs supports two _color schemes_: a light mode, which is just
|
||||||
called `default`, and a dark mode, which is called `slate`. The color scheme
|
called `default`, and a dark mode, which is called `slate`. The color scheme
|
||||||
@ -71,9 +71,11 @@ theme:
|
|||||||
scheme: preference
|
scheme: preference
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[3]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/stylesheets/palette/_scheme.scss
|
||||||
|
|
||||||
### Primary color
|
### Primary color
|
||||||
|
|
||||||
> Default: `indigo`
|
[:octicons-file-code-24: Source][4] · :octicons-tools-24: Default: `indigo`
|
||||||
|
|
||||||
The _primary color_ is used for the header, the sidebar, text links and several
|
The _primary color_ is used for the header, the sidebar, text links and several
|
||||||
other components. In order to change the primary color, set the following value
|
other components. In order to change the primary color, set the following value
|
||||||
@ -137,9 +139,11 @@ color:
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
[4]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/stylesheets/palette/_primary.scss
|
||||||
|
|
||||||
### Accent color
|
### Accent color
|
||||||
|
|
||||||
> Default: `indigo`
|
[:octicons-file-code-24: Source][5] · :octicons-tools-24: Default: `indigo`
|
||||||
|
|
||||||
The _accent color_ is used to denote elements that can be interacted with, e.g.
|
The _accent color_ is used to denote elements that can be interacted with, e.g.
|
||||||
hovered links, buttons and scrollbars. It can be changed in `mkdocs.yml` by
|
hovered links, buttons and scrollbars. It can be changed in `mkdocs.yml` by
|
||||||
@ -197,11 +201,13 @@ color:
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
[5]: https://github.com/squidfunk/mkdocs-material/blob/master/src/assets/stylesheets/palette/_accent.scss
|
||||||
|
|
||||||
## Customization
|
## Customization
|
||||||
|
|
||||||
Material for MkDocs implements colors using [CSS variables][3] (custom
|
Material for MkDocs implements colors using [CSS variables][6] (custom
|
||||||
properties). If you want to customize the colors beyond the palette (e.g. to
|
properties). If you want to customize the colors beyond the palette (e.g. to
|
||||||
use your brand-specific colors), you can add an [additional stylesheet][4] and
|
use your brand-specific colors), you can add an [additional stylesheet][7] and
|
||||||
tweak the following CSS variables:
|
tweak the following CSS variables:
|
||||||
|
|
||||||
``` css
|
``` css
|
||||||
@ -232,7 +238,7 @@ tweak the following CSS variables:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The colors of [code blocks][5], [admonitions][6], text links and the footer can
|
The colors of [code blocks][8], [admonitions][9], text links and the footer can
|
||||||
be adjusted through dedicated CSS variables, which partly default to the base
|
be adjusted through dedicated CSS variables, which partly default to the base
|
||||||
colors or neutral colors:
|
colors or neutral colors:
|
||||||
|
|
||||||
@ -260,8 +266,10 @@ colors or neutral colors:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
[3]: https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties
|
[6]: https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties
|
||||||
[4]: ../getting-started/customization.md#additional-stylesheets
|
[7]: ../getting-started/customization.md#additional-stylesheets
|
||||||
|
[8]: ../extensions/codehilite.md
|
||||||
|
[9]: ../extensions/admonition.md
|
||||||
|
|
||||||
## Caveats
|
## Caveats
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
{% if repo | last == "/" %}
|
{% if repo | last == "/" %}
|
||||||
{% set repo = repo[:-1] %}
|
{% set repo = repo[:-1] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% set path = page.meta.path | default([""]) %}
|
{% set path = page.meta.path | default("") %}
|
||||||
<a href="{{ [repo, path, page.meta.source] | join('/') }}" title="{{ page.meta.source }}" class="md-content__button md-icon">
|
<a href="{{ [repo, path, page.meta.source] | join('/') }}" title="{{ page.meta.source }}" class="md-content__button md-icon">
|
||||||
{{ lang.t("meta.source") }}
|
{{ lang.t("meta.source") }}
|
||||||
{% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %}
|
{% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
{% if repo | last == "/" %}
|
{% if repo | last == "/" %}
|
||||||
{% set repo = repo[:-1] %}
|
{% set repo = repo[:-1] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% set path = page.meta.path | default([""]) %}
|
{% set path = page.meta.path | default("") %}
|
||||||
<a
|
<a
|
||||||
href="{{ [repo, path, page.meta.source] | join('/') }}"
|
href="{{ [repo, path, page.meta.source] | join('/') }}"
|
||||||
title="{{ page.meta.source }}"
|
title="{{ page.meta.source }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user