Redo design from scratch with something significantly simpler and lower maintainence.
This commit is contained in:
parent
a84bf8aab3
commit
3d00f28657
31 changed files with 228 additions and 1857 deletions
|
@ -4,9 +4,12 @@
|
|||
ViewBag.Title = Model != null ? "Edit Post" : "New Post";
|
||||
}
|
||||
|
||||
<form method="post" action="/blog/save">
|
||||
<form method="post" action="/blog/save" class="edit-form">
|
||||
<input type="hidden" name="id" value="@Model?.Id"/>
|
||||
<label for="postTitle">Title: </label><input name="title" id="postTitle" value="@Model?.Title"/>
|
||||
<div class="edit-form__title form-row">
|
||||
<label for="postTitle" class="edit-form__title__label">Title: </label>
|
||||
<input name="title" id="postTitle" value="@Model?.Title" class="edit-form__title__input"/>
|
||||
</div>
|
||||
<textarea id="postContent" name="content">@Model?.Content</textarea>
|
||||
<button type="submit">Save</button>
|
||||
</form>
|
||||
|
|
|
@ -4,21 +4,6 @@
|
|||
ViewData["Title"] = "Blog";
|
||||
}
|
||||
|
||||
@section ButtonsLeft {
|
||||
@if (Model.Page > 1) {
|
||||
<button onclick="window.location.href='/blog/page/@(Model.Page-1)'" title="Previous Page">
|
||||
<img src="/images/previous.svg" alt="Previous" />
|
||||
</button>
|
||||
}
|
||||
}
|
||||
@section ButtonsRight {
|
||||
@if (Model.Page < Model.MaxPages) {
|
||||
<button onclick="window.location.href='/blog/page/@(Model.Page+1)'" title="Next Page">
|
||||
<img src="/images/next.svg" alt="Next" />
|
||||
</button>
|
||||
}
|
||||
}
|
||||
|
||||
@foreach (var post in Model.Posts) {
|
||||
<article>
|
||||
<h2><a href="/blog/view/@post.Url">@post.Title</a></h2>
|
||||
|
@ -26,4 +11,13 @@
|
|||
<small>Posted on @post.Timestamp</small>
|
||||
<p><a href="/blog/view/@post.Url">Read more...</a></p>
|
||||
</article>
|
||||
}
|
||||
}
|
||||
|
||||
<div class="blog-navigation">
|
||||
@if (Model.Page > 1) {
|
||||
<a href="/blog/page/@(Model.Page - 1)" class="round-button blog-navigation__previous"><img src="/images/previous.svg" alt="Previous"/></a>
|
||||
}
|
||||
@if (Model.Page < Model.MaxPages) {
|
||||
<a href="/blog/page/@(Model.Page + 1)" class="round-button blog-navigation__next"><img src="/images/next.svg" alt="Next"/></a>
|
||||
}
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue