Blog post create
This commit is contained in:
@ -130,7 +130,6 @@ namespace Yavsc.Services
|
|||||||
public bool Part(string cxId, string roomName, string reason)
|
public bool Part(string cxId, string roomName, string reason)
|
||||||
{
|
{
|
||||||
ChatRoomInfo chanInfo;
|
ChatRoomInfo chanInfo;
|
||||||
var userName = ChatUserNames[cxId];
|
|
||||||
if (Channels.TryGetValue(roomName, out chanInfo))
|
if (Channels.TryGetValue(roomName, out chanInfo))
|
||||||
{
|
{
|
||||||
if (!chanInfo.Users.Contains(cxId))
|
if (!chanInfo.Users.Contains(cxId))
|
||||||
|
@ -8,6 +8,7 @@ namespace Yavsc
|
|||||||
public string Title { get; set; } = "Yavsc";
|
public string Title { get; set; } = "Yavsc";
|
||||||
|
|
||||||
public string Slogan { get; set; } = "";
|
public string Slogan { get; set; } = "";
|
||||||
|
public string Banner { get; set; } = "";
|
||||||
|
|
||||||
public string StyleSheet { get; set; } = "site.css";
|
public string StyleSheet { get; set; } = "site.css";
|
||||||
public string FavIcon { get; set; } = "favicon.ico";
|
public string FavIcon { get; set; } = "favicon.ico";
|
||||||
|
@ -3,18 +3,23 @@ using Yavsc.Models.Blog;
|
|||||||
|
|
||||||
namespace Yavsc.ViewModels.Blog;
|
namespace Yavsc.ViewModels.Blog;
|
||||||
|
|
||||||
public class BlogPostEditViewModel : BlogPostBase
|
|
||||||
|
public class BlogPostCreateViewModel : BlogPostBase
|
||||||
|
{
|
||||||
|
public bool Publish { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class BlogPostEditViewModel : BlogPostCreateViewModel
|
||||||
{
|
{
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
|
|
||||||
public required long Id { get; set; }
|
public required long Id { get; set; }
|
||||||
|
|
||||||
public bool Publish { get; set; }
|
|
||||||
|
|
||||||
public BlogPostEditViewModel()
|
public BlogPostEditViewModel()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ namespace Yavsc.Controllers
|
|||||||
[Authorize()]
|
[Authorize()]
|
||||||
public IActionResult Create(string title)
|
public IActionResult Create(string title)
|
||||||
{
|
{
|
||||||
var result = new BlogPostBase
|
var result = new BlogPostCreateViewModel
|
||||||
{
|
{
|
||||||
Title = title
|
Title = title
|
||||||
};
|
};
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
@act.Description </p>
|
@act.Description </p>
|
||||||
|
|
||||||
@if (act.Children.Count>0) {
|
@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) {
|
@foreach (Activity c in act.Children) {
|
||||||
@Html.DisplayFor(subact=>c)
|
@Html.DisplayFor(subact=>c)
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,10 @@
|
|||||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||||
@await RenderSectionAsync("header", false)
|
@await RenderSectionAsync("header", false)
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body style="background-image: url('@Config.SiteSetup.Banner');
|
||||||
|
background-position: 0%;
|
||||||
|
background-attachment: fixed;
|
||||||
|
">
|
||||||
<partial name="_Nav" />
|
<partial name="_Nav" />
|
||||||
@RenderSection("ctxmenu", required: false)
|
@RenderSection("ctxmenu", required: false)
|
||||||
@if (ViewData["Notify"] != null)
|
@if (ViewData["Notify"] != null)
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
<nav class="navbar navbar-expand-sm navbar-dark bg-dark" aria-label="Yavsc">
|
<nav class="navbar navbar-expand-sm navbar-dark bg-dark" aria-label="Yavsc">
|
||||||
|
<a class="navbar-brand" href="#">@Config.SiteSetup.Title</a>
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
|
||||||
data-bs-target="#navbar" aria-controls="navbar"
|
data-bs-target="#navbar" aria-controls="navbar"
|
||||||
aria-expanded="true" aria-label="Toggle navigation">
|
aria-expanded="true" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class="collapse navbar-collapse" id="navbar" style="background-image: @Config.SiteSetup.Banner;">
|
<div class="collapse navbar-collapse" id="navbar" style="background-image: @Config.SiteSetup.Banner;">
|
||||||
<ul class="navbar-nav me-auto" >
|
<ul class="navbar-nav me-auto" >
|
||||||
<li class="nav-item"><a class="nav-link active" aria-current="page" href="/">Home</a></li>
|
<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="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="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>
|
<li class="nav-item"><a asp-controller="Home" asp-action="About" class="nav-link">@SR["About"]</a></li>
|
||||||
|
|
||||||
<partial name="_LoginPartial" />
|
<partial name="_LoginPartial" />
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
/* bootstrap.css | http://localhost:5000/lib/bootstrap/css/bootstrap.css */
|
/* bootstrap.css | http://localhost:5000/lib/bootstrap/css/bootstrap.css */
|
||||||
div.carousel-inner > div.item > div.carousel-caption-s {
|
div.carousel-inner > div.item > div.carousel-caption-s {
|
||||||
margin: .5em;
|
margin: .5em;
|
||||||
background-color: rgba(0, 0, 0, 0.6);
|
background-color: #000000cf;
|
||||||
color: #ffffc8;
|
color:#ffffff;
|
||||||
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
padding: .5em; }
|
padding: .5em; }
|
||||||
|
|
||||||
@ -41,3 +42,8 @@ input[type='checkbox'] {
|
|||||||
min-width: 1em;
|
min-width: 1em;
|
||||||
min-height: 1em;
|
min-height: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
background-color: #000000cf;
|
||||||
|
color:#ffffff;
|
||||||
|
}
|
||||||
|
@ -45,3 +45,8 @@ input[type='checkbox'] {
|
|||||||
min-width: 1em;
|
min-width: 1em;
|
||||||
min-height: 1em;
|
min-height: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
background-color: #000000cf;
|
||||||
|
color:#ffffff;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user