From f8f15a75cacce565ae267fa685f40df7701d44bf Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Wed, 17 Jul 2024 12:26:18 +0200 Subject: [PATCH] Lista de albumes en tarjetas --- LyricsPy/servicios/lyrics/paginas.py | 3 +- .../lyrics/templates/albumescard.html | 64 +++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 LyricsPy/servicios/lyrics/templates/albumescard.html diff --git a/LyricsPy/servicios/lyrics/paginas.py b/LyricsPy/servicios/lyrics/paginas.py index 3046475..fedc23d 100644 --- a/LyricsPy/servicios/lyrics/paginas.py +++ b/LyricsPy/servicios/lyrics/paginas.py @@ -22,7 +22,8 @@ def letras(): @bp.route('/albumes') def albumes(): albums = Album.query.all() - return render_template('albumes.html', albums=albums) + #return render_template('albumes.html', albums=albums) + return render_template('albumescard.html', albums=albums) @bp.route('/404') def cuatrocerocuatro(): diff --git a/LyricsPy/servicios/lyrics/templates/albumescard.html b/LyricsPy/servicios/lyrics/templates/albumescard.html new file mode 100644 index 0000000..172d1b4 --- /dev/null +++ b/LyricsPy/servicios/lyrics/templates/albumescard.html @@ -0,0 +1,64 @@ +{% extends 'base.html' %} + +{% block content %} +
+ +
+
+

Álbumes

+
+
+ +
+ {% for album in albums %} +
+
+
+ {% if album.cover_image %} + {{ album.name }} + {% else %} + Sin imágen + {% endif %} +

{{ album.name }}

+
+
    +
  • Artista:{{ album.artist }}
  • +
  • Año:{{ album.year }}
  • +
+
+ + + +
+
+
+ {% endfor %} +
+
+{% endblock %} \ No newline at end of file