Merge pull request #60 from sgvictorino/empty-description-fixes

fix: handle empty songs descriptions on lyrics and album pages
This commit is contained in:
Achraf RRAMI 2024-05-13 11:31:24 +00:00 committed by GitHub
commit 8241deac12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 7 deletions

View File

@ -23,6 +23,7 @@ templ AlbumPage(a data.Album) {
</a>
}
</div>
if a.About[0] != "" {
<div id="info">
<div id="about">
<h1 id="title">About</h1>
@ -30,6 +31,7 @@ templ AlbumPage(a data.Album) {
<p id="summary">{ a.About[1] }</p>
</div>
</div>
}
</div>
}
}

View File

@ -23,7 +23,7 @@ templ LyricsPage(s data.Song) {
@templ.Raw(s.Lyrics)
</div>
<div id="info">
if s.About[0] != "" {
if s.About[0] != "?" {
<div id="about">
<h1 id="title">About</h1>
<p class="hidden" id="full_about">{ s.About[0] }</p>