diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 22be4917..00000000 --- a/.eslintignore +++ /dev/null @@ -1,8 +0,0 @@ -.output -.nuxt -*.d.ts -**/node_modules/** -**/build/** -**/dist/** -**/coverage/** -**/.*/** diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index e9fca7d4..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "env": { - "browser": true, - "es2021": true, - "node": true - }, - "extends": ["eslint:recommended", "plugin:vue/vue3-essential", "@nuxt/eslint-config"], - "plugins": ["vue"], - "rules": { - "quote-props": ["error", "as-needed"], - "vue/html-self-closing": [ - "error", - { - "html": { - "void": "always" - } - } - ], - "vue/singleline-html-element-content-newline": "off", - "vue/html-self-closing": "off" - } -} diff --git a/.vscode/settings.json b/.vscode/settings.json index 7cbd388d..32a3f97e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,5 +18,6 @@ "strings": "off" }, "editor.tabCompletion": "onlySnippets" - } + }, + "eslint.experimental.useFlatConfig": true } diff --git a/README.md b/README.md index ebf90395..aaf6ac5a 100644 --- a/README.md +++ b/README.md @@ -1,125 +1,62 @@ -![nuxt-ui-docs-social-card](https://github.com/nuxt-ui-pro/docs/assets/739984/f64e13d9-9ae0-4e03-bf7f-6be4c36cd9ba) +# Community Code -# Nuxt UI Pro - Docs template +Welcome to the ZKsync Community Code repository. This project serves as the community hub for ZKsync, providing comprehensive +documentation for developers written by developers. +Whether you're a beginner looking to get started with ZKsync or an experienced developer +seeking advanced guides, you'll find the resources you need here. -[![Nuxt UI Pro](https://img.shields.io/badge/Made%20with-Nuxt%20UI%20Pro-00DC82?logo=nuxt.js&labelColor=020420)](https://ui.nuxt.com/pro) -[![Nuxt Studio](https://img.shields.io/badge/Open%20in%20Nuxt%20Studio-18181B?&logo=nuxt.js&logoColor=3BB5EC)](https://nuxt.studio/themes/docs) +## Tools used -- [Live demo](https://docs-template.nuxt.dev/) -- [Play on Stackblitz](https://stackblitz.com/github/nuxt-ui-pro/docs) -- [Documentation](https://ui.nuxt.com/pro/getting-started) -- [Clone on Nuxt Studio](https://nuxt.studio/themes/docs) +- [Vue](https://vuejs.org/) +- [Nuxt](https://nuxt.com/) +- [Nuxt Content](https://content.nuxt.com/) +- [Nuxt UI & Nuxt UI Pro](https://ui.nuxt.com/) +- [Tailwind](https://tailwindcss.com/) +- [Bun](https://bun.sh/) -## Quick Start +## Local Setup -```bash [Terminal] -npx nuxi init -t github:nuxt-ui-pro/docs -``` - -## Setup - -Make sure to install the dependencies: - -```bash -# npm -npm install - -# pnpm -pnpm install - -# yarn -yarn install +This project uses bun to run, follow the [bun installation instructions](https://bun.sh/docs/installation). Once bun is +installed, run the following command to install all project dependencies: -# bun +```shell bun install ``` -## Development Server - -Start the development server on `http://localhost:3000`: - -```bash -# npm -npm run dev - -# pnpm -pnpm run dev - -# yarn -yarn dev - -# bun -bun run dev -``` - -## Production - -Build the application for production: - -```bash -# npm -npm run build +## Development -# pnpm -pnpm run build +To run the project locally at `http://localhost:3000` -# yarn -yarn build - -# bun -bun run build +```shell +bun run dev -o ``` -Locally preview production build: - -```bash -# npm -npm run preview - -# pnpm -pnpm run preview +## Local Preview -# yarn -yarn preview +To locally preview the production build, first run `bun run generate` to build the project, then run the following: -# bun +```shell bun run preview ``` -Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. +## Lint & Formatting -## Nuxt Studio integration +This project provides lint commands to check the project. -Add `@nuxthq/studio` dependency to your package.json: +### Markdown Linting -```bash -# npm -npm install --save-dev @nuxthq/studio +Markdown files are found in the `/content` directory. The following lint commands will run within that directory: -# pnpm -pnpm add -D @nuxthq/studio - -# yarn -yarn add -D @nuxthq/studio - -# bun -bun add -d @nuxthq/studio -``` - -Add this module to your `nuxt.config.ts`: - -```ts -export default defineNuxtConfig({ - ... - modules: [ - ... - '@nuxthq/studio' - ] -}) +```shell +bun run lint:spelling +bun run lint:markdown ``` -Read more on [Nuxt Studio docs](https://nuxt.studio/docs/projects/setup). +### Linting -## Renovate integration +The following commands are available to run linting on the project: -Install [Renovate GitHub app](https://github.com/apps/renovate/installations/select_target) on your repository and you are good to go. +```shell +bun run lint:prettier +bun run lint:eslint +``` diff --git a/app.config.ts b/app.config.ts index bec4bd3e..79fdd7ab 100644 --- a/app.config.ts +++ b/app.config.ts @@ -1,95 +1,22 @@ export default defineAppConfig({ - ui: { - variables: { - light: { - background: '255 252 255', - // foreground: '147 68 68', - }, - dark: { - background: '17 20 43', - // foreground: 'var(--color-gray-200)', - }, - // header: { - // height: '1rem', - // }, - }, - primary: 'zkPurple', - gray: 'zkSlate', - footer: { - bottom: { - left: 'text-sm text-gray-500 dark:text-gray-400', - wrapper: 'border-t border-gray-200 dark:border-gray-800', - }, - }, - content: { - prose: { - code: { - icon: { - go: 'vscode-icons:file-type-go', - vyper: 'devicon:vyper', - sol: 'vscode-icons:file-type-solidity', - }, - }, - }, - }, - }, seo: { - siteName: 'zkSync Community Cookbook', + siteName: 'ZKsync Community Code', }, header: { - logo: { - alt: '', - light: '/logos/zksync_logo_black.svg', - dark: '/logos/zksync_logo.svg', - }, - search: false, - colorMode: true, links: [ { icon: 'i-simple-icons-github', - to: 'https://github.com/matter-labs/zksync-docs', - target: '_blank', - 'aria-label': 'zkSync Docs on GitHub', - title: 'zkSync Docs on GitHub', - }, - ], - }, - footer: { - credits: 'Made with ❤️ by Matter Labs & Community', - colorMode: false, - links: [ - { - icon: 'i-zksync-matterlabs-logo', - to: 'https://matter-labs.io', - target: '_blank', - 'aria-label': 'MatterLabs Website', - }, - { - icon: 'i-simple-icons-x', - to: 'https://x.com/zksync', - target: '_blank', - 'aria-label': 'zkSync on X', - }, - { - icon: 'i-simple-icons-github', - to: 'https://github.com/matter-labs', - target: '_blank', - 'aria-label': 'zkSync on GitHub', - }, - { - icon: 'i-simple-icons-discord', - to: 'https://join.zksync.dev/', + to: 'https://github.com/zkSync-Community-Hub/community-code', target: '_blank', - 'aria-label': 'zkSync on Discord', + 'aria-label': 'Community Code on GitHub', + title: 'Community Code on GitHub', }, ], }, toc: { - title: 'Table of Contents', bottom: { - title: '', - edit: 'https://github.com/matter-labs/zksync-docs/edit/staging/content', - feedback: 'https://github.com/matter-labs/zksync-docs/issues/new?labels=documentation', + edit: 'https://github.com/zkSync-Community-Hub/community-code/edit/staging/content', + feedback: 'https://github.com/zkSync-Community-Hub/community-code/issues/new', links: [], }, }, diff --git a/app.vue b/app.vue index 48124ab0..6a1cbbdf 100644 --- a/app.vue +++ b/app.vue @@ -1,6 +1,5 @@ @@ -49,7 +49,7 @@ provide('navigation', navigation);
- + @@ -57,7 +57,8 @@ provide('navigation', navigation); - + +
diff --git a/assets/zksync-icons.ts b/assets/zksync-icons.ts deleted file mode 100644 index 5b347a6b..00000000 --- a/assets/zksync-icons.ts +++ /dev/null @@ -1,35 +0,0 @@ -export const zksyncIcons = { - icons: { - logo: { - body: '', - }, - 'matterlabs-logo': { - // svg body - body: '', - // svg width and height, optional - width: 24, - height: 24, - }, - 'atlas-zk-logo': { - body: ` - - - `, - }, - 'remix-logo': { - body: ` - - - - `, - }, - }, -}; diff --git a/bun.lockb b/bun.lockb index 2b4c7151..35c482c2 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/components/AppFooter.vue b/components/AppFooter.vue deleted file mode 100644 index a5dc4a5f..00000000 --- a/components/AppFooter.vue +++ /dev/null @@ -1,23 +0,0 @@ - - - diff --git a/components/AppHeader.vue b/components/AppHeader.vue deleted file mode 100644 index 8d83e6c4..00000000 --- a/components/AppHeader.vue +++ /dev/null @@ -1,54 +0,0 @@ - - - diff --git a/components/OgImage/OgImageCommunityCode.vue b/components/OgImage/OgImageCommunityCode.vue new file mode 100644 index 00000000..cc0e1eb0 --- /dev/null +++ b/components/OgImage/OgImageCommunityCode.vue @@ -0,0 +1,29 @@ + + + diff --git a/components/OgImage/OgImageDocs.vue b/components/OgImage/OgImageDocs.vue deleted file mode 100644 index f91283fd..00000000 --- a/components/OgImage/OgImageDocs.vue +++ /dev/null @@ -1,1704 +0,0 @@ - - - diff --git a/components/content/CheckIcon.vue b/components/content/CheckIcon.vue deleted file mode 100644 index 6c9f6ca0..00000000 --- a/components/content/CheckIcon.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - diff --git a/components/content/ContentSwitcher.vue b/components/content/ContentSwitcher.vue deleted file mode 100644 index 19e1ab7c..00000000 --- a/components/content/ContentSwitcher.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - diff --git a/components/content/DisplayPartial.vue b/components/content/DisplayPartial.vue deleted file mode 100644 index 7eead62f..00000000 --- a/components/content/DisplayPartial.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - diff --git a/components/content/DropPanel/DropPanel.vue b/components/content/DropPanel/DropPanel.vue deleted file mode 100644 index cc788770..00000000 --- a/components/content/DropPanel/DropPanel.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - diff --git a/components/content/DropPanel/Panel.vue b/components/content/DropPanel/Panel.vue deleted file mode 100644 index 251e2f20..00000000 --- a/components/content/DropPanel/Panel.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/components/content/ImgPreview.vue b/components/content/ImgPreview.vue deleted file mode 100644 index 4a9b7694..00000000 --- a/components/content/ImgPreview.vue +++ /dev/null @@ -1,86 +0,0 @@ - - - diff --git a/components/content/ProseA.vue b/components/content/ProseA.vue deleted file mode 100644 index 007793fc..00000000 --- a/components/content/ProseA.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - diff --git a/components/content/ProseCodeInline.vue b/components/content/ProseCodeInline.vue deleted file mode 100644 index 5e85672e..00000000 --- a/components/content/ProseCodeInline.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/components/content/ProseImg.vue b/components/content/ProseImg.vue deleted file mode 100644 index dc8c0790..00000000 --- a/components/content/ProseImg.vue +++ /dev/null @@ -1,48 +0,0 @@ - - - diff --git a/content/_zksync.json b/content/_zksync.json deleted file mode 100644 index 968972f8..00000000 --- a/content/_zksync.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "zkevm": { - "label": "zkSync VM" - }, - "mainnet": { - "name": "zkSync Era Mainnet", - "identifier": "mainnet", - "rpc_url": "https://mainnet.era.zksync.io", - "websocket_url": "wss://mainnet.era.zksync.io/ws", - "chain_id": 324, - "currency_symbol": "ETH", - "block_explorer_url": "https://explorer.zksync.io" - }, - "testnet": { - "name": "zkSync Era Testnet", - "identifier": "sepolia", - "rpc_url": "https://sepolia.era.zksync.dev", - "websocket_url": "wss://sepolia.era.zksync.dev/ws", - "chain_id": 280, - "currency_symbol": "ETH", - "block_explorer_url": "https://sepolia.explorer.zksync.io" - }, - "git_repo": { - "block-explorer": "https://github.com/matter-labs/block-explorer", - "era-boojum": "https://github.com/matter-labs/era-boojum", - "era-compiler-llvm": "https://github.com/matter-labs/era-compiler-llvm", - "era-compiler-llvm-context": "https://github.com/matter-labs/era-compiler-llvm-context", - "era-compiler-solidity": "https://github.com/matter-labs/era-compiler-solidity", - "era-compiler-vyper": "https://github.com/matter-labs/era-compiler-vyper", - "era-contracts": "https://github.com/matter-labs/era-contracts", - "era-hardhat-with-plugins": "https://github.com/matter-labs/era-hardhat-with-plugins", - "era-test-node": "https://github.com/matter-labs/era-test-node", - "era-solidity": "https://github.com/matter-labs/era-solidity", - "era-zkEVM-assembly": "https://github.com/matter-labs/era-zkEVM-assembly", - "era-zkevm_circuits": "https://github.com/matter-labs/era-zkevm_circuits", - "era-zkevm_test_harness": "https://github.com/matter-labs/era-zkevm_test_harness", - "eravm-spec": "https://matter-labs.github.io/eravm-spec", - "foundry-zksync": "https://github.com/matter-labs/foundry-zksync", - "franklin-crypto": "https://github.com/matter-labs/franklin-crypto", - "hardhat-zksync": "https://github.com/matter-labs/hardhat-zksync", - "local-setup": "https://github.com/matter-labs/local-setup", - "matter-labs-github-io": "https://matter-labs.github.io", - "zksolc-bin": "https://github.com/matter-labs/zksolc-bin", - "zksync-cli": "https://github.com/matter-labs/zksync-cli", - "zksync-contract-templates": "https://github.com/matter-labs/zksync-contract-templates", - "zksync-developers": "https://github.com/zkSync-Community-Hub/zksync-developers", - "zksync-docs": "https://github.com/matter-labs/zksync-docs", - "zksync-era": "https://github.com/matter-labs/zksync-era", - "zksync-frontend-templates": "https://github.com/matter-labs/zksync-frontend-templates", - "zksync-scripting-templates": "https://github.com/matter-labs/zksync-scripting-templates", - "zkvyper-bin": "https://github.com/matter-labs/zkvyper-bin" - } -} diff --git a/content/index.yml b/content/index.yml index a59aaee6..afa9c7be 100644 --- a/content/index.yml +++ b/content/index.yml @@ -1,10 +1,7 @@ -title: 'zkSync Community Cookbook' -description: - Nuxt UI Pro is a collection of premium Vue components built on top of Nuxt UI to create beautiful & responsive Nuxt - applications in minutes. -navigation: false +title: 'zkSync Code Community' +description: Contribute and share code for the zkSync community! features: - title: 'All-in-one docs template' + title: 'Community Contributed Guides for zkSync' links: - label: 'Explore community guides' trailingIcon: 'i-heroicons-arrow-right-20-solid' diff --git a/error.vue b/error.vue index a6c0ca61..da611b50 100644 --- a/error.vue +++ b/error.vue @@ -31,7 +31,7 @@ provide('navigation', navigation);