Skip to content

Commit

Permalink
refactor: flexing dashboard search
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerg committed Mar 14, 2024
1 parent 4e70bfe commit cfb893f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
8 changes: 6 additions & 2 deletions templates/Pages/Dashboard/_dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,18 @@ body.view-dashboard {
}


nav[role="search"] {
div[role="search"] {
display: flex;
@media (min-width: 568px) { width: 22 * $gutter + $gutter; }
gap: $gutter * 2;
// @media (min-width: 568px) { width: 22 * $gutter + $gutter; }
input {
margin-right: $gutter * .5;
flex-grow: 1;
}
}
div[role="search"] > * {
white-space: nowrap;
}

.dashboard-section > .list-objects {
display: table;
Expand Down
29 changes: 14 additions & 15 deletions templates/Pages/Dashboard/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,20 @@
<h2>{{ __('Search') }}</h2>
</header>

<nav role="search">
<input type="text" v-model="searchString" v-on:keydown.stop="captureKeys">
<button ref="searchSubmit" :disabled="!searchString || searchString.length < 3" v-on:click="searchObjects">
<app-icon icon="carbon:search"></app-icon>
{{ __('Search') }}
</button>
</nav>
</section>

<section class="dashboard-section">
<div>
<input type="text" placeholder="{{ __('ID or uname') }}" v-model="searchId">
<button @click.prevent="goToID()" :disabled="!searchId">
{{ __('ID') }}
</button>
<div role="search">
<div role="textsearch">
<input type="text" v-model="searchString" v-on:keydown.stop="captureKeys">
<button ref="searchSubmit" :disabled="!searchString || searchString.length < 3" v-on:click="searchObjects">
<app-icon icon="carbon:search"></app-icon>
{{ __('Search') }}
</button>
</div>
<div role="idsearch">
<input type="text" placeholder="{{ __('ID or uname') }}" v-model="searchId">
<button @click.prevent="goToID()" :disabled="!searchId">
{{ __('ID') }}
</button>
</div>
</div>
</section>

Expand Down
2 changes: 1 addition & 1 deletion templates/Pages/Login/login.twig
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<span class="ml-05">{{ __('Sign in') }}</span>
</button>

<p class="mt-025">{{ Html.link(__('Forgot your password?'), {'_name': 'password:reset'})|raw }}</p>
<p class="mt-1">{{ Html.link(__('Forgot your password?'), {'_name': 'password:reset'})|raw }}</p>


{# Temp hidden to check session id #}
Expand Down

0 comments on commit cfb893f

Please sign in to comment.