mirror of
https://github.com/aljazceru/landscape-template.git
synced 2025-12-18 23:04:20 +01:00
feat: make logo link to the homepage of the app, rename login btn to connect, remove html entities from post excerpt
This commit is contained in:
@@ -373,7 +373,13 @@ const createStory = extendType({
|
||||
|
||||
// Preprocess & insert
|
||||
const htmlBody = marked.parse(body);
|
||||
const excerpt = htmlBody.replace(/<[^>]+>/g, '').slice(0, 120);
|
||||
const excerpt = htmlBody
|
||||
.replace(/<[^>]+>/g, '')
|
||||
.slice(0, 120)
|
||||
.replace(/&/g, "&")
|
||||
.replace(/'/g, "'")
|
||||
.replace(/"/g, '"')
|
||||
;
|
||||
|
||||
if (id) {
|
||||
await prisma.story.update({
|
||||
|
||||
@@ -40,11 +40,11 @@ export default function NavDesktop() {
|
||||
|
||||
return (
|
||||
<nav className="bg-white flex py-16 px-32 items-center w-full min-w-full">
|
||||
<a href="https://bolt.fun/">
|
||||
<Link to="/">
|
||||
<h2 className="text-h5 font-bold mr-40 lg:mr-64">
|
||||
<img className='h-40' src={ASSETS.Logo} alt="Bolt fun logo" />
|
||||
</h2>
|
||||
</a>
|
||||
</Link>
|
||||
<ul className="flex gap-32 xl:gap-64">
|
||||
<li className="relative">
|
||||
<Link to={'/products'} className='text-body4 font-bold hover:text-primary-600'>
|
||||
@@ -192,7 +192,7 @@ export default function NavDesktop() {
|
||||
|
||||
:
|
||||
<Link to='/login' className="font-bold hover:text-primary-800 hover:underline">
|
||||
Login <FiLogIn />
|
||||
Connect ⚡
|
||||
</Link>)
|
||||
}
|
||||
<div className="relative h-36">
|
||||
|
||||
@@ -75,9 +75,9 @@ export default function NavMobile() {
|
||||
return (
|
||||
<div className={`${styles.navMobile}`}>
|
||||
<nav className={`bg-white h-[67px] w-full p-16 px-32 flex justify-between items-center`}>
|
||||
<a href="https://bolt.fun/">
|
||||
<Link to="/">
|
||||
<img className='h-32' src={ASSETS.Logo} alt="Bolt fun logo" />
|
||||
</a>
|
||||
</Link>
|
||||
|
||||
<div className="ml-auto"></div>
|
||||
{curUser !== undefined &&
|
||||
@@ -109,7 +109,7 @@ export default function NavMobile() {
|
||||
|
||||
:
|
||||
<Link to='/login' className="font-bold hover:text-primary-800 hover:underline">
|
||||
Login
|
||||
Connect ⚡
|
||||
</Link>)
|
||||
}
|
||||
<IconButton className='auto text-2xl w-[50px] h-[50px] hover:bg-gray-200 self-center' onClick={() => toggleDrawerOpen()}>
|
||||
|
||||
@@ -18,9 +18,7 @@ export default function AuthorCard({ author }: Props) {
|
||||
return (
|
||||
<div className="bg-white p-16 border-2 border-gray-200 rounded-12">
|
||||
<div className='flex gap-8'>
|
||||
<Link to={createRoute({ type: 'profile', id: author.id, username: author.name })}>
|
||||
<Avatar width={48} src={author.avatar} />
|
||||
</Link>
|
||||
<div className="overflow-hidden">
|
||||
<p className={`'text-body4' text-black font-medium overflow-hidden text-ellipsis whitespace-nowrap`}>{trimText(author.name, 333)}</p>
|
||||
<p className={`text-body6 text-gray-600`}>Joined on {dayjs(author.join_date).format('MMMM DD, YYYY')}</p>
|
||||
|
||||
Reference in New Issue
Block a user