Skip to content

Commit b85c011

Browse files
authored
Merge pull request #4742 from nirname/docs/2910_small-fixes
Fixes to Docs sidebar, main page and badges
2 parents 7b7e281 + aec97d6 commit b85c011

File tree

5 files changed

+125
-295
lines changed

5 files changed

+125
-295
lines changed

docs/intro/index.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ It is a JavaScript based diagramming and charting tool that renders Markdown-ins
1414
1515
<img src="/header.png" alt="" />
1616

17+
<div class='badges'>
18+
1719
[![Build CI Status](https://github.com/mermaid-js/mermaid/actions/workflows/build.yml/badge.svg)](https://github.com/mermaid-js/mermaid/actions/workflows/build.yml) [![NPM](https://img.shields.io/npm/v/mermaid)](https://www.npmjs.com/package/mermaid) [![npm minified gzipped bundle size](https://img.shields.io/bundlephobia/minzip/mermaid)](https://bundlephobia.com/package/mermaid) [![Coverage Status](https://coveralls.io/repos/github/mermaid-js/mermaid/badge.svg?branch=master)](https://coveralls.io/github/mermaid-js/mermaid?branch=master) [![CDN Status](https://img.shields.io/jsdelivr/npm/hm/mermaid)](https://www.jsdelivr.com/package/npm/mermaid) [![NPM](https://img.shields.io/npm/dm/mermaid)](https://www.npmjs.com/package/mermaid) [![Join our Slack!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=slack&label=slack)](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE) [![Twitter Follow](https://img.shields.io/twitter/follow/mermaidjs_?style=social)](https://twitter.com/mermaidjs_)
1820

21+
</div>
22+
1923
<!-- Mermaid book banner -->
2024

2125
[![Explore Mermaid.js in depth, with real-world examples, tips & tricks from the creator... The first official book on Mermaid is available for purchase. Check it out!](img/book-banner-post-release.jpg)](https://mermaid-js.github.io/mermaid/landing/)
@@ -389,8 +393,12 @@ The above command generates files into the `dist` folder and publishes them to \
389393

390394
## Contributors
391395

396+
<div class='badges'>
397+
392398
[![Good first issue](https://img.shields.io/github/labels/mermaid-js/mermaid/Good%20first%20issue%21)](https://github.com/mermaid-js/mermaid/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good+first+issue%21%22) [![Contributors](https://img.shields.io/github/contributors/mermaid-js/mermaid)](https://github.com/mermaid-js/mermaid/graphs/contributors) [![Commits](https://img.shields.io/github/commit-activity/m/mermaid-js/mermaid)](https://github.com/mermaid-js/mermaid/graphs/contributors)
393399

400+
</div>
401+
394402
Mermaid is a growing community and is always accepting new contributors. There's a lot of different ways to help out and we're always looking for extra hands! Look at [this issue](https://github.com/mermaid-js/mermaid/issues/866) if you want to know where to start helping out.
395403

396404
Detailed information about how to contribute can be found in the [contribution guide](https://github.com/mermaid-js/mermaid/blob/develop/CONTRIBUTING.md)
@@ -424,20 +432,14 @@ A quick note from Knut Sveidqvist:
424432
_Mermaid was created by Knut Sveidqvist for easier documentation._
425433

426434
<style scoped>
427-
#contributors + p,
428-
#about-mermaid + p + p + blockquote + img + p
429-
{
430-
display: flex
435+
.badges > p {
436+
display: flex;
431437
}
432-
433-
#contributors + p a,
434-
#about-mermaid + p + p + blockquote + img + p a
435-
{
436-
margin: 0 0.5rem
438+
.badges > p > a {
439+
margin: 0 0.5rem;
437440
}
438441

439-
.dark #VPContent > div > div > div.content > div > main > div > div > img
440-
{
442+
.dark #VPContent > div > div > div.content > div > main > div > div > img {
441443
filter: invert(1) hue-rotate(217deg) contrast(0.72);
442444
}
443445
</style>

packages/mermaid/src/docs/.vitepress/config.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function sidebarAll() {
101101
return [
102102
{
103103
text: '📔 Introduction',
104-
collapsible: true,
104+
collapsed: false,
105105
items: [
106106
{ text: 'About Mermaid', link: '/intro/' },
107107
{ text: 'Deployment', link: '/intro/n00b-gettingStarted' },
@@ -123,7 +123,7 @@ function sidebarSyntax() {
123123
return [
124124
{
125125
text: '📊 Diagram Syntax',
126-
collapsible: true,
126+
collapsed: false,
127127
items: [
128128
{ text: 'Flowchart', link: '/syntax/flowchart' },
129129
{ text: 'Sequence Diagram', link: '/syntax/sequenceDiagram' },
@@ -154,7 +154,7 @@ function sidebarConfig() {
154154
return [
155155
{
156156
text: '⚙️ Deployment and Configuration',
157-
collapsible: true,
157+
collapsed: false,
158158
items: [
159159
{ text: 'Configuration', link: '/config/configuration' },
160160
{ text: 'Tutorials', link: '/config/Tutorials' },
@@ -176,7 +176,7 @@ function sidebarEcosystem() {
176176
return [
177177
{
178178
text: '📚 Ecosystem',
179-
collapsible: true,
179+
collapsed: false,
180180
items: [
181181
{ text: 'Showcases', link: '/ecosystem/showcases' },
182182
{ text: 'Use-Cases and Integrations', link: '/ecosystem/integrations' },
@@ -189,7 +189,7 @@ function sidebarCommunity() {
189189
return [
190190
{
191191
text: '🙌 Contributions and Community',
192-
collapsible: true,
192+
collapsed: false,
193193
items: [
194194
{ text: 'Overview for Beginners', link: '/community/n00b-overview' },
195195
...sidebarCommunityDevelopContribute(),
@@ -207,7 +207,7 @@ function sidebarCommunityDevelopContribute() {
207207
{
208208
text: 'Contributing to Mermaid',
209209
link: page_path + '#contributing-to-mermaid',
210-
collapsible: true,
210+
collapsed: false,
211211
items: [
212212
{
213213
text: 'Technical Requirements and Setup',
@@ -238,7 +238,7 @@ function sidebarNews() {
238238
return [
239239
{
240240
text: '📰 Latest News',
241-
collapsible: true,
241+
collapsed: false,
242242
items: [
243243
{ text: 'Announcements', link: '/news/announcements' },
244244
{ text: 'Blog', link: '/news/blog' },

packages/mermaid/src/docs/intro/index.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ It is a JavaScript based diagramming and charting tool that renders Markdown-ins
88
99
<img src="/header.png" alt="" />
1010

11+
<div class='badges'>
12+
1113
[![Build CI Status](https://github.com/mermaid-js/mermaid/actions/workflows/build.yml/badge.svg)](https://github.com/mermaid-js/mermaid/actions/workflows/build.yml) [![NPM](https://img.shields.io/npm/v/mermaid)](https://www.npmjs.com/package/mermaid) [![npm minified gzipped bundle size](https://img.shields.io/bundlephobia/minzip/mermaid)](https://bundlephobia.com/package/mermaid) [![Coverage Status](https://coveralls.io/repos/github/mermaid-js/mermaid/badge.svg?branch=master)](https://coveralls.io/github/mermaid-js/mermaid?branch=master) [![CDN Status](https://img.shields.io/jsdelivr/npm/hm/mermaid)](https://www.jsdelivr.com/package/npm/mermaid) [![NPM](https://img.shields.io/npm/dm/mermaid)](https://www.npmjs.com/package/mermaid) [![Join our Slack!](https://img.shields.io/static/v1?message=join%20chat&color=9cf&logo=slack&label=slack)](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE) [![Twitter Follow](https://img.shields.io/twitter/follow/mermaidjs_?style=social)](https://twitter.com/mermaidjs_)
1214

15+
</div>
16+
1317
<!-- Mermaid book banner -->
1418

1519
[![Explore Mermaid.js in depth, with real-world examples, tips & tricks from the creator... The first official book on Mermaid is available for purchase. Check it out!](img/book-banner-post-release.jpg)](https://mermaid-js.github.io/mermaid/landing/)
@@ -166,8 +170,12 @@ The above command generates files into the `dist` folder and publishes them to <
166170

167171
## Contributors
168172

173+
<div class='badges'>
174+
169175
[![Good first issue](https://img.shields.io/github/labels/mermaid-js/mermaid/Good%20first%20issue%21)](https://github.com/mermaid-js/mermaid/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good+first+issue%21%22) [![Contributors](https://img.shields.io/github/contributors/mermaid-js/mermaid)](https://github.com/mermaid-js/mermaid/graphs/contributors) [![Commits](https://img.shields.io/github/commit-activity/m/mermaid-js/mermaid)](https://github.com/mermaid-js/mermaid/graphs/contributors)
170176

177+
</div>
178+
171179
Mermaid is a growing community and is always accepting new contributors. There's a lot of different ways to help out and we're always looking for extra hands! Look at [this issue](https://github.com/mermaid-js/mermaid/issues/866) if you want to know where to start helping out.
172180

173181
Detailed information about how to contribute can be found in the [contribution guide](https://github.com/mermaid-js/mermaid/blob/develop/CONTRIBUTING.md)
@@ -201,20 +209,14 @@ A quick note from Knut Sveidqvist:
201209
_Mermaid was created by Knut Sveidqvist for easier documentation._
202210

203211
<style scoped>
204-
#contributors + p,
205-
#about-mermaid + p + p + blockquote + img + p
206-
{
207-
display: flex
212+
.badges > p {
213+
display: flex;
208214
}
209-
210-
#contributors + p a,
211-
#about-mermaid + p + p + blockquote + img + p a
212-
{
213-
margin: 0 0.5rem
215+
.badges > p > a {
216+
margin: 0 0.5rem;
214217
}
215218

216-
.dark #VPContent > div > div > div.content > div > main > div > div > img
217-
{
219+
.dark #VPContent > div > div > div.content > div > main > div > div > img {
218220
filter: invert(1) hue-rotate(217deg) contrast(0.72);
219221
}
220222
</style>

packages/mermaid/src/docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"dependencies": {
1818
"@vueuse/core": "^10.1.0",
1919
"jiti": "^1.18.2",
20-
"vue": "^3.2.47"
20+
"vue": "^3.3"
2121
},
2222
"devDependencies": {
2323
"@iconify-json/carbon": "^1.1.16",

0 commit comments

Comments
 (0)