From f4a3e9838588d8d0f06fc5875498eeed156a9001 Mon Sep 17 00:00:00 2001 From: devinxl Date: Thu, 16 May 2024 16:41:03 +0800 Subject: [PATCH] feat(dcellar-web-ui): add discord and release note link --- ...t_v0.1.1.min.js => iconfont_v0.1.2.min.js} | 2 +- .../src/components/layout/Nav/index.tsx | 57 +++++++++++++++---- apps/dcellar-web-ui/src/pages/_document.tsx | 2 +- 3 files changed, 47 insertions(+), 14 deletions(-) rename apps/dcellar-web-ui/public/js/{iconfont_v0.1.1.min.js => iconfont_v0.1.2.min.js} (98%) diff --git a/apps/dcellar-web-ui/public/js/iconfont_v0.1.1.min.js b/apps/dcellar-web-ui/public/js/iconfont_v0.1.2.min.js similarity index 98% rename from apps/dcellar-web-ui/public/js/iconfont_v0.1.1.min.js rename to apps/dcellar-web-ui/public/js/iconfont_v0.1.2.min.js index 5057417d..1e4a3576 100644 --- a/apps/dcellar-web-ui/public/js/iconfont_v0.1.1.min.js +++ b/apps/dcellar-web-ui/public/js/iconfont_v0.1.2.min.js @@ -1 +1 @@ -!function(e){var t,n,d,o,i,a,r='';function c(){i||(i=!0,d())}t=function(){var e,t,n;(n=document.createElement("div")).innerHTML=r,r=null,(t=n.getElementsByTagName("svg")[0])&&(t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",e=t,(n=document.body).firstChild?(t=n.firstChild).parentNode.insertBefore(e,t):n.appendChild(e))},document.addEventListener?["complete","loaded","interactive"].indexOf(document.readyState)>-1?setTimeout(t,0):(n=function(){document.removeEventListener("DOMContentLoaded",n,!1),t()},document.addEventListener("DOMContentLoaded",n,!1)):document.attachEvent&&(d=t,o=e.document,i=!1,(a=function(){try{o.documentElement.doScroll("left")}catch(e){return void setTimeout(a,50)}c()})(),o.onreadystatechange=function(){"complete"==o.readyState&&(o.onreadystatechange=null,c())})}(window); \ No newline at end of file +!function(e){var t,n,d,o,i,a,r='';function c(){i||(i=!0,d())}t=function(){var e,t,n;(n=document.createElement("div")).innerHTML=r,r=null,(t=n.getElementsByTagName("svg")[0])&&(t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",e=t,(n=document.body).firstChild?(t=n.firstChild).parentNode.insertBefore(e,t):n.appendChild(e))},document.addEventListener?["complete","loaded","interactive"].indexOf(document.readyState)>-1?setTimeout(t,0):(n=function(){document.removeEventListener("DOMContentLoaded",n,!1),t()},document.addEventListener("DOMContentLoaded",n,!1)):document.attachEvent&&(d=t,o=e.document,i=!1,(a=function(){try{o.documentElement.doScroll("left")}catch(e){return void setTimeout(a,50)}c()})(),o.onreadystatechange=function(){"complete"==o.readyState&&(o.onreadystatechange=null,c())})}(window); \ No newline at end of file diff --git a/apps/dcellar-web-ui/src/components/layout/Nav/index.tsx b/apps/dcellar-web-ui/src/components/layout/Nav/index.tsx index 1a262b66..37e96621 100644 --- a/apps/dcellar-web-ui/src/components/layout/Nav/index.tsx +++ b/apps/dcellar-web-ui/src/components/layout/Nav/index.tsx @@ -1,7 +1,7 @@ import { IconFont } from '@/components/IconFont'; import { css } from '@emotion/react'; import styled from '@emotion/styled'; -import { Box, Text } from '@node-real/uikit'; +import { Box, Flex, Text, Tooltip } from '@node-real/uikit'; import Link from 'next/link'; import { useRouter } from 'next/router'; import { memo } from 'react'; @@ -43,9 +43,21 @@ const ASIDE = [ { link: 'https://docs.bnbchain.org/greenfield-docs/', trackId: 'dc.main.nav.doc.click', - icon: 'doc', + icon: 'book', text: 'BNB Greenfield Docs', }, + { + link: 'https://docs.bnbchain.org/greenfield-docs/docs/release-notes/releaseNotes/', + trackId: 'dc.main.nav.release_note.click', + icon: 'doc', + text: 'Release Notes', + }, + { + link: 'https://discord.com/invite/bnbchain', + trackId: 'dc.main.nav.discord.click', + icon: 'discord', + text: 'Discord', + }, { link: 'https://docs.nodereal.io/docs/dcellar-get-started', trackId: 'dc.main.nav.faq.click', @@ -78,18 +90,38 @@ export const Nav = memo(function Nav() { ); })} - + {ASIDE.map((menu) => ( - - - - - - {menu.text} - - + + + + + + + + + ))} - + ); }); @@ -114,6 +146,7 @@ const MenuItem = styled.li<{ $active?: boolean }>` position: relative; font-weight: 500; transition: all 0.15s; + list-style-type: none; a { display: grid; gap: 12px; diff --git a/apps/dcellar-web-ui/src/pages/_document.tsx b/apps/dcellar-web-ui/src/pages/_document.tsx index e45554c8..c150f269 100644 --- a/apps/dcellar-web-ui/src/pages/_document.tsx +++ b/apps/dcellar-web-ui/src/pages/_document.tsx @@ -26,7 +26,7 @@ export default function Document() { __html: `window.__ASSET_PREFIX = ${flatted.stringify(assetPrefix)}`, }} > - +