updated layout for small screens - colapsable sidepanel, fix issue with link to favicon when url_prefix is used

This commit is contained in:
2026-04-23 06:49:02 +00:00
parent a30eb4d42d
commit 62bf16589f
7 changed files with 156 additions and 55 deletions
+9
View File
@@ -22,6 +22,7 @@ func (h *Handlers) CreateNotePageHandler(c *gin.Context) {
c.HTML(http.StatusInternalServerError, "error", gin.H{
"error": "Failed to build tree structure",
"app_name": h.config.AppName,
"LoginAndEdits": h.config.LoginAndEdits,
"message": err.Error(),
"ContentTemplate": "error_content",
"ScriptsTemplate": "error_scripts",
@@ -32,6 +33,7 @@ func (h *Handlers) CreateNotePageHandler(c *gin.Context) {
c.HTML(http.StatusOK, "create", gin.H{
"app_name": h.config.AppName,
"LoginAndEdits": h.config.LoginAndEdits,
"folder_path": folderPath,
"notes_tree": notesTree,
"active_path": utils.GetActivePath(folderPath),
@@ -163,6 +165,7 @@ func (h *Handlers) EditNotePageHandler(c *gin.Context) {
c.HTML(http.StatusBadRequest, "error", gin.H{
"error": "Invalid note path",
"app_name": h.config.AppName,
"LoginAndEdits": h.config.LoginAndEdits,
"message": "Note path must end with .md or .markdown",
"ContentTemplate": "error_content",
"ScriptsTemplate": "error_scripts",
@@ -176,6 +179,7 @@ func (h *Handlers) EditNotePageHandler(c *gin.Context) {
c.HTML(http.StatusBadRequest, "error", gin.H{
"error": "Invalid path",
"app_name": h.config.AppName,
"LoginAndEdits": h.config.LoginAndEdits,
"message": "Path traversal is not allowed",
"ContentTemplate": "error_content",
"ScriptsTemplate": "error_scripts",
@@ -189,6 +193,7 @@ func (h *Handlers) EditNotePageHandler(c *gin.Context) {
c.HTML(http.StatusForbidden, "error", gin.H{
"error": "Access denied",
"app_name": h.config.AppName,
"LoginAndEdits": h.config.LoginAndEdits,
"message": "This note cannot be edited",
"ContentTemplate": "error_content",
"ScriptsTemplate": "error_scripts",
@@ -203,6 +208,7 @@ func (h *Handlers) EditNotePageHandler(c *gin.Context) {
c.HTML(http.StatusNotFound, "error", gin.H{
"error": "Note not found",
"app_name": h.config.AppName,
"LoginAndEdits": h.config.LoginAndEdits,
"message": "The requested note does not exist",
"ContentTemplate": "error_content",
"ScriptsTemplate": "error_scripts",
@@ -216,6 +222,7 @@ func (h *Handlers) EditNotePageHandler(c *gin.Context) {
c.HTML(http.StatusInternalServerError, "error", gin.H{
"error": "Failed to read note",
"app_name": h.config.AppName,
"LoginAndEdits": h.config.LoginAndEdits,
"message": err.Error(),
"ContentTemplate": "error_content",
"ScriptsTemplate": "error_scripts",
@@ -229,6 +236,7 @@ func (h *Handlers) EditNotePageHandler(c *gin.Context) {
c.HTML(http.StatusInternalServerError, "error", gin.H{
"error": "Failed to build tree structure",
"app_name": h.config.AppName,
"LoginAndEdits": h.config.LoginAndEdits,
"message": err.Error(),
"ContentTemplate": "error_content",
"ScriptsTemplate": "error_scripts",
@@ -251,6 +259,7 @@ func (h *Handlers) EditNotePageHandler(c *gin.Context) {
c.HTML(http.StatusOK, "edit", gin.H{
"app_name": h.config.AppName,
"LoginAndEdits": h.config.LoginAndEdits,
"title": title,
"content": string(content),
"note_path": notePath,