Skip to content

Commit

Permalink
feat: add category heroicons
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Dec 6, 2024
1 parent f80f9ac commit 9d4fcc5
Show file tree
Hide file tree
Showing 11 changed files with 76 additions and 1 deletion.
9 changes: 9 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module.exports = {
{
type: 'category',
label: 'Introduction',
className: 'menu__intro-category',
collapsible: false,
items: [
'README',
Expand All @@ -15,6 +16,7 @@ module.exports = {
{
type: 'category',
label: 'Contribute',
className: 'menu__contribute-category',
collapsible: false,
items: [
'contributing',
Expand All @@ -29,6 +31,7 @@ module.exports = {
{
type: 'category',
label: 'Setting Up',
className: 'menu__install-category',
collapsible: false,
items: [
'composer',
Expand All @@ -40,6 +43,7 @@ module.exports = {
{
type: 'category',
label: 'Management',
className: 'menu__manage-category',
collapsible: false,
items: [
'admin',
Expand All @@ -56,6 +60,7 @@ module.exports = {
{
type: 'category',
label: 'Advanced',
className: 'menu__advanced-category',
collapsible: false,
items: [
'rest-api',
Expand All @@ -69,6 +74,7 @@ module.exports = {
type: 'category',
label: 'Main Concepts',
collapsible: false,
className: 'menu__intro-category',
items: [
'extend/README',
'extend/start',
Expand All @@ -84,6 +90,7 @@ module.exports = {
type: 'category',
label: 'Update Guides',
collapsible: false,
className: 'menu__update-category',
items: [
// 'extend/update-2_x',
'extend/update-2_0',
Expand All @@ -94,6 +101,7 @@ module.exports = {
type: 'category',
label: 'Reference Guides',
collapsible: false,
className: 'menu__refs-category',
items: [
'extend/admin',
'extend/backend-events',
Expand All @@ -116,6 +124,7 @@ module.exports = {
type: 'category',
label: 'Advanced Guides',
collapsible: false,
className: 'menu__advanced-category',
items: [
'extend/api-throttling',
'extend/assets',
Expand Down
3 changes: 3 additions & 0 deletions src/assets/adjustments-vertical.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/arrow-down-tray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/book-open.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/cog-6-tooth.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/cube.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/document-arrow-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/lifebuoy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/light-bulb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 33 additions & 1 deletion src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ html[data-theme='dark'] .docusaurus-highlight-code-line {
margin-top: 1.5rem;
}

.menu__list-item-collapsible .menu__link:not(.menu__link--active) {
.menu__list-item-collapsible .menu__link {
color: var(--ifm-color-black);
}

Expand Down Expand Up @@ -280,3 +280,35 @@ img[alt="Flarum Home Screenshot"] {
margin: 0 calc(-1 * var(--ifm-pre-padding));
padding: 0 var(--ifm-pre-padding);
}

.theme-doc-sidebar-item-category-level-1 > .menu__list-item-collapsible > .menu__link::before {
--size: 16px;
width: var(--size);
height: var(--size);
margin-right: calc(var(--size) / 2);
margin-left: calc(0px - var(--size) / 2);
filter: invert(1);
display: inline-block;
}

.menu__intro-category > .menu__list-item-collapsible > .menu__link::before {
content: url("../assets/book-open.svg");
}
.menu__contribute-category > .menu__list-item-collapsible > .menu__link::before {
content: url("../assets/lifebuoy.svg");
}
.menu__install-category > .menu__list-item-collapsible > .menu__link::before {
content: url("../assets/arrow-down-tray.svg");
}
.menu__manage-category > .menu__list-item-collapsible > .menu__link::before {
content: url("../assets/adjustments-vertical.svg");
}
.menu__advanced-category > .menu__list-item-collapsible > .menu__link::before {
content: url("../assets/light-bulb.svg");
}
.menu__update-category > .menu__list-item-collapsible > .menu__link::before {
content: url("../assets/document-arrow-up.svg");
}
.menu__refs-category > .menu__list-item-collapsible > .menu__link::before {
content: url("../assets/cube.svg");
}
9 changes: 9 additions & 0 deletions versioned_sidebars/version-1.x-sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"type": "category",
"label": "Introduction",
"collapsible": false,
"className": "menu__intro-category",
"items": [
"README",
"code-of-conduct",
Expand All @@ -16,6 +17,7 @@
"type": "category",
"label": "Contribute",
"collapsible": false,
"className": "menu__contribute-category",
"items": [
"contributing",
"contributing-docs-translations",
Expand All @@ -30,6 +32,7 @@
"type": "category",
"label": "Setting Up",
"collapsible": false,
"className": "menu__install-category",
"items": [
"composer",
"install",
Expand All @@ -41,6 +44,7 @@
"type": "category",
"label": "Management",
"collapsible": false,
"className": "menu__manage-category",
"items": [
"admin",
"config",
Expand All @@ -56,6 +60,7 @@
"type": "category",
"label": "Advanced",
"collapsible": false,
"className": "menu__advanced-category",
"items": [
"rest-api",
"extenders"
Expand All @@ -67,6 +72,7 @@
"type": "category",
"label": "Main Concepts",
"collapsible": false,
"className": "menu__intro-category",
"items": [
"extend/README",
"extend/start",
Expand All @@ -82,6 +88,7 @@
"type": "category",
"label": "Reference Guides",
"collapsible": false,
"className": "menu__update-category",
"items": [
"extend/admin",
"extend/backend-events",
Expand All @@ -104,6 +111,7 @@
"type": "category",
"label": "Advanced Guides",
"collapsible": false,
"className": "menu__refs-category",
"items": [
"extend/api-throttling",
"extend/assets",
Expand All @@ -126,6 +134,7 @@
"type": "category",
"label": "Update Guides",
"collapsible": false,
"className": "menu__advanced-category",
"items": [
"extend/update-1_x",
"extend/update-1_0",
Expand Down

0 comments on commit 9d4fcc5

Please sign in to comment.