Skip to content

fix: smaller screen view and search for mobile views #689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 35 commits into from
May 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
11427c1
fix: search button for field
Revathyvenugopal162 May 9, 2025
18db9c8
feat: search for mobile view
Revathyvenugopal162 May 9, 2025
16da9ed
chore: adding changelog file 689.fixed.md [dependabot-skip]
pyansys-ci-bot May 9, 2025
b881df0
Merge branch 'main' into fix/screen-view
Revathyvenugopal162 May 12, 2025
18fe4ae
fix: add percentage
Revathyvenugopal162 May 12, 2025
ae8fd4d
fix(styles): update the laptop width
Revathyvenugopal162 May 12, 2025
eebe5ae
fix(styles): update the shortcut visisbility
Revathyvenugopal162 May 12, 2025
7fa5225
Merge branch 'main' into fix/screen-view
Revathyvenugopal162 May 12, 2025
8169bf7
fix(js): update the mobile search
Revathyvenugopal162 May 12, 2025
8dfa6b6
Merge branch 'main' into fix/screen-view
Revathyvenugopal162 May 12, 2025
dfe3cbb
fix: media container to 1040
Revathyvenugopal162 May 13, 2025
0e32194
Merge branch 'fix/screen-view' of https://github.com/ansys/ansys-sphi…
Revathyvenugopal162 May 13, 2025
2eacb3e
fix: media sidebar
Revathyvenugopal162 May 13, 2025
af19fd6
feat: add minimum to 1040px
Revathyvenugopal162 May 13, 2025
d2c801b
fix: cleanup
Revathyvenugopal162 May 13, 2025
45acf4a
fix(styles): breakpoint to 1200
Revathyvenugopal162 May 13, 2025
39286b6
Merge branch 'main' into fix/screen-view
Revathyvenugopal162 May 13, 2025
4231698
fix: media sidebar
Revathyvenugopal162 May 13, 2025
170b491
Merge branch 'fix/screen-view' of https://github.com/ansys/ansys-sphi…
Revathyvenugopal162 May 13, 2025
0df0bb5
Merge branch 'main' into fix/screen-view
MaxJPRey May 14, 2025
3ce2acc
feat: add resize window
Revathyvenugopal162 May 16, 2025
0b73fb4
Merge branch 'fix/screen-view' of https://github.com/ansys/ansys-sphi…
Revathyvenugopal162 May 16, 2025
d9c84ef
feat: add container width
Revathyvenugopal162 May 16, 2025
b78aef2
feat: cleanup and docstrings
Revathyvenugopal162 May 16, 2025
65664c2
Merge branch 'main' into fix/screen-view
Revathyvenugopal162 May 26, 2025
0b854f8
Merge branch 'main' into fix/screen-view
Revathyvenugopal162 May 27, 2025
e79d272
feat: merge main
Revathyvenugopal162 May 27, 2025
52ed36b
Merge branch 'main' into fix/screen-view
Revathyvenugopal162 May 27, 2025
04aa525
Merge branch 'main' into fix/screen-view
jorgepiloto May 27, 2025
c7234d1
Merge branch 'main' into fix/screen-view
Revathyvenugopal162 May 28, 2025
b0ca815
Apply suggestions from code review
Revathyvenugopal162 May 28, 2025
fb80cf8
fix: precommit
Revathyvenugopal162 May 28, 2025
7142feb
fix: cleanup
Revathyvenugopal162 May 28, 2025
a3c21de
fix: cleanup the docstrings
Revathyvenugopal162 May 28, 2025
c122593
fix: px to rem
Revathyvenugopal162 May 28, 2025
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
1 change: 1 addition & 0 deletions doc/changelog.d/689.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
smaller screen view and search for mobile views
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

:root {
/** Ansys specific changes to the theme */

/**
* Ansys Font family
*
Expand Down Expand Up @@ -52,6 +51,7 @@
--bs-nav-link-font-size: 0.875rem; /* 14px */
--bs-navbar-color: var(--bs-ast-navbar-color);
--ast-font-sidebar-header: 1rem; /* 16px */

/**
* weight
*/
Expand Down Expand Up @@ -401,7 +401,7 @@ html[data-theme="dark"] {
body {
font-family: var(--ast-body-family);
line-height: var(--ast-global-line-height);
font-size: 14px;
font-size: 0.875rem; // 14px
color: var(--ast-color-text);
}

Expand All @@ -420,5 +420,108 @@ h6 {
}

h1 {
line-height: 56px;
line-height: 3.5rem; // 56px
}


/* Mobile-specific overrides (≤ 1200px) */
@media (max-width: 1200px) {
.navbar-header-items {
display: none !important;
flex-grow: 1 !important;
padding: 0 0 0 0.5rem !important;
}

ul.navbar-nav {
align-items: baseline;
}

.navbar-center-items .navbar-item {
display: inline-block;
}

.navbar-persistent--mobile {
display: none;
}

.navbar-persistent--container {
display: flex;
}

.bd-sidebar-primary {
flex-grow: 0.75;
height: 100vh;
left: 0;
margin-left: -75%;
max-height: 100vh !important;
max-width: 21.875rem !important; // 350px
position: fixed;
top: 0;
transition: visibility 0.2s ease-out,margin 0.2s ease-out;
visibility: hidden;
width: 75%;
z-index: 1050;
display: flex !important;
}

.bd-sidebar-primary[open] {
visibility: visible !important;
}

button.primary-toggle {
display: flex !important;
}

#pst-collapse-sidebar-button {
display: none !important;
}

nav.bd-links {
display: block !important;
}

.nav-link .hide-on-wide {
display: none !important;
}

.bd-sidebar-primary.hide-on-wide {
display: flex !important;
}

.bd-sidebar-primary .sidebar-header-items {
display: flex !important;
}
}

/* Desktop-specific overrides (> 1200px) */
@media (min-width: 1200px) {
.navbar-header-items {
display: inherit;
flex-grow: 1;
padding: 0 0 0 0.5rem;
}

ul.navbar-nav {
align-items: baseline;
}

.navbar-center-items .navbar-item {
display: inline-block;
}

.navbar-persistent--mobile {
display: none;
}

.navbar-persistent--container {
display: flex;
}

.bd-sidebar-primary {
font-size: var(--pst-sidebar-font-size);
}

button.primary-toggle {
display: none;
}
}
58 changes: 46 additions & 12 deletions src/ansys_sphinx_theme/assets/styles/ast-search.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* Static Search Results Container */

.bd-search{
display: flex;
}
.static-search-results {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -80,10 +84,6 @@ html[data-theme="light"] .highlight {
.bd-search .search-button__kbd-shortcut {
background-color: var(--ast-search-bar-enable-background) !important;
box-shadow: none !important;
height: 2.25rem; /* 36px */
display: flex;
flex-wrap: wrap;
align-content: center;
}

/* Index Select Dropdown */
Expand Down Expand Up @@ -149,21 +149,55 @@ html[data-theme="light"] .highlight {
}

/* Responsive Styles */
@media (max-width: 48rem) { /* 768px */
.bd-search input.expanded {
width: 6.25rem; /* 100px */
@media (min-width: 1200px) and (max-width: 85.375rem) {
.bd-search input.form-control.expanded {
width: 100%; /* 320px */
}

.bd-search input.form-control {
width: 100%; /* 240px */
}

.bd-search .search-button__kbd-shortcut {
display: none !important;
}

.static-search-results {
width: 50%; /* 480px */
}
}

@media (max-width: 1200px) {

.bd-search input.form-control.expanded {
width: 5rem; /* 320px */
}

.form-control {
width: 3.125rem; /* 50px */
.bd-search input.form-control {
width: 100%; /* 240px */
}

.result {
width: 6.25rem; /* 100px */
.static-search-results {
width: 50%; /* 480px */
}

.bd-search .search-button__kbd-shortcut {
display: none;
display: none !important;
}
}

// laptop
@media (min-width: 85.375rem) and (max-width: 128rem) {
.bd-search input.form-control.expanded {
width: 35rem; /* 560px */
}

.bd-search input.form-control {
width: 100%; /* 240px */
}

.static-search-results {
width: 37rem; /* 600px */
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -744,25 +744,25 @@ button.btn.version-switcher__button:hover {
max-width: 100%;
}

@media (min-width: 960px) {
@media (min-width: 1200px) {
.bd-sidebar-primary {
width: 20%;
}
}

@media (min-width: 960px) {
@media (min-width: 1200px) {
.col-lg-3 {
width: fit-content;
}
}

@media (min-width: 960px) {
@media (min-width: 1200px) {
.bd-page-width {
max-width: min(100%, 1700px) !important;
}
}

@media (min-width: 960px) {
@media (min-width: 1200px) {
.bd-main .bd-content .bd-article-container {
width: min(100%, 1070px);
}
Expand Down
Loading
Loading