mkdocs-material/material/partials/source.html

24 lines
780 B
HTML
Raw Normal View History

2017-01-06 20:48:32 +03:00
{% import "partials/i18n.html" as i18n %}
{% 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" %}
{% elif "gitlab" in platform %}
2016-12-15 17:55:40 +03:00
{% set repo_type = "gitlab" %}
{% elif "bitbucket" in platform %}
2016-12-15 17:55:40 +03:00
{% set repo_type = "bitbucket" %}
{% else %}
2016-12-15 17:55:40 +03:00
{% set repo_type = "" %}
{% endif %}
2017-01-06 20:48:32 +03:00
<a href="{{ config.repo_url }}" title="{{ i18n.t('source.link.title') }}" class="md-source" data-md-source="{{ repo_type }}">
2016-12-28 16:47:53 +03:00
{% if repo_type %}
<div class="md-source__icon">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlink:href="#{{ repo_type }}" width="24" height="24"></use>
</svg>
</div>
2016-12-28 16:47:53 +03:00
{% endif %}
<div class="md-source__repository">
2016-12-16 11:21:31 +03:00
{{ config.repo_name }}
</div>
</a>