Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Refactor #182

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions docs/docs/examples/_category_.json

This file was deleted.

5 changes: 0 additions & 5 deletions docs/docs/guide/containers/_category_.json

This file was deleted.

5 changes: 0 additions & 5 deletions docs/docs/guide/services/_category_.json

This file was deleted.

5 changes: 0 additions & 5 deletions docs/docs/guide/tokens/_category_.json

This file was deleted.

File renamed without changes.
5 changes: 5 additions & 0 deletions docs/docs/tutorial/guide/containers/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Containers",
"position": 1,
"link": { "type": "doc", "id": "tutorial/guide/containers/introduction" }
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "React Bindings",
"position": 3,
"link": { "type": "doc", "id": "guide/react/introduction" },
"link": { "type": "doc", "id": "tutorial/guide/react/introduction" },
"className": "sidebar_doc_incomplete"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
sidebar_class_name: sidebar_doc_incomplete
draft: true
---

# React Bindings
Expand Down
5 changes: 5 additions & 0 deletions docs/docs/tutorial/guide/services/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Services",
"position": 2,
"link": { "type": "doc", "id": "tutorial/guide/services/introduction" }
}
5 changes: 5 additions & 0 deletions docs/docs/tutorial/guide/tokens/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Tokens",
"position": 2,
"link": { "type": "doc", "id": "tutorial/guide/tokens/introduction" }
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
sidebar_class_name: sidebar_doc_incomplete
draft: true
---

# Migrating from typestack/typedi
5 changes: 5 additions & 0 deletions docs/docs/what-is-dependency-injection.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: What is Dependency Injection?
---

Dependency Injection
26 changes: 16 additions & 10 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const darkCodeTheme = require('prism-react-renderer/themes/oceanicNext');

/** @type {import('./src/app-config').AppConfigCustomFields} */
const customFields = {
Expand Down Expand Up @@ -101,17 +101,17 @@ const config = {
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
announcementBar: {
// Not really sure what the ID does here, but guessing it's just for the DOM.
id: 'global_announcement',
// announcementBar: {
// // Not really sure what the ID does here, but guessing it's just for the DOM.
// id: 'global_announcement',

// Add in a disclaimer about the documentation being alpha.
content:
'This documentation is mostly complete, though lacking in some areas. Any incomplete sections are greyed out.',
// // Add in a disclaimer about the documentation being alpha.
// content:
// 'This documentation is mostly complete, though lacking in some areas. Any incomplete sections are greyed out.',

// We want to make sure people don't accidentally close it.
isCloseable: false,
},
// // We want to make sure people don't accidentally close it.
// isCloseable: false,
// },

// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
Expand All @@ -128,6 +128,12 @@ const config = {
position: 'left',
label: 'Tutorial',
},
{
type: 'docSidebar',
sidebarId: 'examplesSidebar',
position: 'left',
label: 'Examples'
},
{
href: customFields.changelog.link,
label: 'Changelog',
Expand Down
14 changes: 9 additions & 5 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,18 @@ const sidebars = {
tutorialSidebar: [
{
type: 'autogenerated',
dirName: '.',
dirName: 'tutorial',
customProps: {
collapsed: false,
},
},
}
],

examplesSidebar: [
{
type: 'autogenerated',
dirName: 'examples'
}
],

// But you can create a sidebar manually
Expand All @@ -38,7 +45,4 @@ const sidebars = {
*/
};

// @ts-expect-error
sidebars.tutorialSidebar.collapsed = false;

module.exports = sidebars;
32 changes: 26 additions & 6 deletions docs/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/* You can override the default Infima variables here. */
:root {
font-size: 17px;
--ifm-color-primary: #00569d;
--ifm-color-primary-dark: #214067;
--ifm-color-primary-darker: #243352;
Expand All @@ -18,31 +19,41 @@

--ifm-background-color-emphasis: #ffffff;
--ifm-background-color-emphasis-2: #ededed;
--ifm-navbar-background-color: rgb(208, 208, 208)!important;
--ifm-navbar-background-color: rgb(255, 255, 255)!important;
--ifm-background-color: #f3f3f3!important;
--hero-background-color: #dfdfdf!important;
--ifm-color-primary-light: #7e5fe4;
--ifm-color-primary-lighter: #8e6df8;
--ifm-color-primary-lightest: #9f82ff;

font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
font-family: "Nimbus Sans";
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
--ifm-color-primary: #89caff;
--ifm-color-primary: #9f89ff;
--ifm-color-primary-dark: #7da5d6;
--ifm-color-primary-darker: #6884bd;
--ifm-color-primary-darkest: #526f9a;
--ifm-background-color: #262430!important;
--ifm-background-color: #171620!important;
/* --ifm-background-color-emph: #343142!important; */
--ifm-background-color-emphasis: #403c53;
--ifm-background-color-emphasis-2: #575370;
--ifm-navbar-background-color: #322f40!important;
--hero-background-color: #2f2b3c!important;
--ifm-navbar-background-color: #1b1a26!important;
--hero-background-color: #171620!important;
--ifm-color-primary-light: #7e5fe4;
--ifm-color-primary-lighter: #8e6df8;
--ifm-color-primary-lightest: #9f82ff;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
--ifm-navbar-shadow: 0px 0px 0px 1px rgb(65, 65, 65);

--ifm-navbar-search-input-background-color: #000000;

--ifm-alert-background-color: red!important;
}

[data-theme="dark"] .navbar__search-input {
border: 1px solid rgb(65, 65, 65);
}

/** Custom styles for the announcement bar. */
Expand Down Expand Up @@ -79,6 +90,15 @@
border-left: 3px solid #0073ff62;
}

.menu__link--active {
font-weight: bold;
}

.menu__link {
padding-top: 10px;
padding-bottom: 10px;
}

/* Only show incomplete pages in development. */
[data-environment="development"] .sidebar_doc_incomplete {
opacity: 55%;
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function HomepageHeader() {
<div className={styles.buttons}>
<Link
className="button button--primary button--lg"
to="/docs/getting-started">
to="/docs/tutorial/getting-started">
Getting Started
</Link>
<Link
Expand Down
Loading