edit_notes.tmpl 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. {{showFile "templates/section/head.tmpl"}}
  2. <body class="bg-[#0b0d12] text-white font-sans min-h-screen">
  3. <div class="max-w-4xl mx-auto px-6 py-10">
  4. <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-8">
  5. <div>
  6. <h1 class="text-3xl md:text-4xl font-bold tracking-tight text-white">
  7. Editează notița
  8. </h1>
  9. <p class="text-gray-400 mt-2 text-sm md:text-base">
  10. Modifică titlul și conținutul, apoi salvează schimbările.
  11. </p>
  12. </div>
  13. <div class="flex gap-3">
  14. <a href="/list_notes"
  15. class="inline-flex items-center justify-center rounded-xl border border-[#313846] bg-[#171b22] px-4 py-3 text-sm font-semibold text-gray-200 transition hover:bg-[#20252f] hover:text-white">
  16. Înapoi la listă
  17. </a>
  18. <a href="/notes/?note={{.Path}}"
  19. class="inline-flex items-center justify-center rounded-xl border border-[#313846] bg-[#171b22] px-4 py-3 text-sm font-semibold text-gray-200 transition hover:bg-[#20252f] hover:text-white">
  20. Vezi notița
  21. </a>
  22. </div>
  23. </div>
  24. <div class="rounded-2xl border border-[#2a3140] bg-[#11151b] shadow-2xl overflow-hidden">
  25. <div class="border-b border-[#252b37] bg-[#181d27] px-6 py-5">
  26. <h2 class="text-xl md:text-2xl font-bold text-[#b899ff]">
  27. Formular editare
  28. </h2>
  29. <p class="text-sm text-gray-400 mt-1">
  30. Editezi notița selectată.
  31. </p>
  32. </div>
  33. <div class="p-6 md:p-8">
  34. <form method="POST" action="/api/update_note" class="space-y-6">
  35. <!-- PATH către fișier -->
  36. <input type="hidden" name="path" value="{{.Path}}">
  37. <!-- DIRECTORUL în care se află -->
  38. <input type="hidden" name="director" value="{{.Folder}}">
  39. <!-- Afișare folder (doar vizual) -->
  40. <div>
  41. <label class="block text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2">
  42. Folder
  43. </label>
  44. <div
  45. class="w-full rounded-xl border border-[#323949] bg-[#1a1f29] px-4 py-3 text-sm text-gray-300">
  46. {{.Folder}}
  47. </div>
  48. </div>
  49. <div>
  50. <label class="block text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2">
  51. Titlu fișier
  52. </label>
  53. <input type="text" name="titlu" value="{{.Titlu}}"
  54. class="w-full rounded-xl border border-[#323949] bg-[#1a1f29] px-4 py-3 text-sm text-gray-200 outline-none transition focus:border-[#7b58ad] focus:ring-2 focus:ring-[#7b58ad]/30">
  55. </div>
  56. <div>
  57. <label class="block text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2">
  58. Conținut notiță
  59. </label>
  60. <textarea name="notita" rows="18"
  61. class="w-full rounded-xl border border-[#323949] bg-[#1a1f29] px-4 py-3 text-sm text-gray-200 outline-none transition focus:border-[#7b58ad] focus:ring-2 focus:ring-[#7b58ad]/30 resize-y">{{.Continut}}</textarea>
  62. </div>
  63. <div class="flex flex-col sm:flex-row gap-3 pt-2">
  64. <button type="submit"
  65. class="flex-1 rounded-xl bg-[#7b58ad] px-5 py-3 text-sm font-bold text-white transition hover:bg-[#9974d0] shadow-lg shadow-purple-900/20">
  66. Salvează modificările
  67. </button>
  68. <a href="/list_notes/"
  69. class="flex-1 rounded-xl border border-[#3a3f4b] bg-[#171a21] px-5 py-3 text-center text-sm font-semibold text-gray-200 transition hover:bg-[#20242d] hover:text-white">
  70. Anulează
  71. </a>
  72. </div>
  73. </form>
  74. </div>
  75. <div class="border-t border-[#252b37] bg-[#12151b] px-6 py-4 flex justify-between items-center text-[11px] uppercase tracking-widest text-gray-500">
  76. <span>Status: Edit Mode</span>
  77. <span class="flex items-center gap-2">
  78. <span class="w-2 h-2 rounded-full bg-amber-400"></span>
  79. Loaded
  80. </span>
  81. </div>
  82. </div>
  83. </div>
  84. </body>
  85. </html>