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-2"> 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> ··· 25 </nav> 26 {{ end }} 27 28 {{ define "dropDown" }} 29 <details class="relative inline-block text-left"> 30 <summary ··· 38 > 39 <a href="/{{ $user }}">profile</a> 40 <a href="/{{ $user }}?tab=repos">repositories</a> 41 <a href="/knots">knots</a> 42 <a href="/spindles">spindles</a> 43 <a href="/settings">settings</a>
··· 9 10 <div id="right-items" class="flex items-center gap-2"> 11 {{ with .LoggedInUser }} 12 + {{ block "newButton" . }} {{ end }} 13 {{ block "dropDown" . }} {{ end }} 14 {{ else }} 15 <a href="/login">login</a> ··· 23 </nav> 24 {{ end }} 25 26 + {{ define "newButton" }} 27 + <details class="relative inline-block text-left"> 28 + <summary class="btn-create py-0 cursor-pointer list-none flex items-center gap-2"> 29 + {{ i "plus" "w-4 h-4" }} new 30 + </summary> 31 + <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"> 32 + <a href="/repo/new" class="flex items-center gap-2"> 33 + {{ i "book-plus" "w-4 h-4" }} 34 + new repository 35 + </a> 36 + <a href="/strings/new" class="flex items-center gap-2"> 37 + {{ i "line-squiggle" "w-4 h-4" }} 38 + new string 39 + </a> 40 + </div> 41 + </details> 42 + {{ end }} 43 + 44 {{ define "dropDown" }} 45 <details class="relative inline-block text-left"> 46 <summary ··· 54 > 55 <a href="/{{ $user }}">profile</a> 56 <a href="/{{ $user }}?tab=repos">repositories</a> 57 + <a href="/strings/{{ $user }}">strings</a> 58 <a href="/knots">knots</a> 59 <a href="/spindles">spindles</a> 60 <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 = {