diff --git a/src/components/AccountSidebar.astro b/src/components/AccountSidebar.astro index 642fd1e52..03e321f9f 100644 --- a/src/components/AccountSidebar.astro +++ b/src/components/AccountSidebar.astro @@ -18,6 +18,15 @@ const sidebarLinks = [ classes: 'h-3 w-4', } }, + { + href: '/account/road-card', + title: 'Road Card', + id: 'road-card', + icon: { + glyph: 'user', + classes: 'h-4 w-4', + } + }, { href: '/account/update-profile', title: 'Profile', diff --git a/src/components/RoadCard/RoadCardPage.tsx b/src/components/RoadCard/RoadCardPage.tsx new file mode 100644 index 000000000..1c913583f --- /dev/null +++ b/src/components/RoadCard/RoadCardPage.tsx @@ -0,0 +1,150 @@ +import Cookies from 'js-cookie'; +import { TOKEN_COOKIE_NAME, decodeToken } from '../../lib/jwt'; + +export function RoadCardPage() { + const token = Cookies.get(TOKEN_COOKIE_NAME); + if (!token) { + return null; + } + + const user = decodeToken(token); + console.log(user); + + const textareaContent = ` + + Road Card + + `.trim(); + + return ( +
+
+

Grab your #RoadCard

+

+ Pick a badge and share your progress with the world. +

+
+ +
+
+ + Road Card + + +
+ + + Copy Link + +
+
+
+ Embed + +

+ You can include it on your website or follow the instructions to{' '} + + include it on your GitHub profile. + +

+
+
+ +
+
+ + Road Card + + +
+ + Download + + + Copy Link + +
+
+
+ Embed + +

+ You can include it on your website or follow the instructions to{' '} + + include it on your GitHub profile. + +

+
+
+
+ ); +} diff --git a/src/pages/account/road-card.astro b/src/pages/account/road-card.astro new file mode 100644 index 000000000..31dcdf557 --- /dev/null +++ b/src/pages/account/road-card.astro @@ -0,0 +1,14 @@ +--- +import AccountSidebar from '../../components/AccountSidebar.astro'; +import AccountLayout from '../../layouts/AccountLayout.astro'; +import { RoadCardPage } from '../../components/RoadCard/RoadCardPage'; +--- + + + + + + diff --git a/src/styles/global.css b/src/styles/global.css index fb3c8fe0b..ba9c6535c 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -6,6 +6,16 @@ .container { @apply mx-auto max-w-[830px] px-4; } + + /* Chrome, Safari and Opera */ + .no-scrollbar::-webkit-scrollbar { + display: none; + } + + .no-scrollbar { + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ + } } blockquote p:before {