mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed error when only setting a single icon
This commit is contained in:
parent
4d386df1e9
commit
fcbd47c2cb
@ -52,12 +52,6 @@ font:
|
|||||||
# icons that are part of the HTML can be configured and replaced
|
# icons that are part of the HTML can be configured and replaced
|
||||||
icon:
|
icon:
|
||||||
|
|
||||||
# Shown if no logo is set
|
|
||||||
logo: material/library
|
|
||||||
|
|
||||||
# Repository icon
|
|
||||||
repo: fontawesome/brands/git-alt
|
|
||||||
|
|
||||||
# Favicon to be rendered
|
# Favicon to be rendered
|
||||||
favicon: assets/images/favicon.png
|
favicon: assets/images/favicon.png
|
||||||
|
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
{% if config.theme.logo %}
|
{% if config.theme.logo %}
|
||||||
<img src="{{ config.theme.logo | url }}" alt="logo">
|
<img src="{{ config.theme.logo | url }}" alt="logo">
|
||||||
{% else %}
|
{% else %}
|
||||||
{% include ".icons/" ~ config.theme.icon.logo ~ ".svg" %}
|
{% set icon = config.theme.icon.logo or "material/library" %}
|
||||||
|
{% include ".icons/" ~ icon ~ ".svg" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
<label class="md-header-nav__button md-icon" for="__drawer">
|
<label class="md-header-nav__button md-icon" for="__drawer">
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
{% if config.theme.logo %}
|
{% if config.theme.logo %}
|
||||||
<img src="{{ config.theme.logo | url }}" alt="logo">
|
<img src="{{ config.theme.logo | url }}" alt="logo">
|
||||||
{% else %}
|
{% else %}
|
||||||
{% include ".icons/" ~ config.theme.icon.logo ~ ".svg" %}
|
{% set icon = config.theme.icon.logo or "material/library" %}
|
||||||
|
{% include ".icons/" ~ icon ~ ".svg" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
{{ config.site_name }}
|
{{ config.site_name }}
|
||||||
|
@ -9,5 +9,6 @@
|
|||||||
{% 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") }}
|
||||||
{% include ".icons/" ~ config.theme.icon.repo ~ ".svg" %}
|
{% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %}
|
||||||
|
{% include ".icons/" ~ icon ~ ".svg" %}
|
||||||
</a>
|
</a>
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
{% import "partials/language.html" as lang with context %}
|
{% import "partials/language.html" as lang with context %}
|
||||||
<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source">
|
<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source">
|
||||||
<div class="md-source__icon md-icon">
|
<div class="md-source__icon md-icon">
|
||||||
{% include ".icons/" ~ config.theme.icon.repo ~ ".svg" %}
|
{% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %}
|
||||||
|
{% include ".icons/" ~ icon ~ ".svg" %}
|
||||||
</div>
|
</div>
|
||||||
<div class="md-source__repository">
|
<div class="md-source__repository">
|
||||||
{{ config.repo_name }}
|
{{ config.repo_name }}
|
||||||
|
@ -57,8 +57,6 @@ theme:
|
|||||||
text: Roboto
|
text: Roboto
|
||||||
code: Roboto Mono
|
code: Roboto Mono
|
||||||
icon:
|
icon:
|
||||||
logo: material/library
|
|
||||||
repo: fontawesome/brands/git-alt
|
|
||||||
favicon: assets/favicon.png
|
favicon: assets/favicon.png
|
||||||
logo: assets/images/icon.svg
|
logo: assets/images/icon.svg
|
||||||
|
|
||||||
|
@ -52,12 +52,6 @@ font:
|
|||||||
# icons that are part of the HTML can be configured and replaced
|
# icons that are part of the HTML can be configured and replaced
|
||||||
icon:
|
icon:
|
||||||
|
|
||||||
# Shown if no logo is set
|
|
||||||
logo: material/library
|
|
||||||
|
|
||||||
# Repository icon
|
|
||||||
repo: fontawesome/brands/git-alt
|
|
||||||
|
|
||||||
# Favicon to be rendered
|
# Favicon to be rendered
|
||||||
favicon: assets/images/favicon.png
|
favicon: assets/images/favicon.png
|
||||||
|
|
||||||
|
@ -36,7 +36,8 @@
|
|||||||
{% if config.theme.logo %}
|
{% if config.theme.logo %}
|
||||||
<img src="{{ config.theme.logo | url }}" alt="logo" />
|
<img src="{{ config.theme.logo | url }}" alt="logo" />
|
||||||
{% else %}
|
{% else %}
|
||||||
{% include ".icons/" ~ config.theme.icon.logo ~ ".svg" %}
|
{% set icon = config.theme.icon.logo or "material/library" %}
|
||||||
|
{% include ".icons/" ~ icon ~ ".svg" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
<label
|
<label
|
||||||
|
@ -34,7 +34,8 @@
|
|||||||
{% if config.theme.logo %}
|
{% if config.theme.logo %}
|
||||||
<img src="{{ config.theme.logo | url }}" alt="logo" />
|
<img src="{{ config.theme.logo | url }}" alt="logo" />
|
||||||
{% else %}
|
{% else %}
|
||||||
{% include ".icons/" ~ config.theme.icon.logo ~ ".svg" %}
|
{% set icon = config.theme.icon.logo or "material/library" %}
|
||||||
|
{% include ".icons/" ~ icon ~ ".svg" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
{{ config.site_name }}
|
{{ config.site_name }}
|
||||||
|
@ -34,5 +34,6 @@
|
|||||||
class="md-content__button md-icon"
|
class="md-content__button md-icon"
|
||||||
>
|
>
|
||||||
{{ lang.t("meta.source") }}
|
{{ lang.t("meta.source") }}
|
||||||
{% include ".icons/" ~ config.theme.icon.repo ~ ".svg" %}
|
{% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %}
|
||||||
|
{% include ".icons/" ~ icon ~ ".svg" %}
|
||||||
</a>
|
</a>
|
||||||
|
@ -29,7 +29,8 @@
|
|||||||
class="md-source"
|
class="md-source"
|
||||||
>
|
>
|
||||||
<div class="md-source__icon md-icon">
|
<div class="md-source__icon md-icon">
|
||||||
{% include ".icons/" ~ config.theme.icon.repo ~ ".svg" %}
|
{% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %}
|
||||||
|
{% include ".icons/" ~ icon ~ ".svg" %}
|
||||||
</div>
|
</div>
|
||||||
<div class="md-source__repository">
|
<div class="md-source__repository">
|
||||||
{{ config.repo_name }}
|
{{ config.repo_name }}
|
||||||
|
Loading…
Reference in New Issue
Block a user