this repo has no description
at ci-statuses 4.6 kB view raw
1{{ define "title" }}{{ or .Card.UserHandle .Card.UserDid }}{{ end }} 2 3{{ define "extrameta" }} 4 {{ $avatarUrl := fullAvatar .Card.UserHandle }} 5 <meta property="og:title" content="{{ or .Card.UserHandle .Card.UserDid }}" /> 6 <meta property="og:type" content="profile" /> 7 <meta property="og:url" content="https://tangled.org/{{ or .Card.UserHandle .Card.UserDid }}?tab={{ .Active }}" /> 8 <meta property="og:description" content="{{ or .Card.Profile.Description .Card.UserHandle .Card.UserDid }}" /> 9 <meta property="og:image" content="{{ $avatarUrl }}" /> 10 <meta property="og:image:width" content="512" /> 11 <meta property="og:image:height" content="512" /> 12 13 <meta name="twitter:card" content="summary" /> 14 <meta name="twitter:title" content="{{ or .Card.UserHandle .Card.UserDid }}" /> 15 <meta name="twitter:description" content="{{ or .Card.Profile.Description .Card.UserHandle .Card.UserDid }}" /> 16 <meta name="twitter:image" content="{{ $avatarUrl }}" /> 17{{ end }} 18 19{{ define "content" }} 20 {{ template "profileTabs" . }} 21 <section class="bg-white dark:bg-gray-800 px-2 py-6 md:p-6 rounded w-full dark:text-white drop-shadow-sm"> 22 <div class="grid grid-cols-1 md:grid-cols-11 gap-4"> 23 {{ $style := "hidden md:block md:col-span-3" }} 24 {{ if eq $.Active "overview" }} 25 {{ $style = "md:col-span-3" }} 26 {{ end }} 27 <div class="{{ $style }} order-1 order-1"> 28 <div class="flex flex-col gap-4"> 29 {{ template "user/fragments/profileCard" .Card }} 30 {{ block "punchcard" .Card.Punchcard }} {{ end }} 31 </div> 32 </div> 33 34 {{ block "profileContent" . }} {{ end }} 35 </div> 36 </section> 37{{ end }} 38 39{{ define "profileTabs" }} 40<nav class="w-full pl-4 overflow-x-auto overflow-y-hidden"> 41 <div class="flex z-60"> 42 {{ $activeTabStyles := "-mb-px bg-white dark:bg-gray-800" }} 43 {{ $tabs := .Card.GetTabs }} 44 {{ $tabmeta := dict "x" "y" }} 45 {{ range $item := $tabs }} 46 {{ $key := index $item 0 }} 47 {{ $value := index $item 1 }} 48 {{ $icon := index $item 2 }} 49 {{ $meta := index $item 3 }} 50 <a 51 href="?tab={{ $value }}" 52 class="relative -mr-px group no-underline hover:no-underline" 53 hx-boost="true"> 54 <div 55 class="px-4 py-1 mr-1 text-black dark:text-white min-w-[80px] text-center relative rounded-t whitespace-nowrap 56 {{ if eq $.Active $key }} 57 {{ $activeTabStyles }} 58 {{ else }} 59 group-hover:bg-gray-100/25 group-hover:dark:bg-gray-700/25 60 {{ end }} 61 "> 62 <span class="flex items-center justify-center"> 63 {{ i $icon "w-4 h-4 mr-2" }} 64 {{ $key }} 65 {{ if $meta }} 66 <span class="bg-gray-200 dark:bg-gray-700 rounded py-1/2 px-1 text-sm ml-1">{{ $meta }}</span> 67 {{ end }} 68 </span> 69 </div> 70 </a> 71 {{ end }} 72 </div> 73</nav> 74{{ end }} 75 76{{ define "punchcard" }} 77 {{ $now := now }} 78 <div> 79 <p class="px-2 pb-4 flex gap-2 text-sm font-bold dark:text-white"> 80 PUNCHCARD 81 <span class="font-mono font-normal text-sm text-gray-500 dark:text-gray-400 "> 82 {{ .Total | int64 | commaFmt }} commits 83 </span> 84 </p> 85 <div class="grid grid-cols-28 md:grid-cols-14 gap-y-3 w-full h-full"> 86 {{ range .Punches }} 87 {{ $count := .Count }} 88 {{ $theme := "bg-gray-200 dark:bg-gray-700 size-[4px]" }} 89 {{ if lt $count 1 }} 90 {{ $theme = "bg-gray-200 dark:bg-gray-700 size-[4px]" }} 91 {{ else if lt $count 2 }} 92 {{ $theme = "bg-green-200 dark:bg-green-900 size-[5px]" }} 93 {{ else if lt $count 4 }} 94 {{ $theme = "bg-green-300 dark:bg-green-800 size-[5px]" }} 95 {{ else if lt $count 8 }} 96 {{ $theme = "bg-green-400 dark:bg-green-700 size-[6px]" }} 97 {{ else }} 98 {{ $theme = "bg-green-500 dark:bg-green-600 size-[7px]" }} 99 {{ end }} 100 101 {{ if .Date.After $now }} 102 {{ $theme = "border border-gray-200 dark:border-gray-700 size-[4px]" }} 103 {{ end }} 104 <div class="w-full h-full flex justify-center items-center"> 105 <div 106 class="aspect-square rounded-full transition-all duration-300 {{ $theme }} max-w-full max-h-full" 107 title="{{ .Date.Format "2006-01-02" }}: {{ .Count }} commits"> 108 </div> 109 </div> 110 {{ end }} 111 </div> 112 </div> 113{{ end }} 114 115{{ define "layouts/profilebase" }} 116 {{ template "layouts/base" . }} 117{{ end }}