diff --git a/data.json b/data.json index e46e534..b391a2e 100644 --- a/data.json +++ b/data.json @@ -3908,12 +3908,14 @@ { "title": "Aperte fino al 10.11.2023 le iscrizioni per SSIBAP Scuola di specializzazione in beni architettonici e del paesaggio", "date": "1692079200", + "sticky": true, "featured_image": null, "terms": [[0,0]] }, { "title": "Aperte fino al 13.09.2023 le iscrizioni per la laurea triennale in Urbanistica e pianificazione del territorio", "date": "1692079200", + "sticky": true, "featured_image": { "filename": "news-urbanistica", "path": "/post_type/news" diff --git a/src/assets/css/components/chip.css b/src/assets/css/components/chip.css index 0aff0b3..c7a8faf 100644 --- a/src/assets/css/components/chip.css +++ b/src/assets/css/components/chip.css @@ -1,2 +1,7 @@ .chip{ + --chip-bg: theme(colors.black); + --chip-color: theme(colors.white); + background: var(--chip-bg); + color: var(--chip-color); + @apply h-6 px-2 flex items-center text-size-sm; } \ No newline at end of file diff --git a/src/assets/css/components/tease.css b/src/assets/css/components/tease.css index 3281ee8..afcdef0 100644 --- a/src/assets/css/components/tease.css +++ b/src/assets/css/components/tease.css @@ -20,6 +20,9 @@ img{ @apply w-full h-full object-cover; } + .chip{ + @apply absolute top-2.5 left-2.5; + } /* &:not(:has(*)){ background:url( data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAD9JREFUKFOF0EkKADAMAkD9/6MtKbR0SaLnQUFKEkxIgg4Giq4WLhSDJTxRCV+Uwgx9sEIX7NCGDk0IxE32cwyfdD/mA174iAAAAABJRU5ErkJggg== diff --git a/src/layout/partials/tease.twig b/src/layout/partials/tease.twig index cb956b7..c49aa51 100644 --- a/src/layout/partials/tease.twig +++ b/src/layout/partials/tease.twig @@ -4,6 +4,9 @@

{{post.title}}

+ {% if post.sticky %} + In evidenza + {% endif %} {% if post.featured_image %} {% include "./picture.twig" with {"image": post.featured_image } %} {% endif %} @@ -15,9 +18,12 @@ {% else %}
- {% if post.featured_image %} - {% include "./picture.twig" with {"image": post.featured_image } %} - {% endif %} + {% if post.sticky %} + In evidenza + {% endif %} + {% if post.featured_image %} + {% include "./picture.twig" with {"image": post.featured_image } %} + {% endif %}