From 02a4e864bf035306eb14ef2b494c55defebbf61e Mon Sep 17 00:00:00 2001 From: eti Date: Wed, 6 May 2026 04:00:44 +0200 Subject: [PATCH] appview: add mobile fullscreen search overlay - tap search on mobile opens fullscreen overlay with body scroll lock and visualViewport-aware height for ios keyboard - reorder topbar so search sits first on mobile, last on desktop - add safe-area-inset padding to header/footer for notched devices Signed-off-by: eti --- appview/pages/pages.go | 7 +- appview/pages/templates/layouts/base.html | 8 +- .../templates/layouts/fragments/topbar.html | 204 ++++++++++++++---- .../templates/search/fragments/quick.html | 17 +- appview/state/search.go | 7 +- 5 files changed, 189 insertions(+), 54 deletions(-) diff --git a/appview/pages/pages.go b/appview/pages/pages.go index 073013e3..026b9962 100644 --- a/appview/pages/pages.go +++ b/appview/pages/pages.go @@ -1675,9 +1675,10 @@ func (p *Pages) SearchRepos(w io.Writer, params SearchReposParams) error { } type SearchQuickParams struct { - Repos []models.Repo - Query string - Total int + Repos []models.Repo + Query string + Total int + Mobile bool } func (p *Pages) SearchQuick(w io.Writer, params SearchQuickParams) error { diff --git a/appview/pages/templates/layouts/base.html b/appview/pages/templates/layouts/base.html index aa9a508a..d4f2698d 100644 --- a/appview/pages/templates/layouts/base.html +++ b/appview/pages/templates/layouts/base.html @@ -1,9 +1,9 @@ {{ define "layouts/base" }} - + - + @@ -68,7 +68,7 @@ {{ block "topbarLayout" . }} -
+
{{ if .LoggedInUser }}
+
{{ template "layouts/fragments/footer" . }}
{{ end }} diff --git a/appview/pages/templates/layouts/fragments/topbar.html b/appview/pages/templates/layouts/fragments/topbar.html index e70ecdc2..b3edd2ea 100644 --- a/appview/pages/templates/layouts/fragments/topbar.html +++ b/appview/pages/templates/layouts/fragments/topbar.html @@ -9,11 +9,11 @@
{{ with .LoggedInUser }} - {{ block "searchButton" . }} {{ end }} - - {{ block "newButton" . }} {{ end }} - {{ template "notifications/fragments/bell" }} - {{ block "profileDropdown" . }} {{ end }} +
{{ block "newButton" . }} {{ end }}
+
{{ template "notifications/fragments/bell" }}
+
{{ block "searchButton" . }} {{ end }}
+ +
{{ block "profileDropdown" . }} {{ end }}
{{ else }} login or @@ -46,11 +46,8 @@ {{ define "searchButton" }}