-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: align header links with docs restructure (#103)
Aligns links in the header with matter-labs/zksync-docs#278 This is done through a hack to avoid the need to change nuxt template, publish new version, and then update the dep. We can do that as a follow-up.
- Loading branch information
Showing
3 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
export const headerLinks = () => { | ||
const config = useRuntimeConfig(); | ||
const route = useRoute(); | ||
|
||
const activeApp = config.public.app; | ||
const isDocsApp = activeApp === 'docs'; | ||
const isCodeApp = activeApp === 'code'; | ||
|
||
return [ | ||
{ | ||
label: 'ZKsync Era', | ||
to: isDocsApp ? '/zksync-era' : `${config.public.urls.docs}/zksync-era`, | ||
active: route.path.startsWith('/zksync-era'), | ||
}, | ||
{ | ||
label: 'ZK Stack', | ||
to: isDocsApp ? '/zk-stack' : `${config.public.urls.docs}/zk-stack`, | ||
active: route.path.startsWith('/zk-stack'), | ||
}, | ||
{ | ||
label: 'ZKsync Protocol', | ||
to: isDocsApp ? '/zksync-protocol' : `${config.public.urls.docs}/zksync-protocol`, | ||
active: route.path.startsWith('/zksync-protocol'), | ||
}, | ||
{ | ||
label: 'Community Code', | ||
to: isCodeApp ? '/' : `${config.public.urls.code}`, | ||
active: isCodeApp, | ||
}, | ||
]; | ||
}; |