Blog post create
This commit is contained in:
@ -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))
|
||||
|
@ -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";
|
||||
|
@ -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()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -95,7 +95,7 @@ namespace Yavsc.Controllers
|
||||
[Authorize()]
|
||||
public IActionResult Create(string title)
|
||||
{
|
||||
var result = new BlogPostBase
|
||||
var result = new BlogPostCreateViewModel
|
||||
{
|
||||
Title = title
|
||||
};
|
||||
|
@ -51,7 +51,7 @@
|
||||
@act.Description </p>
|
||||
|
||||
@if (act.Children.Count>0) {
|
||||
<a asp-route-id="@act.Code" class="btn btn-default">
|
||||
<a asp-route-id="@act.Code" class="btn btn-light">
|
||||
@foreach (Activity c in act.Children) {
|
||||
@Html.DisplayFor(subact=>c)
|
||||
}
|
||||
|
@ -16,7 +16,10 @@
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
@await RenderSectionAsync("header", false)
|
||||
</head>
|
||||
<body>
|
||||
<body style="background-image: url('@Config.SiteSetup.Banner');
|
||||
background-position: 0%;
|
||||
background-attachment: fixed;
|
||||
">
|
||||
<partial name="_Nav" />
|
||||
@RenderSection("ctxmenu", required: false)
|
||||
@if (ViewData["Notify"] != null)
|
||||
|
@ -1,11 +1,10 @@
|
||||
<nav class="navbar navbar-expand-sm navbar-dark bg-dark" aria-label="Yavsc">
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
|
||||
<a class="navbar-brand" href="#">@Config.SiteSetup.Title</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
|
||||
data-bs-target="#navbar" aria-controls="navbar"
|
||||
aria-expanded="true" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbar" style="background-image: @Config.SiteSetup.Banner;">
|
||||
<ul class="navbar-nav me-auto" >
|
||||
<li class="nav-item"><a class="nav-link active" aria-current="page" href="/">Home</a></li>
|
||||
@ -13,9 +12,7 @@
|
||||
<li class="nav-item"><a asp-controller="Home" asp-action="Chat" class="nav-link">@SR["Chat"]</a></li>
|
||||
<li class="nav-item"><a asp-controller="Home" asp-action="Contact" class="nav-link">@SR["Contact"]</a></li>
|
||||
<li class="nav-item"><a asp-controller="Home" asp-action="About" class="nav-link">@SR["About"]</a></li>
|
||||
|
||||
<partial name="_LoginPartial" />
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -45,3 +45,8 @@ input[type='checkbox'] {
|
||||
min-width: 1em;
|
||||
min-height: 1em;
|
||||
}
|
||||
|
||||
.container {
|
||||
background-color: #000000cf;
|
||||
color:#ffffff;
|
||||
}
|
||||
|
Reference in New Issue
Block a user