mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#3472 listing design improvments - Integrate
This commit is contained in:
parent
b17c93cd37
commit
5aa60780ee
@ -101,11 +101,16 @@ ul {
|
||||
& > div {
|
||||
div {
|
||||
line-height: 1;
|
||||
|
||||
&.sub-cat {
|
||||
margin-left: 1.65rem;
|
||||
}
|
||||
}
|
||||
|
||||
svg, img {
|
||||
width: 1.15rem;
|
||||
height: 1.15rem;
|
||||
overflow: hidden;
|
||||
object-fit: contain;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
@ -117,13 +122,13 @@ ul {
|
||||
}
|
||||
|
||||
.sub-cat {
|
||||
a {
|
||||
font-size: calc(12rem / 16);
|
||||
}
|
||||
|
||||
li {
|
||||
margin-bottom: .25rem;
|
||||
|
||||
a {
|
||||
font-size: calc(12rem / 16);
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: .5rem;
|
||||
margin-top: .25rem;
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div id="viewTypes" class="d-flex justify-content-between">
|
||||
<div id="viewTypes" class="d-flex justify-content-end">
|
||||
|
||||
{{ addBlock('ads-list/partials/before-display-mode', {'topfields': topfields})|raw }}
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
{% if params.category %}
|
||||
{% for category_breadcrumbs in params.mainCats %}
|
||||
<span class="text-truncate">
|
||||
<a href="{{ url_route('adv_list_seo', [category_breadcrumbs['slug']]) }}" data-toggle="tooltip"
|
||||
data-placement="bottom" title="{{ category_breadcrumbs['val'] }}">
|
||||
{{ category_breadcrumbs['val'] }}
|
||||
<a href="{{ url_route('adv_list_seo', [category_breadcrumbs.slug]) }}" data-toggle="tooltip"
|
||||
data-placement="bottom" title="{{ category_breadcrumbs.name }}">
|
||||
{{ category_breadcrumbs.name }}
|
||||
</a>
|
||||
</span>
|
||||
{% endfor %}
|
||||
|
||||
@ -4,56 +4,30 @@
|
||||
|
||||
<li>
|
||||
<div class="d-flex">
|
||||
{% if maincat.icon %}
|
||||
<img src="{{ maincat.icon.url }}" alt="{{ maincat.name }}">
|
||||
{% else %}
|
||||
{{ img('visiosoft.module.advs::images/listing/sample-cat-icon.svg').data|raw }}
|
||||
{% if (not categoryId) or (loop.first and categoryId) %}
|
||||
{% if maincat.icon %}
|
||||
<img src="{{ maincat.icon.url }}" alt="{{ maincat.name }}">
|
||||
{% else %}
|
||||
{{ img('visiosoft.module.advs::images/listing/sample-cat-icon.svg').data|raw }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div class="ml-2">
|
||||
<a href="{{ appendRequestURL(request_query(),url_route('adv_list_seo', [maincat.slug, cityId.slug]),{},['page']) }}">
|
||||
{{ maincat.name }}
|
||||
</a>
|
||||
{# <ul class="sub-cat mt-1">#}
|
||||
{# {% for subcat in subCats %}#}
|
||||
{# {% if subcat.parent_category_id == maincat.id %}#}
|
||||
{# {% set subCatId = entries('cats', 'category').find(subcat.id) %}#}
|
||||
|
||||
{# <li>#}
|
||||
{# <a href="{{ appendRequestURL(request_query(), url_route('adv_list_seo', [subCatId.slug, citySlug]), {}, ['page']) }}">#}
|
||||
{# {{ subcat.name }}#}
|
||||
{# </a>#}
|
||||
{# <ul>#}
|
||||
{# <li>#}
|
||||
{# <a href="#">Test</a>#}
|
||||
{# <ul>#}
|
||||
{# <li><a href="#">Test</a></li>#}
|
||||
{# <li><a href="#">Test</a></li>#}
|
||||
{# <li><a href="#">Test</a></li>#}
|
||||
{# <li><a href="#">Test</a></li>#}
|
||||
{# <li><a href="#">Test</a></li>#}
|
||||
{# <li><a href="#">Test</a></li>#}
|
||||
{# </ul>#}
|
||||
{# </li>#}
|
||||
{# </ul>#}
|
||||
{# </li>#}
|
||||
{# {% endif %}#}
|
||||
{# {% endfor %}#}
|
||||
{# </ul>#}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<div class="d-flex">
|
||||
{% if maincat.icon %}
|
||||
<img src="{{ maincat.icon.url }}" alt="{{ maincat.name }}">
|
||||
{% else %}
|
||||
{{ img('visiosoft.module.advs::images/listing/sample-cat-icon.svg').data|raw }}
|
||||
{% endif %}
|
||||
<div class="ml-2">
|
||||
<div class="{{ not loop.first and categoryId ? 'sub-cat' : 'ml-2' }}" style="{{ not loop.first and categoryId ? 'padding-left: ' ~ (loop.index - 1) * 0.5 ~ 'rem;' }}">
|
||||
<a href="{{ appendRequestURL(request_query(),url_route('adv_list_seo', [maincat.slug, cityId.slug]),{},['page']) }}">
|
||||
{{ maincat.name }}
|
||||
</a>
|
||||
{% if count(subCats) %}
|
||||
<ul class="sub-cat mt-1 ml-2">
|
||||
{% for subcat in subCats %}
|
||||
{% if subcat.parent_category_id == maincat.id %}
|
||||
<li>
|
||||
<a href="{{ appendRequestURL(request_query(), url_route('adv_list_seo', [subcat.slug, citySlug]), {}, ['page']) }}">
|
||||
{{ subcat.name }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@ -178,7 +178,7 @@ class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
|
||||
$categories = array();
|
||||
$z = 1;
|
||||
for ($i = 1; $i <= $z; $i++) {
|
||||
if ($main = $this->newQuery()->where('id', $id)->first()->select('id', 'name', 'slug', '')) {
|
||||
if ($main = $this->find($id)) {
|
||||
$categories[] = $main;
|
||||
if ($main->parent_category_id != null) {
|
||||
$id = $main->parent_category_id;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user