2016-12-15 16:43:40 +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-12-16 09:21:31 +01:00
|
|
|
{% set repo_icon = "md-source--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
|
|
|
{% set repo_icon = "md-source--gitlab" %}
|
|
|
|
{% elif "bitbucket" in platform %}
|
2016-12-15 15:55:40 +01:00
|
|
|
{% set repo_type = "bitbucket" %}
|
2016-10-16 18:22:07 +02:00
|
|
|
{% set repo_icon = "md-source--bitbucket" %}
|
2016-09-23 17:46:16 +02:00
|
|
|
{% else %}
|
2016-12-15 15:55:40 +01:00
|
|
|
{% set repo_type = "" %}
|
2016-10-16 18:22:07 +02:00
|
|
|
{% set repo_icon = "" %}
|
2016-09-23 17:46:16 +02:00
|
|
|
{% endif %}
|
2016-12-16 09:21:31 +01:00
|
|
|
<a href="{{ config.repo_url }}" title="Go to repository" class="md-source {{ repo_icon }}" data-md-source="{{ repo_type }}">
|
2016-09-23 17:46:16 +02:00
|
|
|
<div class="md-source__repository">
|
2016-12-16 09:21:31 +01:00
|
|
|
{{ config.repo_name }}
|
2016-09-23 17:46:16 +02:00
|
|
|
</div>
|
|
|
|
</a>
|