mirror of
https://github.com/flarum/core.git
synced 2025-08-05 16:07:34 +02:00
Implement search on front end
This commit is contained in:
82
less/lib/search.less
Normal file
82
less/lib/search.less
Normal file
@@ -0,0 +1,82 @@
|
||||
.search-box {
|
||||
& input:focus, &.active input, & .search-results {
|
||||
width: 400px;
|
||||
}
|
||||
}
|
||||
.search-results {
|
||||
max-height: 70vh;
|
||||
overflow: auto;
|
||||
|
||||
& > li > a {
|
||||
white-space: normal;
|
||||
|
||||
&:hover {
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
|
||||
& mark {
|
||||
background: none;
|
||||
padding: 0;
|
||||
font-weight: bold;
|
||||
color: inherit;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
.search-input {
|
||||
overflow: hidden;
|
||||
color: @fl-body-muted-color;
|
||||
|
||||
&:before {
|
||||
.fa();
|
||||
content: @fa-var-search;
|
||||
float: left;
|
||||
margin-right: -36px;
|
||||
width: 36px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
padding: @padding-base-vertical - 1 0;
|
||||
line-height: @line-height-base;
|
||||
pointer-events: none;
|
||||
}
|
||||
& input {
|
||||
float: left;
|
||||
width: 225px;
|
||||
padding-left: 36px;
|
||||
padding-right: 36px;
|
||||
.transition(~"all 0.4s");
|
||||
|
||||
.active & {
|
||||
background: @fl-body-bg;
|
||||
border: 2px solid @fl-body-secondary-color;
|
||||
|
||||
&:focus {
|
||||
&:extend(.form-control:focus);
|
||||
}
|
||||
}
|
||||
}
|
||||
& .btn {
|
||||
float: left;
|
||||
margin-left: -36px;
|
||||
width: 36px !important;
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
.discussion-search-result {
|
||||
& .title {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
& .excerpt {
|
||||
color: @fl-body-muted-color;
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
.user-search-result {
|
||||
& .avatar {
|
||||
.avatar-size(24px);
|
||||
margin: -2px 10px -2px 0;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user