Commit f479fb5

HPCesia <me@hpcesia.com>
2026-07-01 19:18:13
Fix menu layout: consistent mobile height, site/repo breadcrumb style
1 parent b770865
Changed files (2)
pkg/templates/layout.gohtml
@@ -16,11 +16,14 @@
 {{ template "svg" . }}
 <div class="menu">
     <div class="menu-content">
-        {{ if ne .SiteName "" }}
-        <a href="{{ .RootHref }}index.html" class="project-name">{{ .SiteName }}</a>
-        {{ end }}
         {{ if not .IsMultiRepoIndex }}
-        <a href="{{ .RepoHref }}index.html" class="project-name">{{ .Name }}</a>
+        <span class="project-name">
+            {{ if ne .SiteName "" }}
+            <a href="{{ .RootHref }}index.html" class="project-name-site">{{ .SiteName }}</a>
+            <span class="project-name-sep">/</span>
+            {{ end }}
+            <a href="{{ .RepoHref }}index.html" class="project-name-repo">{{ .Name }}</a>
+        </span>
         <div class="menu-item {{ if eq .Selected "code" }}selected{{ end }}">
             <a href="{{ .RepoHref }}blob/{{ .CurrentRefDir }}/index.html">
                 <svg aria-hidden="true" width="16" height="16">
@@ -53,6 +56,10 @@
                 Commits
             </a>
         </div>
+        {{ else }}
+        <span class="project-name">
+            <a href="{{ .RootHref }}index.html" class="project-name-site">{{ .SiteName }}</a>
+        </span>
         {{ end }}
     </div>
 </div>
pkg/templates/styles.go
@@ -177,13 +177,43 @@ a:hover {
 }
 
 .project-name {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  gap: 6px;
+  height: 56px;
+  margin-inline: 16px;
+  white-space: nowrap;
+}
+
+.project-name-site {
+  font-weight: 600;
+  font-size: 16px;
+  color: var(--c-text-1);
+  text-decoration: none;
+}
+
+.project-name-site:hover {
+  text-decoration: underline;
+}
+
+.project-name-sep {
+  font-weight: 400;
+  font-size: 16px;
+  color: var(--c-text-3);
+}
+
+.project-name-repo {
   font-weight: 600;
   font-size: 16px;
-  margin-inline: 16px;
   color: var(--c-text-1);
   text-decoration: none;
 }
 
+.project-name-repo:hover {
+  text-decoration: underline;
+}
+
 main {
   flex-grow: 1;
   width: 100%;