2017-05-13 01:54:12 +09:00
|
|
|
<template>
|
2020-11-01 23:44:57 +09:00
|
|
|
<div
|
|
|
|
class="SearchBar"
|
|
|
|
:class="{ '-expanded': !hidden }"
|
2020-10-30 04:13:31 +09:00
|
|
|
>
|
2020-11-24 19:32:42 +09:00
|
|
|
<button
|
2020-10-30 04:13:31 +09:00
|
|
|
v-if="hidden"
|
2020-11-24 19:32:42 +09:00
|
|
|
class="button-unstyled nav-icon"
|
2020-10-30 04:13:31 +09:00
|
|
|
:title="$t('nav.search')"
|
2021-02-02 04:07:09 +09:00
|
|
|
type="button"
|
2023-01-22 05:08:17 +09:00
|
|
|
:aria-expanded="!hidden"
|
2021-02-25 21:32:21 +09:00
|
|
|
@click.prevent.stop="toggleHidden"
|
2020-11-24 19:32:42 +09:00
|
|
|
>
|
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
class="fa-scale-110 fa-old-padding"
|
|
|
|
icon="search"
|
|
|
|
/>
|
|
|
|
</button>
|
2020-10-30 04:13:31 +09:00
|
|
|
<template v-else>
|
|
|
|
<input
|
|
|
|
id="search-bar-input"
|
|
|
|
ref="searchInput"
|
|
|
|
v-model="searchTerm"
|
|
|
|
class="search-bar-input"
|
|
|
|
:placeholder="$t('nav.search')"
|
|
|
|
type="text"
|
|
|
|
@keyup.enter="find(searchTerm)"
|
2020-11-01 23:44:57 +09:00
|
|
|
>
|
2020-10-30 04:13:31 +09:00
|
|
|
<button
|
2020-11-24 19:32:42 +09:00
|
|
|
class="button-default search-button"
|
2021-02-02 04:07:09 +09:00
|
|
|
type="submit"
|
2023-01-22 05:08:17 +09:00
|
|
|
:title="$t('nav.search')"
|
2021-02-25 21:32:21 +09:00
|
|
|
@click="find(searchTerm)"
|
2020-11-01 23:44:57 +09:00
|
|
|
>
|
2020-10-30 04:13:31 +09:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="search"
|
2020-11-01 23:44:57 +09:00
|
|
|
/>
|
2020-10-30 04:13:31 +09:00
|
|
|
</button>
|
2020-11-24 19:32:42 +09:00
|
|
|
<button
|
|
|
|
class="button-unstyled cancel-search"
|
2021-02-02 04:07:09 +09:00
|
|
|
type="button"
|
2023-01-22 05:08:17 +09:00
|
|
|
:title="$t('nav.search_close')"
|
|
|
|
:aria-expanded="!hidden"
|
2021-02-25 21:32:21 +09:00
|
|
|
@click.prevent.stop="toggleHidden"
|
2020-11-24 19:32:42 +09:00
|
|
|
>
|
2020-10-30 04:13:31 +09:00
|
|
|
<FAIcon
|
|
|
|
fixed-width
|
|
|
|
icon="times"
|
|
|
|
class="cancel-icon fa-scale-110 fa-old-padding"
|
2020-11-01 23:44:57 +09:00
|
|
|
/>
|
2020-11-24 19:32:42 +09:00
|
|
|
</button>
|
2022-08-12 07:27:09 +09:00
|
|
|
<span class="spacer" />
|
|
|
|
<span class="spacer" />
|
2020-10-30 04:13:31 +09:00
|
|
|
</template>
|
2018-12-05 21:01:56 +09:00
|
|
|
</div>
|
2017-05-13 01:54:12 +09:00
|
|
|
</template>
|
|
|
|
|
2019-07-16 01:42:27 +09:00
|
|
|
<script src="./search_bar.js"></script>
|
2017-05-13 01:54:12 +09:00
|
|
|
|
|
|
|
<style lang="scss">
|
2023-01-10 03:02:16 +09:00
|
|
|
@import "../../variables";
|
2017-11-08 18:26:42 +09:00
|
|
|
|
2020-10-30 04:13:31 +09:00
|
|
|
.SearchBar {
|
2018-12-03 14:03:11 +09:00
|
|
|
display: inline-flex;
|
|
|
|
align-items: baseline;
|
|
|
|
vertical-align: baseline;
|
2019-07-16 01:42:27 +09:00
|
|
|
justify-content: flex-end;
|
2018-12-03 14:03:11 +09:00
|
|
|
|
2020-10-30 04:13:31 +09:00
|
|
|
&.-expanded {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
2019-07-16 01:42:27 +09:00
|
|
|
.search-bar-input,
|
2018-12-03 14:03:11 +09:00
|
|
|
.search-button {
|
|
|
|
height: 29px;
|
|
|
|
}
|
2019-07-16 01:42:27 +09:00
|
|
|
|
|
|
|
.search-bar-input {
|
2020-10-30 04:13:31 +09:00
|
|
|
flex: 1 0 auto;
|
2018-12-03 14:03:11 +09:00
|
|
|
}
|
2017-06-04 05:42:54 +09:00
|
|
|
|
2020-11-24 19:32:42 +09:00
|
|
|
.cancel-search {
|
|
|
|
height: 50px;
|
|
|
|
}
|
|
|
|
|
2020-10-21 04:54:43 +09:00
|
|
|
.cancel-icon {
|
|
|
|
color: $fallback--text;
|
|
|
|
color: var(--btnTopBarText, $fallback--text);
|
2019-07-16 01:42:27 +09:00
|
|
|
}
|
2018-04-01 11:28:20 +09:00
|
|
|
}
|
2017-09-11 02:46:42 +09:00
|
|
|
|
2017-05-13 01:54:12 +09:00
|
|
|
</style>
|