Skip to content

Add "No Match" text to interactive demo #184

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 2 commits into from
Sep 8, 2023
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Follow the links below to find out more about this project.
- [Documentation](https://reactive-python.github.io/reactpy-django)
- [GitHub Discussions](https://github.com/reactive-python/reactpy-django/discussions)
- [Discord](https://discord.gg/uNb5P4hA9X)
- [Contributor Guide](https://reactive-python.github.io/reactpy-django/latest/contribute/code/)
- [Contributor Guide](https://reactive-python.github.io/reactpy-django/latest/about/code/)
- [Code of Conduct](https://github.com/reactive-python/reactpy-django/blob/main/CODE_OF_CONDUCT.md)

<!--resources-end-->
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ <h3>Introducing Quantum Components</h3>
</svg>
</button>
</div>
<p class="no-match"></p>
</div>

<script>
Expand All @@ -159,6 +160,12 @@ <h3>Introducing Quantum Components</h3>
}
document.querySelector(".browser-viewport h2").innerText =
numVids + " Videos";

if (search && numVids == 0) {
document.querySelector(".browser-viewport .no-match").innerText = `No matches for “${search}”`;
} else {
document.querySelector(".browser-viewport .no-match").innerText = "";
}
});
</script>
</div>
Expand Down
5 changes: 5 additions & 0 deletions docs/src/assets/css/navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
margin: 0.2rem -0.8rem;
}

[dir="ltr"] .md-header__title.md-header__title--active {
margin: 0;
transition: margin 0.35s ease;
}

/* Mobile Styling */
@media screen and (max-width: 60em) {
label.md-header__button.md-icon[for="__drawer"] {
Expand Down