Skip to content

Commit

Permalink
Merge pull request #60 from sgvictorino/empty-description-fixes
Browse files Browse the repository at this point in the history
fix: handle empty songs descriptions on lyrics and album pages
  • Loading branch information
rramiachraf authored May 13, 2024
2 parents 5a5ffca + 54e4a44 commit 8241dea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions views/album.templ
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ templ AlbumPage(a data.Album) {
</a>
}
</div>
<div id="info">
<div id="about">
<h1 id="title">About</h1>
<p class="hidden" id="full_about">{ a.About[0] }</p>
<p id="summary">{ a.About[1] }</p>
if a.About[0] != "" {
<div id="info">
<div id="about">
<h1 id="title">About</h1>
<p class="hidden" id="full_about">{ a.About[0] }</p>
<p id="summary">{ a.About[1] }</p>
</div>
</div>
</div>
}
</div>
}
}
2 changes: 1 addition & 1 deletion views/lyrics.templ
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 8241dea

Please sign in to comment.