1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-24 23:50:13 +01:00
mkdocs-material/material/partials/source.html

26 lines
840 B
HTML
Raw Normal View History

2017-01-13 00:31:37 +01:00
{% import "partials/language.html" as lang %}
{% set platform = config.extra.repo_icon or config.repo_url %}
{% if "github" in platform %}
2016-12-15 15:55:40 +01:00
{% set repo_type = "github" %}
{% elif "gitlab" in platform %}
2016-12-15 15:55:40 +01:00
{% set repo_type = "gitlab" %}
{% elif "bitbucket" in platform %}
2016-12-15 15:55:40 +01:00
{% set repo_type = "bitbucket" %}
{% else %}
2016-12-15 15:55:40 +01:00
{% set repo_type = "" %}
{% endif %}
{% block repo %}
<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">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlink:href="#{{ repo_type }}" width="24" height="24"></use>
</svg>
</div>
{% endif %}
<div class="md-source__repository">
{{ config.repo_name }}
</div>
</a>
{% endblock %}