Skip to content

Commit

Permalink
fix(backend): add responsive to alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
bastean committed Jan 16, 2024
1 parent 7ff0641 commit fc1e4c8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/apps/crud/backend/cmd/web/templates/layouts/alert.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{{define "alert"}}
<div class="fixed mx-auto mt-5 flex w-full items-center justify-center">
<div
class="fixed z-50 mx-auto mt-5 flex w-full items-center justify-center px-2"
>
<div id="alert"></div>
</div>
{{end}}
5 changes: 4 additions & 1 deletion src/apps/crud/backend/cmd/web/templates/layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@
<body hx-ext="response-targets, class-tools, remove-me">
{{template "alert"}}

<div id="main" class="flex h-screen w-full items-center justify-center">
<div
id="main"
class="container mx-auto flex h-screen flex-col overflow-y-auto overflow-x-hidden"
>
{{end}} {{template "content"}} {{if .isNotHxRequest}}
</div>
</body>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div role="alert" class="alert w-max alert-{{.Type}}" remove-me="3s">
<div role="alert" class="alert alert-{{.Type}}" remove-me="3s">
{{if eq .Type "success"}}
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down

0 comments on commit fc1e4c8

Please sign in to comment.