commit
546fcb8480
|
@ -281,9 +281,10 @@ export class App extends React.PureComponent {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div className={`${theme.ns}Layout-searchBar hidden-xs hidden-sm`}>
|
<div className="hidden-xs p-t pull-right">
|
||||||
<DocSearch theme={this.state.theme.value} />
|
<DocSearch theme={this.state.theme.value} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
|
|
|
@ -68,18 +68,20 @@ export default class DocSearch extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
const searchResults = this.state.searchResults;
|
const searchResults = this.state.searchResults;
|
||||||
return (
|
return (
|
||||||
<div className="p-l p-t">
|
<div className="p-r">
|
||||||
<SearchBox onSearch={this.onSearch} onCancel={this.onSearchCancel} />
|
<SearchBox onSearch={this.onSearch} onCancel={this.onSearchCancel} />
|
||||||
<div className="search-result">
|
{searchResults.length > 0 ? (
|
||||||
{searchResults.map(item => {
|
<div className="search-result">
|
||||||
return (
|
{searchResults.map(item => {
|
||||||
<a href={'/' + item.path} key={`list_${item.path}`}>
|
return (
|
||||||
<h5>{item.title}</h5>
|
<a href={'/' + item.path} key={`list_${item.path}`}>
|
||||||
<p dangerouslySetInnerHTML={{__html: item.abstract}} />
|
<h5>{item.title}</h5>
|
||||||
</a>
|
<p dangerouslySetInnerHTML={{__html: item.abstract}} />
|
||||||
);
|
</a>
|
||||||
})}
|
);
|
||||||
</div>
|
})}
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -714,11 +714,19 @@ a {
|
||||||
|
|
||||||
.search-result {
|
.search-result {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
top: 45px;
|
top: 50px;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
box-shadow: 0px 2px 7px #888888;
|
||||||
|
a {
|
||||||
|
padding: 0 5px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
background-color: $gray200;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark {
|
.dark {
|
||||||
|
|
Loading…
Reference in New Issue