mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
Merge pull request #112 from oceanprotocol/fix/search-title
fix search titles
This commit is contained in:
commit
4dc4befbd3
@ -18,12 +18,3 @@
|
|||||||
margin-top: $spacer / 2;
|
margin-top: $spacer / 2;
|
||||||
font-size: $font-size-large;
|
font-size: $font-size-large;
|
||||||
}
|
}
|
||||||
|
|
||||||
.titleReverse {
|
|
||||||
composes: title;
|
|
||||||
color: $brand-grey-light;
|
|
||||||
|
|
||||||
span {
|
|
||||||
color: $brand-grey-dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -7,14 +7,12 @@ import meta from '../../data/meta.json'
|
|||||||
const Route = ({
|
const Route = ({
|
||||||
title,
|
title,
|
||||||
description,
|
description,
|
||||||
titleReverse,
|
|
||||||
wide,
|
wide,
|
||||||
children,
|
children,
|
||||||
className
|
className
|
||||||
}: {
|
}: {
|
||||||
title: string
|
title: string
|
||||||
description?: string
|
description?: string
|
||||||
titleReverse?: boolean
|
|
||||||
children: any
|
children: any
|
||||||
wide?: boolean
|
wide?: boolean
|
||||||
className?: string
|
className?: string
|
||||||
@ -29,13 +27,7 @@ const Route = ({
|
|||||||
<Content wide={wide}>
|
<Content wide={wide}>
|
||||||
<article>
|
<article>
|
||||||
<header className={styles.header}>
|
<header className={styles.header}>
|
||||||
<h1
|
<h1 className={styles.title}>{title}</h1>
|
||||||
className={
|
|
||||||
titleReverse ? styles.titleReverse : styles.title
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{title}
|
|
||||||
</h1>
|
|
||||||
{description && (
|
{description && (
|
||||||
<p
|
<p
|
||||||
className={styles.description}
|
className={styles.description}
|
||||||
|
@ -1,5 +1,16 @@
|
|||||||
@import '../styles/variables';
|
@import '../styles/variables';
|
||||||
|
|
||||||
|
.resultsTitle {
|
||||||
|
color: $brand-grey-light;
|
||||||
|
font-size: $font-size-h3;
|
||||||
|
margin-top: -($spacer / 2);
|
||||||
|
margin-bottom: $spacer;
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: $brand-grey-dark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.results {
|
.results {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
|
@ -102,13 +102,17 @@ export default class Search extends PureComponent<SearchProps, SearchState> {
|
|||||||
const { totalResults, totalPages, currentPage } = this.state
|
const { totalResults, totalPages, currentPage } = this.state
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Route
|
<Route title="Search" wide>
|
||||||
title={`${
|
{totalResults > 0 && (
|
||||||
totalResults > 0 ? totalResults : ''
|
<h2
|
||||||
} Results for <span>${this.searchTerm}</span>`}
|
className={styles.resultsTitle}
|
||||||
titleReverse
|
dangerouslySetInnerHTML={{
|
||||||
wide
|
__html: `${totalResults} results for <span>${
|
||||||
>
|
this.searchTerm
|
||||||
|
}</span>`
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
{this.renderResults()}
|
{this.renderResults()}
|
||||||
|
|
||||||
<Pagination
|
<Pagination
|
||||||
|
Loading…
Reference in New Issue
Block a user