{{ctx.Locale.Tr "org.teams.leave.detail" (``|TrustHTML)}}
+diff --git a/src/build-output.test.ts b/src/build-output.test.ts index 8cdceb62..a978fa81 100644 --- a/src/build-output.test.ts +++ b/src/build-output.test.ts @@ -671,6 +671,15 @@ describe("Forgejo 15 native integration", () => { expect(read("sidebar.tmpl")).toContain('href="{{AppSubUrl}}/notifications/watching"'); }); + it("gives a team GitHub's sidebar and underline tabs without Forgejo's teal button", () => { + const read = (...parts: string[]) => + fs.readFileSync(path.join(ROOT_DIR, "templates", "org", "team", ...parts), "utf-8"); + const sidebar = read("sidebar.tmpl"); + expect(sidebar).not.toContain("teal"); + expect(sidebar).toContain('class="ui button theme-control theme-team-settings"'); + expect(read("navbar.tmpl")).toContain('{{.Team.NumMembers}}'); + }); + it("matches GitHub's repository About, visibility, and code-search details", () => { const headerStyle = fs.readFileSync(path.join(ROOT_DIR, "styles", "templates", "repo", "header.ts"), "utf-8"); const headerTemplate = fs.readFileSync(path.join(ROOT_DIR, "templates", "repo", "home_header.tmpl"), "utf-8"); diff --git a/styles/pages/organization.css b/styles/pages/organization.css index c12dc8a9..709fd209 100644 --- a/styles/pages/organization.css +++ b/styles/pages/organization.css @@ -290,8 +290,91 @@ height: 24px; } -.organization.teams .org-team-navbar { - background: var(--color-box-header); +/* A team: GitHub's sidebar (the name with Leave or Join, the summary, Settings) beside underline tabs over a box. */ +.theme-team-header { + display: flex; + align-items: center; + justify-content: space-between; + gap: 8px; + margin-bottom: 8px; +} + +.theme-team-header > h2 { + margin: 0; + font-size: 20px; + font-weight: 600; + line-height: 30px; + overflow-wrap: anywhere; +} + +.theme-team-detail > .item { + padding: 8px 0; + color: var(--color-text-light-1); + font-size: 14px; + line-height: 21px; +} + +.theme-team-detail > .item + .item { + border-top: 1px solid var(--color-light-border); +} + +.theme-team-detail h3 { + margin: 0 0 4px; + color: var(--color-text); + font-size: 14px; + font-weight: 600; +} + +.theme-team-detail ul { + margin: 0 0 12px; + padding-left: 20px; +} + +.theme-team-settings { + width: 100%; + margin-top: 8px; +} + +.theme-team-tabs { + display: flex; + gap: 8px; + margin-bottom: 16px; + border-bottom: 1px solid var(--color-light-border); +} + +.theme-team-tabs > a { + position: relative; + display: inline-flex; + align-items: center; + gap: 8px; + padding: 0 8px 8px; + color: var(--color-text); + font-size: 14px; + line-height: 30px; + text-decoration: none; +} + +.theme-team-tabs > a > .svg { + color: var(--color-text-light-1); +} + +.theme-team-tabs > a[aria-current]::after { + content: ""; + position: absolute; + inset: auto 0 -1px; + height: 2px; + border-radius: var(--border-radius); + background: var(--github-underlineNav-borderColor-active); +} + +.theme-team-tabs > a[aria-current] { + font-weight: 600; +} + +/* Under the tabs the add form and the list are one box instead of Forgejo's attached segments. */ +.organization.teams .ten.wide.column > .theme-team-tabs + .ui.attached.segment { + border-top-width: 1px; + border-radius: var(--border-radius) var(--border-radius) 0 0; } /* Inner team pages retain the permission summary beside members/repositories. */ diff --git a/templates/org/team/navbar.tmpl b/templates/org/team/navbar.tmpl new file mode 100644 index 00000000..fd05fcc9 --- /dev/null +++ b/templates/org/team/navbar.tmpl @@ -0,0 +1,5 @@ +{{/* GitHub's underline tabs for a team's members and repositories, each with its counter. */}} + diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl new file mode 100644 index 00000000..5ad96503 --- /dev/null +++ b/templates/org/team/sidebar.tmpl @@ -0,0 +1,88 @@ +{{/* Forgejo 17's team summary as a GitHub sidebar: the team's name with Leave or Join, its description and +permissions, then Settings as a default button. */}} +
+{{ctx.Locale.Tr "org.teams.leave.detail" (``|TrustHTML)}}
+