feat: Search page
This commit is contained in:
@@ -50,9 +50,23 @@ export default {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="input-container" :class="{ 'is-focused': isInputFocused }">
|
||||
<div class="icon-container">
|
||||
<fluent-icon icon="search" class="icon" aria-hidden="true" />
|
||||
<div
|
||||
class="input-container transition-[border-bottom] duration-[0.2s] ease-[ease-in-out] relative flex items-center py-2 px-4 h-14 gap-2 rounded-sm border border-solid"
|
||||
:class="{
|
||||
'border-n-brand dark:border-n-brand': isInputFocused,
|
||||
'border-n-weak dark:border-n-strong': !isInputFocused,
|
||||
}"
|
||||
>
|
||||
<div class="flex items-center">
|
||||
<fluent-icon
|
||||
icon="search"
|
||||
class="icon"
|
||||
aria-hidden="true"
|
||||
:class="{
|
||||
'text-n-blue-text': isInputFocused,
|
||||
'text-n-slate-10': !isInputFocused,
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
<input
|
||||
ref="searchInput"
|
||||
@@ -68,37 +82,15 @@ export default {
|
||||
:title="$t('SEARCH.PLACEHOLDER_KEYBINDING')"
|
||||
:show-close="false"
|
||||
small
|
||||
class="helper-label"
|
||||
class="!m-0 whitespace-nowrap !bg-n-slate-3 dark:!bg-n-solid-3 !border-n-weak dark:!border-n-strong"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.input-container {
|
||||
transition: border-bottom 0.2s ease-in-out;
|
||||
@apply relative flex items-center py-2 px-4 h-14 gap-2 rounded-sm border border-solid border-slate-100 dark:border-slate-800;
|
||||
|
||||
input[type='search'] {
|
||||
@apply w-full m-0 shadow-none border-transparent active:border-transparent active:shadow-none hover:border-transparent hover:shadow-none focus:border-transparent focus:shadow-none;
|
||||
}
|
||||
|
||||
&.is-focused {
|
||||
@apply border-woot-100 dark:border-woot-600;
|
||||
|
||||
.icon {
|
||||
color: var(--w-400);
|
||||
@apply text-woot-400 dark:text-woot-500;
|
||||
}
|
||||
}
|
||||
}
|
||||
.icon-container {
|
||||
@apply flex items-center;
|
||||
.icon {
|
||||
@apply text-slate-400;
|
||||
}
|
||||
}
|
||||
|
||||
.helper-label {
|
||||
@apply m-0 whitespace-nowrap;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user