Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 26 additions & 18 deletions assets/scss/_content_project.scss

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain what these changes are and why they are needed? My understanding is that these affect the scrollbar, but I'm not sure how that's related to the sidebar issue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I restricted the custom scrollbars to desktop only. On mobile, forcing custom webkit scrollbars makes them stay permanently visible instead of auto-hiding like normal touch scrollbars do. It was eating up screen space and adding to the horizontal overflow issues on smaller viewports.

Original file line number Diff line number Diff line change
Expand Up @@ -175,28 +175,36 @@ h6 {
}
}

/* width */
::-webkit-scrollbar {
width: 8px;
height: 8px;
background-color: transparent;
}
@media (min-width: 768px) {
/* width */
::-webkit-scrollbar {
width: 8px;
height: 8px;
background-color: transparent;
}

/* Track */
::-webkit-scrollbar-track {
border-radius: 10px;
background-color: transparent;
}
/* Track */
::-webkit-scrollbar-track {
border-radius: 10px;
background-color: transparent;
}

/* Handle */
::-webkit-scrollbar-thumb {
background: $primary;
border-radius: 10px;
}

/* Handle */
::-webkit-scrollbar-thumb {
background: $primary;
border-radius: 10px;
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: $secondary;
}
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: $secondary;
@media (max-width: 767.98px) {
::-webkit-scrollbar {
display: none !important;
}
}

.td-initial table {
Expand Down
37 changes: 33 additions & 4 deletions assets/scss/_elements_project.scss

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes affect the styling for images. Why were these changes made? 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes a readability issue on mobile view. Before, floating these images at 40% width forced the text next to it into a tiny, unreadable column and caused horizontal scrolling. Setting them to 100% width and removing the float on small screens makes them stack neatly and fixes the overflow

Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,47 @@ div.tip {
float: left;
margin: 1rem 1.25rem 1rem 0rem;
box-shadow: 0px 5px 10px 1px $primary;

@media (max-width: 768px) {
width: 100%;
float: none;
margin: 1rem 0;
}
}

.image-right {
width: 40%;
float: right;
margin: 1rem 0rem 1rem 1.25rem;
box-shadow: 0px 5px 10px 1px $primary;

@media (max-width: 768px) {
width: 100%;
float: none;
margin: 1rem 0;
}
}
.image-right-no-shadow {
width: 40%;
float: right;
margin: 1rem 0rem 1rem 1rem;

@media (max-width: 768px) {
width: 100%;
float: none;
margin: 1rem 0;
}
}
.image-left-no-shadow {
width: 40%;
float: left;
margin: 1rem 1rem 1rem 0rem;

@media (max-width: 768px) {
width: 100%;
float: none;
margin: 1rem 0;
}
}
.image-center-shadow {
display: block;
Expand Down Expand Up @@ -112,11 +136,16 @@ div.tip {
}

.pagination-nav {
grid-gap: 1rem;
display: grid;
gap: 1rem;
grid-template-columns: repeat(2, 1fr);
grid-gap: 1rem;
display: grid;
gap: 1rem;
grid-template-columns: repeat(2, 1fr);

@media (max-width: 576px) {
grid-template-columns: 1fr;
gap: 0.75rem;
}
}


.pagination-nav__link {
Expand Down
13 changes: 4 additions & 9 deletions assets/scss/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
min-height: 4rem;
margin: auto;
z-index: 32;
padding: 0 !important;

.navbar-brand {
text-transform: none;
Expand Down Expand Up @@ -68,18 +69,12 @@

@include media-breakpoint-down(lg) {
.td-navbar-nav-scroll {
max-width: fit-content;
height: 3.5rem;
font-size: 0.9rem;
}

.navbar-brand {
// margin-right: 0;
width: 100%;
max-width: 100%;
}

.navbar-nav {
padding-bottom: 2rem;
overflow-x: auto;
flex-wrap: nowrap;
}
}

Expand Down
54 changes: 50 additions & 4 deletions assets/scss/_navbar_project.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
.navbar-brand {
width: 280.06px;
height: auto;

img {
width: 100%;
height: auto;
}

@media (max-width: 768px) {
width: 240px;
}

@media (max-width: 576px) {
width: 200px;
}
}

.nav-item {
margin-right: 0.75rem;
box-sizing: border-box;

@media (max-width: 768px) {
margin-right: 0.4rem;
}

.current {
color: $primary;
Expand All @@ -21,27 +39,55 @@
display: flex;
flex-direction: row;
flex-wrap: wrap;
width: 180px;
width: 220px;
justify-content: center;
padding: 0.5rem .2rem;
// padding: 0;
transform: translate(-15%, 2.5rem);
border-radius: 0.75rem;

@media (max-width: 576px) {
width: 180px;
transform: translate(-20%, 2.5rem);
}

&::after{
content: "";
width: 5rem;
width: 6rem;
@media (max-width: 576px) {
width: 5rem;
}
}
&--col{
flex-direction: column;
padding: 0.1rem .1rem;
}
.dropdown-item {
height: 5rem;
width: 5rem;
min-height: 5.5rem;
height: auto;
width: 6rem;
display: flex;
flex-direction: column;
align-items: center;
border-radius: 0.75rem;
padding: 0.5rem 0.25rem 0.75rem;

span {
font-size: 0.85rem;
margin-top: 0.25rem;
}

@media (max-width: 576px) {
min-height: 4.8rem;
height: auto;
width: 5rem;
padding: 0.5rem 0.25rem 0.5rem;

span {
font-size: 0.75rem;
}
}

.logo-container {
height: 2rem;
width: 2rem;
Expand Down
8 changes: 8 additions & 0 deletions assets/scss/_search_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
background: transparent;
position: relative;
width: 100%;
max-width: 100%;
margin: 0;
padding: 0;

// Search icon
&__icon {
Expand Down Expand Up @@ -130,6 +133,7 @@
.td-navbar {
min-height: 6rem;
background-color: $body-bg !important;
width: 100%;

.td-navbar-nav-scroll {
// max-width: fit-content;
Expand All @@ -140,6 +144,7 @@

.navbar-brand {
margin: 1.25rem;
flex-shrink: 0;
}
.td-search {
display: flex;
Expand All @@ -148,6 +153,9 @@
// background-color: #EBC017;
background-color: #2e2e31;
border-radius: 1rem;
margin: 0 0.5rem;
flex: 1;
max-width: calc(100% - 1rem);

.td-search__input {
width: 100%;
Expand Down
45 changes: 32 additions & 13 deletions assets/scss/_sidebar-tree.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.td-sidebar-nav {
$_max-height: calc(100vh - 8.5rem);

padding: 0;
padding-right: 0.5rem;
margin-right: -15px;
margin-left: -15px;
Expand All @@ -19,7 +20,7 @@
@include media-breakpoint-up(lg) {
// There's no search box so add top padding
// and adjust max-height:
padding-top: 1rem;
padding-top: 0;

@supports (position: sticky) {
max-height: calc(#{$_max-height} + 4.5rem);
Expand Down Expand Up @@ -59,7 +60,8 @@
}

a {
color: var(--bs-secondary-color);
color: var(--sidebar-section-title-color);
transition: var(--sidebar-link-transition);
}
}

Expand All @@ -68,25 +70,40 @@
padding-bottom: 0.375rem;

&__page {
color: var(--bs-body-color);
font-weight: $font-weight-light;
color: var(--sidebar-link-color);
font-weight: var(--sidebar-link-font-weight);
transition: var(--sidebar-link-transition);
}
}

a {
color: var(--sidebar-link-color);
transition: var(--sidebar-link-transition);

&:focus,
&:hover {
color: var(--bs-link-color);
color: var(--sidebar-link-hover-color);
background-color: var(--sidebar-link-hover-bg);
border-radius: 4px;
padding: 0.25rem 0.5rem;
}

&.active {
font-weight: $font-weight-bold;
font-weight: var(--sidebar-active-link-font-weight);
color: var(--sidebar-link-active-color);
}
}

.dropdown {
a {
color: var(--bs-tertiary-color);
color: var(--sidebar-secondary-text-color);
transition: var(--sidebar-link-transition);

&:hover,
&:focus {
color: var(--sidebar-link-hover-color);
background-color: var(--sidebar-link-hover-bg);
}
}

.nav-link {
Expand Down Expand Up @@ -119,13 +136,14 @@
@include link-decoration;

@include media-breakpoint-up(md) {
padding-top: 4rem;
background-color: var(--bs-body-tertiary-bg);
padding-right: 1rem;
border-right: 1px solid var(--bs-border-color);
padding-top: 0;
background-color: var(--sidebar-bg-color);
padding-right: var(--sidebar-padding-horizontal);
padding-left: var(--sidebar-padding-horizontal);
border-right: var(--sidebar-border-width) solid var(--sidebar-border-color);
}

padding-bottom: 1rem;
padding-bottom: var(--sidebar-padding-vertical);

&__toggle {
line-height: 1;
Expand All @@ -134,7 +152,8 @@
}

&__search {
padding: 1rem 0;
padding: 0 0;
padding-bottom: 1rem;
}

&__inner {
Expand Down
Loading
Loading