diff --git a/.env.example b/.env.example index 065c5658..5fe4e9ef 100644 --- a/.env.example +++ b/.env.example @@ -3,7 +3,7 @@ #### And inline by Next.js during docker build ############################################################# -NEXT_PUBLIC_APP_NAME=xlog +NEXT_PUBLIC_APP_NAME=XLog NEXT_PUBLIC_OUR_DOMAIN=localhost:3000 NEXT_PUBLIC_DISCORD_LINK="https://discord.gg/9XscSqJEq4" NEXT_PUBLIC_GITHUB_LINK="https://github.com/Crossbell-Box/xlog" diff --git a/package.json b/package.json index 1e16a019..a348039e 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,7 @@ "react-dom": "^18.1.0", "react-hook-form": "^7.31.1", "react-hot-toast": "^2.2.0", + "react-scroll": "^1.8.7", "react-sortablejs": "^6.1.1", "refractor": "^4.7.0", "rehype-prism-plus": "^1.4.0", @@ -106,6 +107,7 @@ "@types/react": "^18.0.9", "@types/react-avatar-editor": "^12.0.0", "@types/react-dom": "^18.0.3", + "@types/react-scroll": "^1.8.4", "@types/sortablejs": "^1.13.0", "@types/ua-parser-js": "^0.7.36", "@types/uuid": "^8.3.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2b410fcc..01759064 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,6 +38,7 @@ specifiers: '@types/react': ^18.0.9 '@types/react-avatar-editor': ^12.0.0 '@types/react-dom': ^18.0.3 + '@types/react-scroll': ^1.8.4 '@types/sortablejs': ^1.13.0 '@types/ua-parser-js': ^0.7.36 '@types/uuid': ^8.3.4 @@ -81,6 +82,7 @@ specifiers: react-dom: ^18.1.0 react-hook-form: ^7.31.1 react-hot-toast: ^2.2.0 + react-scroll: ^1.8.7 react-sortablejs: ^6.1.1 refractor: ^4.7.0 rehype-prism-plus: ^1.4.0 @@ -156,6 +158,7 @@ dependencies: react-dom: 18.2.0_react@18.2.0 react-hook-form: 7.33.0_react@18.2.0 react-hot-toast: 2.2.0_biqbaboplfbrettd7655fr4n2y + react-scroll: 1.8.7_biqbaboplfbrettd7655fr4n2y react-sortablejs: 6.1.4_yi7d4rnqh6snv6o2bvvwtjnph4 refractor: 4.7.0 rehype-prism-plus: 1.4.1 @@ -195,6 +198,7 @@ devDependencies: '@types/react': 18.0.14 '@types/react-avatar-editor': 12.0.0 '@types/react-dom': 18.0.5 + '@types/react-scroll': 1.8.4 '@types/sortablejs': 1.13.0 '@types/ua-parser-js': 0.7.36 '@types/uuid': 8.3.4 @@ -2081,6 +2085,12 @@ packages: '@types/react': 18.0.14 dev: true + /@types/react-scroll/1.8.4: + resolution: {integrity: sha512-DpHA9PYw42/rBrfKbGE/kAEvHRfyDL/ACfKB/ORWUYuCLi/yGrntxSzYXmg/7TLgQsJ5ma13GCDOzFSOz+8XOA==} + dependencies: + '@types/react': 18.0.14 + dev: true + /@types/react/18.0.14: resolution: {integrity: sha512-x4gGuASSiWmo0xjDLpm5mPb52syZHJx02VKbqUKdLmKtAwIh63XClGsiTI1K6DO5q7ox4xAsQrU+Gl3+gGXF9Q==} dependencies: @@ -6132,6 +6142,10 @@ packages: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true + /lodash.throttle/4.1.1: + resolution: {integrity: sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==} + dev: false + /lodash/4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} dev: false @@ -7698,6 +7712,18 @@ packages: use-sidecar: 1.1.2_luyos4mouogwq6z3wafb3re4ce dev: false + /react-scroll/1.8.7_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-fBOIwweAlhicx8RqP9tQXn/Uhd+DTtVRjw+0VBsIn1Z+MjRYLhTZ0tMoTAU1vOD3dce8mI6copexI4yWII+Luw==} + peerDependencies: + react: ^15.5.4 || ^16.0.0 || ^17.0.0 || ^18.0.0 + react-dom: ^15.5.4 || ^16.0.0 || ^17.0.0 || ^18.0.0 + dependencies: + lodash.throttle: 4.1.1 + prop-types: 15.8.1 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + dev: false + /react-sortablejs/6.1.4_yi7d4rnqh6snv6o2bvvwtjnph4: resolution: {integrity: sha512-fc7cBosfhnbh53Mbm6a45W+F735jwZ1UFIYSrIqcO/gRIFoDyZeMtgKlpV4DdyQfbCzdh5LoALLTDRxhMpTyXQ==} peerDependencies: diff --git a/public/screenshot2.png b/public/screenshot2.png index 65e82adb..8d0dda23 100644 Binary files a/public/screenshot2.png and b/public/screenshot2.png differ diff --git a/src/components/main/MainLayout.tsx b/src/components/main/MainLayout.tsx index 1bed9b51..c79ceba7 100644 --- a/src/components/main/MainLayout.tsx +++ b/src/components/main/MainLayout.tsx @@ -4,13 +4,16 @@ import { UniLink } from "../ui/UniLink" import { ConnectButton } from "../common/ConnectButton" import { getSiteLink } from "~/lib/helpers" import Image from "next/image" +import { Link } from "react-scroll" export function MainLayout({ children, title, + tabs, }: { children?: React.ReactNode title?: string + tabs?: string[] }) { return ( <> @@ -19,45 +22,57 @@ export function MainLayout({ siteName={APP_NAME} description={APP_DESCRIPTION} /> -
+
-
+
{APP_NAME}
- {APP_NAME.toUpperCase()}
-
+
+ {tabs?.map((tab, index) => ( + + {tab} + + ))}
{children} -