Skip to content

Commit

Permalink
Add "No Match" text to interactive demo (#184)
Browse files Browse the repository at this point in the history
* Add "No Match" text to interactive demo

* fix broken link
  • Loading branch information
Archmonger authored Sep 8, 2023
1 parent ad327c4 commit 749e707
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
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-->
7 changes: 7 additions & 0 deletions docs/overrides/home-code-examples/add-interactivity-demo.html
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

0 comments on commit 749e707

Please sign in to comment.