Skip to content

Commit

Permalink
some small cosmetic fixes
Browse files Browse the repository at this point in the history
 * move author to top
 * rename blog in nav bar to "Eng Blog"
 * remove "Edit this page on Github" in blog mode
  • Loading branch information
jtolio committed Jul 3, 2024
1 parent 19c2044 commit 548c3c2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
3 changes: 1 addition & 2 deletions src/components/BlogLayout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ export default async function BlogLayout({ children, href, frontmatter, ast }) {
{title}
</h1>
)}
<Bio name={name} />
<time dateTime={new Date(date).toISOString().slice(0, 10)}>
{' '}
{new Date(date).toLocaleDateString()}
</time>
</header>
Expand All @@ -99,7 +99,6 @@ export default async function BlogLayout({ children, href, frontmatter, ast }) {
indiehackers={frontmatter.indiehackers}
/>
</article>
<Bio name={name} />
<PrevNextLinks />
</Prose>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Spaces.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const spaces = [
{ name: 'Learn', href: '/learn' },
{ name: 'Node', href: '/node' },
{ name: 'Help Center', href: '/support' },
{ name: 'Blog', href: '/blog' },
{ name: 'Eng Blog', href: '/blog' },
]

export function TopLevelLink({ href, className, current, children }) {
Expand Down
22 changes: 13 additions & 9 deletions src/components/TableOfContents.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,19 @@ export default function TableOfContents({ tableOfContents, routeGroup }) {
</ol>
</>
)}
<div className="mt-3 space-y-2 border-t border-gray-200 pt-5 text-sm text-gray-900 dark:border-gray-300" />
<a
target="_blank"
rel="noreferrer"
className="text-sm text-slate-500 hover:text-slate-600 dark:text-slate-400 dark:hover:text-slate-300"
href={`${GITHUB_EDIT_URL}/${routeGroup}${pathname}/page.md`}
>
Edit this page on GitHub →
</a>
{routeGroup != "(blog)" ?
<div>
<div className="mt-3 space-y-2 border-t border-gray-200 pt-5 text-sm text-gray-900 dark:border-gray-300" />
<a
target="_blank"
rel="noreferrer"
className="text-sm text-slate-500 hover:text-slate-600 dark:text-slate-400 dark:hover:text-slate-300"
href={`${GITHUB_EDIT_URL}/${routeGroup}${pathname}/page.md`}
>
Edit this page on GitHub →
</a>
</div>
: ""}
</nav>
)
}

0 comments on commit 548c3c2

Please sign in to comment.