Skip to content

Commit

Permalink
External link fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chadokruse committed Jan 14, 2024
1 parent 534bb2e commit 2de9af6
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/_includes/card-template.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
<div class="eachcard w-full sm:w-full md:w-1/2 lg:w-1/3 xl:w-1/4 2xl:w-1/5 p-4 {% for each in card.data.tags %}{{ each | slugify }} {% endfor %}">
<div
class="eachcard w-full sm:w-full md:w-1/2 lg:w-1/3 xl:w-1/4 2xl:w-1/5 p-4 {% for each in card.data.tags %}{{ each | slugify }} {% endfor %}">
<div class="bg-white rounded-lg border border-gray-200 shadow-md dark:bg-gray-800 dark:border-gray-700">
{% if card.data.image_href %}
<a href="{{ card.data.image_href }}" target="_blank"><img class="w-full mx-auto border-none rounded-t-lg" src="/images/{{ card.data.image }}" alt="{{ card.data.header }}"></a>
<a href="{{ card.data.image_href }}" target="_blank"><img class="w-full mx-auto border-none rounded-t-lg"
src="/images/{{ card.data.image }}" alt="{{ card.data.header }}"></a>
{% else %}
<img class="w-full mx-auto border-none rounded-t-lg" src="/images/{{ card.data.image }}" alt="{{ card.data.header }}">
<img class="w-full mx-auto border-none rounded-t-lg" src="/images/{{ card.data.image }}"
alt="{{ card.data.header }}">
{% endif %}
<div class="p-5">
<h2 class="mb-2 text-2xl tracking-tight font-bold text-gray-900 dark:text-white">{{ card.data.header }}</h2>
<div class="mb-2 font-normal">
{% for tag in card.data.tags %}
<a href="#{{ tag | slugify }}" target="_blank" class="inline-flex leading-5 mr-2 mb-1 px-2 text-xs text-gray-900 bg-gray-200 rounded whitespace-nowrap hover:bg-indigo-600 hover:text-white" data-filter=".{{ tag | slugify }}">{{ tag }}</a>
<a href="#{{ tag | slugify }}"
class="inline-flex leading-5 mr-2 mb-1 px-2 text-xs text-gray-900 bg-gray-200 rounded whitespace-nowrap hover:bg-indigo-600 hover:text-white"
data-filter=".{{ tag | slugify }}">{{ tag }}</a>
{% endfor %}
</div>
<div class="prose prose-p:leading-snug prose-li:m-0 mb-3 font-normal">
{{ card.templateContent }}
</div>
</div>
</div>
</div>
</div>

0 comments on commit 2de9af6

Please sign in to comment.