Skip to content

Commit

Permalink
Fix(components/page/nav): move socials slot after generated logos
Browse files Browse the repository at this point in the history
  • Loading branch information
sleelin committed Jun 21, 2024
1 parent 0b2ac91 commit 317cd86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions docs/components/page/nav.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const element = inject("manifest").for("page", "nav");
--color-primary: var(--vp-c-neutral);
--color-link-hover: var(--vp-button-brand-active-bg);
--color-link-shadow: var(--vp-button-brand-hover-bg);
--color-link-folded: var(--vp-c-white);

&::part(container) {
position: relative;
Expand Down Expand Up @@ -69,10 +70,6 @@ const element = inject("manifest").for("page", "nav");
}

@container demo-container (width < 510px) {
&::part(content) {
--color-primary: var(--vp-c-white);
}

&::part(links) {
margin-left: 100px;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/page/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export class PageNav extends LitElement {
<slot @slotchange=${this.#listenLinks}></slot>
</div>
<div part="socials">
<slot name="socials" @slotchange=${() => this.requestUpdate()}></slot>
${this.#socials.map((a) => html`
<a href="${a.href}" target="_blank" title="${a.innerText || a.title || a.querySelector("img")?.alt}">
${choose(a.href?.match(/^https?:\/\/(?:www\.)?(.*?)\/.*$/)?.at(1), [
Expand All @@ -93,6 +92,7 @@ export class PageNav extends LitElement {
})}
</a>
`)}
<slot name="socials" @slotchange=${() => this.requestUpdate()}></slot>
</div>
</nav>
</div>
Expand Down

0 comments on commit 317cd86

Please sign in to comment.