Skip to content

Commit

Permalink
Add ?q= URL query param for searching glyphs
Browse files Browse the repository at this point in the history
  • Loading branch information
electrikmilk committed May 26, 2024
1 parent c4e15da commit 8c0ce86
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
</f7-nav-title>
<f7-subnavbar>
<f7-searchbar search-container=".search-list"
ref="searchbar"
class="searchbar"
:outline="false"
placeholder="Find Glyphs"
search-in=".item-title">
</f7-searchbar>
</f7-subnavbar>
Expand Down Expand Up @@ -214,6 +214,11 @@ export default {
},
mounted() {
this.blue = f7.colors['blue'];
const params = new URL(window.location.href).searchParams;
if (params.has('q')) {
this.$refs.searchbar.search(params.get('q'));
}
},
methods: {
alert(text, title) {
Expand Down

0 comments on commit 8c0ce86

Please sign in to comment.