Skip to content

Commit

Permalink
Merge pull request #11 from zkSync-Community-Hub/itsacoyote-quick-fixes
Browse files Browse the repository at this point in the history
Itsacoyote quick fixes
  • Loading branch information
itsacoyote authored May 23, 2024
2 parents 7dca130 + 6a0fd90 commit d648220
Show file tree
Hide file tree
Showing 26 changed files with 95 additions and 101 deletions.
16 changes: 15 additions & 1 deletion app.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script setup lang="ts">
import type { ParsedContent } from '@nuxt/content/types';
provideHeadlessUseId(() => useId());
const { seo } = useAppConfig();
Expand Down Expand Up @@ -31,13 +33,18 @@ useSeoMeta({
});
defineOgImageComponent('OgImageZK');
const { data: files } = useLazyFetch<ParsedContent[]>('/api/search.json', {
default: () => [],
server: false,
});
</script>

<template>
<div>
<NuxtLoadingIndicator />

<HeaderComponent />
<HeaderComponent :search="true" />

<UMain>
<NuxtLayout>
Expand All @@ -47,6 +54,13 @@ defineOgImageComponent('OgImageZK');

<FooterComponent />

<ClientOnly>
<LazyUContentSearch
:files="files"
:navigation="navigation || []"
/>
</ClientOnly>

<UNotifications />
</div>
</template>
1 change: 1 addition & 0 deletions content/tutorials/cross-chain-governance/_dir.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
title: Cross-chain governance
featured: true
authors:
- name: MatterLabs
url: https://matter-labs.io
Expand Down
2 changes: 1 addition & 1 deletion content/tutorials/daily-spend-limit-account/_dir.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
title: Native spend limit smart account
featured: true
authors:
- name: porco-rosso
url: https://linktr.ee/porcorossoj
Expand All @@ -22,4 +23,3 @@ tools:
- zksync-cli
- zksync-ethers
- Hardhat
related_tutorials:
1 change: 0 additions & 1 deletion content/tutorials/dapp-nft-paymaster/_dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ tools:
- zksync-ethers
- Hardhat
- react
related_tutorials:
3 changes: 1 addition & 2 deletions content/tutorials/erc20-paymaster/_dir.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
title: Build an ERC20 custom paymaster
featured: true
authors:
- name: MatterLabs
url: https://matter-labs.io
Expand All @@ -23,5 +24,3 @@ tools:
- zksync-cli
- zksync-ethers
- Hardhat
related_tutorials:
- /tutorials/another-tutorial
2 changes: 0 additions & 2 deletions content/tutorials/frontend-paymaster/_dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,3 @@ tools:
- zksync-cli
- zksync-ethers
- Hardhat
related_tutorials:
- /tutorials/another-tutorial
3 changes: 1 addition & 2 deletions content/tutorials/guide-dipdup-indexer/_dir.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
title: Create an indexer with DipDup
featured: true
authors:
- name: DipDup
url: https://dipdup.io
Expand All @@ -18,5 +19,3 @@ updated: 2024-05-09
tools:
- DipDup
- Python
related_tutorials:
- /tutorials/another-tutorial
2 changes: 0 additions & 2 deletions content/tutorials/guide-subquery/_dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,3 @@ updated: 2024-05-09
tools:
- SubQuery
- GraphQL
related_tutorials:
- /tutorials/another-tutorial
2 changes: 0 additions & 2 deletions content/tutorials/guide-the-graph/_dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,3 @@ updated: 2024-05-09
tools:
- theGraph
- GraphQL
related_tutorials:
- /tutorials/another-tutorial
3 changes: 1 addition & 2 deletions content/tutorials/guide-viem/_dir.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
title: Using viem with zkSync
featured: true
authors:
- name: MatterLabs
url: https://matter-labs.io
Expand All @@ -18,5 +19,3 @@ what_you_will_learn:
updated: 2024-05-09
tools:
- viem
related_tutorials:
- /tutorials/another-tutorial
2 changes: 0 additions & 2 deletions content/tutorials/guide-wagmi/_dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@ what_you_will_learn:
updated: 2024-05-09
tools:
- wagmi
related_tutorials:
- /tutorials/another-tutorial
2 changes: 0 additions & 2 deletions content/tutorials/guide-walletconnect/_dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ what_you_will_learn:
updated: 2024-05-09
tools:
- walletconnect
related_tutorials:
- /tutorials/another-tutorial
3 changes: 1 addition & 2 deletions content/tutorials/guide-web3js/_dir.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
title: Using web3.js to interact with zkSync
featured: true
authors:
- name: ChainSafe
url: https://web3js.org/
Expand All @@ -16,5 +17,3 @@ what_you_will_learn:
updated: 2024-05-09
tools:
- web3.js
related_tutorials:
- /tutorials/another-tutorial
2 changes: 0 additions & 2 deletions content/tutorials/how-to-deploy-contract/_dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,3 @@ updated: 2024-05-09
tools:
- hardhat-zksync-deploy
- hardhat-zksync-ethers
related_tutorials:
- /tutorials/another-tutorial
2 changes: 0 additions & 2 deletions content/tutorials/how-to-deposit-erc20/_dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ what_you_will_learn:
updated: 2024-05-09
tools:
- zksync-ethers
related_tutorials:
- /tutorials/another-tutorial
2 changes: 0 additions & 2 deletions content/tutorials/how-to-deposit-eth/_dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ what_you_will_learn:
updated: 2024-05-09
tools:
- zksync-ethers
related_tutorials:
- /tutorials/another-tutorial
2 changes: 0 additions & 2 deletions content/tutorials/how-to-send-l2-l1-message/_dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@ updated: 2024-05-09
tools:
- zksync-ethers
- zksync-contracts
related_tutorials:
- /tutorials/another-tutorial
2 changes: 0 additions & 2 deletions content/tutorials/how-to-test-contracts/_dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ updated: 2024-05-09
tools:
- zksync-ethers
- era-test-node
related_tutorials:
- /tutorials/another-tutorial
2 changes: 0 additions & 2 deletions content/tutorials/how-to-verify-contracts/_dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@ updated: 2024-05-09
tools:
- hardhat-zksync-deploy
- hardhat-zksync-verify
related_tutorials:
- /tutorials/another-tutorial
2 changes: 0 additions & 2 deletions content/tutorials/how-to-withdraw-erc20/_dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ what_you_will_learn:
updated: 2024-05-09
tools:
- zksync-ethers
related_tutorials:
- /tutorials/another-tutorial
2 changes: 0 additions & 2 deletions content/tutorials/how-to-withdraw-eth/_dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ what_you_will_learn:
updated: 2024-05-09
tools:
- zksync-ethers
related_tutorials:
- /tutorials/another-tutorial
2 changes: 0 additions & 2 deletions content/tutorials/native-aa-multisig/_dir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,3 @@ tools:
- zksync-cli
- zksync-ethers
- Hardhat
related_tutorials:
- /tutorials/another-tutorial
2 changes: 1 addition & 1 deletion error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ provide('navigation', navigation);

<template>
<div>
<HeaderComponent :links="[]" />
<HeaderComponent :search="true" />

<UMain>
<UContainer>
Expand Down
15 changes: 14 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,20 @@ export default defineNuxtConfig({
},
content: {
navigation: {
fields: ['authors', 'tags', 'summary', 'updated', 'tools', 'featured', 'description'],
fields: [
'authors',
'tags',
'summary',
'updated',
'tools',
'featured',
'description',
'github_repo',
'what_you_will_learn',
],
},
},
routeRules: {
'/api/search.json': { prerender: true },
},
});
37 changes: 15 additions & 22 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const navigation = inject<Ref<NavItem[]>>('navigation');
const guides = computed(() => {
const tutorialPath = navigation?.value.find((item) => item._path === '/tutorials') ?? { children: [] };
return tutorialPath.children;
return tutorialPath.children?.filter((tutorial) => tutorial.featured);
});
useSeoMeta({
Expand All @@ -33,6 +33,7 @@ useSeoMeta({
size: 'xl',
},
]"
:ui="{ description: 'backdrop-blur bg-background/65' }"
>
<template #headline>
<NuxtImg
Expand All @@ -43,37 +44,29 @@ useSeoMeta({
</template>

<UPageGrid>
<SiteLink
<ULandingCard
v-for="(guide, index) of guides"
:key="index"
:to="guide._path"
class="hover:border-zkPurple-300 rounded-lg border-2 border-transparent transition-colors duration-200 ease-in-out"
:title="guide.title"
:description="guide.summary"
:ui="{ body: { base: 'justify-between' } }"
>
<UCard>
<span class="mb-4 inline-block text-lg font-semibold">
{{ guide.title }}
</span>

<p>{{ guide.summary }}</p>

<AuthorsList
class="my-4"
:authors="guide.authors"
/>

<div class="mt-4">
<div class="mt-auto">
<AuthorsList :authors="guide.authors" />
<div class="mt-2">
<UBadge
v-for="tag in guide.tags"
:key="tag"
v-for="(tag, index) of guide.tags"
:key="index"
:label="tag"
color="blue"
size="sm"
size="xs"
variant="subtle"
class="mb-2 mr-2"
class="mr-2"
/>
</div>
</UCard>
</SiteLink>
</div>
</ULandingCard>
</UPageGrid>
</ULandingSection>
</div>
Expand Down
Loading

0 comments on commit d648220

Please sign in to comment.