appview/pages: hide profile-card from non-overview pages on mobile #570

merged
opened by oppi.li targeting master from push-pzrysszkwwtk

on medium and above:

  • show profile card on all profile pages

on mobile:

  • show profile card on overview page
  • hide profile card on all other profile pages

Signed-off-by: oppiliappan me@oppi.li

Changed files
+7 -2
appview
pages
templates
+7 -2
appview/pages/templates/layouts/profilebase.html
···
{{ define "content" }}
{{ template "profileTabs" . }}
-
<section class="bg-white dark:bg-gray-800 p-6 rounded w-full dark:text-white drop-shadow-sm">
+
<section class="bg-white dark:bg-gray-800 px-2 py-6 md:p-6 rounded w-full dark:text-white drop-shadow-sm">
<div class="grid grid-cols-1 md:grid-cols-11 gap-4">
-
<div class="md:col-span-3 order-1 md:order-1">
+
{{ $style := "hidden md:block md:col-span-3" }}
+
{{ if eq $.Active "overview" }}
+
{{ $style = "md:col-span-3" }}
+
{{ end }}
+
<div class="{{ $style }} order-1 order-1">
<div class="flex flex-col gap-4">
{{ template "user/fragments/profileCard" .Card }}
{{ block "punchcard" .Card.Punchcard }} {{ end }}
</div>
</div>
+
{{ block "profileContent" . }} {{ end }}
</div>
</section>