mkdocs-material/material/partials/source.html

20 lines
724 B
HTML
Raw Normal View History

{% set platform = config.extra.repo_icon or config.repo_url %}
{% if "github" in platform %}
2016-12-15 17:55:40 +03:00
{% set repo_type = "github" %}
2016-12-16 11:21:31 +03:00
{% set repo_icon = "md-source--github" %}
{% elif "gitlab" in platform %}
2016-12-15 17:55:40 +03:00
{% set repo_type = "gitlab" %}
{% set repo_icon = "md-source--gitlab" %}
{% elif "bitbucket" in platform %}
2016-12-15 17:55:40 +03:00
{% set repo_type = "bitbucket" %}
{% set repo_icon = "md-source--bitbucket" %}
{% else %}
2016-12-15 17:55:40 +03:00
{% set repo_type = "" %}
{% set repo_icon = "" %}
{% endif %}
2016-12-16 11:21:31 +03:00
<a href="{{ config.repo_url }}" title="Go to repository" class="md-source {{ repo_icon }}" data-md-source="{{ repo_type }}">
<div class="md-source__repository">
2016-12-16 11:21:31 +03:00
{{ config.repo_name }}
</div>
</a>