From 79f5eaf40b93d64be74d8b4f1ef80d19fadbfbe1 Mon Sep 17 00:00:00 2001 From: Paweł Bernaciak Date: Fri, 29 Dec 2023 09:41:56 +0100 Subject: Cywilizowany tailwind --- CoreWiki/Pages/All.cshtml | 36 +++++--------- CoreWiki/Pages/All.cshtml.cs | 2 +- CoreWiki/Pages/Create.cshtml | 48 +++++++------------ CoreWiki/Pages/Delete.cshtml | 41 ++++++---------- CoreWiki/Pages/Details.cshtml | 28 ++++++++--- CoreWiki/Pages/Details.cshtml.cs | 86 ++++++++++++++++++++++++++++++++-- CoreWiki/Pages/Edit.cshtml | 19 ++++---- CoreWiki/Pages/LatestChanges.cshtml | 18 ++----- CoreWiki/Pages/LatestChanges.cshtml.cs | 7 +-- CoreWiki/Pages/Shared/_Layout.cshtml | 78 ++++++++++++++++-------------- CoreWiki/Pages/_ViewImports.cshtml | 3 +- CoreWiki/Pages/_articleList.cshtml | 20 ++++++++ CoreWiki/Pages/_comments.cshtml | 35 ++++++++++++++ CoreWiki/Pages/_commentsForm.cshtml | 32 +++++++++++++ CoreWiki/Pages/_commentsList.cshtml | 25 ++++++++++ 15 files changed, 318 insertions(+), 160 deletions(-) create mode 100644 CoreWiki/Pages/_articleList.cshtml create mode 100644 CoreWiki/Pages/_comments.cshtml create mode 100644 CoreWiki/Pages/_commentsForm.cshtml create mode 100644 CoreWiki/Pages/_commentsList.cshtml (limited to 'CoreWiki/Pages') diff --git a/CoreWiki/Pages/All.cshtml b/CoreWiki/Pages/All.cshtml index ca06cb5..6e3430e 100644 --- a/CoreWiki/Pages/All.cshtml +++ b/CoreWiki/Pages/All.cshtml @@ -5,40 +5,28 @@ ViewData["Title"] = "All articles"; } -

All articles

+

All articles

-@foreach (var item in Model.Articles) -{ -
-
-

- @item.Topic -

-
- @item.Published -
+ - Edit - Delete -
-
-} - -
- + +
@RenderBody()
+
- - - - +@Html.HtmxAntiforgeryScript() + @await RenderSectionAsync("Scripts", required: false) diff --git a/CoreWiki/Pages/_ViewImports.cshtml b/CoreWiki/Pages/_ViewImports.cshtml index 802f152..86f4a07 100644 --- a/CoreWiki/Pages/_ViewImports.cshtml +++ b/CoreWiki/Pages/_ViewImports.cshtml @@ -1,4 +1,5 @@ @using CoreWiki @namespace CoreWiki.Pages @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -@addTagHelper *, Westwind.AspNetCore.Markdown \ No newline at end of file +@addTagHelper *, Westwind.AspNetCore.Markdown +@addTagHelper *, Htmx.TagHelpers \ No newline at end of file diff --git a/CoreWiki/Pages/_articleList.cshtml b/CoreWiki/Pages/_articleList.cshtml new file mode 100644 index 0000000..7b8b038 --- /dev/null +++ b/CoreWiki/Pages/_articleList.cshtml @@ -0,0 +1,20 @@ +@model IEnumerable + +@foreach (var item in Model) +{ +
+

+ @item.Topic +

+
+
+ @item.Published +
+ +
+ Edit + Delete +
+
+
+} \ No newline at end of file diff --git a/CoreWiki/Pages/_comments.cshtml b/CoreWiki/Pages/_comments.cshtml new file mode 100644 index 0000000..3abc114 --- /dev/null +++ b/CoreWiki/Pages/_comments.cshtml @@ -0,0 +1,35 @@ +@using CoreWiki.Models +@model DetailsModel + +
+ Add comment + + + + + + +
+
+
+ + + +
+
+ Comments + + + + + + +
+
+
+
+ +
+
\ No newline at end of file diff --git a/CoreWiki/Pages/_commentsForm.cshtml b/CoreWiki/Pages/_commentsForm.cshtml new file mode 100644 index 0000000..f87da25 --- /dev/null +++ b/CoreWiki/Pages/_commentsForm.cshtml @@ -0,0 +1,32 @@ +@using Htmx.TagHelpers +@using Microsoft.AspNetCore.Mvc.TagHelpers +@model DetailsModel +
+
+
+ + + +
+
+ + + +
+
+
+ + + +
+ +
+ \ No newline at end of file diff --git a/CoreWiki/Pages/_commentsList.cshtml b/CoreWiki/Pages/_commentsList.cshtml new file mode 100644 index 0000000..ba0eb85 --- /dev/null +++ b/CoreWiki/Pages/_commentsList.cshtml @@ -0,0 +1,25 @@ +@model CoreWiki.Models.ArticleCommentListViewModel + +@foreach (var item in Model.Comments) +{ +
+
+ avatar +
+ @item.DisplayName +
+ Commented on @item.Submitted +
+
+
+
+ @item.Content +
+
+} +@if (Model.Comments.Count() == 10) +{ +
+
+
+} \ No newline at end of file -- cgit v1.2.3