Skip to content

Commit

Permalink
Merge pull request #46 from jordanopensource/feature/app-category-sin…
Browse files Browse the repository at this point in the history
…gle-page

Fix search field and alignments in apps page
  • Loading branch information
wissamataleh authored Mar 16, 2021
2 parents 27ea084 + 3372318 commit b507bb7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions components/Elements/Dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
}
.dropdown-link {
@apply w-full flex flex-row flex-no-wrap items-center justify-start;
@apply w-full h-full flex flex-row flex-no-wrap items-center justify-start;
}
.dropdown-link:hover>* {
Expand All @@ -84,7 +84,6 @@
.dropdown-menu {
@apply absolute z-10 overflow-y-auto py-4 my-4 bg-white;
top: 100%;
left: 40px;
background-clip: padding-box;
}
Expand Down
4 changes: 2 additions & 2 deletions components/Lists/AppAll.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<div class="grid-list container">
<div class="flex flex-row flex-wrap justify-between items-center mb-8">
<h2 v-if="title" class="mb-4 flex-grow">{{ title }}</h2>
<div class="flex flex-row flex-no-wrap justify-start items-center mb-4">
<h2 v-if="title" class="mb-4">{{ title }}</h2>
<div class="flex flex-grow flex-row flex-no-wrap justify-end items-center mb-4">
<!-- Sort -->
<div class="inline-block relative">
<select name="sortMembers" id="sortMembers" v-model="sortValue"
Expand Down
2 changes: 1 addition & 1 deletion pages/apps/category/_slug.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="container flex flex-col-reverse lg:flex-row justify-between py-6">
<ElementsDropdown :items="categories" :active="activeCat" @setActive="setActiveCat" class="min-w-xs" />
<ElementsControlInput v-model="searchString" :placeholder="$t('searchIn') + ' ' + activeCatTitle"
class="search-bar mb-8 lg:mb-0 rounded-full flex-grow w-full lg:w-auto" />
class="search-bar mb-8 lg:mb-0 rounded-full flex-grow w-full lg:w-auto rtl:mr-8 ltr:ml-8" />
</div>
<ListsAppAll v-if="allApps.length" :title="searchString ? $t('searchResults') + ' ' + searchString : ''"
:contentList="filterBy(allApps, searchString, 'name_en', 'name_ar')" class="my-10" />
Expand Down
4 changes: 2 additions & 2 deletions pages/apps/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<div class="container flex flex-col-reverse lg:flex-row justify-between py-6">
<ElementsDropdown :items="categories" :active="activeCat" @setActive="setActiveCat" class="min-w-xs" />
<ElementsControlInput v-model="searchString" :placeholder="$t('search')"
class="search-bar mb-8 lg:mb-0 rounded-full flex-grow w-full lg:w-auto" />
class="search-bar mb-8 lg:mb-0 rounded-full flex-grow w-full lg:w-auto rtl:mr-8 ltr:ml-8" />
</div>
<ListsAppSpotlight v-if="spotlightApps.length && !searchString" :title="$t('spotlightApp')"
:content="orderBy(spotlightApps, 'published_at', -1)[0]" class="mt-10" />
<ListsAppGrid v-if="popularApps.length && !searchString" :title="$t('popularApps')" :contentList="popularApps"
:count="3" class="mt-10" />
<ListsAppAll v-if="allApps.length" :title="searchString ? $t('searchResults') + ' ' + searchString : $t('allApps')"
:contentList="filterBy(allApps, searchString, 'name_en', 'description_en', 'name_ar', 'description_ar')"
:contentList="filterBy(allApps, searchString, 'name_en', 'name_ar')"
class="my-10" />
</div>
</template>
Expand Down

0 comments on commit b507bb7

Please sign in to comment.