mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 15:26:10 -06:00
fixed mobile sub-cats
This commit is contained in:
parent
b53a852a6a
commit
92eadf3821
@ -258,4 +258,75 @@ a.sort-by-open-dropdown:hover {
|
||||
|
||||
.navbar-collapse {
|
||||
padding-left: 15px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.mobile-sub-cats {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: #fff;
|
||||
padding: 0 !important;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
z-index: 999;
|
||||
display: flex !important;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.mobile-sub-cats {
|
||||
background-color: #f3f0f0;
|
||||
}
|
||||
|
||||
.mobile-sub-cats ul {
|
||||
background-color: #fff;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
padding-top: 10px;
|
||||
margin-bottom: 50px;
|
||||
width: 100%;
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.mobile-sub-cats .categories-list-li {
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.mobile-sub-cats .categories-list-li img {
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.mobile-sub-cats .categories-list-li .main-advs-count {
|
||||
color: #1064bc !important;
|
||||
}
|
||||
.mobile-sub-cats .categories-list-li .advs-count{
|
||||
font-weight: 200;
|
||||
color: #bcbbbb !important;
|
||||
}
|
||||
|
||||
.mobile-sub-cats .categories-list-li a {
|
||||
margin-bottom: 10px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.mobile-sub-cats .categories-list-li i{
|
||||
color: #bcbbbb !important;
|
||||
}
|
||||
|
||||
.mobile-sub-cats .categories-list-li a span:first-child{
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mobile-sub-cats .show-all {
|
||||
font-weight: bolder;
|
||||
color: #1064bc !important;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<div id="mobileListingPage" class="d-sm-none mb-5">
|
||||
|
||||
{% include "visiosoft.module.advs::list/partials/sub-categories-mobile" %}
|
||||
{% if not hideBreadcrump %}
|
||||
{% include "visiosoft.module.advs::list/partials/mobile-breadcrumb" %}
|
||||
{% endif %}
|
||||
|
||||
@ -0,0 +1,53 @@
|
||||
{% set sub_categories_limit = setting_value('visiosoft.theme.sahibinden::home_page_sub_categories_limit') %}
|
||||
|
||||
{% if setting_value('visiosoft.theme.sahibinden::show_subcategories_on_mobile_view')
|
||||
and subCats|length > 0
|
||||
and request().show != 'all' %}
|
||||
<div class="mobile-sub-cats">
|
||||
<ul class="categories-list px-0 mr-2 d-block d-sm-none">
|
||||
<li class="categories-list-li category-icon text-truncate d-flex justify-content-between text-dark">
|
||||
<a href="{{ url_current() }}?show=all" class="sub-category show-all">
|
||||
<span>
|
||||
{{ trans('visiosoft.theme.sahibinden::field.show_all_for_cats', {cat_name: mainCats|last.val})}}
|
||||
</span>
|
||||
<span>
|
||||
{% if setting_value('visiosoft.module.advs::show_ads_count') %}
|
||||
{% set catAdsCount = entries('advs', 'advs').countAdsByCategoryId(mainCats[1].id) %}
|
||||
<span class="text-muted main-advs-count">
|
||||
({{ catAdsCount }})
|
||||
</span>
|
||||
{% endif %}
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{% for sub_category in subCats %}
|
||||
<li class="categories-list-li category-icon text-truncate d-flex justify-content-between font-weight-bold category-{{ sub_category.slug }}">
|
||||
|
||||
{% if sub_category.icon != "" %}
|
||||
<img src="{{ url(sub_category.icon) }}" alt="{{ sub_category.name }}"
|
||||
class="img-responsive p-1 mr-1">
|
||||
{% endif %}
|
||||
<a href="{{ url_route('adv_list_seo', [sub_category.slug]) }}" class="sub-category">
|
||||
<span>
|
||||
{{ sub_category.name }}
|
||||
</span>
|
||||
<span>
|
||||
{% if setting_value('visiosoft.module.advs::show_ads_count') %}
|
||||
{% set catLevel = getParentsCount(sub_category.id) + 1 %}
|
||||
{% set catAdsCount = entries('advs', 'advs').countAdsByCategoryId(sub_category.id, catLevel) %}
|
||||
<span class="text-muted advs-count mr-1">
|
||||
({{ catAdsCount }})
|
||||
</span>
|
||||
{% endif %}
|
||||
<i class="fa fa-angle-right mt-1"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
Loading…
Reference in New Issue
Block a user