mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Removed platform detection from repository markup
This commit is contained in:
parent
980054a0d1
commit
24c58d8fd4
@ -2,17 +2,7 @@
|
|||||||
This file was automatically generated - do not edit
|
This file was automatically generated - do not edit
|
||||||
-#}
|
-#}
|
||||||
{% import "partials/language.html" as lang with context %}
|
{% import "partials/language.html" as lang with context %}
|
||||||
{% set platform = config.repo_url %}
|
<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source">
|
||||||
{% 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="{{ lang.t('source.link.title') }}" class="md-source" data-md-source="{{ repo_type }}">
|
|
||||||
<div class="md-source__icon">
|
<div class="md-source__icon">
|
||||||
{% set repo_icon = config.extra.repo_icon | default("brands/git-alt") %}
|
{% set repo_icon = config.extra.repo_icon | default("brands/git-alt") %}
|
||||||
{% include "assets/images/icons/fontawesome/" ~ repo_icon ~ ".svg" %}
|
{% include "assets/images/icons/fontawesome/" ~ repo_icon ~ ".svg" %}
|
||||||
|
@ -22,27 +22,11 @@
|
|||||||
|
|
||||||
{% import "partials/language.html" as lang with context %}
|
{% import "partials/language.html" as lang with context %}
|
||||||
|
|
||||||
<!--
|
|
||||||
Check whether the repository is hosted on one of the supported code hosting
|
|
||||||
platforms (GitHub, GitLab or Bitbucket) to show icon.
|
|
||||||
-->
|
|
||||||
{% 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 %}
|
|
||||||
|
|
||||||
<!-- Repository containing source -->
|
<!-- Repository containing source -->
|
||||||
<a
|
<a
|
||||||
href="{{ config.repo_url }}"
|
href="{{ config.repo_url }}"
|
||||||
title="{{ lang.t('source.link.title') }}"
|
title="{{ lang.t('source.link.title') }}"
|
||||||
class="md-source"
|
class="md-source"
|
||||||
data-md-source="{{ repo_type }}"
|
|
||||||
>
|
>
|
||||||
<div class="md-source__icon">
|
<div class="md-source__icon">
|
||||||
{% set repo_icon = config.extra.repo_icon | default("brands/git-alt") %}
|
{% set repo_icon = config.extra.repo_icon | default("brands/git-alt") %}
|
||||||
|
Loading…
Reference in New Issue
Block a user