Skip to content

Commit

Permalink
feat: add new products, reconfigure, update footer
Browse files Browse the repository at this point in the history
  • Loading branch information
Rekard0 committed Oct 22, 2024
1 parent abaf238 commit 903b5f2
Show file tree
Hide file tree
Showing 11 changed files with 211 additions and 590 deletions.
9 changes: 9 additions & 0 deletions docs/governanceAppTemplate/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: governanceAppTemplate
sidebar_label: Introduction
sidebar_position: 0
---

## governanceAppTemplate

This section will contain guides.
9 changes: 9 additions & 0 deletions docs/governanceUiKit/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: governanceUiKit
sidebar_label: Introduction
sidebar_position: 0
---

## governanceUiKit

This section will contain guides.
171 changes: 55 additions & 116 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
require('dotenv').config();
const {themes} = require('prism-react-renderer');
const lightCodeTheme = themes.github,
Expand All @@ -24,17 +23,12 @@ const config = {
'@docusaurus/preset-classic',
{
docs: {
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
id: 'default',
path: 'docs/osx',
routeBasePath: '/', // OSx docs as the main entry point
sidebarPath: require.resolve('./sidebars/osxSidebar.js'),
remarkPlugins: [math],
rehypePlugins: [katex],
includeCurrentVersion: true,
lastVersion: 'current',
versions: {
current: {
label: '1.4.0-alpha',
},
},
},
theme: {
customCss: [
Expand All @@ -50,6 +44,51 @@ const config = {
],
],

plugins: [
// Governance UI Kit Documentation
[
'@docusaurus/plugin-content-docs',
{
id: 'governanceUiKit',
path: 'docs/governanceUiKit',
routeBasePath: 'governance-ui-kit',
sidebarPath: require.resolve('./sidebars/governanceUiKitSidebar.js'),
includeCurrentVersion: true,
},
],
// Governance App Template Documentation
[
'@docusaurus/plugin-content-docs',
{
id: 'governanceAppTemplate',
path: 'docs/governanceAppTemplate',
routeBasePath: 'governance-app-template',
sidebarPath: require.resolve(
'./sidebars/governanceAppTemplateSidebar.js',
),
includeCurrentVersion: true,
},
],
// Search Plugin
[
require.resolve('@cmfcmf/docusaurus-search-local'),
{
// Options here (default options are fine unless you have specific needs)
},
],
// Tailwind Plugin
async function TailwindPlugin(context, options) {
return {
name: 'docusaurus-tailwindcss',
configurePostCss(postcssOptions) {
postcssOptions.plugins.push(require('tailwindcss'));
postcssOptions.plugins.push(require('autoprefixer'));
return postcssOptions;
},
};
},
],

stylesheets: [
{
href: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css',
Expand All @@ -71,32 +110,19 @@ const config = {
items: [
{
type: 'docSidebar',
position: 'left',
sidebarId: 'osxSidebar',
label: 'Overview',
},
{
type: 'docSidebar',
position: 'left',
sidebarId: 'advancedSidebar',
label: 'Advanced',
label: 'Aragon OSx',
},
{
type: 'docSidebar',
to: '/governance-ui-kit', // Link to Governance UI Kit documentation
label: 'Governance UI Kit',
position: 'left',
sidebarId: 'guidesSidebar',
label: 'Guides',
},
{
type: 'docSidebar',
to: '/governance-app-template', // Link to Governance App Template documentation
label: 'Governance App Template',
position: 'left',
sidebarId: 'supportSidebar',
label: 'Support',
},
{
type: 'docsVersionDropdown',
position: 'right',
dropdownActiveClassDisabled: true,
},
],
},
Expand All @@ -117,48 +143,6 @@ const config = {

footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Tutorial',
to: '/docs/intro',
},
],
},
{
title: 'Community',
items: [
{
label: 'Stack Overflow',
href: 'https://ethereum.stackexchange.com/search?q=aragon',
},
{
label: 'Discord',
href: 'https://discord.gg/Wpk36QRdMN',
},
{
label: 'Twitter',
href: 'https://twitter.com/AragonProject/',
},
],
},
{
title: 'More',
items: [
{
label: 'Blog',
to: 'https://blog.aragon.org/',
},
{
label: 'GitHub',
href: 'https://github.com/aragon',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Aragon Association, Inc.`,
},
colorMode: {
defaultMode: 'light',
Expand All @@ -172,57 +156,12 @@ const config = {
announcementBar: {
id: 'register_to_dev_newsletter',
content:
'Register to our developer newsletter and get the latest updates on DAO tooling <a target="_blank" rel="noopener noreferrer" href="https://aragondevelopers.substack.com/">here</a></strong>!',
'Register to our developer newsletter and get the latest updates on DAO tooling <a target="_blank" rel="noopener noreferrer" href="https://aragondevelopers.substack.com/">here</a>!',
backgroundColor: '#3164fa',
textColor: '#fff',
isCloseable: true,
},
}),

plugins: [
[
require.resolve('@cmfcmf/docusaurus-search-local'),
{
// Options here
},
],
[
'@graphql-markdown/docusaurus',
{
schema: `./static/subgraph/schema-introspection-partial.json`,
rootPath: './versioned_docs/version-1.3.0',
baseURL: 'osx/subgraph/reference-guide',
homepage: './static/subgraph/index.md',
linkRoot: '/1.3.0',
loaders: {
JsonFileLoader: {
module: '@graphql-tools/json-file-loader',
options: {
rootTypes: {
query: '',
subscription: '',
mutation: '',
},
},
},
},
printTypeOptions: {
useApiGroup: false,
},
},
],
async function TailwindPlugin(context, options) {
return {
name: 'docusaurus-tailwindcss',
configurePostCss(postcssOptions) {
// Appends TailwindCSS and AutoPrefixer.
postcssOptions.plugins.push(require('tailwindcss'));
postcssOptions.plugins.push(require('autoprefixer'));
return postcssOptions;
},
};
},
],
};

module.exports = config;
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"docs:subgraph": "docusaurus graphql-to-doc && ./scripts/prune-subgraph-docs.sh",
"serve:all-optimized": "yarn && yarn docs:subgraph && yarn optimize-svg && yarn build && yarn serve",
"serve:all-optimized": "yarn && yarn optimize-svg && yarn build && yarn serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"optimize-svg": "svgo -rf ./static/img -o ./static/optimized-svg",
Expand All @@ -25,17 +24,13 @@
"@docusaurus/plugin-google-gtag": "^3.1.1",
"@docusaurus/plugin-google-tag-manager": "^3.1.1",
"@docusaurus/preset-classic": "^3.1.1",
"@graphql-markdown/docusaurus": "^1.24.0",
"@graphql-tools/json-file-loader": "^8.0.1",
"@mantine/hooks": "^7.5.2",
"@mdx-js/react": "^3.0.1",
"autoprefixer": "^10.4.7",
"clsx": "^2.1.0",
"docusaurus-tailwindcss": "^0.1.0",
"dotenv": "^16.4.5",
"ethers": "^5.6.9",
"graphql": "^16.8.1",
"graphql-config": "^5.0.3",
"hast-util-is-element": "3.0.0",
"postcss": "^8.4.14",
"prism-react-renderer": "^2.3.0",
Expand Down
7 changes: 7 additions & 0 deletions sidebars/governanceAppTemplateSidebar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// sidebars.js

const sidebars = {
governanceAppTemplateSidebar: [{type: 'autogenerated', dirName: '.'}],
};

module.exports = sidebars;
7 changes: 7 additions & 0 deletions sidebars/governanceUiKitSidebar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// sidebars.js

const sidebars = {
governanceUiKitSidebar: [{type: 'autogenerated', dirName: '.'}],
};

module.exports = sidebars;
7 changes: 7 additions & 0 deletions sidebars/osxSidebar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// sidebars.js

const sidebars = {
osxSidebar: [{type: 'autogenerated', dirName: '.'}],
};

module.exports = sidebars;
36 changes: 12 additions & 24 deletions src/components/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,19 @@ const currentYear = new Date().getFullYear();

const leftLinks = [
{
text: 'Home',
to: '/',
},
{
text: 'How it works',
to: '/docs/osx/how-it-works',
text: 'Discord',
to: 'https://discord.gg/Wpk36QRdMN',
},
{
text: 'Guides',
to: '/docs/osx/how-to-guides',
text: 'Github',
to: 'https://github.com/aragon',
},
{
text: 'Support',
to: 'https://discord.gg/Wpk36QRdMN',
}
];
const rightLinks = [
{
text: 'Aragon',
to: 'https://aragon.org',
}
// {
// text: 'Terms of service',
// to: 'https://aragon.org',
// },
// {
// text: 'Privacy',
// to: 'https://aragon.org',
// },
},
];

export const Footer = () => {
Expand All @@ -43,7 +27,12 @@ export const Footer = () => {
<Image src={require('@site/static/img/logo-dark.png').default}></Image>
<LinksContainer>
{leftLinks.map((link, index) => (
<Link href={link.to} key={index}>
<Link
href={link.to}
key={index}
target="_blank"
rel="noopener noreferrer"
>
{link.text}
</Link>
))}
Expand All @@ -53,11 +42,10 @@ export const Footer = () => {
<LinksContainer>
{rightLinks.map((link, index) => (
<Link href={link.to} key={index}>
{link.text}
{link.text} <Text>©{currentYear}</Text>
</Link>
))}
</LinksContainer>
<Text>© {currentYear}</Text>
</RightContainer>
</FooterWrapper>
);
Expand Down
7 changes: 1 addition & 6 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
--warning-color: #e1c75c;
--danger-color: #e75268;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
--ifm-color-background:
--ifm-color-background:
;
}

Expand Down Expand Up @@ -106,8 +106,3 @@ div[class*='announcementBarContent'] a:hover {
color: var(--ifm-color-primary-darkest);
font-weight: bold;
}

/* Adding custom style to specific documents */
.docs-doc-id-osx\/get-started .markdown {
max-width: 100%;
}
Loading

0 comments on commit 903b5f2

Please sign in to comment.