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.

Full.cshtml 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. @model Teknik.Areas.Paste.ViewModels.PasteViewModel
  2. @using Teknik.Utilities
  3. @using Teknik.Areas.Vault.Models
  4. @Styles.Render("~/Content/paste")
  5. <script type="text/javascript">
  6. var createVaultURL = '@Url.SubRouteUrl("vault", "Vault.NewVaultFromService", new { type = "Paste" })';
  7. </script>
  8. <div class="container">
  9. <div class="row text-center">
  10. <div class="col-sm-12 text-center">
  11. <h2><b>@((string.IsNullOrEmpty(Model.Title)) ? "Untitled" : Model.Title)</b> <small>Posted on <time datetime="@Model.DatePosted.ToString("s")">@Model.DatePosted.ToString("dddd, MMMM d, yyyy") at @Model.DatePosted.ToString("h:mm:ss tt")</time> - Format: <b id="syntaxLanguage">@Model.Syntax</b></small></h2>
  12. </div>
  13. </div>
  14. <hr />
  15. <div class="row">
  16. <div class="col-sm-12 pull-left">
  17. <div class="btn-group" role="group">
  18. <a role="button" class="btn btn-default" href="@Url.SubRouteUrl("p", "Paste.Simple", new { url = Model.Url })">Simple</a>
  19. <a role="button" class="btn btn-default" href="@Url.SubRouteUrl("p", "Paste.Raw", new { url = Model.Url })">Raw</a>
  20. <a role="button" class="btn btn-default" href="@Url.SubRouteUrl("p", "Paste.Download", new { url = Model.Url })">Download</a>
  21. <button type="button" class="btn btn-default" id="create-vault" data-paste-url="@Model.Url" data-paste-title="@((string.IsNullOrEmpty(Model.Title)) ? "Untitled" : Model.Title)">Create Vault</button>
  22. @if (User.Identity.IsAuthenticated && Model.Vaults != null && Model.Vaults.Any())
  23. {
  24. <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Add to Vault <span class="caret"></span></button>
  25. <ul class="dropdown-menu pull-right" id="add-to-vault-menu">
  26. @foreach (Vault item in Model.Vaults)
  27. {
  28. <li><a href="#" class="add-to-vault" data-add-to-vault-url="@Url.SubRouteUrl("vault", "Vault.EditVault", new { url = item.Url, type = "Paste" })" data-paste-url="@Model.Url" data-paste-title="@((string.IsNullOrEmpty(Model.Title)) ? "Untitled" : Model.Title)">@item.Title</a></li>
  29. }
  30. </ul>
  31. }
  32. </div>
  33. </div>
  34. </div>
  35. <br />
  36. <div class="row">
  37. <div class="col-sm-12">@Html.Raw(Model.Content)</div>
  38. </div>
  39. </div>
  40. @Scripts.Render("~/bundles/paste")