1
0
mirror of https://github.com/minio/docs.git synced 2025-08-27 03:42:05 +03:00
Files
docs/source/_static/scss/includes/_toc.scss
Rushan e9fe3bfee2 UI Enhancements: Recommended video section, k8s active class, mobile nav links (#726)
- Give recommended video section a makeover 
<img width="355" alt="Screenshot 2023-02-08 at 14 05 44"
src="https://user-images.githubusercontent.com/13393018/217500836-348b4063-2c54-4b23-8daa-20b127aa7d79.png">

- Fix k8s's active nav state
- Fix nav links wrapping on mobile (current behaviour on production
looks likes below)
<img width="637" alt="Screenshot 2023-02-08 at 11 50 10"
src="https://user-images.githubusercontent.com/13393018/217501024-1b8d21d6-0787-46b0-a8f4-fba8e1086f36.png">
2023-02-14 09:18:50 -06:00

210 lines
4.7 KiB
SCSS

div.topic {
all: revert;
}
.content__toc {
position: sticky;
top: 0;
@include breakpoint-min(breakpoints(lg)) {
flex-shrink: 0;
order: 2;
width: 14rem;
height: calc(100vh - 6.0625rem); // 6.0625rem = header height
padding: var(--content-padding) var(--content-padding) var(--content-padding) 0;
overflow-y: auto;
.icon {
display: none;
}
}
@include breakpoint-max(breakpoints(lg)) {
display: flex;
gap: 0.75rem;
align-items: center;
padding: var(--content-padding);
background-color: var(--body-bg);
z-index: $z-index-header - 2;
}
.icon {
height: 2.5rem;
width: 2.5rem;
padding: 0.7rem;
border: 1px solid var(--theme-light-bg);
cursor: pointer;
&:last-child {
margin-left: auto;
}
&.search-toggle {
order: 3;
margin-left: auto;
}
}
&.active {
#table-of-contents {
& > ul {
display: block;
}
.topic-title {
border-radius: $border-radius $border-radius 0 0;
&:after {
transform: rotate(180deg);
}
}
}
}
}
.content__toc--empty {
@include breakpoint-min(breakpoints(lg)) {
display: none;
}
}
#table-of-contents {
flex: 1;
position: relative;
.topic-title {
@include breakpoint-max(breakpoints(lg)) {
padding: 0.85rem 1rem;
background-color: var(--theme-light-bg);
border-radius: $border-radius;
display: block;
position: relative;
font-size: $font-size-sm;
cursor: pointer;
&:after {
content: "";
height: 1rem;
width: 1rem;
position: absolute;
right: 1rem;
top: 0.8rem;
background: var(--toc-caret-icon) no-repeat center;
background-size: 0.8rem;
transform-origin: center;
}
}
}
ul {
list-style: none;
padding: 0;
margin: 0;
font-size: $font-size-sm;
color: var(--text-muted-color);
ul {
margin-left: 0.75rem;
}
}
& > ul {
@include breakpoint-min(breakpoints(lg)) {
position: relative;
padding-left: 1rem;
margin-top: 1rem;
margin-bottom: 1.75rem;
&:before {
content: "";
width: 2px;
height: calc(100% - 0.8rem);
position: absolute;
left: 0.2rem;
top: 0.5rem;
background-color: var(--theme-light-bg);
}
}
@include breakpoint-max(breakpoints(lg)) {
position: absolute;
left: 0;
top: 100%;
width: 100%;
background-color: var(--toc-dropdown-bg);
display: none;
border-radius: 0 0 $border-radius $border-radius;
z-index: 1;
padding: 0.65rem 1rem 1rem;
max-height: 12rem;
overflow-y: auto;
}
a {
display: block;
color: var(--text-muted-color);
padding: 0.15rem 0;
&:hover {
color: var(--text-color);
}
}
}
}
p.topic-title {
color: var(--headings-color);
line-height: 1;
font-size: $font-size-md;
margin: 0;
}
.extlinks-video {
p.topic-title {
margin-bottom: 0.75rem;
}
ul {
padding: 0;
margin: 0;
& > li {
display: flex;
align-items: start;
a {
font-size: $font-size-sm;
color: var(--text-muted-color);
padding: 0.25rem 0;
display: block;
&:hover {
color: var(--text-color);
}
}
&::marker {
display: none;
}
&:before {
content: "";
height: 1rem;
width: 1rem;
display: grid;
place-content: center;
margin-right: 0.75rem;
background: var(--recommended-videos-marker) no-repeat center;
flex-shrink: 0;
background-size: 100%;
margin-top: 0.425rem;
}
}
}
@include breakpoint-max(breakpoints(lg)) {
display: none;
}
}