markdown render fixes (#1454)
* markdown render fix * links in my proposal page * fix
This commit is contained in:
parent
70c9af7dbc
commit
329b0c9f88
|
@ -31,6 +31,7 @@ import {
|
|||
SequenceType,
|
||||
txBatchesToInstructionSetWithSigners,
|
||||
} from '@utils/sendTransactions'
|
||||
import useQueryContext from '@hooks/useQueryContext'
|
||||
|
||||
const MyProposalsBn = () => {
|
||||
const [modalIsOpen, setModalIsOpen] = useState(false)
|
||||
|
@ -483,6 +484,8 @@ const ProposalList = ({
|
|||
proposals: ProgramAccount<Proposal>[]
|
||||
isLoading: boolean
|
||||
}) => {
|
||||
const { fmtUrlWithCluster } = useQueryContext()
|
||||
const { symbol } = useRealm()
|
||||
return (
|
||||
<>
|
||||
{' '}
|
||||
|
@ -516,7 +519,16 @@ const ProposalList = ({
|
|||
className="text-xs border-fgd-4 border px-3 py-2 mb-3 rounded-lg"
|
||||
key={x.pubkey.toBase58()}
|
||||
>
|
||||
{x.account.name}
|
||||
<a
|
||||
className="underline cursor-pointer"
|
||||
href={fmtUrlWithCluster(
|
||||
`/dao/${symbol}/proposal/${x.pubkey.toBase58()}`
|
||||
)}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
{x.account.name}
|
||||
</a>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
|
|
@ -124,6 +124,88 @@ tbody {
|
|||
@apply block mb-2 text-sm;
|
||||
}
|
||||
|
||||
.markdown table {
|
||||
margin: 10px 0;
|
||||
border: 1px solid #ccc;
|
||||
@apply border-bkg-4;
|
||||
border-collapse: collapse;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
table caption {
|
||||
font-size: 1.5em;
|
||||
margin: 0.5em 0 0.75em;
|
||||
}
|
||||
|
||||
table tr {
|
||||
border: 1px solid #ddd;
|
||||
@apply border-bkg-4;
|
||||
padding: 0.35em;
|
||||
}
|
||||
|
||||
table th,
|
||||
table td {
|
||||
padding: 0.625em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table th {
|
||||
font-size: 0.85em;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
table {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
table caption {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
table thead {
|
||||
border: none;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
table tr {
|
||||
border-bottom: 3px solid #ddd;
|
||||
display: block;
|
||||
margin-bottom: 0.625em;
|
||||
}
|
||||
|
||||
table td {
|
||||
border-bottom: 1px solid #ddd;
|
||||
display: block;
|
||||
font-size: 0.8em;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
table td::before {
|
||||
/*
|
||||
* aria-label has no advantage, it won't be read inside a table
|
||||
content: attr(aria-label);
|
||||
*/
|
||||
content: attr(data-label);
|
||||
float: left;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
table td:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
:placeholder-shown {
|
||||
@apply font-body;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue