mirror of
https://git.teknik.io/Teknikode/Teknik.git
synced 2023-08-02 14:16:22 +02:00
Added <time> tags to all datetime displays.
Modified layout of options for paste to make them even. Changed 'Download' content-type to application/octet-stream to trigger download always.
This commit is contained in:
parent
efe61f5112
commit
c3cd74d29e
@ -16,7 +16,7 @@
|
||||
<div class="col-sm-8 col-sm-offset-2">
|
||||
<div class="post-comment">
|
||||
<p class="post-comment-meta text-muted">
|
||||
<a href="@Url.SubRouteUrl("profile", "Profile.Index", new { username = Model.Post.Blog.User.Username })">@Model.Post.Blog.User.Username</a> replied at @Model.DatePosted.ToString("HH:mm:ss tt") on @Model.DatePosted.ToString("MMMM dd, yyyy")
|
||||
<a href="@Url.SubRouteUrl("profile", "Profile.Index", new { username = Model.Post.Blog.User.Username })">@Model.Post.Blog.User.Username</a> replied at <time datetime="@Model.DatePosted.ToString("o")">@Model.DatePosted.ToString("HH:mm:ss tt") on @Model.DatePosted.ToString("MMMM dd, yyyy")</time>
|
||||
@if (Model.Post.Blog.User.Username == User.Identity.Name || User.IsInRole("Admin"))
|
||||
{
|
||||
<br />
|
||||
|
@ -16,7 +16,7 @@
|
||||
<div class="blog-post">
|
||||
<h2 class="blog-post-title text-center"><a href="@Url.SubRouteUrl("blog", "Blog.Post", new { username = Model.Blog.User.Username, id = Model.PostId })" id="title_@Model.PostId">@Model.Title</a></h2>
|
||||
<p class="blog-post-meta text-center text-muted">
|
||||
Posted on @Model.DatePublished.ToString("MMMM dd, yyyy") by <a href="@Url.SubRouteUrl("profile", "Profile.Index", new { username = Model.Blog.User.Username })">@Model.Blog.User.Username</a>
|
||||
Posted on <time datetime="@Model.DatePosted.ToString("o")">@Model.DatePublished.ToString("MMMM dd, yyyy")</time> by <a href="@Url.SubRouteUrl("profile", "Profile.Index", new { username = Model.Blog.User.Username })">@Model.Blog.User.Username</a>
|
||||
@if (Model.Blog.User.Username == User.Identity.Name || User.IsInRole("Admin"))
|
||||
{
|
||||
<br />
|
||||
|
@ -150,7 +150,7 @@
|
||||
<a href="@Url.SubRouteUrl("blog", "Blog.Post", new { username = post.Blog.User.Username, id = post.PostId })" id="title_@post.PostId">@post.Title</a>
|
||||
</h2>
|
||||
<p class="blog-post-meta-sm text-left text-muted">
|
||||
Posted on @post.DatePosted.ToString("MMMM dd, yyyy") by <a href="@Url.SubRouteUrl("profile", "Profile.Index", new { username = post.Blog.User.Username })">@post.Blog.User.Username</a>
|
||||
Posted on <time datetime="@post.DatePosted.ToString("o")">@post.DatePosted.ToString("MMMM dd, yyyy")</time> by <a href="@Url.SubRouteUrl("profile", "Profile.Index", new { username = post.Blog.User.Username })">@post.Blog.User.Username</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -201,7 +201,7 @@
|
||||
<a href="@Url.SubRouteUrl("podcast", "Podcast.View", new { username = post.Blog.User.Username, id = post.PostId })" id="title_@post.PostId">@post.Title</a>
|
||||
</h2>
|
||||
<p class="blog-post-meta-sm text-left text-muted">
|
||||
Posted on @post.DatePosted.ToString("MMMM dd, yyyy")
|
||||
Posted on <time datetime="@post.DatePosted.ToString("o")">@post.DatePosted.ToString("MMMM dd, yyyy")</time>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -251,7 +251,7 @@
|
||||
<h2 class="blog-post-title-sm text-left"><a href="@Url.SubRouteUrl("blog", "Blog.Post", new { username = post.Blog.User.Username, id = post.PostId })" id="title_@post.PostId">@post.Title</a>
|
||||
</h2>
|
||||
<p class="blog-post-meta-sm text-left text-muted">
|
||||
Posted on @post.DatePosted.ToString("MMMM dd, yyyy") by <a href="@Url.SubRouteUrl("profile", "Profile.Index", new { username = post.Blog.User.Username })">@post.Blog.User.Username</a>
|
||||
Posted on <time datetime="@post.DatePosted.ToString("o")">@post.DatePosted.ToString("MMMM dd, yyyy")</time> by <a href="@Url.SubRouteUrl("profile", "Profile.Index", new { username = post.Blog.User.Username })">@post.Blog.User.Username</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -32,6 +32,7 @@ namespace Teknik.Areas.Paste.Controllers
|
||||
Models.Paste paste = db.Pastes.Where(p => p.Url == url).FirstOrDefault();
|
||||
if (paste != null)
|
||||
{
|
||||
ViewBag.Title = ((string.IsNullOrEmpty(paste.Title)) ? string.Empty : paste.Title + " - ") + Config.Title + " Paste";
|
||||
// Increment Views
|
||||
paste.Views += 1;
|
||||
db.Entry(paste).State = EntityState.Modified;
|
||||
@ -79,7 +80,7 @@ namespace Teknik.Areas.Paste.Controllers
|
||||
case "simple":
|
||||
return View("~/Areas/Paste/Views/Paste/Simple.cshtml", model);
|
||||
case "raw":
|
||||
return Content(model.Content, "text/plain");
|
||||
return Content(model.Content, "application/octet-stream");
|
||||
case "download":
|
||||
//Create File
|
||||
var cd = new System.Net.Mime.ContentDisposition
|
||||
|
@ -13,7 +13,7 @@
|
||||
<div class="container">
|
||||
<div class="row text-center">
|
||||
<div class="col-sm-12 text-center">
|
||||
<h2><b>@((string.IsNullOrEmpty(Model.Title)) ? "Untitled" : Model.Title)</b> <small>Posted on @Model.DatePosted.ToString("dddd, MMMM d, yyyy") at @Model.DatePosted.ToString("h:mm:ss tt") - Format: @Model.Syntax</small></h2>
|
||||
<h2><b>@((string.IsNullOrEmpty(Model.Title)) ? "Untitled" : Model.Title)</b> <small>Posted on <time datetime="@Model.DatePosted.ToString("o")">@Model.DatePosted.ToString("dddd, MMMM d, yyyy") at @Model.DatePosted.ToString("h:mm:ss tt")</time> - Format: @Model.Syntax</small></h2>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
|
@ -26,7 +26,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="syntax" class="col-sm-2 col-sm-offset-1 control-label">Syntax</label>
|
||||
<div class="col-sm-2">
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control" name="Syntax" id="syntax">
|
||||
<option value="auto-select">Auto Select</option>
|
||||
@foreach (KeyValuePair<string, string> format in Constants.HIGHLIGHTFORMATS)
|
||||
@ -38,7 +38,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="syntax" class="col-sm-2 col-sm-offset-1 control-label">Expires</label>
|
||||
<div class="col-sm-1">
|
||||
<div class="col-sm-2">
|
||||
<input type="number" min="1" step="1" class="form-control" name="ExpireLength" id="expirelength" placeholder="1">
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
|
@ -20,10 +20,10 @@
|
||||
<div class="col-sm-3@((string.IsNullOrEmpty(Model.About) && !OwnProfile) ? " col-sm-offset-4" : string.Empty)"><!--left col-->
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item text-muted">Profile</li>
|
||||
<li class="list-group-item text-right"><span class="pull-left"><strong>Joined</strong></span> @Model.JoinDate.ToString("MMMM dd, yyyy")</li>
|
||||
<li class="list-group-item text-right"><span class="pull-left"><strong>Joined</strong></span> <time datetime="@Model.LastSeen.ToString("o")">@Model.JoinDate.ToString("MMMM dd, yyyy")</time></li>
|
||||
@if (OwnProfile && User.Identity.IsAuthenticated)
|
||||
{
|
||||
<li class="list-group-item text-right"><span class="pull-left"><strong>Last Seen</strong></span> @Model.LastSeen.ToString("MMMM dd, yyyy")</li>
|
||||
<li class="list-group-item text-right"><span class="pull-left"><strong>Last Seen</strong></span> <time datetime="@Model.LastSeen.ToString("o")">@Model.LastSeen.ToString("MMMM dd, yyyy")</time></li>
|
||||
}
|
||||
<li class="list-group-item text-right"><span class="pull-left"><strong>Email</strong></span> <a href="mailto:@Model.Email">@Model.Email</a></li>
|
||||
<li class="list-group-item text-right"><span class="pull-left"><strong>Blog</strong></span> <a href="@Url.SubRouteUrl("blog", "Blog.Blog", new { username = Model.Username })" id="blog_title">@(string.IsNullOrEmpty(Model.BlogTitle) ? string.Format("{0}'s Blog", Model.Username) : Model.BlogTitle)</a></li>
|
||||
@ -182,12 +182,14 @@
|
||||
<button class="btn btn-lg" type="reset"><i class="glyphicon glyphicon-repeat"></i> Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Upload Settings -->
|
||||
<!-- Paste Settings -->
|
||||
</form>
|
||||
</div><!--/tab-pane-->
|
||||
<div class="tab-pane" id="privacy">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-center">
|
||||
<iframe style="border: 0; width: 100%;" src="https://stats.teknik.io/index.php?module=CoreAdminHome&action=optOut&language=en"></iframe>
|
||||
<!-- Privacy Settings Here -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -35,7 +35,7 @@
|
||||
<div class="col-xs-12 text-center">
|
||||
<div class="alert alert-danger">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<span><strong>Notice: </strong> JavaScript is not enabled. To experience the site at it's best, <a href="http://enable-javascript.com/" class="alert-link">please enable JavaScript</a>.</span>
|
||||
<span><strong>Notice: </strong> JavaScript is not enabled. To experience the site at its best, <a href="http://enable-javascript.com/" class="alert-link">please enable JavaScript</a>.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user