appview/pages: rework topbar to incorporate strings #416

merged
opened by oppi.li targeting master from push-potvrpwlpwsl
Changed files
+43 -26
appview
pages
templates
layouts
+20 -3
appview/pages/templates/layouts/topbar.html
··· 9 10 <div id="right-items" class="flex items-center gap-4"> 11 {{ with .LoggedInUser }} 12 - <a href="/repo/new" hx-boost="true" class="btn-create hover:no-underline hover:text-white"> 13 - {{ i "plus" "w-4 h-4" }} 14 - </a> 15 {{ block "dropDown" . }} {{ end }} 16 {{ else }} 17 <a href="/login">login</a> ··· 21 </nav> 22 {{ end }} 23 24 {{ define "dropDown" }} 25 <details class="relative inline-block text-left"> 26 <summary ··· 34 > 35 <a href="/{{ $user }}">profile</a> 36 <a href="/{{ $user }}?tab=repos">repositories</a> 37 <a href="/knots">knots</a> 38 <a href="/spindles">spindles</a> 39 <a href="/settings">settings</a>
··· 9 10 <div id="right-items" class="flex items-center gap-4"> 11 {{ with .LoggedInUser }} 12 + {{ block "newButton" . }} {{ end }} 13 {{ block "dropDown" . }} {{ end }} 14 {{ else }} 15 <a href="/login">login</a> ··· 19 </nav> 20 {{ end }} 21 22 + {{ define "newButton" }} 23 + <details class="relative inline-block text-left"> 24 + <summary class="btn-create py-0 cursor-pointer list-none flex items-center gap-2"> 25 + {{ i "plus" "w-4 h-4" }} new 26 + </summary> 27 + <div class="absolute flex flex-col right-0 mt-4 p-4 rounded w-48 bg-white dark:bg-gray-800 dark:text-white border border-gray-200 dark:border-gray-700"> 28 + <a href="/repo/new" class="flex items-center gap-2"> 29 + {{ i "book-plus" "w-4 h-4" }} 30 + new repository 31 + </a> 32 + <a href="/strings/new" class="flex items-center gap-2"> 33 + {{ i "line-squiggle" "w-4 h-4" }} 34 + new string 35 + </a> 36 + </div> 37 + </details> 38 + {{ end }} 39 + 40 {{ define "dropDown" }} 41 <details class="relative inline-block text-left"> 42 <summary ··· 50 > 51 <a href="/{{ $user }}">profile</a> 52 <a href="/{{ $user }}?tab=repos">repositories</a> 53 + <a href="/strings/{{ $user }}">strings</a> 54 <a href="/knots">knots</a> 55 <a href="/spindles">spindles</a> 56 <a href="/settings">settings</a>
+22 -22
flake.lock
··· 1 { 2 "nodes": { 3 "gitignore": { 4 "inputs": { 5 "nixpkgs": [ ··· 20 "type": "github" 21 } 22 }, 23 - "flake-utils": { 24 - "inputs": { 25 - "systems": "systems" 26 - }, 27 - "locked": { 28 - "lastModified": 1694529238, 29 - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", 30 - "owner": "numtide", 31 - "repo": "flake-utils", 32 - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", 33 - "type": "github" 34 - }, 35 - "original": { 36 - "owner": "numtide", 37 - "repo": "flake-utils", 38 - "type": "github" 39 - } 40 - }, 41 "gomod2nix": { 42 "inputs": { 43 "flake-utils": "flake-utils", ··· 128 "lucide-src": { 129 "flake": false, 130 "locked": { 131 - "lastModified": 1742302029, 132 - "narHash": "sha256-OyPVtpnC4/AAmPq84Wt1r1Gcs48d9KG+UBCtZK87e9k=", 133 "type": "tarball", 134 - "url": "https://github.com/lucide-icons/lucide/releases/download/0.483.0/lucide-icons-0.483.0.zip" 135 }, 136 "original": { 137 "type": "tarball", 138 - "url": "https://github.com/lucide-icons/lucide/releases/download/0.483.0/lucide-icons-0.483.0.zip" 139 } 140 }, 141 "nixpkgs": {
··· 1 { 2 "nodes": { 3 + "flake-utils": { 4 + "inputs": { 5 + "systems": "systems" 6 + }, 7 + "locked": { 8 + "lastModified": 1694529238, 9 + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", 10 + "owner": "numtide", 11 + "repo": "flake-utils", 12 + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", 13 + "type": "github" 14 + }, 15 + "original": { 16 + "owner": "numtide", 17 + "repo": "flake-utils", 18 + "type": "github" 19 + } 20 + }, 21 "gitignore": { 22 "inputs": { 23 "nixpkgs": [ ··· 38 "type": "github" 39 } 40 }, 41 "gomod2nix": { 42 "inputs": { 43 "flake-utils": "flake-utils", ··· 128 "lucide-src": { 129 "flake": false, 130 "locked": { 131 + "lastModified": 1754044466, 132 + "narHash": "sha256-+exBR2OToB1iv7ZQI2S4B0lXA/QRvC9n6U99UxGpJGs=", 133 "type": "tarball", 134 + "url": "https://github.com/lucide-icons/lucide/releases/download/0.536.0/lucide-icons-0.536.0.zip" 135 }, 136 "original": { 137 "type": "tarball", 138 + "url": "https://github.com/lucide-icons/lucide/releases/download/0.536.0/lucide-icons-0.536.0.zip" 139 } 140 }, 141 "nixpkgs": {
+1 -1
flake.nix
··· 22 flake = false; 23 }; 24 lucide-src = { 25 - url = "https://github.com/lucide-icons/lucide/releases/download/0.483.0/lucide-icons-0.483.0.zip"; 26 flake = false; 27 }; 28 inter-fonts-src = {
··· 22 flake = false; 23 }; 24 lucide-src = { 25 + url = "https://github.com/lucide-icons/lucide/releases/download/0.536.0/lucide-icons-0.536.0.zip"; 26 flake = false; 27 }; 28 inter-fonts-src = {