m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-17 09:33:38 -05:00

Fix bugs in Liquid

This commit is contained in:
Sergio
2025-02-28 17:30:57 +02:00
parent 02c5d00e66
commit 4caa117a4e

View File

@@ -225,182 +225,97 @@
</div> </div>
<ul> <ul>
{% for server in server_ids %} {% for server in server_ids %}
{% if server == '' %} <li class="mb-4 last:mb-0">
<li class="mb-8 last:mb-0"> <p
<ul class="my-4 text-lg font-semibold text-{{ theme }}-600 dark:text-{{ theme }}-400 px-6"
class="dark:divide-{{theme}}-900 divide-y dark:text-white" >
> {% if server == '' %}
{% for image in servers[server] %} Local images
<li {% else %}
class="flex items-center gap-4 break-all px-6 py-4 text-start hover:bg-{{theme}}-100 hover:dark:bg-{{theme}}-900/50 transition-colors duration-200"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="size-6 shrink-0 text-{{ theme }}-500"
>
<path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"/><path d="m3.3 7 8.7 5 8.7-5"/><path d="M12 22V12"/>
</svg>
<span class="font-mono">{{ image.name }}</span>
{% case image.status %}
{% when 'Up to
date' %}
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="ml-auto text-green-500"
>
<circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/>
</svg>
{% when 'Unknown' %}
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="text-{{ theme }}-500 ml-auto"
>
<circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><path d="M12 17h.01"/>
</svg>
{% else %}
{% case image.status %}
{% when 'Major update' %}
{% assign color = 'text-red-500' %}
{% when 'Minor
update' %}
{% assign color = 'text-yellow-500' %}
{% else %}
{% assign color = 'text-blue-500' %}
{% endcase %}
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="ml-auto {{ color }}"
>
<circle cx="12" cy="12" r="10"/><path d="m16 12-4-4-4 4"/><path d="M12 16V8"/>
</svg>
{% endcase %}
</li>
{% endfor %}
</ul>
</li>
{% else %}
<li class="mb-4 last:mb-0">
<p
class="my-4 text-lg font-semibold text-{{ theme }}-600 dark:text-{{ theme }}-400 px-6"
>
{{ server }} {{ server }}
</p> {% endif %}
<ul </p>
class="dark:divide-{{ theme }}-900 divide-y dark:text-white" <ul
> class="dark:divide-{{theme}}-900 divide-y dark:text-white"
{% for image in servers[server] %} >
<li {% for image in servers[server] %}
class="flex items-center gap-4 break-all px-6 py-4 text-start hover:bg-{{ theme }}-100 hover:dark:bg-{{ theme }}-900/50 transition-colors duration-200" <li
class="flex items-center gap-4 break-all px-6 py-4 text-start hover:bg-{{theme}}-100 hover:dark:bg-{{theme}}-900/50 transition-colors duration-200"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="size-6 shrink-0 text-{{ theme }}-500"
> >
<svg <path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"/><path d="m3.3 7 8.7 5 8.7-5"/><path d="M12 22V12"/>
xmlns="http://www.w3.org/2000/svg" </svg>
width="24" <span class="font-mono">{{ image.name }}</span>
height="24" {% case image.status %}
viewBox="0 0 24 24" {% when 'Up to date' %}
fill="none" <svg
stroke="currentColor" xmlns="http://www.w3.org/2000/svg"
stroke-width="2" width="24"
stroke-linecap="round" height="24"
stroke-linejoin="round" viewBox="0 0 24 24"
class="size-6 shrink-0" fill="none"
> stroke="currentColor"
<path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"/><path d="m3.3 7 8.7 5 8.7-5"/><path d="M12 22V12"/> stroke-width="2"
</svg> stroke-linecap="round"
{{ image.name }} stroke-linejoin="round"
{% case image.status %} class="ml-auto text-green-500"
{% when 'Up to >
date' %} <circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/>
<svg </svg>
xmlns="http://www.w3.org/2000/svg" {% when 'Unknown' %}
width="24" <svg
height="24" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24" width="24"
fill="none" height="24"
stroke="currentColor" viewBox="0 0 24 24"
stroke-width="2" fill="none"
stroke-linecap="round" stroke="currentColor"
stroke-linejoin="round" stroke-width="2"
class="ml-auto text-green-500" stroke-linecap="round"
> stroke-linejoin="round"
<circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/> class="text-{{ theme }}-500 ml-auto"
</svg> >
{% when 'Unknown' %} <circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><path d="M12 17h.01"/>
<svg </svg>
xmlns="http://www.w3.org/2000/svg" {% else %}
width="24" {% case image.status %}
height="24" {% when 'Major update' %}
viewBox="0 0 24 24" {% assign color = 'text-red-500' %}
fill="none" {% when 'Minor update' %}
stroke="currentColor" {% assign color = 'text-yellow-500' %}
stroke-width="2" {% else %}
stroke-linecap="round" {% assign color = 'text-blue-500' %}
stroke-linejoin="round" {% endcase %}
class="text-{{ theme }}-500 ml-auto" <svg
> xmlns="http://www.w3.org/2000/svg"
<circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><path d="M12 17h.01"/> width="24"
</svg> height="24"
{% else %} viewBox="0 0 24 24"
{% case image.status %} fill="none"
{% when 'Major update' %} stroke="currentColor"
{% assign color = 'text-red-500' %} stroke-width="2"
{% when 'Minor stroke-linecap="round"
update' %} stroke-linejoin="round"
{% assign color = 'text-yellow-500' %} class="ml-auto {{ color }}"
{% else %} >
{% assign color = 'text-blue-500' %} <circle cx="12" cy="12" r="10"/><path d="m16 12-4-4-4 4"/><path d="M12 16V8"/>
{% endcase %} </svg>
<svg {% endcase %}
xmlns="http://www.w3.org/2000/svg" </li>
width="24" {% endfor %}
height="24" </ul>
viewBox="0 0 24 24" </li>
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="ml-auto {{ color }}"
>
<circle cx="12" cy="12" r="10"/><path d="m16 12-4-4-4 4"/><path d="M12 16V8"/>
</svg>
{% endcase %}
</li>
{% endfor %}
</ul>
</li>
{% endif %}
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>