diff --git a/public/fonts/FTPolarMono-Medium.woff2 b/public/fonts/FTPolarMono-Medium.woff2 new file mode 100644 index 000000000..b5616580b Binary files /dev/null and b/public/fonts/FTPolarMono-Medium.woff2 differ diff --git a/public/fonts/FTPolarMono-Regular.woff2 b/public/fonts/FTPolarMono-Regular.woff2 new file mode 100644 index 000000000..3063f3565 Binary files /dev/null and b/public/fonts/FTPolarMono-Regular.woff2 differ diff --git a/public/fonts/TransSansPremium-Bold.woff2 b/public/fonts/TransSansPremium-Bold.woff2 new file mode 100644 index 000000000..a7617c982 Binary files /dev/null and b/public/fonts/TransSansPremium-Bold.woff2 differ diff --git a/public/scroll-docs-white.svg b/public/scroll-docs-white.svg new file mode 100644 index 000000000..2fa605bfc --- /dev/null +++ b/public/scroll-docs-white.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/scroll-white.svg b/public/scroll-white.svg index 2fa605bfc..4dbfc4c20 100644 --- a/public/scroll-white.svg +++ b/public/scroll-white.svg @@ -1,6 +1,6 @@ + viewBox="0 0 84.6 34.8" style="enable-background:new 0 0 84.6 34.8;" xml:space="preserve"> @@ -55,12 +55,4 @@ - - - - - - - - diff --git a/src/components/Aside.astro b/src/components/Aside.astro index a501e7fb0..9a385a2d7 100644 --- a/src/components/Aside.astro +++ b/src/components/Aside.astro @@ -40,7 +40,7 @@ const icons = { background-color: var(--aside-bg); /* display: flex; */ - @apply p-[30px] gap-4 rounded-[27px] text-info; + @apply p-[30px] gap-4 rounded-[27px] text-info mb-[1rem]; } aside p.title { diff --git a/src/components/Header/Header.astro b/src/components/Header/Header.astro index 250211b08..7ff764ff3 100644 --- a/src/components/Header/Header.astro +++ b/src/components/Header/Header.astro @@ -35,7 +35,7 @@ const section = frontmatter?.section ?? "" - + diff --git a/src/components/Header/Search/SearchModal.tsx b/src/components/Header/Search/SearchModal.tsx index f2b9c9ab9..263c2321e 100644 --- a/src/components/Header/Search/SearchModal.tsx +++ b/src/components/Header/Search/SearchModal.tsx @@ -12,20 +12,20 @@ const searchClient = algoliasearch(CONFIG.ALGOLIA.appId, CONFIG.ALGOLIA.publicAp const recommendedArticles = [ { - title: "Suggested Article A", - url: "/", + title: "User Guide", + url: "/en/user-guide", }, { - title: "Suggested Article B", - url: "/", + title: "Developer Quickstart", + url: "/en/developers/developer-quickstart", }, { - title: "Suggested Article C", - url: "/", + title: "Sepolia Testnet Contracts", + url: "/en/developers/alpha-testnet-contracts", }, { - title: "Suggested Article D", - url: "/", + title: "Architecture Overview", + url: "/en/technology/architecture/scroll-architecture", }, ] diff --git a/src/components/MarkmapView/MarkmapaView.tsx b/src/components/MarkmapView/MarkmapaView.tsx index 6c47eeb8f..a5016185d 100644 --- a/src/components/MarkmapView/MarkmapaView.tsx +++ b/src/components/MarkmapView/MarkmapaView.tsx @@ -4,7 +4,7 @@ import { Markmap } from 'markmap-view'; const transformer = new Transformer(); -export default function MarkmapHooks({value}) { +export default function MarkmapHooks({value, children}) { // Ref for SVG element const refSvg = useRef(); // Ref for markmap object @@ -21,7 +21,7 @@ export default function MarkmapHooks({value}) { // Update data for markmap once value is changed const mm = refMm.current; if (!mm) return; - const { root } = transformer.transform(value); + const { root } = transformer.transform(children?.props?.value || value); mm.setData(root); mm.fit(); }, [refMm.current, value]); diff --git a/src/components/MarkmapView/index.astro b/src/components/MarkmapView/index.astro index c60f0d4d4..fac0216dd 100644 --- a/src/components/MarkmapView/index.astro +++ b/src/components/MarkmapView/index.astro @@ -16,4 +16,14 @@ const data = (await fs.readFile(path.join(process.cwd(), "public", src), "utf-8" const cleanSrc = src.replace(/^\/+/, "") --- - + + { + ` + # markmap + - beautiful1 + - useful + - easy + - interactive + ` + } + diff --git a/src/config/site.ts b/src/config/site.ts index aba584b44..08e593ced 100644 --- a/src/config/site.ts +++ b/src/config/site.ts @@ -18,7 +18,8 @@ export const OPEN_GRAPH = { } // Uncomment this to add an "Edit this page" button to every page of documentation. -export const GITHUB_EDIT_URL = `https://github.com/scroll-tech/scroll-documentation/tree/main/` +// export const GITHUB_EDIT_URL = `https://github.com/scroll-tech/scroll-documentation/tree/main/` +export const GITHUB_EDIT_URL = `https://github.com/scroll-tech/scroll-documentation/tree/ui-refactor/` // Uncomment this to add an "Join our Community" button to every page of documentation. export const COMMUNITY_INVITE_URL = `https://discord.gg/scroll` diff --git a/src/layouts/MainLayout.astro b/src/layouts/MainLayout.astro index 3b38e5b56..e69da75ff 100644 --- a/src/layouts/MainLayout.astro +++ b/src/layouts/MainLayout.astro @@ -16,7 +16,7 @@ const { content = {}, frontmatter } = Astro.props const headings = Astro.props?.headings || Astro.props?.content?.astro.headings const currentPage = new URL(Astro.request.url).pathname -const currentFile = `src/pages${currentPage.replace(/\/$/, "")}.${frontmatter?.file.split(".").pop() || "md"}` +const currentFile = `src/content/docs${currentPage.replace(/\/$/, "")}.${frontmatter?.file.split(".").pop() || "md"}` const githubEditUrl = CONFIG.GITHUB_EDIT_URL + currentFile const formattedContentTitle = content.title ? `${content.title} | ${CONFIG.SITE.title}` @@ -46,6 +46,10 @@ changeLanguage(content.lang) href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@500&family=Roboto+Flex:opsz,wght@8..144,400;8..144,500;8..144,600&display=swap" rel="stylesheet" /> +