mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
20 lines
724 B
HTML
20 lines
724 B
HTML
{% set platform = config.extra.repo_icon or config.repo_url %}
|
|
{% if "github" in platform %}
|
|
{% set repo_type = "github" %}
|
|
{% set repo_icon = "md-source--github" %}
|
|
{% elif "gitlab" in platform %}
|
|
{% set repo_type = "gitlab" %}
|
|
{% set repo_icon = "md-source--gitlab" %}
|
|
{% elif "bitbucket" in platform %}
|
|
{% set repo_type = "bitbucket" %}
|
|
{% set repo_icon = "md-source--bitbucket" %}
|
|
{% else %}
|
|
{% set repo_type = "" %}
|
|
{% set repo_icon = "" %}
|
|
{% endif %}
|
|
<a href="{{ config.repo_url }}" title="Go to repository" class="md-source {{ repo_icon }}" data-md-source="{{ repo_type }}">
|
|
<div class="md-source__repository">
|
|
{{ config.repo_name }}
|
|
</div>
|
|
</a>
|