<!DOCTYPE html>
<html lang="ro">

<head>
  <meta charset="UTF-8">
  <title>Notițe</title>
  <script src="https://cdn.tailwindcss.com"></script>
</head>

<body class="bg-[#0f0f0f] text-white p-10 font-sans">
  <h1 class="text-3xl mb-8 text-[#9974d0] font-bold">Notițele existente</h1>

  {{template "folder" .}}

</body>

</html>


{{define "folder"}}

<div class="ml-4 mb-6">

  <h2 class="text-xl font-bold text-[#c7a6ff] mb-2">
    {{.Nume}}
  </h2>

  {{if .Fisiere}}
  <div class="space-y-2 mb-4">
    {{range .Fisiere}}
    <div class="bg-[#202020] border border-[#3e3e3e] rounded-lg p-3">
      <a href="/notes/?note={{.Path}}" class="text-gray-200 hover:text-[#9974d0] hover:underline">
        {{.Nume}}
      </a>
    </div>
    {{end}}
  </div>
  {{end}}

  {{range .Subfoldere}}
    {{template "folder" .}}
  {{end}}

</div>

{{end}}