Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: tweak search bar #988

Merged
merged 1 commit into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions assets/main/scss/_top-app-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,21 @@ $header-caret-width: 0.35em;
}

.search-bar {
@include media-breakpoint-up(xxl) {
width: 180px;
}

.search-input {
padding-left: 2rem;
padding-left: 2.25rem;

@include media-breakpoint-up(xxl) {
width: 180px;
transition: 0.5s width ease-in-out;

&:focus {
width: 240px;
}
}
}

.search-shortcut {
margin-top: 0.35rem;
margin-top: 0.575rem;
}
}

Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/header/search-bar.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{- $shortcut := partialCached "functions/search-shortcut" . }}
<hr class="d-xxl-none">
<form class="search-bar ms-auto my-auto" action="{{ with $page }}{{ .RelPermalink }}{{ end }}" novalidate>
<div class="input-group input-group-sm align-items-center">
<div class="input-group align-items-center">
<span class="btn btn-search disabled position-absolute left-0 border-0 px-1">
<i class="fas fa-fw fa-search fa-lg"></i>
</span>
Expand All @@ -18,7 +18,7 @@
{{- with $shortcut }}
<span class="search-shortcut position-absolute end-0 top-0 me-2">
{{- range . }}
<kbd class="bg-primary rounded shadow">{{ . }}</kbd>
<kbd class="text-dark bg-white opacity-75 rounded-3 shadow border border-primary py-1 fw-bold">{{ . }}</kbd>
{{- end }}
</span>
{{- end }}
Expand Down