Various blog improvements
This commit is contained in:
parent
929adac910
commit
8e79aed647
8 changed files with 37 additions and 44 deletions
|
@ -7,12 +7,12 @@ namespace Website.ViewModels
|
|||
{
|
||||
public class BlogPostViewModel
|
||||
{
|
||||
public BlogPostViewModel(BlogPost blogPost) {
|
||||
public BlogPostViewModel(BlogPost blogPost, bool preview) {
|
||||
Id = blogPost.Id;
|
||||
Title = blogPost.Title;
|
||||
Timestamp = FormatTimestamp(blogPost.Timestamp);
|
||||
Url = blogPost.Url;
|
||||
Content = blogPost.Content;
|
||||
Content = preview ? blogPost.Draft : blogPost.Content;
|
||||
}
|
||||
|
||||
private static string GetDaySuffix(int day) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue