privacyguides.org/_includes/card.html

77 lines
3.6 KiB
HTML
Raw Normal View History

<div class="col-xl-4 col-lg-6 col-md-12 mb-4">
2018-10-23 20:07:59 +02:00
<div class="card card-{{include.color}}">
{% if include.color == "warning" %}
<div class="card-header text-dark bg-{{include.color}}">
{% else %}
<div class="card-header text-white bg-{{include.color}}">
{% endif %}
<h3 class="h5">{{include.title}}</h3>
</div>
<div class="card-body">
2018-10-27 16:28:46 +02:00
{% if include.labels %}
{% assign labels = include.labels | replace:", ", "," | split:"," %}
<div class="mb-1">
{% for label in labels %}
{% assign label_data = label | split:":" %}
{% assign color = label_data[0] %}
{% assign text = label_data[1] %}
2018-12-15 12:16:20 +01:00
{% assign tooltip = label_data[2] | default: "" %}
{% assign help_icon = '<i class="far fa-question-circle"></i>' %}
2020-12-13 21:37:35 +01:00
<span class="badge badge-{{color}}" {% if tooltip %} data-toggle="tooltip" data-original-title="{{ tooltip }}">{{text}} {{ help_icon
2018-12-15 12:16:20 +01:00
}}
{% else %}
>{{text}}
{% endif %}
</span>
2018-10-27 16:28:46 +02:00
{% endfor %}
</div>
{% endif %}
<p>
{% if include.image %}
<img src="{{include.image}}" width="120" height="120" alt="{{include.title}}" class="panel-item">
{% elsif include.icon %}
<i class="{{ include.icon }} panel-icon{% if include.iconcolor %} text-{{include.iconcolor}}{% endif %}"></i>
{% elsif include.font %}
2019-10-11 00:07:03 +02:00
<span class="{{ include.font }} panel-item panel-font" alt="{{ include.title }}"></span>
{% endif %}
{{include.description}}
</p>
2018-10-27 18:35:20 +02:00
<div>
<p>
{% if include.url %}
2019-09-17 11:08:19 +02:00
<a class="btn btn-{{include.color}} mb-1" href="{{include.url}}">
{% if include.website %}
{{include.website}}
{% else %}
{{ include.url | remove: "https://" | remove: "http://" | remove: "www." | remove: "/" | remove: "github.com" }}
{% endif %}
</a>
{% elsif include.page %}
<a class="btn btn-{{include.color}} mb-1" href="{{include.page}}">
{% if include.moretext %}
{{include.moretext}}
{% else %}
Learn More
{% endif %}
</a>
{% endif %}
{% if include.tor %}
<a class="mb-1" data-toggle="tooltip" data-placement="bottom" data-original-title="{{include.tor}} Requires specific software to access: torproject.org" href="{{include.tor}}"><img alt="Tor" src="/assets/img/layout/tor.png" width="35" height="35"></a>
2018-10-25 18:12:44 +02:00
{% endif %}
{% if include.git %}
<a class="mb-1" data-toggle="tooltip" data-placement="bottom" data-original-title="{{include.git}} supports source code compiling and open review | is free software" href="{{include.git}}"><img alt="Git" src="assets/img/layout/git.png" width="35"></a>
{% endif %}
2018-10-25 18:12:44 +02:00
{% if include.extra_button %}
{{include.extra_button}}
2018-10-23 20:07:59 +02:00
{% endif %}
</p>
{% if include.footer %}
<p>{{include.footer}}</p>
{% endif %}
2018-10-23 20:07:59 +02:00
</div>
</div>
2018-10-23 18:10:38 +02:00
</div>
</div>