Skip to content

Commit

Permalink
docs: adjust font size of sidebar items (#2158)
Browse files Browse the repository at this point in the history
* adjust font size

* made sidebar narrower
  • Loading branch information
shahednasser authored Sep 7, 2022
1 parent 7b98e6e commit 65654c5
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 13 deletions.
8 changes: 6 additions & 2 deletions docs/content/contribution-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,18 @@ In the body of the PR, explain clearly what the PR does. If the PR solves an iss

## Sidebar

When you add a new page to the documentation, you must add the new page in `www/docs/sidebars.js` under the `tutorialSidebar`. You can learn more about the syntax used [here](https://docusaurus.io/docs/sidebar/items).
When you add a new page to the documentation, you must add the new page in `www/docs/sidebars.js` under the `docsSidebar`. You can learn more about the syntax used [here](https://docusaurus.io/docs/sidebar/items).

### Terminology

When the documentation page is a conceptual or overview documentation, the label in the sidebar should start with a noun.

When the documentation page is a tutorial documentation, the label in the sidebar should start with a verb. An exception of this rule are integration documentations and upgrade guides.

### Character Count

The character count of the sidebar item's label must be at most twenty seven characters.

## Notes and Additional Information

When displaying notes and additional information in a documentation page, use [Admonitions](https://docusaurus.io/docs/markdown-features/admonitions). Make sure the type of admonition used matches the note’s importance to the current document.
Expand Down Expand Up @@ -109,7 +113,7 @@ For example, even though you can run the `start` script using NPM with `npm star

When a command uses the global option `-g`, add it at the end of the NPM command to ensure that it’s transformed to a Yarn command properly. For example:

```bash
```bash npm2yarn
npm install @medusajs/medusa-cli -g
```

Expand Down
2 changes: 1 addition & 1 deletion www/docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ module.exports = {
label: 'Go to medusajs.com',
className: 'topright-icon',
},
]
],
},
presets: [
[
Expand Down
6 changes: 3 additions & 3 deletions www/docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = {
{
type: "doc",
id: "tutorial/set-up-your-development-environment",
label: "Set Up Development Environment"
label: "Set Up Dev Environment"
},
{
type: "doc",
Expand Down Expand Up @@ -326,7 +326,7 @@ module.exports = {
{
type: "doc",
id: "add-plugins/contentful/customize-contentful",
label: "Customize Contentful Integration",
label: "Customize Integration",
},
]
},
Expand Down Expand Up @@ -440,7 +440,7 @@ module.exports = {
{
type: "doc",
id: "troubleshooting/missing-payment-providers",
label: "Payment provider (Stripe) not showing in checkout",
label: "Payment provider missing",
},
{
type: "doc",
Expand Down
16 changes: 10 additions & 6 deletions www/docs/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
--ifm-font-family-base: "Inter",BlinkMacSystemFont,-apple-system,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue","Helvetica","Arial",sans-serif;

/* Sidebar */
--doc-sidebar-width: 350px !important;
--doc-sidebar-width: 250px !important;

/* Docs Page */
--ifm-docs-page-max-width: 850px;
Expand Down Expand Up @@ -387,7 +387,7 @@ kbd {
.menu__link,
.redocusaurus .menu-content label {
font-weight: 500 !important;
font-size: 14px;
font-size: 12px;
line-height: 1.7em;
position: relative;
white-space: nowrap;
Expand Down Expand Up @@ -430,11 +430,11 @@ kbd {
font-weight: 600 !important;
}

.menu__list,
/* .menu__list,
.redocusaurus .menu-content ul {
padding-left: 1.7em;
padding-right: 1.7em;
}
} */

a.menu__link--sublist::after {
content: none;
Expand Down Expand Up @@ -540,7 +540,7 @@ a.menu__link--sublist::before,
background-image: url('/img/alert.svg');
width: 20px;
height: 20px;
top: 23%;
top: 19%;
}

html:not([data-theme="dark"]) .menu__list-item.alert-icon .menu__link:hover::before,
Expand All @@ -557,7 +557,7 @@ html:not([data-theme="dark"]) .menu__list-item.alert-icon .menu__link.menu__link
background-image: url('/img/arrow-top-right.svg');
width: 20px;
height: 20px;
top: 23%;
top: 19%;
}

html:not([data-theme="dark"]) .menu__list-item.topright-icon .menu__link:hover::before,
Expand All @@ -577,4 +577,8 @@ html:not([data-theme="dark"]) .menu__list-item.topright-icon .menu__link.menu__l

.menu__list-item-collapsible {
padding-bottom: 6px;
}

.redocusaurus .menu-content {
width: var(--doc-sidebar-width);
}
7 changes: 6 additions & 1 deletion www/docs/src/theme/DocSidebar/Desktop/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,10 @@
.sidebarFooterList {
border-top: 1px solid var(--ifm-toc-border-color);
list-style: none;
padding: 1.7em;
padding-top: 1.7em;
padding-left: 0;
}

.sidebarFooterList li a {
padding-left: 1.8em !important;
}

0 comments on commit 65654c5

Please sign in to comment.