From 0a1bef37fe9776b2903e8a3be74b153f9013145a Mon Sep 17 00:00:00 2001
From: Paul Schneider
Date: Wed, 9 Jul 2025 13:16:01 +0100
Subject: [PATCH] Blog post create
---
.../Services/ChatHubConnexionManager.cs | 1 -
src/Yavsc.Server/Settings/SiteSettings.cs | 1 +
.../ViewModels/BlogSpot/BlogPostEdit.cs | 13 +++++++++----
.../Controllers/Communicating/BlogspotController.cs | 2 +-
src/Yavsc/Views/Home/Index.cshtml | 2 +-
src/Yavsc/Views/Shared/_Layout.cshtml | 5 ++++-
src/Yavsc/Views/Shared/_Nav.cshtml | 7 ++-----
src/Yavsc/wwwroot/css/site.css | 10 ++++++++--
src/Yavsc/wwwroot/css/site.scss | 5 +++++
9 files changed, 31 insertions(+), 15 deletions(-)
diff --git a/src/Yavsc.Server/Services/ChatHubConnexionManager.cs b/src/Yavsc.Server/Services/ChatHubConnexionManager.cs
index 5e823087..d47c7af8 100644
--- a/src/Yavsc.Server/Services/ChatHubConnexionManager.cs
+++ b/src/Yavsc.Server/Services/ChatHubConnexionManager.cs
@@ -130,7 +130,6 @@ namespace Yavsc.Services
public bool Part(string cxId, string roomName, string reason)
{
ChatRoomInfo chanInfo;
- var userName = ChatUserNames[cxId];
if (Channels.TryGetValue(roomName, out chanInfo))
{
if (!chanInfo.Users.Contains(cxId))
diff --git a/src/Yavsc.Server/Settings/SiteSettings.cs b/src/Yavsc.Server/Settings/SiteSettings.cs
index 5939c31b..92eea715 100644
--- a/src/Yavsc.Server/Settings/SiteSettings.cs
+++ b/src/Yavsc.Server/Settings/SiteSettings.cs
@@ -8,6 +8,7 @@ namespace Yavsc
public string Title { get; set; } = "Yavsc";
public string Slogan { get; set; } = "";
+ public string Banner { get; set; } = "";
public string StyleSheet { get; set; } = "site.css";
public string FavIcon { get; set; } = "favicon.ico";
diff --git a/src/Yavsc.Server/ViewModels/BlogSpot/BlogPostEdit.cs b/src/Yavsc.Server/ViewModels/BlogSpot/BlogPostEdit.cs
index f384664c..e6f2af67 100644
--- a/src/Yavsc.Server/ViewModels/BlogSpot/BlogPostEdit.cs
+++ b/src/Yavsc.Server/ViewModels/BlogSpot/BlogPostEdit.cs
@@ -3,18 +3,23 @@ using Yavsc.Models.Blog;
namespace Yavsc.ViewModels.Blog;
-public class BlogPostEditViewModel : BlogPostBase
+
+public class BlogPostCreateViewModel : BlogPostBase
+{
+ public bool Publish { get; set; }
+}
+
+public class BlogPostEditViewModel : BlogPostCreateViewModel
{
[Required]
- public required long Id { get; set; }
+ public required long Id { get; set; }
- public bool Publish { get; set; }
public BlogPostEditViewModel()
{
-
+
}
diff --git a/src/Yavsc/Controllers/Communicating/BlogspotController.cs b/src/Yavsc/Controllers/Communicating/BlogspotController.cs
index 2098db64..0c1de2e3 100644
--- a/src/Yavsc/Controllers/Communicating/BlogspotController.cs
+++ b/src/Yavsc/Controllers/Communicating/BlogspotController.cs
@@ -95,7 +95,7 @@ namespace Yavsc.Controllers
[Authorize()]
public IActionResult Create(string title)
{
- var result = new BlogPostBase
+ var result = new BlogPostCreateViewModel
{
Title = title
};
diff --git a/src/Yavsc/Views/Home/Index.cshtml b/src/Yavsc/Views/Home/Index.cshtml
index f2580e3e..5e9580bb 100755
--- a/src/Yavsc/Views/Home/Index.cshtml
+++ b/src/Yavsc/Views/Home/Index.cshtml
@@ -51,7 +51,7 @@
@act.Description
@if (act.Children.Count>0) {
-
+
@foreach (Activity c in act.Children) {
@Html.DisplayFor(subact=>c)
}
diff --git a/src/Yavsc/Views/Shared/_Layout.cshtml b/src/Yavsc/Views/Shared/_Layout.cshtml
index 84c5f210..a686a35d 100644
--- a/src/Yavsc/Views/Shared/_Layout.cshtml
+++ b/src/Yavsc/Views/Shared/_Layout.cshtml
@@ -16,7 +16,10 @@
@await RenderSectionAsync("header", false)
-
+
@RenderSection("ctxmenu", required: false)
@if (ViewData["Notify"] != null)
diff --git a/src/Yavsc/Views/Shared/_Nav.cshtml b/src/Yavsc/Views/Shared/_Nav.cshtml
index 5b830891..cab0f104 100644
--- a/src/Yavsc/Views/Shared/_Nav.cshtml
+++ b/src/Yavsc/Views/Shared/_Nav.cshtml
@@ -1,11 +1,10 @@
+
-
diff --git a/src/Yavsc/wwwroot/css/site.css b/src/Yavsc/wwwroot/css/site.css
index 70e306e8..40580588 100644
--- a/src/Yavsc/wwwroot/css/site.css
+++ b/src/Yavsc/wwwroot/css/site.css
@@ -16,8 +16,9 @@
/* bootstrap.css | http://localhost:5000/lib/bootstrap/css/bootstrap.css */
div.carousel-inner > div.item > div.carousel-caption-s {
margin: .5em;
- background-color: rgba(0, 0, 0, 0.6);
- color: #ffffc8;
+ background-color: #000000cf;
+ color:#ffffff;
+
font-weight: bold;
padding: .5em; }
@@ -41,3 +42,8 @@ input[type='checkbox'] {
min-width: 1em;
min-height: 1em;
}
+
+.container {
+ background-color: #000000cf;
+ color:#ffffff;
+}
diff --git a/src/Yavsc/wwwroot/css/site.scss b/src/Yavsc/wwwroot/css/site.scss
index 2b86238d..4ae292e5 100644
--- a/src/Yavsc/wwwroot/css/site.scss
+++ b/src/Yavsc/wwwroot/css/site.scss
@@ -45,3 +45,8 @@ input[type='checkbox'] {
min-width: 1em;
min-height: 1em;
}
+
+.container {
+ background-color: #000000cf;
+ color:#ffffff;
+}