chore: refactor image setup
This commit is contained in:
parent
f5b480e195
commit
82a8a1f15a
20 changed files with 121 additions and 52 deletions
|
@ -1,7 +1,7 @@
|
|||
<div class="mt-12 py-8 border-t-2 flex flex-col md:flex-row justify-between items-center">
|
||||
<div class="flex flex-col mb-4 md:mb-0 md:flex-row items-center flex-1">
|
||||
<div class="border border-teal-700 dark:border-teal-300 bg-white rounded-full overflow-hidden mb-4 md:mb-0 md:mr-4">
|
||||
{% image './src/assets/img/avatar.webp', site.name, 'inline-block h-20 w-20', '80px' %}
|
||||
<div class="border border-teal-700 dark:border-teal-300 bg-white rounded-full overflow-hidden mb-4 md:mb-0 md:mr-4 [&>*]:h-20 [&>*]:w-20 flex flex-col items-center">
|
||||
{% image './src/assets/img/avatar.webp', site.name, 'inline-block' %}
|
||||
</div>
|
||||
<span class="text-lg font-medium">{{ site.name }}</span>
|
||||
</div>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
{% for item in media limit: count %}
|
||||
{% assign alt = item.alt | strip %}
|
||||
<a href="{{ item.url | stripUtm }}" title="{{ alt | escape }}">
|
||||
<div class="relative block h-full"{% if shape != 'square' %} style="max-width:226px"{% endif %}>
|
||||
<div class="relative block h-full rounded-lg overflow-hidden"{% if shape != 'square' %} style="max-width:226px"{% endif %}>
|
||||
<div class="absolute left-0 top-0 h-full w-full rounded-lg border border-purple-600 hover:border-pink-500 dark:border-purple-400 dark:hover:border-pink-500 ease-in-out duration-300{% if item.title %} bg-cover-gradient{% endif %}"></div>
|
||||
<div class="absolute left-1 bottom-2 drop-shadow-md">
|
||||
{% if item.title %}
|
||||
|
@ -20,8 +20,7 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{%- capture size %}{% if shape == 'square' %}225px{% else %}180px{% endif %}{% endcapture -%}
|
||||
{% image item.image, alt, 'rounded-lg w-full h-full', size, loading %}
|
||||
{% image item.image, alt, 'rounded-lg w-full h-full [&>*]:h-full' %}
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
{% for mention in mentions['in-reply-to'] %}
|
||||
<div class="border-bottom flex flex-row items-center border-gray-100 pb-4 w-full">
|
||||
<a class="text-gray-700 dark:text-gray-200 group flex flex-row space-between items-center" href={{mention.url}}>
|
||||
{% image mention.author.photo, mention.author.name, 'bg-gray-900 dark:bg-white h-14 w-14 rounded-full border-4 border-white dark:border-gray-900 transition-all ease-in-out duration-300 group-hover:border-pink-500 dark:group-hover:border-pink-500', '56px' %}
|
||||
<div class="bg-gray-900 dark:bg-white h-14 w-14 border-4 border-white dark:border-gray-900 transition-all ease-in-out duration-300 group-hover:border-pink-500 dark:group-hover:border-pink-500 rounded-full overflow-hidden">
|
||||
{% image mention.author.photo, mention.author.name %}
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
<p class="text-sm group-hover:text-pink-500 dark:group-hover:text-pink-500">{{ mention.content.text }}</p>
|
||||
<p class="mt-1 text-xs group-hover:text-pink-500 dark:group-hover:text-pink-500">{{ mention.published | isoDateOnly }}</p>
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
{% for mention in mentions[type] %}
|
||||
<li class="-ml-3 inline">
|
||||
<a href={{mention.url}}>
|
||||
{% image mention.author.photo, mention.author.name, 'bg-gray-900 dark:bg-white h-14 w-14 rounded-full border-4 border-white dark:border-gray-900 transition-all hover:border-pink-500 dark:hover:border-pink-500', '56px' %}
|
||||
<div class="bg-gray-900 dark:bg-white h-14 w-14 border-4 border-white dark:border-gray-900 transition-all ease-in-out duration-300 hover:border-pink-500 dark:hover:border-pink-500 rounded-full overflow-hidden">
|
||||
{% image mention.author.photo, mention.author.name %}
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
|
Reference in a new issue