Skip to content

Instantly share code, notes, and snippets.

@elmarputz
Created April 12, 2024 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elmarputz/22a43d4410d9f59c6bf46ce6da656436 to your computer and use it in GitHub Desktop.
Save elmarputz/22a43d4410d9f59c6bf46ce6da656436 to your computer and use it in GitHub Desktop.
book detail
@if(book){
<div class="ui grid">
<div class="four wide column">
@if(book.images && book.images[0]){
<img class="ui large image" [src]="book.images[0].url">
}
</div>
<div class="twelve wide column">
<h1 class="ui header">{{ book.title }}</h1>
<h3 class="ui header">{{ book.subtitle }}</h3>
<div class="ui divider"></div>
<div class="ui grid">
<div class="four wide column">
<h4 class="ui header">Autoren</h4>
@for (author of book?.authors; track author; let l =$last) {
<span>{{ author.firstName }} {{ author.lastName }}@if(!l){<span>, </span>}</span>
}
</div>
<div class="four wide column">
<h4 class="ui header">ISBN</h4>
{{ book.isbn }}
</div>
<div class="four wide column">
<h4 class="ui header">Erschienen</h4>
{{ book.published }}
</div>
<div class="four wide column">
<h4 class="ui header">Rating</h4>
@if(book.rating){
<div class="ui star rating">
@for (r of getRating(book.rating); track r) {
<i class="yellow star icon"></i>
}
</div>
}
</div>
</div>
</div>
<div class="sixteen wide column">
<h3 class="ui header">Beschreibung</h3>
{{ book.description }}
</div>
<div class="sixteen wide column">
<div class="ui small images">
@for (thumbnail of book.images; track thumbnail) {
<img [src]="thumbnail.url">
}
</div>
</div>
</div>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment