-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Side bar nav updates and icons (#95)
Needing to add buttons to the sidebar, this does it! Closes #84 Solution ======== - Note: These icons are the placeholder icons - There is no way to get in and update the mdbook `toc` setup, so instead we are just adding the icons via css. - Assumption is that there will be a different dark mode, but that might not be. - Assumption is that there might be a different active/hover (or `currentColor` use), but not doing that until we have final icons - Changed the spacing a bit from the original mocks per a design discussion
- Loading branch information
Showing
14 changed files
with
157 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
:root { | ||
--icon-provider: url("../images/icons/icon-provider.svg"); | ||
--icon-gateway: url("../images/icons/icon-gateway.svg"); | ||
--icon-sso: url("../images/icons/icon-sso.svg"); | ||
--icon-core: url("../images/icons/icon-core.svg"); | ||
} | ||
|
||
/* Light theme */ | ||
.light { | ||
--icon-provider: url("../images/icons/icon-provider.svg"); | ||
--icon-gateway: url("../images/icons/icon-gateway.svg"); | ||
--icon-sso: url("../images/icons/icon-sso.svg"); | ||
--icon-core: url("../images/icons/icon-core.svg"); | ||
} | ||
|
||
/* Dark theme */ | ||
.coal { | ||
--icon-provider: url("../images/icons/icon-provider-dark.svg"); | ||
--icon-gateway: url("../images/icons/icon-gateway-dark.svg"); | ||
--icon-sso: url("../images/icons/icon-sso-dark.svg"); | ||
--icon-core: url("../images/icons/icon-core-dark.svg"); | ||
} | ||
|
||
/* Dark mode preference */ | ||
@media (prefers-color-scheme: dark) { | ||
.light.no-js { | ||
/* Override light theme variables if needed */ | ||
--icon-provider: url("../images/icons/icon-provider-dark.svg"); | ||
--icon-gateway: url("../images/icons/icon-gateway-dark.svg"); | ||
--icon-sso: url("../images/icons/icon-sso-dark.svg"); | ||
--icon-core: url("../images/icons/icon-core-dark.svg"); | ||
} | ||
} | ||
|
||
/* Basic icon styling for all chapter items */ | ||
#toc > .chapter > li.chapter-item > a:first-of-type::before { | ||
content: ""; | ||
display: block; | ||
flex: 0 0 45px; | ||
width: 45px; | ||
height: 45px; | ||
margin-inline-end: 1rem; | ||
background-size: contain; | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
} | ||
|
||
/* Individual icons for specific items (1 indexed) */ | ||
#toc > .chapter li.chapter-item:nth-child(2) > a:first-of-type::before { | ||
background-image: var(--icon-provider); | ||
} | ||
|
||
#toc > .chapter li.chapter-item:nth-child(3) > a:first-of-type::before { | ||
background-image: var(--icon-gateway); | ||
} | ||
|
||
#toc > .chapter li.chapter-item:nth-child(4) > a:first-of-type::before { | ||
background-image: var(--icon-sso); | ||
} | ||
|
||
#toc > .chapter li.chapter-item:nth-child(5) > a:first-of-type::before { | ||
background-image: var(--icon-core); | ||
} | ||
|
||
/* Nav Bar */ | ||
|
||
#toc .chapter li.chapter-item:nth-child(1) { | ||
/* Hide the "overview" page */ | ||
display: none; | ||
} | ||
|
||
#toc > .chapter > li.chapter-item { | ||
margin-block-start: 4.5rem; | ||
} | ||
|
||
#toc > .chapter > li > a:first-of-type { | ||
padding-inline-start: 1rem; | ||
font-weight: bold; | ||
} | ||
|
||
#toc > .chapter > li > .section { | ||
padding-inline-start: calc(45px + 2rem); | ||
} | ||
|
||
#toc > .chapter li { | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
#toc > .chapter li.chapter-item > a:first-of-type { | ||
padding-inline-start: 0; | ||
display: flex; | ||
align-items: center; | ||
flex: 1; | ||
} | ||
|
||
.chapter li > a.toggle { | ||
flex: 0 0 24px; | ||
width: 24px; | ||
height: 24px; | ||
padding: 0px; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.