Add search hints to initial search page (#497)
* add search hints * revise hint about sub searches --------- Co-authored-by: rleed <rleed1@pm.me>
This commit is contained in:
parent
786c185464
commit
e5852ee0b1
|
@ -3,6 +3,7 @@ import { getGetServerSideProps } from '../../api/ssrApollo'
|
|||
import { useRouter } from 'next/router'
|
||||
import { SUB_SEARCH } from '../../fragments/subs'
|
||||
import Items from '../../components/items'
|
||||
import styles from './search.module.css'
|
||||
|
||||
export const getServerSideProps = getGetServerSideProps({
|
||||
query: SUB_SEARCH,
|
||||
|
@ -24,9 +25,23 @@ export default function Index ({ ssrData }) {
|
|||
noMoreText='NO MORE'
|
||||
/>
|
||||
: (
|
||||
<div className='text-muted text-center mt-5' style={{ fontFamily: 'lightning', fontSize: '2rem', opacity: '0.75' }}>
|
||||
search for something
|
||||
</div>)}
|
||||
<div className={styles.content}>
|
||||
<div className={styles.box}>
|
||||
<div className={styles.header}>
|
||||
<div className='text-muted text-center' style={{ fontFamily: 'lightning', fontSize: '2rem', opacity: '0.75' }}>
|
||||
more filters
|
||||
</div>
|
||||
</div>
|
||||
<div className={styles.body}>
|
||||
<div className={styles.inner}>
|
||||
<div><b>nym:</b>​<em>sn</em> - limit results by stacker nym</div>
|
||||
<div><b>url:</b>​<em>stacker​.news</em> - limit to specific site</div>
|
||||
<div>you are searching <em>{variables.sub || 'home'}</em><br /><em>home</em> searches show results from all</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</SearchLayout>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
.content {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
.box {
|
||||
border: 1px solid var(--theme-borderColor);
|
||||
border-radius: 10px;
|
||||
box-shadow: 2px 2px 10px var(--theme-borderColor);
|
||||
min-width: 50%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.header {
|
||||
border-bottom: 1px solid var(--theme-borderColor);
|
||||
}
|
||||
.body {
|
||||
display: flex;
|
||||
align-self: center;
|
||||
}
|
||||
.inner {
|
||||
padding: 0.5rem 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.inner > div {
|
||||
padding: 5px 2rem;
|
||||
}
|
Loading…
Reference in New Issue