Skip to content

Commit 749e707

Browse files
authored
Add "No Match" text to interactive demo (#184)
* Add "No Match" text to interactive demo * fix broken link
1 parent ad327c4 commit 749e707

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Follow the links below to find out more about this project.
107107
- [Documentation](https://reactive-python.github.io/reactpy-django)
108108
- [GitHub Discussions](https://github.com/reactive-python/reactpy-django/discussions)
109109
- [Discord](https://discord.gg/uNb5P4hA9X)
110-
- [Contributor Guide](https://reactive-python.github.io/reactpy-django/latest/contribute/code/)
110+
- [Contributor Guide](https://reactive-python.github.io/reactpy-django/latest/about/code/)
111111
- [Code of Conduct](https://github.com/reactive-python/reactpy-django/blob/main/CODE_OF_CONDUCT.md)
112112

113113
<!--resources-end-->

docs/overrides/home-code-examples/add-interactivity-demo.html

+7
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ <h3>Introducing Quantum Components</h3>
134134
</svg>
135135
</button>
136136
</div>
137+
<p class="no-match"></p>
137138
</div>
138139

139140
<script>
@@ -159,6 +160,12 @@ <h3>Introducing Quantum Components</h3>
159160
}
160161
document.querySelector(".browser-viewport h2").innerText =
161162
numVids + " Videos";
163+
164+
if (search && numVids == 0) {
165+
document.querySelector(".browser-viewport .no-match").innerText = `No matches for “${search}”`;
166+
} else {
167+
document.querySelector(".browser-viewport .no-match").innerText = "";
168+
}
162169
});
163170
</script>
164171
</div>

docs/src/assets/css/navbar.css

+5
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
margin: 0.2rem -0.8rem;
3232
}
3333

34+
[dir="ltr"] .md-header__title.md-header__title--active {
35+
margin: 0;
36+
transition: margin 0.35s ease;
37+
}
38+
3439
/* Mobile Styling */
3540
@media screen and (max-width: 60em) {
3641
label.md-header__button.md-icon[for="__drawer"] {

0 commit comments

Comments
 (0)