Skip to content

Commit 19f5c09

Browse files
committed
First commit
First commit
1 parent e829e40 commit 19f5c09

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2205
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

next.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
future: {
3+
webpack5: true,
4+
},
5+
webpack: (config, { isServer }) => {
6+
if (!isServer) {
7+
config.resolve.fallback.fs = false;
8+
}
9+
10+
return config;
11+
},
12+
}

package.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "botdocs",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"dev": "next dev",
8+
"build": "next build",
9+
"start": "next start"
10+
},
11+
"author": "",
12+
"license": "ISC",
13+
"dependencies": {
14+
"i18next": "^20.3.0",
15+
"next": "^10.2.0",
16+
"react": "^17.0.2",
17+
"react-dom": "^17.0.2",
18+
"react-i18next": "^11.9.0",
19+
"react-icons": "^4.2.0",
20+
"react-markdown": "^6.0.2",
21+
"sass": "^1.32.13",
22+
"swr": "^0.5.6"
23+
},
24+
"devDependencies": {
25+
"webpack": "^5.37.0",
26+
"webpack-cli": "^4.7.0"
27+
}
28+
}
389 KB
Binary file not shown.
279 KB
Binary file not shown.
268 KB
Binary file not shown.
390 KB
Binary file not shown.
7.45 KB
Loading

src/components/categories/List.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import Link from "next/link";
2+
import { countDeconstructedCategories } from "../../utils/json";
3+
import styles from "./_categories.module.sass";
4+
5+
export default function List({ categories, commands, current, colors, t }) {
6+
console.log(colors)
7+
return (
8+
<div className={styles.categories}>
9+
<div className={styles.categories__caption}>{t("categories")}</div>
10+
11+
<ul>
12+
{categories.map((category, i) => (
13+
<Link href={`/category/${category.toLowerCase()}`} shallow={true} key={i}>
14+
<li className={(current[1] ? current[1].substr(1) : null) === category.toLowerCase() ? `${styles.category} ${styles["category--active"]}` : styles.category}>
15+
<div className={styles.category__title}>
16+
<span className={styles["category__title-marker"]} style={{"backgroundColor": colors[category.toLowerCase()]}}></span>
17+
<span>{category}</span>
18+
<span className={styles["category__title-counter"]}>{countDeconstructedCategories(commands, category)}</span>
19+
</div>
20+
</li>
21+
</Link>
22+
))}
23+
</ul>
24+
</div>
25+
);
26+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
@import "../../styles/includes"
2+
@import "../../styles/theme"
3+
4+
.categories
5+
width: $categories-width
6+
7+
&__caption
8+
text-transform: uppercase
9+
font-weight: bold
10+
color: $categories-caption-text-color
11+
padding: 1em 0
12+
13+
ul
14+
list-style-type: none
15+
padding: 0
16+
margin: 0
17+
18+
.category
19+
padding: 1em
20+
@include borderRadius($categories-item-radius)
21+
@include transition(background-color, 0.1s, ease)
22+
cursor: pointer
23+
24+
&--active
25+
background-color: $categories-item-background-color-active
26+
27+
&__title
28+
font-weight: bold
29+
color: $categories-item-text-color
30+
display: flex
31+
align-items: center
32+
33+
&-marker
34+
background-color: $theme-primary-color
35+
margin-right: 1em
36+
height: $categories-item-title-marker-size
37+
width: $categories-item-title-marker-size
38+
@include borderRadius($categories-item-title-marker-radius)
39+
40+
&-counter
41+
background-color: $categories-item-title-counter-background-color
42+
padding: 0 0.5em
43+
@include borderRadius($categories-item-title-counter-radius)
44+
margin-left: auto
45+
color: $categories-item-title-counter-text-color
46+
font-size: $categories-item-title-counter-font-size
47+
48+
&:hover
49+
background-color: $categories-item-background-color-hover

0 commit comments

Comments
 (0)