From 5c87d96a51d466669cdcd16016ac421c7db8efa2 Mon Sep 17 00:00:00 2001 From: maddalax Date: Thu, 10 Oct 2024 20:31:20 -0500 Subject: [PATCH] css fixes --- examples/hackernews/pages/index.go | 2 +- examples/hackernews/partials/story.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/hackernews/pages/index.go b/examples/hackernews/pages/index.go index b103599..44cc3fd 100644 --- a/examples/hackernews/pages/index.go +++ b/examples/hackernews/pages/index.go @@ -12,7 +12,7 @@ func IndexPage(ctx *h.RequestContext) *h.Page { h.Class("flex gap-2 min-h-screen"), partials.StorySidebar(ctx), h.Main( - h.Class("flex justify-center items-start p-6 max-w-3xl min-w-3xl mx-auto"), + h.Class("flex justify-left items-start p-6 w-full"), partials.Story(ctx), ), ), diff --git a/examples/hackernews/partials/story.go b/examples/hackernews/partials/story.go index 0aa6c05..8b72272 100644 --- a/examples/hackernews/partials/story.go +++ b/examples/hackernews/partials/story.go @@ -24,6 +24,7 @@ func Story(ctx *h.RequestContext) *h.Partial { ctx, h.PushUrlHeader(fmt.Sprintf("/?item=%d", storyId)), h.Div( + h.Class("w-full"), h.Id("story-body"), CachedStoryBody(storyId), ), @@ -50,9 +51,10 @@ var CachedStoryBody = h.CachedPerKeyT[string, int](time.Minute*3, func(itemId in func StoryBody(story *news.Story) *h.Element { return h.Div( + h.Class("w-full"), h.Id("story-body"), h.Div( - h.Class("prose prose-2xl bg-white border-b border-gray-200 pb-3 min-w-3xl max-w-3xl"), + h.Class("prose prose-2xl border-b border-gray-200 pb-3 max-w-none w-full"), h.H5( h.Class("flex gap-2 items-left font-bold"), h.UnsafeRaw(story.Title),