mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(board nav): add home and settings buttons
This commit is contained in:
@@ -15,6 +15,11 @@
|
||||
text-decoration: var(--internal-link-text-decoration-hover);
|
||||
}
|
||||
|
||||
.navTopRight {
|
||||
float: right;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.boardNavMobile {
|
||||
padding: 2px 4px;
|
||||
background-color: var(--boardnav-mobile-background-color);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Link, useNavigate } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import useDefaultSubplebbits from '../../hooks/use-default-subplebbits';
|
||||
import styles from './board-nav.module.css';
|
||||
|
||||
@@ -9,19 +10,30 @@ interface BoardNavProps {
|
||||
}
|
||||
|
||||
const BoardNavDesktop = ({ subplebbits }: BoardNavProps) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<div className={styles.boardNavDesktop}>
|
||||
[
|
||||
{subplebbits.map((subplebbit: any, index: number) => (
|
||||
<span key={subplebbit.address}>
|
||||
{index === 0 ? null : ' '}
|
||||
<Link to={`/p/${subplebbit.address}`} title={subplebbit.title || ''}>
|
||||
{subplebbit.address.includes('.') ? subplebbit.address : subplebbit.title || subplebbit.address.slice(0, 10).concat('...')}
|
||||
</Link>
|
||||
{index !== subplebbits.length - 1 ? ' /' : null}
|
||||
</span>
|
||||
))}
|
||||
]
|
||||
<span className={styles.boardList}>
|
||||
[
|
||||
{subplebbits.map((subplebbit: any, index: number) => (
|
||||
<span key={subplebbit.address}>
|
||||
{index === 0 ? null : ' '}
|
||||
<Link to={`/p/${subplebbit.address}`} title={subplebbit.title || ''}>
|
||||
{subplebbit.address.includes('.') ? subplebbit.address : subplebbit.title || subplebbit.address.slice(0, 10).concat('...')}
|
||||
</Link>
|
||||
{index !== subplebbits.length - 1 ? ' /' : null}
|
||||
</span>
|
||||
))}
|
||||
]
|
||||
</span>
|
||||
<span className={styles.navTopRight}>
|
||||
[
|
||||
<Link to='/settings' onClick={(e) => e.preventDefault()}>
|
||||
{t('settings')}
|
||||
</Link>
|
||||
] [<Link to='/'>{t('home')}</Link>]
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -26,7 +26,7 @@ const BoardStats = ({ address, createdAt }: BoardStatsProps) => {
|
||||
<table className={styles.blotter}>
|
||||
<hr />
|
||||
{showStats && (
|
||||
<tbody id='blotter-msgs'>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<Trans
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.debug {
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user