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

21 lines
659 B
HTML
Raw Normal View History

{% 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 %}
2016-12-28 14:47:53 +01:00
<a href="{{ config.repo_url }}" title="Go to repository" class="md-source" data-md-source="{{ repo_type }}">
{% if repo_type %}
<svg class="md-source__icon">
2016-12-28 15:32:26 +01:00
<use href="#{{ repo_type }}" x="12" y="12" width="24" height="24"></use>
2016-12-28 14:47:53 +01:00
</svg>
{% endif %}
<div class="md-source__repository">
2016-12-16 09:21:31 +01:00
{{ config.repo_name }}
</div>
</a>