| 1 | @model KernelRecordsMVC.Models.Artist
|
|---|
| 2 |
|
|---|
| 3 | @{
|
|---|
| 4 | ViewData["Title"] = Model.ArtistName;
|
|---|
| 5 | }
|
|---|
| 6 |
|
|---|
| 7 | <div class="artist-details-page">
|
|---|
| 8 |
|
|---|
| 9 | <a asp-controller="Artist"
|
|---|
| 10 | asp-action="Index"
|
|---|
| 11 | class="artist-back-link">
|
|---|
| 12 |
|
|---|
| 13 | ← All Artists
|
|---|
| 14 |
|
|---|
| 15 | </a>
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 | <section class="artist-details-hero">
|
|---|
| 19 |
|
|---|
| 20 | <div class="artist-details-image">
|
|---|
| 21 |
|
|---|
| 22 | @if (!string.IsNullOrWhiteSpace(
|
|---|
| 23 | Model.ArtistPhoto))
|
|---|
| 24 | {
|
|---|
| 25 | <img src="@Model.ArtistPhoto"
|
|---|
| 26 | alt="@Model.ArtistName" />
|
|---|
| 27 | }
|
|---|
| 28 | else
|
|---|
| 29 | {
|
|---|
| 30 | <div class="artist-photo-placeholder large">
|
|---|
| 31 | ♪
|
|---|
| 32 | </div>
|
|---|
| 33 | }
|
|---|
| 34 |
|
|---|
| 35 | </div>
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 | <div class="artist-details-info">
|
|---|
| 39 |
|
|---|
| 40 | <span class="artist-eyebrow">
|
|---|
| 41 | ARTIST
|
|---|
| 42 | </span>
|
|---|
| 43 |
|
|---|
| 44 | <h1>
|
|---|
| 45 | @Model.ArtistName
|
|---|
| 46 | </h1>
|
|---|
| 47 |
|
|---|
| 48 | @if (!string.IsNullOrWhiteSpace(
|
|---|
| 49 | Model.ArtistDescription))
|
|---|
| 50 | {
|
|---|
| 51 | <p>
|
|---|
| 52 | @Model.ArtistDescription
|
|---|
| 53 | </p>
|
|---|
| 54 | }
|
|---|
| 55 |
|
|---|
| 56 | </div>
|
|---|
| 57 |
|
|---|
| 58 | </section>
|
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 | <section class="artist-release-section">
|
|---|
| 62 |
|
|---|
| 63 | <div class="artist-section-header">
|
|---|
| 64 |
|
|---|
| 65 | <span class="artist-eyebrow">
|
|---|
| 66 | DISCOGRAPHY
|
|---|
| 67 | </span>
|
|---|
| 68 |
|
|---|
| 69 | <h2>Releases</h2>
|
|---|
| 70 |
|
|---|
| 71 | </div>
|
|---|
| 72 |
|
|---|
| 73 |
|
|---|
| 74 | @{
|
|---|
| 75 | var releases = Model.ReleaseArtists
|
|---|
| 76 | .OrderBy(ra => ra.Release.ReleaseDate)
|
|---|
| 77 | .Select(ra => ra.Release)
|
|---|
| 78 | .DistinctBy(r => r.ReleaseId)
|
|---|
| 79 | .ToList();
|
|---|
| 80 | }
|
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 | @if (!releases.Any())
|
|---|
| 84 | {
|
|---|
| 85 | <div class="artist-empty">
|
|---|
| 86 | No releases are currently linked to this artist.
|
|---|
| 87 | </div>
|
|---|
| 88 | }
|
|---|
| 89 | else
|
|---|
| 90 | {
|
|---|
| 91 | <div class="artist-release-grid">
|
|---|
| 92 |
|
|---|
| 93 | @foreach (var release in releases)
|
|---|
| 94 | {
|
|---|
| 95 | <a asp-controller="Release"
|
|---|
| 96 | asp-action="Details"
|
|---|
| 97 | asp-route-id="@release.ReleaseId"
|
|---|
| 98 | class="artist-release-card">
|
|---|
| 99 |
|
|---|
| 100 | <div class="artist-release-cover">
|
|---|
| 101 |
|
|---|
| 102 | @if (!string.IsNullOrWhiteSpace(
|
|---|
| 103 | release.CoverPhoto))
|
|---|
| 104 | {
|
|---|
| 105 | <img src="@release.CoverPhoto"
|
|---|
| 106 | alt="@release.Title" />
|
|---|
| 107 | }
|
|---|
| 108 | else
|
|---|
| 109 | {
|
|---|
| 110 | <div class="artist-photo-placeholder">
|
|---|
| 111 | ♪
|
|---|
| 112 | </div>
|
|---|
| 113 | }
|
|---|
| 114 |
|
|---|
| 115 | </div>
|
|---|
| 116 |
|
|---|
| 117 |
|
|---|
| 118 | <div class="artist-release-body">
|
|---|
| 119 |
|
|---|
| 120 | <h3>
|
|---|
| 121 | @release.Title
|
|---|
| 122 | </h3>
|
|---|
| 123 |
|
|---|
| 124 | <p>
|
|---|
| 125 | @release.ReleaseDate.Year
|
|---|
| 126 | ·
|
|---|
| 127 | @release.Genre
|
|---|
| 128 | </p>
|
|---|
| 129 |
|
|---|
| 130 | @if (release.Products.Any())
|
|---|
| 131 | {
|
|---|
| 132 | <span>
|
|---|
| 133 | @release.Products.Count
|
|---|
| 134 | product@(release.Products.Count == 1 ? "" : "s")
|
|---|
| 135 | </span>
|
|---|
| 136 | }
|
|---|
| 137 |
|
|---|
| 138 | </div>
|
|---|
| 139 |
|
|---|
| 140 | </a>
|
|---|
| 141 | }
|
|---|
| 142 |
|
|---|
| 143 | </div>
|
|---|
| 144 | }
|
|---|
| 145 |
|
|---|
| 146 | </section>
|
|---|
| 147 |
|
|---|
| 148 | </div> |
|---|