2017-10-19 20:09:59 +02:00
|
|
|
{% import "partials/language.html" as lang with context %}
|
2016-12-28 14:50:11 +01:00
|
|
|
{% set platform = config.extra.repo_icon or config.repo_url %}
|
2016-10-16 18:22:07 +02:00
|
|
|
{% if "github" in platform %}
|
2016-12-15 15:55:40 +01:00
|
|
|
{% set repo_type = "github" %}
|
2016-10-16 18:22:07 +02:00
|
|
|
{% elif "gitlab" in platform %}
|
2016-12-15 15:55:40 +01:00
|
|
|
{% set repo_type = "gitlab" %}
|
2016-10-16 18:22:07 +02:00
|
|
|
{% elif "bitbucket" in platform %}
|
2016-12-15 15:55:40 +01:00
|
|
|
{% set repo_type = "bitbucket" %}
|
2016-09-23 17:46:16 +02:00
|
|
|
{% else %}
|
2016-12-15 15:55:40 +01:00
|
|
|
{% set repo_type = "" %}
|
2016-09-23 17:46:16 +02:00
|
|
|
{% endif %}
|
2017-01-06 19:08:09 +01:00
|
|
|
{% block repo %}
|
2017-10-18 21:38:33 +02:00
|
|
|
<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source" data-md-source="{{ repo_type }}">
|
2017-01-06 19:08:09 +01: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>
|
|
|
|
{% endif %}
|
|
|
|
<div class="md-source__repository">
|
|
|
|
{{ config.repo_name }}
|
2016-12-28 17:59:29 +01:00
|
|
|
</div>
|
2017-01-06 19:08:09 +01:00
|
|
|
</a>
|
|
|
|
{% endblock %}
|