Skip to content

Commit

Permalink
feat(person): display character
Browse files Browse the repository at this point in the history
  • Loading branch information
believer committed Sep 9, 2024
1 parent 0b0752e commit b946a1c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 15 deletions.
1 change: 1 addition & 0 deletions types/person.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type PersonMovie struct {
Title string `json:"title" db:"title"`
ReleaseDate time.Time `json:"release_date" db:"release_date"`
Seen bool `json:"seen" db:"seen"`
Character string `json:"character" db:"character"`
}

type PersonMovies []PersonMovie
Expand Down
3 changes: 3 additions & 0 deletions views/person.templ
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ templ Credit(title string, data types.PersonMovies, id string) {
{ movie.Title }
}
@components.Divider()
if movie.Character != "" {
<div class="text-sm truncate relative top-1">{ movie.Character }</div>
}
<span class="flex items-center gap-x-2">
<a
class="text-sm tabular-nums inline-flex items-center gap-1 focus:outline-none focus-visible:rounded-sm focus-visible:outline-dashed focus-visible:outline-offset-2 focus-visible:outline-neutral-400 dark:focus-visible:outline-neutral-600 border-b border-dashed border-neutral-500 dark:border-neutral-400"
Expand Down
49 changes: 34 additions & 15 deletions views/person_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b946a1c

Please sign in to comment.