mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
21 lines
639 B
HTML
21 lines
639 B
HTML
{% set platform = config.repo_url %}
|
|
{% if "github" in platform %}
|
|
{% set repo_type = "github" %}
|
|
{% elif "gitlab" in platform %}
|
|
{% set repo_type = "gitlab" %}
|
|
{% elif "bitbucket" in platform %}
|
|
{% set repo_type = "bitbucket" %}
|
|
{% else %}
|
|
{% set repo_type = "" %}
|
|
{% endif %}
|
|
<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">
|
|
<use xlink:href="#{{ repo_type }}" x="12" y="12" width="24" height="24"></use>
|
|
</svg>
|
|
{% endif %}
|
|
<div class="md-source__repository">
|
|
{{ config.repo_name }}
|
|
</div>
|
|
</a>
|