Skip to content

Commit

Permalink
Fixing Github Pages Search Bar
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWongLife committed Jun 2, 2024
1 parent 15b5aa0 commit dec035f
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 84 deletions.
17 changes: 3 additions & 14 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<form class="search navbar-form navbar-right" action="http://www.google.com/search" method="GET" role="search" onSubmit="Gsitesearch(this)">
<div class="input-group"> <input name="q" type="hidden" />
<input class="form-control" name="qfront" type="search" required class="searchField" placeholder="Search" maxlength="50"/>
<span class="input-group-btn"> <button type="submit" class="search-button btn btn-primary"> <span class="glyphicon glyphicon-search"></span> </button> </span>
<span class="input-group-btn"> <button type="submit" class="search-button btn btn-primary"> <span class="fa-solid fa-magnifying-glass fa-sm"></span> </button> </span>
</div>
</form>
</div>
Expand Down Expand Up @@ -262,19 +262,8 @@ <h4 class="header404">404 <i class="fa-solid fa-magnifying-glass fa-sm"></i></h4
<script src="js/script.js"></script>
<script src="js/scroll.js"></script>
<script>
import { Autocomplete, Collapse, Dropdown, Input, Ripple, initMDB } from "mdb-ui-kit";
initMDB({ Collapse, Dropdown, Input, Ripple });
const navbarAutocomplete = document.querySelector('#navbar-search-autocomplete');
const navbarData = ['About', 'Contact', 'Resume'];
const navbarDataFilter = (value) => {
return navbarData.filter((item) => {
return item.toLowerCase().startsWith(value.toLowerCase());
});
};

new Autocomplete(navbarAutocomplete, {
filter: navbarDataFilter,
});
import { Ripple, initMDB } from "mdb-ui-kit";
initMDB({ Ripple });
</script>
</body>

Expand Down
17 changes: 3 additions & 14 deletions html/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<form class="search navbar-form navbar-right" action="http://www.google.com/search" method="GET" role="search" onSubmit="Gsitesearch(this)">
<div class="input-group"> <input name="q" type="hidden" />
<input class="form-control" name="qfront" type="search" required class="searchField" placeholder="Search" maxlength="50"/>
<span class="input-group-btn"> <button type="submit" class="search-button btn btn-primary"> <span class="glyphicon glyphicon-search"></span> </button> </span>
<span class="input-group-btn"> <button type="submit" class="search-button btn btn-primary"> <span class="fa-solid fa-magnifying-glass fa-sm"></span> </button> </span>
</div>
</form>
</div>
Expand Down Expand Up @@ -286,19 +286,8 @@ <h3 align="center">Senior @ University of Illinois Urbana-Champaign (UIUC) major
<script src="../js/script.js"></script>
<script src="../js/scroll.js"></script>
<script>
import { Autocomplete, Collapse, Dropdown, Input, Ripple, initMDB } from "mdb-ui-kit";
initMDB({ Collapse, Dropdown, Input, Ripple });
const navbarAutocomplete = document.querySelector('#navbar-search-autocomplete');
const navbarData = ['About', 'Contact', 'Resume'];
const navbarDataFilter = (value) => {
return navbarData.filter((item) => {
return item.toLowerCase().startsWith(value.toLowerCase());
});
};

new Autocomplete(navbarAutocomplete, {
filter: navbarDataFilter,
});
import { Ripple, initMDB } from "mdb-ui-kit";
initMDB({ Ripple });
</script>
</body>

Expand Down
17 changes: 3 additions & 14 deletions html/contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<form class="search navbar-form navbar-right" action="http://www.google.com/search" method="GET" role="search" onSubmit="Gsitesearch(this)">
<div class="input-group"> <input name="q" type="hidden" />
<input class="form-control" name="qfront" type="search" required class="searchField" placeholder="Search" maxlength="50"/>
<span class="input-group-btn"> <button type="submit" class="search-button btn btn-primary"> <span class="glyphicon glyphicon-search"></span> </button> </span>
<span class="input-group-btn"> <button type="submit" class="search-button btn btn-primary"> <span class="fa-solid fa-magnifying-glass fa-sm"></span> </button> </span>
</div>
</form>
</div>
Expand Down Expand Up @@ -290,19 +290,8 @@ <h1 class="text-center mt-5">Let's start a conversation <i class="fa-solid fa-co
<script src="../js/script.js"></script>
<script src="../js/scroll.js"></script>
<script>
import { Autocomplete, Collapse, Dropdown, Input, Ripple, initMDB } from "mdb-ui-kit";
initMDB({ Collapse, Dropdown, Input, Ripple });
const navbarAutocomplete = document.querySelector('#navbar-search-autocomplete');
const navbarData = ['About', 'Contact', 'Resume'];
const navbarDataFilter = (value) => {
return navbarData.filter((item) => {
return item.toLowerCase().startsWith(value.toLowerCase());
});
};

new Autocomplete(navbarAutocomplete, {
filter: navbarDataFilter,
});
import { Ripple, initMDB } from "mdb-ui-kit";
initMDB({ Ripple });
</script>
</body>

Expand Down
17 changes: 3 additions & 14 deletions html/resume.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<form class="search navbar-form navbar-right" action="http://www.google.com/search" method="GET" role="search" onSubmit="Gsitesearch(this)">
<div class="input-group"> <input name="q" type="hidden" />
<input class="form-control" name="qfront" type="search" required class="searchField" placeholder="Search" maxlength="50"/>
<span class="input-group-btn"> <button type="submit" class="search-button btn btn-primary"> <span class="glyphicon glyphicon-search"></span> </button> </span>
<span class="input-group-btn"> <button type="submit" class="search-button btn btn-primary"> <span class="fa-solid fa-magnifying-glass fa-sm"></span> </button> </span>
</div>
</form>
</div>
Expand Down Expand Up @@ -242,19 +242,8 @@ <h1 class="text-center mt-5">Check out my resume <i class="fa-solid fa-file fa-s
<script src="../js/script.js"></script>
<script src="../js/scroll.js"></script>
<script>
import { Autocomplete, Collapse, Dropdown, Input, Ripple, initMDB } from "mdb-ui-kit";
initMDB({ Collapse, Dropdown, Input, Ripple });
const navbarAutocomplete = document.querySelector('#navbar-search-autocomplete');
const navbarData = ['About', 'Contact', 'Resume'];
const navbarDataFilter = (value) => {
return navbarData.filter((item) => {
return item.toLowerCase().startsWith(value.toLowerCase());
});
};

new Autocomplete(navbarAutocomplete, {
filter: navbarDataFilter,
});
import { Ripple, initMDB } from "mdb-ui-kit";
initMDB({ Ripple });
</script>
</body>

Expand Down
17 changes: 3 additions & 14 deletions html/thanks.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<form class="search navbar-form navbar-right" action="http://www.google.com/search" method="GET" role="search" onSubmit="Gsitesearch(this)">
<div class="input-group"> <input name="q" type="hidden" />
<input class="form-control" name="qfront" type="search" required class="searchField" placeholder="Search" maxlength="50"/>
<span class="input-group-btn"> <button type="submit" class="search-button btn btn-primary"> <span class="glyphicon glyphicon-search"></span> </button> </span>
<span class="input-group-btn"> <button type="submit" class="search-button btn btn-primary"> <span class="fa-solid fa-magnifying-glass fa-sm"></span> </button> </span>
</div>
</form>
</div>
Expand Down Expand Up @@ -248,19 +248,8 @@ <h1 class="text-center mt-5">Thank You</h1>
<script src="../js/script.js"></script>
<script src="../js/scroll.js"></script>
<script>
import { Autocomplete, Collapse, Dropdown, Input, Ripple, initMDB } from "mdb-ui-kit";
initMDB({ Collapse, Dropdown, Input, Ripple });
const navbarAutocomplete = document.querySelector('#navbar-search-autocomplete');
const navbarData = ['About', 'Contact', 'Resume'];
const navbarDataFilter = (value) => {
return navbarData.filter((item) => {
return item.toLowerCase().startsWith(value.toLowerCase());
});
};

new Autocomplete(navbarAutocomplete, {
filter: navbarDataFilter,
});
import { Ripple, initMDB } from "mdb-ui-kit";
initMDB({ Ripple });
</script>
</body>

Expand Down
17 changes: 3 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<form class="search navbar-form navbar-right" action="http://www.google.com/search" method="GET" role="search" onSubmit="Gsitesearch(this)">
<div class="input-group"> <input name="q" type="hidden" />
<input class="form-control" name="qfront" type="search" required class="searchField" placeholder="Search" maxlength="50"/>
<span class="input-group-btn"> <button type="submit" class="search-button btn btn-primary"> <span class="glyphicon glyphicon-search"></span> </button> </span>
<span class="input-group-btn"> <button type="submit" class="search-button btn btn-primary"> <span class="fa-solid fa-magnifying-glass fa-sm"></span> </button> </span>
</div>
</form>
</div>
Expand Down Expand Up @@ -352,19 +352,8 @@ <h4>Visual Studio Code</h4>
<script src="js/script.js"></script>
<script src="js/scroll.js"></script>
<script>
import { Autocomplete, Collapse, Dropdown, Input, Ripple, initMDB } from "mdb-ui-kit";
initMDB({ Collapse, Dropdown, Input, Ripple });
const navbarAutocomplete = document.querySelector('#navbar-search-autocomplete');
const navbarData = ['About', 'Contact', 'Resume'];
const navbarDataFilter = (value) => {
return navbarData.filter((item) => {
return item.toLowerCase().startsWith(value.toLowerCase());
});
};

new Autocomplete(navbarAutocomplete, {
filter: navbarDataFilter,
});
import { Ripple, initMDB } from "mdb-ui-kit";
initMDB({ Ripple });
</script>
</body>

Expand Down

0 comments on commit dec035f

Please sign in to comment.