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.

Index.cshtml 3.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. @model Teknik.Areas.Paste.ViewModels.PasteCreateViewModel
  2. <bundle src="css/paste.min.css" append-version="true"></bundle>
  3. <div class="container">
  4. <div class="row">
  5. <div class="col-sm-10 col-sm-offset-1 text-center">
  6. <b>@Html.ValidationSummary(true, "The input is not valid")</b>
  7. </div>
  8. </div>
  9. <div class="row">
  10. <div class="col-sm-12">
  11. <!form class="form-horizontal" name="editor" method="post" action="@Url.SubRouteUrl("paste", "Paste.Action", new { action = "Paste" })">
  12. <div class="form-group">
  13. <div class="col-sm-10 col-sm-offset-1">
  14. <textarea class="form-control" name="Content" id="content" rows="20"></textarea>
  15. </div>
  16. </div>
  17. <div class="form-group">
  18. <label for="title" class="col-sm-2 col-sm-offset-1 control-label">Title</label>
  19. <div class="col-sm-4">
  20. <input type="text" class="form-control" name="Title" id="title" placeholder="My Awesome Paste">
  21. </div>
  22. <div class="col-sm-1 col-sm-offset-2">
  23. <button type="submit" class="btn btn-primary" id="pasteSubmit">Submit Paste</button>
  24. </div>
  25. </div>
  26. <div class="form-group">
  27. <label for="syntax" class="col-sm-2 col-sm-offset-1 control-label">Syntax</label>
  28. <div class="col-sm-4">
  29. <select class="form-control" name="Syntax" id="syntax">
  30. <!option value="">Text</!option>
  31. @foreach (var format in HighlightHelper.Languages.GroupBy(l => l.Value).ToList())
  32. {
  33. <!option value="@(format?.FirstOrDefault().Key)">@(format?.Key)</!option>
  34. }
  35. </select>
  36. </div>
  37. </div>
  38. <div class="form-group">
  39. <label for="syntax" class="col-sm-2 col-sm-offset-1 control-label">Expires</label>
  40. <div class="col-sm-2 hidden" id="length-div">
  41. <input type="number" min="1" step="1" class="form-control" name="ExpireLength" id="expirelength" value="1">
  42. </div>
  43. <div class="col-sm-4" id="unit-div">
  44. <select class="form-control" name="ExpireUnit" id="expireunit">
  45. @foreach (ExpirationUnit unit in Enum.GetValues(typeof(ExpirationUnit)))
  46. {
  47. <!option value="@unit">@unit.ToString()</!option>
  48. }
  49. </select>
  50. </div>
  51. </div>
  52. <div class="form-group">
  53. <label for="password" class="col-sm-2 col-sm-offset-1 control-label">Password</label>
  54. <div class="col-sm-4">
  55. <input type="password" class="form-control" name="Password" id="password" placeholder="Secret">
  56. </div>
  57. </div>
  58. </!form>
  59. </div>
  60. </div>
  61. <div class="text-center">
  62. Useful Tools: <a href="@Url.SubRouteUrl("help", "Help.Tools")">Paste Scripts and Utilities</a>
  63. </div>
  64. </div>
  65. <bundle src="js/paste.min.js" append-version="true"></bundle>