Skip to content
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

bugfix: mobile tabs for demo page horizontally scroll now #2958

Merged
merged 1 commit into from
Dec 16, 2024
Merged
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
2 changes: 1 addition & 1 deletion server/src/public/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<div class="flex-1"></div>
<div
id="nav-links"
class="flex flex-wrap items-center gap-4 justify-center sm:justify-right"
class="flex flex-wrap items-center gap-4 justify-center sm:justify-right -mt-2 sm:mt-0"
>
<a
class="flex items-center gap-1 text-black"
Expand Down
17 changes: 13 additions & 4 deletions server/src/public/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,13 @@
padding: 0rem;
}

#tab-buttons {
display: flex;
flex-wrap: nowrap;
overflow-x: auto;
gap: 0.25rem;
}

.tab-button {
background-color: #ffffff;
border-radius: 0.25rem 0.25rem 0rem 0rem;
Expand Down Expand Up @@ -280,10 +287,12 @@
<main>
<div class="basic">
<div id="root" class="min-h-[36px]"></div>
{% if params.singleProductOptions and params.singleProductOptions.productName %} {% include
"product.html" %} {% endif %} {% if tabs|length > 0 %} {% include
"tabs.html" %} {% else %} {% include "search-component-code.html" %} {%
endif %}
{% if params.singleProductOptions and
params.singleProductOptions.productName %} {% include "product.html" %}
{% else %}
<div class="mt-24 sm:mt-6"></div>
{% endif %} {% if tabs|length > 0 %} {% include "tabs.html" %} {% else
%} {% include "search-component-code.html" %} {% endif %}
</div>
</main>
{% if logged_in %}
Expand Down
1 change: 1 addition & 0 deletions server/src/public/tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
tabButtons.forEach((tabButton, index) => {
if (index === tabIndex) {
tabButton.classList.add('active');
tabButton.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
} else {
tabButton.classList.remove('active');
}
Expand Down
12 changes: 12 additions & 0 deletions server/static/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,10 @@ video {
margin-right: auto;
}

.-mt-2 {
margin-top: -0.5rem;
}

.mt-0\.5 {
margin-top: 0.125rem;
}
Expand Down Expand Up @@ -616,6 +620,10 @@ video {
-webkit-line-clamp: 1;
}

.block {
display: block;
}

.flex {
display: flex;
}
Expand Down Expand Up @@ -931,6 +939,10 @@ video {
margin-right: 1.5rem;
}

.sm\:mt-0 {
margin-top: 0px;
}

.sm\:mt-6 {
margin-top: 1.5rem;
}
Expand Down