Index.razor
Home
/
src /
App /
Calibre.App.BlazorUI /
Pages /
Index.razor
@page "/"
<h1>Hello, world!</h1>
@*Welcome to your new app.
<SurveyPrompt Title="How is Blazor working for you?" />*@
<div>
<input @bind-value="@Model.SearchInput" type="text" />
<button @onclick="OnSearchButtonClickAsync">Search</button>
</div>
<div>
<table>
<tr>
<th>Cover</th>
<td>Db</td>
<th>Id</th>
<th>Title</th>
<th>Autors</th>
<th>Tags</th>
</tr>
@foreach (var elem in Model.VisibleBooks)
{
var book = elem.Book;
<tr>
<td>
<img src="data:image/jpg;base64, @Model.ToBase64(elem.Cover)"
alt="Red dot"
style="
width:75px;
height: 150px;
object-fit:scale-down
" />
</td>
<td>
@elem.Library.Data.Name
</td>
<td>@book.Id</td>
<td>@book.Title</td>
<td><pre>@Model.RenderAutorRow(book)</pre></td>
<td><pre>@Model.RenderTags(book)</pre></td>
</tr>
}
</table>
</div>