Skip to content

Commit 8bc0f91

Browse files
feat: updated links and spacing
1 parent dcab735 commit 8bc0f91

File tree

5 files changed

+10
-13
lines changed

5 files changed

+10
-13
lines changed

apps/sim/app/(landing)/studio/[slug]/article-sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export function ArticleSidebar({ author, authors, headings, related }: ArticleSi
7373

7474
{related.length > 0 && (
7575
<div className='border border-[#2A2A2A] bg-[#232323] p-5' style={{ borderRadius: '5px' }}>
76-
<div className='mb-4 flex items-center gap-2 border-b border-[#2A2A2A] pb-3 font-season text-[11px] uppercase tracking-widest text-[#ECECEC]'>
76+
<div className='mb-4 flex items-center gap-2 pb-3 font-season text-[11px] uppercase tracking-widest text-[#ECECEC]'>
7777
<span className='inline-block h-1.5 w-1.5 bg-[#FFCC02]' aria-hidden='true' />
7878
Recent Logs
7979
</div>

apps/sim/app/(landing)/studio/[slug]/prose-studio.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
display: flex;
33
align-items: center;
44
border-bottom: 1px solid #2a2a2a;
5-
padding-bottom: 0.5rem;
5+
padding-bottom: 1.5rem;
66
font-weight: 500;
77
font-size: 1.5rem;
88
color: #ececec;
9-
margin-top: 3rem;
9+
margin-top: 1rem !important;
1010
margin-bottom: 1.5rem;
1111
letter-spacing: -0.025em;
1212
}

apps/sim/app/(landing)/studio/[slug]/table-of-contents.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export function TableOfContents({ headings }: TableOfContentsProps) {
7777

7878
return (
7979
<div>
80-
<div className='mb-4 flex items-center gap-2 border-b border-[#2A2A2A] pb-3 font-season text-[11px] uppercase tracking-widest text-[#ECECEC]'>
80+
<div className='mb-4 flex items-center gap-2 pb-2 font-season text-[11px] uppercase tracking-widest text-[#ECECEC]'>
8181
<List className='h-3 w-3 text-[#2ABBF8]' aria-hidden />
8282
Contents
8383
</div>

apps/sim/app/(landing)/studio/post-grid.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function PostCard({ post, priority = false }: { post: Post; priority?: boolean }
7575
return (
7676
<motion.div variants={cardVariants} className='h-full'>
7777
<Link href={`/studio/${post.slug}`} className='group flex h-full flex-col'>
78-
<article className='flex h-full flex-col overflow-hidden border border-[#2A2A2A] bg-[#232323] transition-[border-color] duration-200 hover:border-[#3d3d3d] active:scale-[0.99]'>
78+
<article className='flex h-full flex-col overflow-hidden border border-[#2A2A2A] bg-[#232323] transition-[border-color,background-color,transform] duration-200 ease-out active:scale-[0.99] [@media(hover:hover)]:group-hover:border-[#3d3d3d] [@media(hover:hover)]:group-hover:bg-[#282828] [@media(hover:hover)]:group-hover:-translate-y-0.5'>
7979
<div className='relative aspect-video w-full overflow-hidden bg-[#1C1C1C]'>
8080
<Image
8181
src={post.ogImage}
@@ -85,7 +85,7 @@ function PostCard({ post, priority = false }: { post: Post; priority?: boolean }
8585
priority={priority}
8686
loading={priority ? undefined : 'lazy'}
8787
fill
88-
className='object-cover opacity-90 transition-[transform,opacity] duration-200 [@media(hover:hover)]:group-hover:scale-[1.02] [@media(hover:hover)]:group-hover:opacity-100'
88+
className='object-cover opacity-80 transition-[transform,opacity] duration-200 ease-out [@media(hover:hover)]:group-hover:scale-[1.03] [@media(hover:hover)]:group-hover:opacity-100'
8989
/>
9090
</div>
9191
<div className='flex flex-1 flex-col p-6'>
@@ -146,15 +146,15 @@ function FeaturedLeadCard({ post }: { post: Post }) {
146146
<motion.div variants={leadVariants} className='col-span-full'>
147147
<Link
148148
href={`/studio/${post.slug}`}
149-
className='group relative flex min-h-[400px] flex-col justify-end overflow-hidden border border-[#2A2A2A] bg-[#232323] transition-[border-color] duration-200 [@media(hover:hover)]:hover:border-[#00F701]'
149+
className='group relative flex min-h-[400px] flex-col justify-end overflow-hidden border border-[#2A2A2A] bg-[#232323] transition-[border-color,transform] duration-200 ease-out [@media(hover:hover)]:hover:border-[#00F701] [@media(hover:hover)]:hover:-translate-y-0.5'
150150
>
151151
<div className='absolute inset-0'>
152152
<Image
153153
src={post.ogImage}
154154
alt={post.title}
155155
fill
156156
sizes='(max-width: 1200px) 100vw, 900px'
157-
className='object-cover opacity-40 transition-opacity duration-300 [@media(hover:hover)]:group-hover:opacity-50'
157+
className='object-cover opacity-30 transition-[opacity,transform] duration-300 ease-out [@media(hover:hover)]:group-hover:scale-[1.02] [@media(hover:hover)]:group-hover:opacity-50'
158158
unoptimized
159159
priority
160160
/>

apps/sim/lib/blog/registry.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import fs from 'fs/promises'
22
import path from 'path'
3+
import { slug as githubSlug } from 'github-slugger'
34
import matter from 'gray-matter'
45
import { compileMDX } from 'next-mdx-remote/rsc'
56
import rehypeAutolinkHeadings from 'rehype-autolink-headings'
@@ -32,11 +33,7 @@ async function loadAuthors(): Promise<Record<string, any>> {
3233
}
3334

3435
function slugify(text: string): string {
35-
return text
36-
.toLowerCase()
37-
.trim()
38-
.replace(/[^a-z0-9\s-]/g, '')
39-
.replace(/\s+/g, '-')
36+
return githubSlug(text)
4037
}
4138

4239
async function scanFrontmatters(): Promise<BlogMeta[]> {

0 commit comments

Comments
 (0)