| [fa0fbaf] | 1 | @model IEnumerable<KernelRecordsMVC.Application.ViewModels.SaleItemViewModel>
|
|---|
| 2 |
|
|---|
| 3 | @{
|
|---|
| 4 | ViewData["Title"] = "Sale";
|
|---|
| 5 | }
|
|---|
| 6 |
|
|---|
| 7 | <div class="sale-page">
|
|---|
| 8 |
|
|---|
| 9 | <div class="sale-header">
|
|---|
| 10 |
|
|---|
| 11 | <span class="page-eyebrow">
|
|---|
| 12 | KERNEL RECORDS
|
|---|
| 13 | </span>
|
|---|
| 14 |
|
|---|
| 15 | <h1>Sale</h1>
|
|---|
| 16 |
|
|---|
| 17 | <p>
|
|---|
| 18 | Limited-time prices on selected physical releases.
|
|---|
| 19 | </p>
|
|---|
| 20 |
|
|---|
| 21 | </div>
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 | @if (!Model.Any())
|
|---|
| 25 | {
|
|---|
| 26 | <div class="no-sales-data">
|
|---|
| 27 |
|
|---|
| 28 | <div class="empty-store-icon">
|
|---|
| 29 | %
|
|---|
| 30 | </div>
|
|---|
| 31 |
|
|---|
| 32 | <h2>No items are currently on sale</h2>
|
|---|
| 33 |
|
|---|
| 34 | <p>
|
|---|
| 35 | Check back soon for new discounts.
|
|---|
| 36 | </p>
|
|---|
| 37 |
|
|---|
| 38 | </div>
|
|---|
| 39 | }
|
|---|
| 40 | else
|
|---|
| 41 | {
|
|---|
| 42 | <div class="sale-grid">
|
|---|
| 43 |
|
|---|
| 44 | @foreach (var item in Model)
|
|---|
| 45 | {
|
|---|
| 46 | <article class="sale-card">
|
|---|
| 47 |
|
|---|
| 48 | <a asp-controller="Release"
|
|---|
| 49 | asp-action="Details"
|
|---|
| 50 | asp-route-id="@item.ReleaseId"
|
|---|
| 51 | class="sale-card-cover">
|
|---|
| 52 |
|
|---|
| 53 | @if (!string.IsNullOrWhiteSpace(item.CoverPhoto))
|
|---|
| 54 | {
|
|---|
| 55 | <img src="@item.CoverPhoto"
|
|---|
| 56 | alt="@item.ReleaseTitle" />
|
|---|
| 57 | }
|
|---|
| 58 | else
|
|---|
| 59 | {
|
|---|
| 60 | <div class="release-no-cover">
|
|---|
| 61 | <span>♪</span>
|
|---|
| 62 | </div>
|
|---|
| 63 | }
|
|---|
| 64 |
|
|---|
| 65 | <span class="sale-badge">
|
|---|
| 66 | -@item.DiscountPercentage%
|
|---|
| 67 | </span>
|
|---|
| 68 |
|
|---|
| 69 | </a>
|
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 | <div class="sale-card-body">
|
|---|
| 73 |
|
|---|
| 74 | <div class="release-card-meta">
|
|---|
| 75 |
|
|---|
| 76 | <span>
|
|---|
| 77 | @item.Format
|
|---|
| 78 | </span>
|
|---|
| 79 |
|
|---|
| 80 | @if (item.Stock > 0)
|
|---|
| 81 | {
|
|---|
| 82 | <span class="stock available">
|
|---|
| 83 | In stock
|
|---|
| 84 | </span>
|
|---|
| 85 | }
|
|---|
| 86 | else
|
|---|
| 87 | {
|
|---|
| 88 | <span class="stock unavailable">
|
|---|
| 89 | Out of stock
|
|---|
| 90 | </span>
|
|---|
| 91 | }
|
|---|
| 92 |
|
|---|
| 93 | </div>
|
|---|
| 94 |
|
|---|
| 95 |
|
|---|
| 96 | <h2>
|
|---|
| 97 |
|
|---|
| 98 | <a asp-controller="Release"
|
|---|
| 99 | asp-action="Details"
|
|---|
| 100 | asp-route-id="@item.ReleaseId">
|
|---|
| 101 |
|
|---|
| 102 | @item.ReleaseTitle
|
|---|
| 103 |
|
|---|
| 104 | </a>
|
|---|
| 105 |
|
|---|
| 106 | </h2>
|
|---|
| 107 |
|
|---|
| 108 |
|
|---|
| 109 | <p class="release-card-artist">
|
|---|
| 110 | @item.ArtistName
|
|---|
| 111 | </p>
|
|---|
| 112 |
|
|---|
| 113 |
|
|---|
| 114 | <div class="sale-price-row">
|
|---|
| 115 |
|
|---|
| 116 | <span class="sale-old-price">
|
|---|
| 117 | @item.OriginalPrice.ToString("C")
|
|---|
| 118 | </span>
|
|---|
| 119 |
|
|---|
| 120 | <strong class="sale-price">
|
|---|
| 121 | @item.SalePrice.ToString("C")
|
|---|
| 122 | </strong>
|
|---|
| 123 |
|
|---|
| 124 | </div>
|
|---|
| 125 |
|
|---|
| 126 |
|
|---|
| 127 | <div class="sale-actions">
|
|---|
| 128 |
|
|---|
| 129 | @if (item.Stock > 0)
|
|---|
| 130 | {
|
|---|
| 131 | <a asp-controller="Order"
|
|---|
| 132 | asp-action="AddProduct"
|
|---|
| 133 | asp-route-id="@item.ProductId"
|
|---|
| 134 | class="store-button primary full">
|
|---|
| 135 |
|
|---|
| 136 | Add to Cart
|
|---|
| 137 |
|
|---|
| 138 | </a>
|
|---|
| 139 | }
|
|---|
| 140 |
|
|---|
| 141 | <a asp-controller="Release"
|
|---|
| 142 | asp-action="Details"
|
|---|
| 143 | asp-route-id="@item.ReleaseId"
|
|---|
| 144 | class="store-button secondary full">
|
|---|
| 145 |
|
|---|
| 146 | View Release
|
|---|
| 147 |
|
|---|
| 148 | </a>
|
|---|
| 149 |
|
|---|
| 150 | </div>
|
|---|
| 151 |
|
|---|
| 152 | </div>
|
|---|
| 153 |
|
|---|
| 154 | </article>
|
|---|
| 155 | }
|
|---|
| 156 |
|
|---|
| 157 | </div>
|
|---|
| 158 | }
|
|---|
| 159 |
|
|---|
| 160 | </div> |
|---|