Merge branch 'dev' into j1/feat/page_artiste
This commit is contained in:
@@ -18,5 +18,6 @@ namespace Webzine.Entity
|
||||
[Display(Name = "Libellé")]
|
||||
public string Libelle { get; set; }
|
||||
|
||||
public List<Titre> Titres { get; set; } = new List<Titre>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,5 +63,6 @@ namespace Webzine.Entity
|
||||
|
||||
public List<Commentaire> Commentaires { get; set; }
|
||||
|
||||
public List<Style> Styles { get; set; } = new List<Style>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
using Webzine.Entity;
|
||||
|
||||
namespace Webzine.Repository.Contracts;
|
||||
|
||||
public interface ILocalEntityRepository
|
||||
{
|
||||
List<Artiste> Artistes { get; set; }
|
||||
List<Style> Styles { get; set; }
|
||||
List<Titre> Titres { get; set; }
|
||||
List<Commentaire> Commentaires { get; set; }
|
||||
void Seed();
|
||||
}
|
||||
@@ -1,12 +1,8 @@
|
||||
using Webzine.Repository.Contracts;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Webzine.Repository;
|
||||
|
||||
using Entity;
|
||||
using Entity.Fixtures;
|
||||
|
||||
public class LocalEntityRepository : ILocalEntityRepository
|
||||
public class LocalEntityRepository
|
||||
{
|
||||
private readonly ILogger<LocalEntityRepository> _logger;
|
||||
public LocalEntityRepository(ILogger<LocalEntityRepository> logger)
|
||||
@@ -14,32 +10,4 @@ public class LocalEntityRepository : ILocalEntityRepository
|
||||
this._logger = logger;
|
||||
this._logger.LogDebug(1, "NLog injected into LocalEntityRepository");
|
||||
}
|
||||
|
||||
public List<Artiste> Artistes { get; set; }
|
||||
public List<Style> Styles { get; set; }
|
||||
public List<Titre> Titres { get; set; }
|
||||
public List<Commentaire> Commentaires { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Permet de remplir les listes d'entités avec des données de test.
|
||||
/// </summary>
|
||||
public void Seed()
|
||||
{
|
||||
this._logger.LogInformation("Seed was called");
|
||||
try
|
||||
{
|
||||
var seedData = new DataFactory();
|
||||
|
||||
Artistes = seedData.GenerateArtists(10);
|
||||
Styles = seedData.GenerateStyles(8);
|
||||
Titres = seedData.GenerateTitres(seedData.RealMusicData.Count, Artistes);
|
||||
Commentaires = seedData.GenerateCommentaires(30, Titres);
|
||||
this._logger.LogInformation("Seed was completed");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
this._logger.LogError(e, "An error occurred while seeding the data");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Webzine.WebApplication.Controllers
|
||||
{
|
||||
public class AccueilController : Controller
|
||||
public class AccueilController : Microsoft.AspNetCore.Mvc.Controller
|
||||
{
|
||||
// Injection du logger via le constructeur
|
||||
private readonly ILogger<AccueilController> _logger;
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Webzine.WebApplication.Controllers;
|
||||
namespace Webzine.WebApplication.Controller;
|
||||
|
||||
public class ApiController : ControllerBase
|
||||
{
|
||||
181
Webzine.WebApplication/Controller/TitreController.cs
Normal file
181
Webzine.WebApplication/Controller/TitreController.cs
Normal file
@@ -0,0 +1,181 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Webzine.Entity;
|
||||
using Webzine.Entity.Fixtures;
|
||||
using Webzine.WebApplication.ViewsModels.Titre;
|
||||
|
||||
namespace Webzine.WebApplication.Controller;
|
||||
|
||||
/// <summary>
|
||||
/// Contrôleur responsable de la gestion des titres musicaux :
|
||||
/// affichage des détails, filtrage par style,
|
||||
/// ajout de likes et commentaires.
|
||||
/// </summary>
|
||||
[Route("titre")]
|
||||
public class TitreController : Microsoft.AspNetCore.Mvc.Controller
|
||||
{
|
||||
private readonly ILogger<TitreController> _logger;
|
||||
private readonly List<Titre> _titres;
|
||||
private readonly List<Style> _styles;
|
||||
private readonly List<Artiste> _artistes;
|
||||
|
||||
/// <summary>
|
||||
/// Initialise une nouvelle instance du <see cref="TitreController"/>.
|
||||
/// Les données sont générées dynamiquement via <see cref="DataFactory"/>.
|
||||
/// </summary>
|
||||
/// <param name="logger">Service de journalisation injecté.</param>
|
||||
public TitreController(ILogger<TitreController> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
|
||||
_logger.LogInformation("Initialisation du contrôleur TitreController.");
|
||||
|
||||
var factory = new DataFactory();
|
||||
|
||||
_artistes = factory.GenerateArtists(10);
|
||||
_styles = factory.GenerateStyles(10);
|
||||
_titres = factory.GenerateTitres(30, _artistes, _styles);
|
||||
|
||||
factory.GenerateCommentaires(50, _titres);
|
||||
|
||||
_logger.LogInformation("Données fictives générées avec succès.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Affiche le détail d'un titre spécifique.
|
||||
/// </summary>
|
||||
/// <param name="id">Identifiant du titre.</param>
|
||||
/// <returns>Vue des détails ou 404 si introuvable.</returns>
|
||||
[HttpGet("{id}")]
|
||||
public IActionResult Details(int id)
|
||||
{
|
||||
_logger.LogInformation("Demande d'affichage du détail pour le titre ID {Id}.", id);
|
||||
|
||||
var titre = _titres.FirstOrDefault(t => t.IdTitre == id);
|
||||
|
||||
if (titre == null)
|
||||
{
|
||||
_logger.LogWarning("Titre avec ID {Id} introuvable.", id);
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var vm = new TitreDetail
|
||||
{
|
||||
Details = new TitreContent
|
||||
{
|
||||
IdTitre = titre.IdTitre,
|
||||
Libelle = titre.Libelle,
|
||||
Chronique = titre.Chronique,
|
||||
DateSortie = titre.DateSortie,
|
||||
NbLikes = titre.NbLikes,
|
||||
UrlJaquette = titre.UrlJaquette,
|
||||
UrlEcoute = titre.UrlEcoute,
|
||||
ArtisteNom = titre.Artiste?.Nom,
|
||||
Styles = titre.Styles,
|
||||
Commentaires = titre.Commentaires
|
||||
},
|
||||
CommentForm = new TitreComment
|
||||
{
|
||||
IdTitre = titre.IdTitre
|
||||
}
|
||||
};
|
||||
|
||||
return View(vm);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Affiche les titres correspondant à un style musical donné.
|
||||
/// </summary>
|
||||
/// <param name="style">Nom du style musical.</param>
|
||||
/// <returns>Vue contenant la liste filtrée.</returns>
|
||||
[HttpGet("style/{style}")]
|
||||
public IActionResult Style(string style)
|
||||
{
|
||||
_logger.LogInformation("Recherche des titres pour le style : {Style}.", style);
|
||||
|
||||
var titresFiltres = _titres
|
||||
.Where(t => t.Styles.Any(s => s.Libelle.Equals(style)))
|
||||
.OrderBy(t => t.Libelle)
|
||||
.ToList();
|
||||
|
||||
if (!titresFiltres.Any())
|
||||
{
|
||||
_logger.LogWarning("Aucun titre trouvé pour le style : {Style}.", style);
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var vm = new TitreStyle
|
||||
{
|
||||
StyleName = style,
|
||||
Titres = titresFiltres.Select(t => new TitreStyleItem
|
||||
{
|
||||
IdTitre = t.IdTitre,
|
||||
Libelle = t.Libelle,
|
||||
ArtisteNom = t.Artiste?.Nom,
|
||||
UrlJaquette = t.UrlJaquette,
|
||||
Duree = t.Duree
|
||||
}).ToList()
|
||||
};
|
||||
|
||||
return View(vm);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ajoute un like à un titre.
|
||||
/// </summary>
|
||||
/// <param name="model">Modèle contenant l'identifiant du titre.</param>
|
||||
/// <returns>Redirection vers la page détail.</returns>
|
||||
[HttpPost("like")]
|
||||
public IActionResult Like(TitreLike model)
|
||||
{
|
||||
_logger.LogInformation("Ajout d'un like pour le titre ID {Id}.", model.IdTitre);
|
||||
|
||||
var titre = _titres.FirstOrDefault(t => t.IdTitre == model.IdTitre);
|
||||
|
||||
if (titre == null)
|
||||
{
|
||||
_logger.LogWarning("Impossible d'ajouter un like. Titre ID {Id} introuvable.", model.IdTitre);
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
titre.NbLikes++;
|
||||
|
||||
return RedirectToAction("Details", new { id = model.IdTitre });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ajoute un commentaire à un titre.
|
||||
/// </summary>
|
||||
/// <param name="model">Données du commentaire.</param>
|
||||
/// <returns>Redirection vers la page détail.</returns>
|
||||
[HttpPost("comment")]
|
||||
public IActionResult Comment(TitreComment model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
_logger.LogWarning("Échec de validation du modèle de commentaire pour le titre ID {Id}.", model.IdTitre);
|
||||
return RedirectToAction("Details", new { id = model.IdTitre });
|
||||
}
|
||||
|
||||
var titre = _titres.FirstOrDefault(t => t.IdTitre == model.IdTitre);
|
||||
|
||||
if (titre == null)
|
||||
{
|
||||
_logger.LogWarning("Impossible d'ajouter le commentaire. Titre ID {Id} introuvable.", model.IdTitre);
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var commentaire = new Commentaire
|
||||
{
|
||||
Auteur = model.Auteur,
|
||||
Contenu = model.Contenu,
|
||||
DateCreation = DateTime.Now,
|
||||
IdTitre = model.IdTitre
|
||||
};
|
||||
|
||||
titre.Commentaires.Add(commentaire);
|
||||
|
||||
_logger.LogInformation("Commentaire ajouté avec succès au titre ID {Id}.", model.IdTitre);
|
||||
|
||||
return RedirectToAction("Details", new { id = model.IdTitre });
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
using NLog;
|
||||
using NLog.Web;
|
||||
using Webzine.Repository;
|
||||
using Webzine.Repository.Contracts;
|
||||
|
||||
// Initiation du logger NLog pour la classe courante afin de pouvoir l'utiliser pour logger des messages d'information, d'erreur, etc avant la construction de l'application.
|
||||
var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
|
||||
@@ -23,9 +21,6 @@ try
|
||||
builder.Logging.ClearProviders();
|
||||
builder.Host.UseNLog();
|
||||
|
||||
// Register LocalEntityRepository as a singleton
|
||||
builder.Services.AddSingleton<ILocalEntityRepository, LocalEntityRepository>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Active la possibilité de servir des fichiers statiques présents dans
|
||||
@@ -41,14 +36,6 @@ try
|
||||
name: "default",
|
||||
pattern: "{controller=Accueil}/{action=Index}/{id?}");
|
||||
|
||||
|
||||
// Permet de remplir les listes d'entités du repository avec des donn<6E>es de test.
|
||||
using (var scope = app.Services.CreateScope())
|
||||
{
|
||||
var repository = scope.ServiceProvider.GetRequiredService<ILocalEntityRepository>();
|
||||
repository.Seed();
|
||||
}
|
||||
|
||||
app.Run();
|
||||
}
|
||||
catch (Exception exception)
|
||||
|
||||
193
Webzine.WebApplication/Views/Titre/Details.cshtml
Normal file
193
Webzine.WebApplication/Views/Titre/Details.cshtml
Normal file
@@ -0,0 +1,193 @@
|
||||
@model Webzine.WebApplication.ViewsModels.Titre.TitreDetail
|
||||
|
||||
@{
|
||||
ViewData["Title"] = Model.Details.Libelle;
|
||||
}
|
||||
|
||||
<div class="container mt-4">
|
||||
|
||||
<div class="mb-3">
|
||||
<h2>
|
||||
<a asp-area="" asp-controller="" asp-action="" asp-route-style="@Model.Details.ArtisteNom">@Model.Details.ArtisteNom</a>
|
||||
- @Model.Details.Libelle
|
||||
</h2>
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center pb-2 mb-3">
|
||||
|
||||
<div class="text-muted small d-flex align-items-center gap-4">
|
||||
|
||||
<!-- Date -->
|
||||
<span class="text-dark">
|
||||
<i class="fa fa-calendar me-1"></i>
|
||||
Le @Model.Details.DateSortie.ToString("dd/MM/yyyy 'à' HH:mm")
|
||||
</span>
|
||||
|
||||
<!-- Likes -->
|
||||
<span>
|
||||
<i class="fa fa-heart text-dark me-1"></i>
|
||||
@Model.Details.NbLikes
|
||||
</span>
|
||||
|
||||
<!-- Styles -->
|
||||
<span class="text-dark">
|
||||
<i class="fa fa-tags me-1"></i>
|
||||
Styles :
|
||||
|
||||
@for (int i = 0; i < Model.Details.Styles.Count; i++)
|
||||
{
|
||||
var style = Model.Details.Styles[i];
|
||||
|
||||
<a class="text-primary text-decoration-none fw-semibold"
|
||||
asp-controller="Titre"
|
||||
asp-action="Style"
|
||||
asp-route-style="@style.Libelle">
|
||||
@style.Libelle
|
||||
</a>
|
||||
|
||||
@if (i < Model.Details.Styles.Count - 1)
|
||||
{
|
||||
<span>, </span>
|
||||
}
|
||||
}
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- ACTION BUTTONS -->
|
||||
<div class="d-flex gap-2">
|
||||
|
||||
<form asp-action="Like" method="post">
|
||||
<input type="hidden" name="IdTitre" value="@Model.Details.IdTitre" />
|
||||
<button type="submit" class="btn btn-outline-primary btn-sm">
|
||||
<i class="fa fa-thumbs-up me-1"></i> Like
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<a class="btn text-primary btn-sm">
|
||||
<i class="fa fa-pen-to-square me-1"></i> Editer
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONTENU -->
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-8">
|
||||
<p class="text-justify">
|
||||
@Model.Details.Chronique
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 text-center">
|
||||
<img src="@Model.Details.UrlJaquette"
|
||||
class="img-fluid rounded shadow"
|
||||
alt="Jaquette" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LECTEUR -->
|
||||
@if (!string.IsNullOrEmpty(Model.Details.UrlEcoute))
|
||||
{
|
||||
<div class="mt-4">
|
||||
<iframe width="100%" height="315"
|
||||
src="@Model.Details.UrlEcoute"
|
||||
title="Lecteur"
|
||||
allowfullscreen>
|
||||
</iframe>
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- FORMULAIRE COMMENTAIRE -->
|
||||
<div class="mt-4 mb-4">
|
||||
<div>
|
||||
|
||||
<h4 class="mb-4">Donne ton avis sur le titre</h4>
|
||||
|
||||
<form asp-action="Comment" method="post">
|
||||
<input type="hidden" name="IdTitre" value="@Model.Details.IdTitre"/>
|
||||
|
||||
<div class="row mb-3 align-items-center">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
Nom<span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col">
|
||||
<input name="Auteur"
|
||||
class="form-control input-full"
|
||||
placeholder="Votre nom"
|
||||
required />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3 align-items-start">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
Commentaire<span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col">
|
||||
<textarea name="Contenu"
|
||||
rows="3"
|
||||
class="form-control input-full"
|
||||
placeholder="Votre commentaire..."
|
||||
required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6 offset-sm-2">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Envoyer
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- COMMENTAIRES -->
|
||||
<div class="mt-4">
|
||||
|
||||
<h4 class="mb-4">Commentaires</h4>
|
||||
|
||||
@if (Model.Details.Commentaires.Any())
|
||||
{
|
||||
foreach (var comment in Model.Details.Commentaires.OrderByDescending(c => c.DateCreation))
|
||||
{
|
||||
<div class="row mb-4">
|
||||
|
||||
<div class="col-sm-1"></div>
|
||||
|
||||
<div class="col-sm-6 d-flex">
|
||||
<img src="/images/avatar.png"
|
||||
width="50"
|
||||
height="50"
|
||||
class="rounded-circle me-3 shadow-sm"
|
||||
alt="avatar" />
|
||||
|
||||
<div>
|
||||
<strong>@comment.Auteur</strong>,
|
||||
<span class="text-muted small">
|
||||
le @comment.DateCreation.ToString("dd/MM/yyyy HH:mm")
|
||||
</span>
|
||||
|
||||
<p class="mb-0">@comment.Contenu</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-sm-6 offset-sm-2">
|
||||
<p class="text-muted">Aucun commentaire pour le moment.</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
50
Webzine.WebApplication/Views/Titre/Style.cshtml
Normal file
50
Webzine.WebApplication/Views/Titre/Style.cshtml
Normal file
@@ -0,0 +1,50 @@
|
||||
@model Webzine.WebApplication.ViewsModels.Titre.TitreStyle
|
||||
|
||||
@{
|
||||
ViewData["Title"] = $"Titres - {Model.StyleName}";
|
||||
Layout = "_Layout";
|
||||
}
|
||||
<div class="container mt-4">
|
||||
<div class="row">
|
||||
|
||||
<!-- COLUMN -->
|
||||
<div class="col-md-8">
|
||||
|
||||
<h1 class="mb-4 titre-h1">Titres ayant le style @Model.StyleName</h1>
|
||||
|
||||
@if (!Model.Titres.Any())
|
||||
{
|
||||
<div class="alert alert-info">
|
||||
Aucun titre trouvé.
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
@foreach (var titre in Model.Titres)
|
||||
{
|
||||
<div class="titre-item d-flex align-items-start">
|
||||
|
||||
<!-- Image -->
|
||||
<div class="me-3">
|
||||
<img src="@titre.UrlJaquette" alt="@titre.Libelle" />
|
||||
</div>
|
||||
|
||||
<!-- Infos -->
|
||||
<div>
|
||||
<a asp-action="Details"
|
||||
asp-route-id="@titre.IdTitre"
|
||||
class="titre-link">
|
||||
@titre.ArtisteNom - @titre.Libelle
|
||||
</a>
|
||||
|
||||
<div class="titre-duree">
|
||||
Durée : @TimeSpan.FromSeconds(titre.Duree).ToString(@"mm\:ss")
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
19
Webzine.WebApplication/ViewsModels/Titre/TitreComment.cs
Normal file
19
Webzine.WebApplication/ViewsModels/Titre/TitreComment.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Webzine.WebApplication.ViewsModels.Titre;
|
||||
|
||||
public class TitreComment
|
||||
{
|
||||
[Required]
|
||||
public int IdTitre { get; set; }
|
||||
|
||||
[Required]
|
||||
[MinLength(2)]
|
||||
[MaxLength(30)]
|
||||
public string Auteur { get; set; }
|
||||
|
||||
[Required]
|
||||
[MinLength(10)]
|
||||
[MaxLength(1000)]
|
||||
public string Contenu { get; set; }
|
||||
}
|
||||
26
Webzine.WebApplication/ViewsModels/Titre/TitreContent.cs
Normal file
26
Webzine.WebApplication/ViewsModels/Titre/TitreContent.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Webzine.Entity;
|
||||
|
||||
namespace Webzine.WebApplication.ViewsModels.Titre;
|
||||
|
||||
public class TitreContent
|
||||
{
|
||||
public int IdTitre { get; set; }
|
||||
|
||||
public string Libelle { get; set; }
|
||||
|
||||
public string Chronique { get; set; }
|
||||
|
||||
public DateTime DateSortie { get; set; }
|
||||
|
||||
public int NbLikes { get; set; }
|
||||
|
||||
public string UrlJaquette { get; set; }
|
||||
|
||||
public string UrlEcoute { get; set; }
|
||||
|
||||
public string ArtisteNom { get; set; }
|
||||
|
||||
public List<Style> Styles { get; set; } = new();
|
||||
|
||||
public List<Commentaire> Commentaires { get; set; } = new();
|
||||
}
|
||||
7
Webzine.WebApplication/ViewsModels/Titre/TitreDetail.cs
Normal file
7
Webzine.WebApplication/ViewsModels/Titre/TitreDetail.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Webzine.WebApplication.ViewsModels.Titre;
|
||||
|
||||
public class TitreDetail
|
||||
{
|
||||
public TitreContent Details { get; set; }
|
||||
public TitreComment CommentForm { get; set; }
|
||||
}
|
||||
6
Webzine.WebApplication/ViewsModels/Titre/TitreLike.cs
Normal file
6
Webzine.WebApplication/ViewsModels/Titre/TitreLike.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Webzine.WebApplication.ViewsModels.Titre;
|
||||
|
||||
public class TitreLike
|
||||
{
|
||||
public int IdTitre { get; set; }
|
||||
}
|
||||
8
Webzine.WebApplication/ViewsModels/Titre/TitreStyle.cs
Normal file
8
Webzine.WebApplication/ViewsModels/Titre/TitreStyle.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Webzine.WebApplication.ViewsModels.Titre;
|
||||
|
||||
public class TitreStyle
|
||||
{
|
||||
public string? StyleName { get; set; }
|
||||
|
||||
public List<TitreStyleItem> Titres { get; set; } = new();
|
||||
}
|
||||
14
Webzine.WebApplication/ViewsModels/Titre/TitreStyleItem.cs
Normal file
14
Webzine.WebApplication/ViewsModels/Titre/TitreStyleItem.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Webzine.WebApplication.ViewsModels.Titre;
|
||||
|
||||
public class TitreStyleItem
|
||||
{
|
||||
public int IdTitre { get; set; }
|
||||
|
||||
public string? Libelle { get; set; }
|
||||
|
||||
public string? ArtisteNom { get; set; }
|
||||
|
||||
public string? UrlJaquette { get; set; }
|
||||
|
||||
public int Duree { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
a {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.titre-h1 {
|
||||
padding: 15px 0;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.titre-item {
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.titre-item img {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.titre-link {
|
||||
font-size: 1.1rem;
|
||||
color: #0d6efd;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.titre-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.titre-duree {
|
||||
font-size: 0.9rem;
|
||||
color: #666;
|
||||
}
|
||||
Reference in New Issue
Block a user