initial commit
This commit is contained in:
94
Views/Home/Repository.cshtml
Normal file
94
Views/Home/Repository.cshtml
Normal file
@@ -0,0 +1,94 @@
|
||||
@model RepositoryPageModel
|
||||
|
||||
<div class="text-center display-6 page-title-color"><b>
|
||||
ДИГИТАЛНИ КОЛЕКЦИИ
|
||||
</b></div>
|
||||
|
||||
<style>
|
||||
.grid-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); /* Подрежда елементите в грид с ширина от поне 200px, но равномерно разпределя останалото пространство */
|
||||
grid-gap: 50px; /* Разстояние между елементите */
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
border: 0px solid #ccc;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@if (Model.CategoryData.Depth == 0)
|
||||
{
|
||||
<div>
|
||||
<div class="grid-container">
|
||||
@foreach (CategoryItemData category in Model.CategoryData.Children)
|
||||
{
|
||||
int q = category.Depth;
|
||||
<div class="grid-item">
|
||||
<div>
|
||||
<img src="~/@Configuration["Images"]/book_@(@category.ID.ToString()).png" ) width="320" height="370">
|
||||
</div>
|
||||
<div>
|
||||
<a href="/Repository/@category.ID">@category.Name</a>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="container row mt-3 mb-3">
|
||||
<div class="nav_tree">
|
||||
@foreach (CategoryItemData category in Model.CategoryPath)
|
||||
{
|
||||
<div class="nav_tree_item_container">
|
||||
@for (int x = 0; x < category.Depth; x++)
|
||||
{
|
||||
<span class="indent"></span>
|
||||
}
|
||||
<span class="indent"><i class="fa fa-caret-down"></i></span>
|
||||
<a href="/Repository/@category.ID">@category.Name </a>
|
||||
</div>
|
||||
}
|
||||
<div class="nav_tree_item_container">
|
||||
@for (int x = 0; x < Model.CategoryData.Depth; x++)
|
||||
{
|
||||
<span class="indent"></span>
|
||||
}
|
||||
<span class="indent"><i class="fa fa-caret-down"></i></span>
|
||||
<span><b>@Model.CategoryData.Name</b></span>
|
||||
</div>
|
||||
@foreach (CategoryItemData category in Model.CategoryData.Children)
|
||||
{
|
||||
<div class="nav_tree_item_container">
|
||||
@for (int x = 0; x < category.Depth; x++)
|
||||
{
|
||||
<span class="indent"></span>
|
||||
}
|
||||
<span class="indent"><i class="fa fa-caret-right"></i></span>
|
||||
<a href="/Repository/@category.ID">@category.Name</a>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center display-6 page-title-color mt-3">
|
||||
<font size=4><b> Публикации в категория </b></font>
|
||||
<font size=5><b> @Model.CategoryData.Name </b></font>
|
||||
<div class="container row mt-3 mb-3">
|
||||
<font size=3 color="#000000" align=left>
|
||||
<b><i>
|
||||
@Model.CategoryData.Catego_opis
|
||||
</i></b>
|
||||
</font>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="container row mt-3 mb-3">
|
||||
@foreach ( BookData book in Model.Books ) {
|
||||
@await Html.PartialAsync("~/Views/Shared/RepositoryBookElement.cshtml", book);
|
||||
}
|
||||
</div>
|
||||
@await Html.PartialAsync( "~/Views/Shared/PagingArea.cshtml" , Model.PagingData )
|
||||
Reference in New Issue
Block a user