Des tonnes de modifications notamment VIM / Couleurs / typos
This commit is contained in:
37
templates/favorites.html
Normal file
37
templates/favorites.html
Normal file
@ -0,0 +1,37 @@
|
||||
{{if .Favorites}}
|
||||
{{range .Favorites}}
|
||||
<div class="favorite-item" data-path="{{.Path}}">
|
||||
{{if .IsDir}}
|
||||
<div class="favorite-folder" data-path="{{.Path}}">
|
||||
<span class="favorite-icon">⭐</span>
|
||||
<span class="favorite-folder-icon">{{.Icon}}</span>
|
||||
<span class="favorite-name">{{.Title}}</span>
|
||||
<button class="favorite-remove"
|
||||
onclick="removeFavorite('{{.Path}}')"
|
||||
title="Retirer des favoris">×</button>
|
||||
</div>
|
||||
{{else}}
|
||||
<a href="#"
|
||||
class="favorite-file"
|
||||
data-path="{{.Path}}"
|
||||
hx-get="/api/notes/{{.Path}}"
|
||||
hx-target="#editor-container"
|
||||
hx-swap="innerHTML">
|
||||
<span class="favorite-icon">⭐</span>
|
||||
<span class="favorite-file-icon">{{.Icon}}</span>
|
||||
<span class="favorite-name">{{.Title}}</span>
|
||||
<button class="favorite-remove"
|
||||
onclick="event.preventDefault(); event.stopPropagation(); removeFavorite('{{.Path}}')"
|
||||
title="Retirer des favoris">×</button>
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<p class="favorites-empty">
|
||||
Aucun favori.<br>
|
||||
<span style="font-size: 0.75rem; color: var(--text-muted);">
|
||||
Cliquez sur ⭐ à côté d'une note ou d'un dossier pour l'ajouter.
|
||||
</span>
|
||||
</p>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user