Tech sub (#311)
* Add tech sub * Fix line break in RSS popover --------- Co-authored-by: ekzyis <ek@stacker.news>
This commit is contained in:
parent
e243c1c224
commit
b890215b98
|
@ -80,7 +80,7 @@ const handleThemeChange = (dark) => {
|
|||
|
||||
const RssPopover = (
|
||||
<Popover>
|
||||
<Popover.Content style={{ fontWeight: 500, fontSize: '.9rem' }}>
|
||||
<Popover.Content className='d-flex' style={{ fontWeight: 500, fontSize: '.9rem' }}>
|
||||
<a href='/rss' className='nav-link p-0 d-inline-flex'>
|
||||
home
|
||||
</a>
|
||||
|
@ -93,6 +93,10 @@ const RssPopover = (
|
|||
nostr
|
||||
</a>
|
||||
<span className='mx-2 text-muted'> \ </span>
|
||||
<a href='/~tech/rss' className='nav-link p-0 d-inline-flex'>
|
||||
tech
|
||||
</a>
|
||||
<span className='mx-2 text-muted'> \ </span>
|
||||
<a href='/~jobs/rss' className='nav-link p-0 d-inline-flex'>
|
||||
jobs
|
||||
</a>
|
||||
|
|
|
@ -218,7 +218,7 @@ export default function Header ({ sub }) {
|
|||
onChange={(formik, e) => router.push(e.target.value === 'home' ? '/' : `/~${e.target.value}`)}
|
||||
name='sub'
|
||||
size='sm'
|
||||
items={['home', 'bitcoin', 'nostr', 'jobs']}
|
||||
items={['home', 'bitcoin', 'nostr', 'tech', 'jobs']}
|
||||
/>
|
||||
</Form>
|
||||
</Nav.Item>
|
||||
|
|
|
@ -21,6 +21,7 @@ export default function SubSelect ({ label, sub, setSub, item, ...props }) {
|
|||
<ul>
|
||||
<li>If it's bitcoin related, put it in the bitcoin sub.</li>
|
||||
<li>If it's nostr related, put it in the nostr sub.</li>
|
||||
<li>If it's tech related, put it in the tech sub.</li>
|
||||
<li>If it's a job, put it in the jobs sub.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -43,7 +44,7 @@ export default function SubSelect ({ label, sub, setSub, item, ...props }) {
|
|||
name='sub'
|
||||
size='sm'
|
||||
defaultValue={props.noForm ? sub : undefined}
|
||||
items={props.noForm ? ['pick sub', 'bitcoin', 'nostr', 'jobs'] : item ? ['bitcoin', 'nostr'] : ['pick sub', 'bitcoin', 'nostr']}
|
||||
items={props.noForm ? ['pick sub', 'bitcoin', 'nostr', 'tech', 'jobs'] : item ? ['bitcoin', 'nostr', 'tech'] : ['pick sub', 'bitcoin', 'nostr', 'tech']}
|
||||
label={label &&
|
||||
<>
|
||||
{label}
|
||||
|
|
|
@ -84,7 +84,7 @@ export function advPostSchemaMembers (client) {
|
|||
|
||||
export function subSelectSchemaMembers (client) {
|
||||
return {
|
||||
sub: Yup.string().required('required').oneOf(['bitcoin', 'nostr'], 'required')
|
||||
sub: Yup.string().required('required').oneOf(['bitcoin', 'nostr', 'tech'], 'required')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
INSERT INTO "Sub" ("name", "desc", "postTypes", "rankingType")
|
||||
VALUES ('tech', 'everything tech related', '{LINK,DISCUSSION,POLL,BOUNTY}', 'WOT') ON CONFLICT DO NOTHING;
|
Loading…
Reference in New Issue