Skip to content

Commit c78f9c5

Browse files
committed
First try at vertical layout on small screens
1 parent c0b15c0 commit c78f9c5

4 files changed

Lines changed: 13 additions & 11 deletions

File tree

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

html/build/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
"src": "html/fonts/glyphicons-halflings-regular.woff2"
2121
},
2222
"resources/js/app.js": {
23-
"file": "assets/app-rG4e28aA.js",
23+
"file": "assets/app-B9REB9KE.js",
2424
"name": "app",
2525
"src": "resources/js/app.js",
2626
"isEntry": true,
2727
"css": [
28-
"assets/app-C85_vTe1.css"
28+
"assets/app-Ca_Sy6IV.css"
2929
],
3030
"assets": [
3131
"assets/glyphicons-halflings-regular-BUJKDMgK.eot",

resources/views/components/filter.blade.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
@keydown.escape.window="close()">
1111

1212
{{-- Main Bar --}}
13-
<div class="tw:group/bar tw:flex tw:flex-nowrap">
14-
<div class="tw:flex tw:items-stretch tw:h-[34px] tw:rounded-lg tw:border tw:border-neutral-300 tw:dark:border-dark-gray-300 tw:bg-white tw:dark:bg-dark-gray-500 tw:font-mono tw:shadow-xs tw:max-w-full">
13+
<div class="tw:group/bar tw:flex tw:flex-col tw:sm:flex-row tw:flex-nowrap">
14+
<div class="tw:flex tw:items-stretch tw:flex-col tw:sm:flex-row tw:h-auto tw:sm:h-[34px] tw:rounded-lg tw:border tw:border-neutral-300 tw:dark:border-dark-gray-300 tw:bg-white tw:dark:bg-dark-gray-500 tw:font-mono tw:shadow-xs tw:max-w-full">
1515

1616
{{-- LEFT SECTION: Options Dropdown --}}
1717
<div class="tw:relative tw:flex tw:items-stretch">
1818
<button type="button"
1919
:title="filters.length ? '{{ __('Filter options') }}' : '{{ __('Open filter menu') }}'"
2020
@click.stop="toggleOptions()"
21-
class="tw:shrink-0 tw:flex tw:items-center tw:gap-2 tw:px-4 tw:h-full tw:transition-colors tw:border-r tw:border-neutral-200 tw:dark:border-dark-gray-300 tw:rounded-l-lg tw:hover:bg-neutral-50 tw:dark:hover:bg-dark-gray-400">
21+
class="tw:shrink-0 tw:flex tw:items-center tw:gap-2 tw:px-4 tw:h-full tw:max-sm:w-full tw:max-sm:left-0 tw:transition-colors tw:border-b tw:sm:border-r tw:border-neutral-200 tw:dark:border-dark-gray-300 tw:rounded-l-lg tw:hover:bg-neutral-50 tw:dark:hover:bg-dark-gray-400">
2222
<div class="tw:relative tw:flex tw:items-center">
2323
<i class="fas fa-filter tw:text-[1.12em]"></i>
2424
<span x-show="filters.length"
@@ -49,9 +49,9 @@ class="tw:flex tw:items-center tw:gap-3 tw:w-full tw:px-5 tw:py-3 tw:text-left t
4949
</div>
5050

5151
{{-- MIDDLE SECTION: Chips --}}
52-
<div class="tw:flex tw:items-stretch tw:overflow-x-auto tw:scrollbar-none tw:flex-nowrap">
52+
<div class="tw:flex tw:flex-col tw:sm:flex-row tw:items-stretch tw:overflow-x-auto tw:scrollbar-none tw:flex-nowrap">
5353
<template x-for="f in filters" :key="f.key">
54-
<div class="filter-chip tw:shrink-0 tw:relative tw:group tw:flex tw:items-stretch tw:h-full tw:border-r tw:border-neutral-200 tw:dark:border-dark-gray-300"
54+
<div class="filter-chip tw:shrink-0 tw:relative tw:group tw:flex tw:items-stretch tw:h-full tw:border-b tw:sm:border-r tw:border-neutral-200 tw:dark:border-dark-gray-300"
5555
role="listitem">
5656
<button type="button" title="{{ __('Edit filter') }}"
5757
@click="open(fields.find(field => field.key === f.key))"
@@ -72,11 +72,11 @@ class="tw:h-full tw:w-0 tw:group-hover:w-[34px] tw:flex tw:items-center tw:justi
7272
</div>
7373

7474
{{-- RIGHT SECTION: Plus Button & Dropdown --}}
75-
<div class="tw:shrink-0 tw:relative tw:flex tw:items-stretch">
75+
<div class="tw:shrink-0 tw:max-sm:left-0 tw:flex tw:items-stretch">
7676
<button type="button" title="{{ __('Add new filter') }}" @click.stop="toggleAdd()"
7777
@keydown.arrow-down.prevent="navDropdown('next')"
7878
@keydown.arrow-up.prevent="navDropdown('prev')"
79-
class="tw:w-[34px] tw:h-full tw:flex tw:items-center tw:justify-center tw:text-[1.4em] tw:text-neutral-400! tw:dark:text-dark-white-400! tw:hover:text-neutral-900! tw:dark:hover:text-dark-white-100! tw:hover:bg-neutral-50 tw:dark:hover:bg-dark-gray-400 tw:transition-colors tw:rounded-r-lg">
79+
class="tw:w-[34px] tw:h-full tw:relative tw:max-sm:w-full tw:flex tw:items-center tw:justify-center tw:text-[1.4em] tw:text-neutral-400! tw:dark:text-dark-white-400! tw:hover:text-neutral-900! tw:dark:hover:text-dark-white-100! tw:hover:bg-neutral-50 tw:dark:hover:bg-dark-gray-400 tw:transition-colors tw:rounded-r-lg">
8080
+
8181
</button>
8282

@@ -100,8 +100,10 @@ class="tw:flex tw:items-center tw:justify-between tw:w-full tw:px-5 tw:py-3 tw:t
100100
</div>
101101
</div>
102102
</div>
103+
104+
{{-- Spacer to reserve space for remove button --}}
103105
<div x-show="filters.length > 0"
104-
class="tw:w-[34px] tw:transition-all tw:duration-200 tw:ease-in-out tw:overflow-hidden tw:group-has-[.filter-chip:hover]/bar:w-0">
106+
class="tw:w-[34px] tw:hidden tw:sm:block tw:transition-all tw:duration-200 tw:ease-in-out tw:overflow-hidden tw:group-has-[.filter-chip:hover]/bar:w-0">
105107
</div>
106108
</div>
107109
{{-- Dialog Modal (Teleported) --}}

0 commit comments

Comments
 (0)