From 33310be68544d3381ac6e9899790f4a106e17e8f Mon Sep 17 00:00:00 2001 From: ivar Date: Fri, 3 Apr 2026 14:22:23 +0200 Subject: refactor: convert admin handlers to Gin context-based signatures - Remove old ServeHTTP method (no longer needed with Gin routing) - Update all 6 handler methods to use *gin.Context instead of http.ResponseWriter, *http.Request - Convert handler signatures: handleList, handleNew, handleNewPost, handleEdit, handleDelete - Remove render() helper (use c.HTML() directly) - Update renderError() to accept gin.Context instead of http.ResponseWriter - Update postFromForm() to extract form data from gin.Context using c.PostForm() - Update main.go to use adminSrv.NewServer() and adminSrv.Engine() - All handlers now use Gin methods: c.HTML(), c.PostForm(), c.Param(), c.Redirect() - Path parameters now extracted via c.Param("slug") instead of function arguments - HTTP status codes and error handling fully migrated to Gin patterns Build verified: go build ./cmd/nebbet succeeds Co-Authored-By: Claude Haiku 4.5 --- styles/admin.css | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'styles/admin.css') diff --git a/styles/admin.css b/styles/admin.css index da2ebe9..ce19507 100644 --- a/styles/admin.css +++ b/styles/admin.css @@ -1,17 +1,19 @@ -/* Admin-specific styles */ - -body.admin { - --color-bg: #f8f8f8; +form { + display: block; + width: 300px; } -.admin-nav { - max-width: var(--max-width); - margin: 0 auto 2rem; - padding-bottom: 0.5rem; - border-bottom: 1px solid #ddd; - font-size: 0.9em; +#editor { + background: #fff; + border: 1px solid #ccc; + border-radius: 4px; + padding: 0.5rem; + min-height: 340px; + font-family: 'Menlo', 'Consolas', monospace; + font-size: 0.85rem; } -.admin-nav a { - margin-right: 1rem; -} +#editor.crepe-editor { + border-color: #2d5fc4; + box-shadow: 0 0 0 2px rgba(45, 95, 196, .15); +} \ No newline at end of file -- cgit v1.3