The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PasteItem.cshtml 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. @model Teknik.Areas.Vault.ViewModels.PasteItemViewModel
  2. @{
  3. string format = Model.Paste.Syntax;
  4. string formatName = "Text";
  5. if (HighlightHelper.Languages.ContainsKey(format))
  6. {
  7. formatName = HighlightHelper.Languages[format];
  8. }
  9. }
  10. <div class="panel panel-default">
  11. <div class="panel-heading">
  12. <div class="row">
  13. <div class="col-sm-10 text-left">
  14. <h4><b>@((string.IsNullOrEmpty(Model.Title)) ? "Paste" : Model.Title)</b> <small>Pasted on <time datetime="@Model.Paste.DatePosted.ToString("s")">@Model.Paste.DatePosted.ToString("dddd, MMMM d, yyyy") at @Model.Paste.DatePosted.ToString("h:mm:ss tt")</time> - Format: <b id="syntaxLanguage_@(Model.Paste.PasteId)">@formatName</b></small></h4>
  15. </div>
  16. <div class="col-sm-2 text-right">
  17. <h4><small><a href="@Url.SubRouteUrl("p", "Paste.View", new { url = Model.Paste.Url })" target="_blank">Direct Link</a></small></h4>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="panel-body">
  22. <div class="row">
  23. <div class="col-sm-12 pull-left">
  24. <div class="btn-group" role="group">
  25. <a role="button" class="btn btn-default" href="@Url.SubRouteUrl("p", "Paste.Simple", new { url = Model.Paste.Url })" target="_blank">Simple</a>
  26. <a role="button" class="btn btn-default" href="@Url.SubRouteUrl("p", "Paste.Raw", new { url = Model.Paste.Url })" target="_blank">Raw</a>
  27. <a role="button" class="btn btn-default" href="@Url.SubRouteUrl("p", "Paste.Download", new { url = Model.Paste.Url })">Download</a>
  28. </div>
  29. </div>
  30. </div>
  31. <br />
  32. <div class="row paste-item">
  33. <div class="col-sm-12 paste-content hideContent" id="@Model.VaultItemId">
  34. @if (!string.IsNullOrEmpty(Model.Paste.HashedPassword))
  35. {
  36. <p class="text-center">Password Required</p>
  37. }
  38. else
  39. {
  40. <pre class="line-numbers"><code class="language-@(format)">@Model.Paste.Content</code></pre>
  41. }
  42. </div>
  43. <div class="show-more" id="show-more-bottom-@Model.VaultItemId">
  44. <button role="button" class="btn btn-default btn-sm show-more-button">Show More</button>
  45. </div>
  46. </div>
  47. </div>
  48. @if (!string.IsNullOrEmpty(Model.Description))
  49. {
  50. <div class="panel-footer">
  51. <p>@Model.Description</p>
  52. </div>
  53. }
  54. </div>