From 9d62d02162158eed7da018bceb86ced1dcb4d638 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 1 Aug 2021 17:22:27 +0100 Subject: [PATCH] :construction: Working on the docs page --- src/pages/docs.js | 168 +++++++++++++++++++++++++++++++++++++++----- src/pages/docs.scss | 56 +++++++++++---- 2 files changed, 193 insertions(+), 31 deletions(-) diff --git a/src/pages/docs.js b/src/pages/docs.js index 207c4766..13cbe8ff 100644 --- a/src/pages/docs.js +++ b/src/pages/docs.js @@ -4,46 +4,175 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import Button from '../components/Button'; import './docs.scss'; - import getColor from '../utils/ui-helpers'; -import IconShortcuts from '../../static/icons/features_shortcuts.svg'; + +import IconCloudSync from '../../static/icons/features_cloud-sync.svg'; +import IconDeploy from '../../static/icons/features_depoloyment.svg'; +// import IconIconography from '../../static/icons/features_icons.svg'; +// import IconLayout from '../../static/icons/features_layout-customization.svg'; +// import IconOpeningMethods from '../../static/icons/features_opening-methods.svg'; +// import IconShortcuts from '../../static/icons/features_shortcuts.svg'; +// import IconStatusIndicators from '../../static/icons/features_status-indicators.svg'; +// import IconThemes from '../../static/icons/features_themes.svg'; +import IconUiConfig from '../../static/icons/features_ui-configuration.svg'; +import IconTroubleshooting from '../../static/icons/docs_troubleshooting.svg'; +import IconManagement from '../../static/icons/docs_managment.svg'; +import IconDeveloping from '../../static/icons/docs_developing.svg'; +import IconDevGuides from '../../static/icons/docs_guides.svg'; +import IconContributing from '../../static/icons/docs_contributing.svg'; +import IconShowcase from '../../static/icons/docs_showcase.svg'; +import IconCredits from '../../static/icons/docs_credits.svg'; +import IconAuth from '../../static/icons/docs_authentication.svg'; +// import IconCloudSync from '../../static/icons/docs_cloud-sync.svg'; +import IconIconography from '../../static/icons/docs_icons.svg'; +import IconInternationalization from '../../static/icons/docs_internationalisation.svg'; +import IconStatusIndicators from '../../static/icons/docs_status-indicators.svg'; +import IconTheming from '../../static/icons/docs_theming.svg'; const DocsLinks = [ { title: 'Deployment', - description: '', + description: 'Getting Dashy up and running', link: '', - icon: (), + icon: (), }, { title: 'Configuring', - description: '', + description: 'All Config Options', link: '', - icon: (), + icon: (), }, { title: 'Management', - description: '', + description: 'Updating, security, web server configuration, etc', link: '', - icon: (), + icon: (), }, { title: 'Troubleshooting', - description: '', + description: 'Solutions to Common Issues', link: '', - icon: (), + icon: (), }, ]; +const DocsSections = [ + { + section: 'Running Dashy', + items: [ + { + title: 'Deployment', + description: 'Getting Dashy up and running', + link: '', + icon: (), + }, + { + title: 'Configuring', + description: 'All Config Options', + link: '', + icon: (), + }, + { + title: 'Management', + description: 'Updating, security, web server configuration, etc', + link: '', + icon: (), + }, + { + title: 'Troubleshooting', + description: 'Solutions to Common Issues', + link: '', + icon: (), + }, + ] + }, + { + section: 'Community', + items: [ + { + title: 'Developing', + description: 'Dashy workflow, and running locally', + link: '', + icon: (), + }, + { + title: 'Dev Guides', + description: 'Common development tasks', + link: '', + icon: (), + }, + { + title: 'Contributing', + description: 'How you can help support Dashy\'s development', + link: '', + icon: (), + }, + { + title: 'Showcase', + description: 'See how others are using Dashy, and share your dashboard', + link: '', + icon: (), + }, + { + title: 'Credits', + description: 'List of people and projects that have made Dashy possible', + link: '', + icon: (), + }, + ] + }, + { + section: 'Feature Docs', + items: [ + { + title: 'Authentication', + description: 'Configure login and user control', + link: '', + icon: (), + }, + { + title: 'Backup & Restore', + description: 'Cloud Sync, usage and background', + link: '', + icon: (), + }, + { + title: 'Icons', + description: 'Available icon types for sections and items', + link: '', + icon: (), + }, + { + title: 'Language Switching', + description: 'Changing language, and adding new locales', + link: '', + icon: (), + }, + { + title: 'Status Indicators', + description: 'Monitoring uptime of your services with Dashy', + link: '', + icon: (), + }, + { + title: 'Theming', + description: 'Guide to customizing the look and feel of Dashy', + link: '', + icon: (), + }, + ] + } +]; + function DocsLink({ title, description, icon, link, index }) { const color = getColor(index); return ( ); } @@ -55,10 +184,15 @@ export default function Docs() { title={siteConfig.title} description="Documentation | Dashy, a self-hosted dashboard for your homelab">
-

Docs

+

Dashy Docs

- {DocsLinks.map((props, index) => ( - + {DocsSections.map((DocsLinks, indexOuter) => ( +
+

{indexOuter + 1}. {DocsLinks.section}

+
+ {DocsLinks.items.map((props, index) => ())} +
+
) )}
diff --git a/src/pages/docs.scss b/src/pages/docs.scss index dac0225f..4221360f 100644 --- a/src/pages/docs.scss +++ b/src/pages/docs.scss @@ -1,26 +1,54 @@ main.docs { - max-width: 1000px; + max-width: 950px; margin: 1rem auto; padding: 1rem; + background: var(--hero-background); + box-shadow: var(--feature-img-shadow); + + h1.docs-title { + margin: 0; + font-size: 5rem; + } + + div.row1 { + display: flex; + flex-direction: row; + } + + div.docs-links-section { + display: flex; + flex-wrap: wrap; + } div.docs-contents { color: var(--text-color); - a { - max-width: 5rem; - padding: 0.25rem 0.5rem; - p { - margin: 0; - } + display: flex; + justify-content: space-around; + flex-direction: column; + h3.section-title { + margin: 1rem 0.5rem 0.5rem 0.5rem; } - a.docs-link { - max-width: 5rem; - p { - color: var(--text-color); + a { + display: flex; + flex-direction: column; + width: calc(33% - 1.5rem); + min-height: 5rem; + padding: 0.25rem 0.5rem; + margin: 0.5rem 0.75rem; + p.name { + margin: 0; + text-align: left; + font-size: 1.4rem; } - .docs-icon svg { - width: 2rem; + span.description { + text-align: left; + font-size: 1rem; + white-space: pre-wrap; + } + @media (max-width: 500px) { + width: 100%; } } } -} \ No newline at end of file +}