mod: оптимизация CSS и спрятана часть tailwind "класс-колбас"
HYPN0 Build and Push Docker Image / build-and-push (push) Successful in 31s
HYPN0 Build and Push Docker Image / build-and-push (push) Successful in 31s
This commit is contained in:
@@ -1,61 +1,25 @@
|
||||
{% load static %}
|
||||
<div id="gallery-card-{{ item.s_hash_id }}"
|
||||
style="{{ item.card_bg_style }}"
|
||||
class="aspect-square rounded-2xl border border-stone-300/80 dark:border-zinc-800/80 overflow-hidden relative group transition-all duration-300 hover:scale-[1.03] hover:shadow-2xl hover:border-amber-500/60 dark:hover:border-amber-500/50 flex items-center justify-center select-none shadow-sm bg-[var(--card-bg-light)] dark:bg-[var(--card-bg-dark)]">
|
||||
|
||||
<!-- Ссылка на полный просмотр картины -->
|
||||
<a href="{% url 'hypn0_site:gallery_detail' item.s_hash_id %}"
|
||||
class="absolute inset-0 z-10 flex items-center justify-center p-3 sm:p-4 border-0 border-none no-underline hover:border-0 hover:border-none focus:outline-none"
|
||||
title="«{{ item.s_title }}» — Анимированная SVG-картина #{{ item.s_hash_id }} | HypnoSVG"
|
||||
aria-label="«{{ item.s_title }}» — Векторная картина #{{ item.s_hash_id }} в галерее HypnoSVG">
|
||||
<div x-data="hypn0LazySvg('{% if item.file_svg %}{{ item.file_svg.url }}{% endif %}')"
|
||||
class="hypn0-card-svg w-full h-full flex items-center justify-center drop-shadow-sm transition-transform duration-300 group-hover:scale-105 border-0">
|
||||
<noscript>
|
||||
<div class="flex flex-col items-center justify-center p-3 text-center gap-1">
|
||||
<span class="text-[11px] font-bold text-amber-600 dark:text-amber-400">Требуется JS для анимации</span>
|
||||
<span class="text-[10px] text-stone-500 dark:text-stone-400 underline">«{{ item.s_title }}»</span>
|
||||
<div id="gallery-card-{{ item.s_hash_id }}" style="{{ item.card_bg_style }}" class="card group">{% load static %}
|
||||
{# <!-- Ссылка на полный просмотр картины -->#}<a href="{% url 'hypn0_site:gallery_detail' item.s_hash_id %}"
|
||||
class="card-link"
|
||||
title="«{{ item.s_title_plain }}» — Анимированная SVG-картина #{{ item.s_hash_id }} | HypnoSVG"
|
||||
aria-label="«{{ item.s_title_plain }}» — Векторная картина #{{ item.s_hash_id }} в галерее HypnoSVG">
|
||||
<div x-data="hypn0LazySvg('{% if item.file_svg %}{{ item.file_svg.url }}{% endif %}')" class="card-svg hypn0-card-svg">
|
||||
<noscript><div class="card-noscript">
|
||||
<span class="card-noscript-warn">Включите JS для анимации</span>
|
||||
<span class="card-noscript-title">«{{ item.s_title|safe }}»</span>
|
||||
</div>
|
||||
</noscript>
|
||||
</div>
|
||||
</noscript>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<!-- Верхний бейдж: Хэш и уровень -->
|
||||
<div class="absolute top-2 left-2 z-20 pointer-events-none flex items-center gap-1">
|
||||
{% if item.i_level >= 1000 %}
|
||||
<span class="text-[10px] font-mono font-bold tracking-tight px-1.5 py-0.5 rounded bg-emerald-950/80 text-emerald-300 backdrop-blur-md border border-emerald-500/30 opacity-80 group-hover:opacity-100 transition-opacity">
|
||||
★ ¤{{ item.s_hash_id }}
|
||||
</span>
|
||||
{% elif item.i_level >= 30 %}
|
||||
<span class="text-[10px] font-mono font-bold tracking-tight px-1.5 py-0.5 rounded bg-cyan-950/80 text-cyan-300 backdrop-blur-md border border-cyan-500/30 opacity-80 group-hover:opacity-100 transition-opacity">
|
||||
◉ ¤{{ item.s_hash_id }}
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="text-[10px] font-mono font-bold tracking-tight px-1.5 py-0.5 rounded bg-stone-900/70 text-stone-200 backdrop-blur-md border border-white/10 opacity-75 group-hover:opacity-100 transition-opacity">
|
||||
¤{{ item.s_hash_id }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Нижняя панель статистики (Лайки и Просмотры) -->
|
||||
<div class="absolute bottom-2 left-2 right-2 z-20 flex items-center justify-between pointer-events-none">
|
||||
<!-- Бейдж лайков -->
|
||||
{% if item.i_level >= 1000 %}
|
||||
<span class="inline-flex items-center gap-1 text-[11px] font-bold font-mono px-2 py-0.5 rounded-full bg-stone-900/80 text-emerald-400 backdrop-blur-md border border-emerald-500/20 shadow-sm opacity-90 group-hover:opacity-100 transition-opacity">
|
||||
♥ {{ item.i_likes_count }}
|
||||
</span>
|
||||
{% elif item.i_level >= 30 %}
|
||||
<span class="inline-flex items-center gap-1 text-[11px] font-bold font-mono px-2 py-0.5 rounded-full bg-stone-900/80 text-cyan-400 backdrop-blur-md border border-cyan-500/20 shadow-sm opacity-90 group-hover:opacity-100 transition-opacity">
|
||||
♥ {{ item.i_likes_count }}
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="inline-flex items-center gap-1 text-[11px] font-bold font-mono px-2 py-0.5 rounded-full bg-stone-900/80 text-amber-400 backdrop-blur-md border border-amber-500/20 shadow-sm opacity-90 group-hover:opacity-100 transition-opacity">
|
||||
♥ {{ item.i_likes_count }}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
<!-- Бейдж просмотров (проявляется при наведении) -->
|
||||
<span class="inline-flex items-center gap-1 text-[10px] font-mono px-1.5 py-0.5 rounded-full bg-stone-900/80 text-stone-400 backdrop-blur-md opacity-0 group-hover:opacity-100 transition-opacity">
|
||||
👁 {{ item.i_views_count }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{# <!-- Верхний бейдж: Хэш и уровень -->#}<div class="card-top">{% if item.i_level >= 1000 %}
|
||||
{# БЕССМЕРТНЫЕ #}<span class="card-tag card-tag-immortal">⁂{{ item.s_hash_id }}</span>{% elif item.i_level >= 30 %}
|
||||
{# ОДОБРЕНО ГИПНОЖАБОЙ #}<span class="card-tag card-tag-curated">✦{{ item.s_hash_id }}</span>{% else %}
|
||||
{# СВЕЖЕЕ #}<span class="card-tag card-tag-fresh">¤{{ item.s_hash_id }}</span>{% endif %}
|
||||
</div>
|
||||
{# <!-- Нижняя панель статистики (Лайки и Просмотры) -->#}<div class="card-bottom">{% if item.i_level >= 1000 %}
|
||||
{# БЕССМЕРТНЫЕ #}<span class="card-stat card-stat-immortal">♥ {{ item.i_likes_count }}</span>{% elif item.i_level >= 30 %}
|
||||
{# ОДОБРЕНО ГИПНОЖАБОЙ #}<span class="card-stat card-stat-curated">♥ {{ item.i_likes_count }}</span>{% else %}
|
||||
{# СВЕЖЕЕ #}<span class="card-stat card-stat-fresh">♥ {{ item.i_likes_count }}</span>{% endif %}
|
||||
<span class="card-stat card-stat-views">👁 {{ item.i_views_count }}</span>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user