diff --git a/resources/assets/scripts/routes/catalog.js b/resources/assets/scripts/routes/catalog.js index d75f6e8..ce149ca 100644 --- a/resources/assets/scripts/routes/catalog.js +++ b/resources/assets/scripts/routes/catalog.js @@ -26,10 +26,10 @@ export default { $(`.filter-groups .subjects:not(${id})`).removeClass('is-active'); $(`.filter-groups ${id}`).toggleClass('is-active'); }) - $('.filter-groups .licenses > a').click((e) => { + $('.licenses > a').click((e) => { e.preventDefault(); let id = $(e.currentTarget).attr('href'); - $(`.filter-groups ${id}`).toggleClass('is-active'); + $(id).toggleClass('is-active'); }) $('.subjects .filter-list a').click((e) => { if ($(e.currentTarget).hasClass('is-active')) { @@ -38,6 +38,7 @@ export default { } else { $('.subjects .filter-list a').removeClass('is-active'); $(e.currentTarget).addClass('is-active'); + $('.subjects').removeClass('has-active-child'); $(e.currentTarget).parent().parent().parent('.subjects').addClass('has-active-child'); } let subjectValue = $('.subjects .filter-list a.is-active').attr('data-filter'); diff --git a/resources/assets/styles/layouts/pages/_catalog.scss b/resources/assets/styles/layouts/pages/_catalog.scss index a64cc71..1a64520 100644 --- a/resources/assets/styles/layouts/pages/_catalog.scss +++ b/resources/assets/styles/layouts/pages/_catalog.scss @@ -60,14 +60,7 @@ } .has-active-child > a { - background: var(--link, $brand-primary); - color: $white; - - .arrow { - path { - fill: $white; - } - } + color: var(--link, $brand-primary); } ul { @@ -135,12 +128,17 @@ } } + .licenses { + display: none; + } + .filter-list { display: none; } &.is-active { - .filter-groups { + .filter-groups, + .licenses { display: block; } } @@ -394,23 +392,47 @@ .filters { width: rem(286); + border-bottom: 0; + + > a { + border-bottom: solid 3px var(--accent, $brand-accent); + + &:hover, + &:focus { + color: $black; + background: $white; + cursor: default; + } + + .arrow { + display: none; + } + } .filter-groups { + display: block; border-right: 0; border-top: 0; border-left: 0; - .subjects, - .licenses { + .subjects { border-bottom: solid 1px #ececec; } } - &.is-active { - border-bottom: 0; + .licenses { + display: block; + margin-top: rem(60); - .filter-groups { - border-top: solid 2px var(--accent, $brand-accent); + a { + background: var(--link, $brand-primary); + color: $white; + + .arrow { + path { + fill: $white; + } + } } } @@ -429,7 +451,7 @@ .sort { .sorts { - border-top: solid 2px var(--accent, $brand-accent); + border-top: solid 3px var(--accent, $brand-accent); border-right: 0; border-left: 0; } diff --git a/resources/views/page-catalog.blade.php b/resources/views/page-catalog.blade.php index 3270f7f..cf847e2 100644 --- a/resources/views/page-catalog.blade.php +++ b/resources/views/page-catalog.blade.php @@ -20,14 +20,14 @@ @endforeach -
- {{ __('Licenses', 'aldine' ) }} - -
+ +
+ {{ __('Licenses', 'aldine' ) }} +
@@ -44,6 +44,7 @@ @include('partials.book', ['book' => $book]) @endforeach
+ @if(App::totalPages(9) > 1) + @endif @endsection