1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-09-24 19:38:27 +02:00

Always render repo icon, no matter what kind of repository

This commit is contained in:
squidfunk 2020-02-01 13:54:34 +01:00
parent e1c5953ae6
commit 980054a0d1
2 changed files with 8 additions and 12 deletions

View File

@ -13,12 +13,10 @@
{% set repo_type = "" %}
{% endif %}
<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source" data-md-source="{{ repo_type }}">
{% if repo_type %}
<div class="md-source__icon">
{% set repo_icon = config.extra.repo_icon | default("brands/git-alt") %}
{% include "assets/images/icons/fontawesome/" ~ repo_icon ~ ".svg" %}
</div>
{% endif %}
<div class="md-source__icon">
{% set repo_icon = config.extra.repo_icon | default("brands/git-alt") %}
{% include "assets/images/icons/fontawesome/" ~ repo_icon ~ ".svg" %}
</div>
<div class="md-source__repository">
{{ config.repo_name }}
</div>

View File

@ -44,12 +44,10 @@
class="md-source"
data-md-source="{{ repo_type }}"
>
{% if repo_type %}
<div class="md-source__icon">
{% set repo_icon = config.extra.repo_icon | default("brands/git-alt") %}
{% include "assets/images/icons/fontawesome/" ~ repo_icon ~ ".svg" %}
</div>
{% endif %}
<div class="md-source__icon">
{% set repo_icon = config.extra.repo_icon | default("brands/git-alt") %}
{% include "assets/images/icons/fontawesome/" ~ repo_icon ~ ".svg" %}
</div>
<div class="md-source__repository">
{{ config.repo_name }}
</div>