forked from tangled.org/core
this repo has no description

appview: profile: improve profile-card layout on mobile

Changed files
+22 -17
appview
pages
templates
+4
appview/pages/templates/repo/tags.html
··· 66 66 {{ end }} 67 67 </div> 68 68 </div> 69 + {{ else }} 70 + <p class="text-center text-gray-400 dark:text-gray-500 p-4"> 71 + This repository does not contain any tags. 72 + </p> 69 73 {{ end }} 70 74 </div> 71 75 </section>
+18 -17
appview/pages/templates/user/profile.html
··· 226 226 {{ end }} 227 227 228 228 {{ define "profileCard" }} 229 - <div class="bg-white dark:bg-gray-800 px-6 py-4 rounded drop-shadow-sm max-h-fit"> 230 - <div class="flex justify-center items-center"> 231 - {{ if .AvatarUri }} 232 - <img class="w-3/4 rounded-full p-2" src="{{ .AvatarUri }}" /> 233 - {{ end }} 234 - </div> 229 + <div class="bg-white dark:bg-gray-800 px-6 py-4 rounded drop-shadow-sm max-h-fit"> 230 + <div class="grid grid-cols-3 md:grid-cols-1 gap-3 items-center"> 231 + <div id="avatar" class="col-span-1 md-col-span-full flex justify-center items-center"> 232 + {{ if .AvatarUri }} 233 + <img class="w-3/4 rounded-full p-2" src="{{ .AvatarUri }}" /> 234 + {{ end }} 235 + </div> 236 + <div id="text" class="col-span-2 md:col-span-full"> 235 237 <p 236 - title="{{ didOrHandle .UserDid .UserHandle }}" 237 - class="text-lg font-bold text-center dark:text-white overflow-hidden text-ellipsis whitespace-nowrap max-w-full" 238 - > 239 - {{ didOrHandle .UserDid .UserHandle }} 238 + title="{{ didOrHandle .UserDid .UserHandle }}" 239 + class="text-lg font-bold md:text-center dark:text-white overflow-hidden text-ellipsis whitespace-nowrap max-w-full"> 240 + {{ didOrHandle .UserDid .UserHandle }} 240 241 </p> 241 - <div class="text-sm text-center dark:text-gray-300"> 242 - <span>{{ .ProfileStats.Followers }} followers</span> 243 - <div 244 - class="inline-block px-1 select-none after:content-['·']" 245 - ></div> 246 - <span>{{ .ProfileStats.Following }} following</span> 242 + <div class="text-sm md:text-center dark:text-gray-300"> 243 + <span id="followers">{{ .ProfileStats.Followers }} followers</span> 244 + <span class="px-1 select-none after:content-['·']"></span> 245 + <span id="following">{{ .ProfileStats.Following }} following</span> 247 246 </div> 248 247 249 248 {{ if ne .FollowStatus.String "IsSelf" }} 250 - {{ template "user/fragments/follow" . }} 249 + {{ template "user/fragments/follow" . }} 251 250 {{ end }} 251 + </div> 252 252 </div> 253 + </div> 253 254 {{ end }} 254 255 255 256 {{ define "ownRepos" }}