From a79e8f0cd6288543e738a2956c649005fef0e256 Mon Sep 17 00:00:00 2001 From: ZeKap Date: Thu, 22 Feb 2024 15:59:40 +0100 Subject: [PATCH] dynamic style for favs --- templates/favorite/index.html.twig | 2 +- templates/index.html.twig | 38 +++++++++++++++++++----------- templates/search/search.html.twig | 12 +++++++++- 3 files changed, 36 insertions(+), 16 deletions(-) diff --git a/templates/favorite/index.html.twig b/templates/favorite/index.html.twig index bce3f79..9659a1e 100644 --- a/templates/favorite/index.html.twig +++ b/templates/favorite/index.html.twig @@ -21,7 +21,7 @@ {% set main_artist = album_liked["artists_sort"] %} {% set artists = album_liked["artists"] %} {% set album = album_liked["title"] %} -
+

{{album}}

by diff --git a/templates/index.html.twig b/templates/index.html.twig index aec585b..b5791f3 100644 --- a/templates/index.html.twig +++ b/templates/index.html.twig @@ -1,20 +1,30 @@ -{% extends 'base.html.twig' %} - -{% block title %}Welcome to Frutti!{% endblock %} - +{% extends 'base.html.twig' %} {% block title %}Welcome to Frutti!{% endblock %} {% block body %} - - -
+

Welcome to Frutti!

Frutti is an application to create your own fruit record collection.

+

But what is a fruit record collection? 🤔

-

A fruit collection is composed of albums which have a link with fruits.

-

Frutti uses Discogs to let you find albums of fruits.

+

+ A fruit collection is composed of albums which have a link with fruits. +

+

+ Frutti uses + Discogs + to let you find albums of fruits. +

+

Start your fruit collection today!

-

Create an account or to connect to an existing one.

-
+

+ Create an account + or to + connect to an existing one. +

+ {% endblock %} diff --git a/templates/search/search.html.twig b/templates/search/search.html.twig index 850e9af..389996a 100644 --- a/templates/search/search.html.twig +++ b/templates/search/search.html.twig @@ -17,7 +17,10 @@ endblock %} {% block body %}
{% for result in results %} {% set array = result['title']|split('-') %} {% set artist = array[0] %} {% set album = array[1] %} -
+

{{album}}

by @@ -28,9 +31,16 @@ endblock %} {% block body %} src="{{result['cover_image']}}" alt="{{album ~ ' by ' ~ artist}}" /> + {% if result['isLiked'] == 'true' %} +

+ Already fav, go to + favorites +

+ {% else %} + {% endif %}
{% endfor %}