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