Skip to content

Commit

Permalink
Link peer breadcrumb to home screen
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolfs committed Sep 13, 2024
1 parent 44dae6b commit 4f63f9e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 18 deletions.
11 changes: 6 additions & 5 deletions src/components/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
0 calc(100% - 6px)
);
}
.breadcrumbs {
gap: 0.5rem;
margin-left: 1rem;
min-height: 1.5rem;
}
</style>

<div class="header global-flex">
Expand Down Expand Up @@ -102,11 +107,7 @@
</Popover>
</div>
</div>
<div
class="global-flex txt-tiny txt-semibold"
style:gap="0.5rem"
style:margin-left="1rem"
style:min-height="1.5rem">
<div class="global-flex txt-tiny txt-semibold breadcrumbs">
<slot name="breadcrumbs" />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Link.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<style>
a {
color: var(--color-fill-secondary);
color: var(--color-foreground-contrast);
text-decoration: none;
}
a:hover {
Expand Down
16 changes: 10 additions & 6 deletions src/views/repo/Issues.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import type { Issue } from "@bindings/Issue";
import type { RepoInfo } from "@bindings/RepoInfo";
import Icon from "@app/components/Icon.svelte";
import Layout from "./Layout.svelte";
import Icon from "@app/components/Icon.svelte";
import Link from "@app/components/Link.svelte";
import NodeId from "@app/components/NodeId.svelte";
export let repo: RepoInfo;
Expand All @@ -16,11 +18,13 @@

<Layout {repo}>
<svelte:fragment slot="breadcrumbs">
<NodeId
nodeId={config.publicKey}
alias={config.alias}
styleFontFamily="var(--font-family-sans-serif)"
styleFontSize="var(--font-size-tiny)" />
<Link route={{ resource: "home" }}>
<NodeId
nodeId={config.publicKey}
alias={config.alias}
styleFontFamily="var(--font-family-sans-serif)"
styleFontSize="var(--font-size-tiny)" />
</Link>
<Icon name="chevron-right" />
{project.data.name}
<Icon name="chevron-right" />
Expand Down
16 changes: 10 additions & 6 deletions src/views/repo/Patches.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import type { Patch } from "@bindings/Patch";
import type { RepoInfo } from "@bindings/RepoInfo";
import Icon from "@app/components/Icon.svelte";
import Layout from "./Layout.svelte";
import Icon from "@app/components/Icon.svelte";
import Link from "@app/components/Link.svelte";
import NodeId from "@app/components/NodeId.svelte";
export let repo: RepoInfo;
Expand All @@ -16,11 +18,13 @@

<Layout {repo}>
<svelte:fragment slot="breadcrumbs">
<NodeId
nodeId={config.publicKey}
alias={config.alias}
styleFontFamily="var(--font-family-sans-serif)"
styleFontSize="var(--font-size-tiny)" />
<Link route={{ resource: "home" }}>
<NodeId
nodeId={config.publicKey}
alias={config.alias}
styleFontFamily="var(--font-family-sans-serif)"
styleFontSize="var(--font-size-tiny)" />
</Link>
<Icon name="chevron-right" />
{project.data.name}
<Icon name="chevron-right" />
Expand Down

0 comments on commit 4f63f9e

Please sign in to comment.