From 2c84128a72f841be246192f4bb03b9cf41aa1992 Mon Sep 17 00:00:00 2001 From: Nils Windisch <windisch@sub.uni-goettingen.de> Date: Thu, 17 Jun 2021 14:14:26 +0200 Subject: [PATCH] feat: search related --- src/.vuepress/components/SearchInput.vue | 34 +++++++++++ .../components/SearchResultEmpty.vue | 19 ++++++ src/.vuepress/components/SearchResultList.vue | 61 +++++++++++++++++++ src/search.md | 15 +++++ 4 files changed, 129 insertions(+) create mode 100644 src/.vuepress/components/SearchInput.vue create mode 100644 src/.vuepress/components/SearchResultEmpty.vue create mode 100644 src/.vuepress/components/SearchResultList.vue create mode 100644 src/search.md diff --git a/src/.vuepress/components/SearchInput.vue b/src/.vuepress/components/SearchInput.vue new file mode 100644 index 0000000..e2e3b81 --- /dev/null +++ b/src/.vuepress/components/SearchInput.vue @@ -0,0 +1,34 @@ +<template> + <form action=""> + <v-container> + <v-row> + <v-col + cols="6" + > + <!-- TODO: provide input for characters other than latin --> + <v-text-field + v-model="search" + label="Your Search String" + outlined + dense + hide-details + ></v-text-field> + </v-col> + <v-col + cols="2" + class="d-flex align-center" + > + <v-btn + tile + color="primary" + > + Start Search + </v-btn> + </v-col> + </v-row> + </v-container> + </form> +</template> + +<style lang="scss" scoped> +</style> diff --git a/src/.vuepress/components/SearchResultEmpty.vue b/src/.vuepress/components/SearchResultEmpty.vue new file mode 100644 index 0000000..e9ec97a --- /dev/null +++ b/src/.vuepress/components/SearchResultEmpty.vue @@ -0,0 +1,19 @@ +<template> + <div> + <v-alert + border="left" + colored-border + color="red accent-4" + elevation="2" + > + <!-- + TODO: provide translation + TODO: insert the string the user searched for in the message + --> + No search results found. + </v-alert> + </div> +</template> + +<style lang="scss" scoped> +</style> diff --git a/src/.vuepress/components/SearchResultList.vue b/src/.vuepress/components/SearchResultList.vue new file mode 100644 index 0000000..1ad097b --- /dev/null +++ b/src/.vuepress/components/SearchResultList.vue @@ -0,0 +1,61 @@ +<template> + <div> + <v-list + two-line + subheader + > + <!-- TODO: add actual search results hits --> + <v-list-item> + <v-list-item-content> + <v-list-item-title>Sheet 2A</v-list-item-title> + <v-list-item-subtitle>Cod. Arab. 236 Copenhagen</v-list-item-subtitle> + </v-list-item-content> + </v-list-item> + <v-list-item> + <v-list-item-content> + <v-list-item-title>Sheet 1</v-list-item-title> + <v-list-item-subtitle>Vat. Arab. 2054</v-list-item-subtitle> + </v-list-item-content> + </v-list-item> + <v-list-item> + <v-list-item-content> + <v-list-item-title>Sheet 194</v-list-item-title> + <v-list-item-subtitle>Or. 1292. The Arabic Text in Leiden.</v-list-item-subtitle> + </v-list-item-content> + </v-list-item> + <v-list-item> + <v-list-item-content> + <v-list-item-title>Sheet 130</v-list-item-title> + <v-list-item-subtitle>Mingana Arabic Christian 93</v-list-item-subtitle> + </v-list-item-content> + </v-list-item> + <v-list-item> + <v-list-item-content> + <v-list-item-title>Sheet 3b</v-list-item-title> + <v-list-item-subtitle>Cambrigde Add 3497</v-list-item-subtitle> + </v-list-item-content> + </v-list-item> + <v-list-item> + <v-list-item-content> + <v-list-item-title>Sheet 82a</v-list-item-title> + <v-list-item-subtitle>Mingana Syriac 133 ff.82v-103r</v-list-item-subtitle> + </v-list-item-content> + </v-list-item> + <v-list-item> + <v-list-item-content> + <v-list-item-title>Sheet 293a</v-list-item-title> + <v-list-item-subtitle>Vat. sir. 159. ff.293rb-299va</v-list-item-subtitle> + </v-list-item-content> + </v-list-item> + </v-list> + <div class="text-center"> + <v-pagination + v-model="page" + :length="6" + ></v-pagination> + </div> + </div> +</template> + +<style lang="scss" scoped> +</style> diff --git a/src/search.md b/src/search.md new file mode 100644 index 0000000..a209a36 --- /dev/null +++ b/src/search.md @@ -0,0 +1,15 @@ +--- +home: false +title: Search +layout: Layout +--- + +# {{ $frontmatter.title }}{.text-h1 .mt-4 .mb-6 .font-weight-light .primary--text} + +Lorem ipsum dolor sit amut. Lorem ipsum dolor sit amut. Lorem ipsum dolor sit amut. Lorem ipsum dolor sit amut. Lorem ipsum dolor sit amut. Lorem ipsum dolor sit amut. Lorem ipsum dolor sit amut. Lorem ipsum dolor sit amut. Lorem ipsum dolor sit amut. Lorem ipsum dolor sit amut. Lorem ipsum dolor sit amut. {.body-2} + +<SearchInput/> + +<!-- TODO: check if any search results and show only one of the following two components --> +<SearchResultList/> +<SearchResultEmpty/> -- GitLab