Skip to content

Commit

Permalink
feat: 🎨 change about layout
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasdsalves committed May 2, 2023
1 parent e372608 commit 8808dd2
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 62 deletions.
2 changes: 1 addition & 1 deletion components/PageTitle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default function PageTitle({ children }) {
return (
<h1 className="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-5xl md:leading-14">
<h1 className="text-3xl font-extrabold leading-9 tracking-tight text-white dark:text-white sm:text-4xl sm:leading-10 md:text-5xl md:leading-14">
{children}
</h1>
)
Expand Down
38 changes: 16 additions & 22 deletions layouts/AuthorLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,26 @@ export default function AuthorLayout({ children, frontMatter }) {
return (
<>
<PageSEO title={`About - ${name}`} description={`About me - ${name}`} />
<div>
<div className="space-y-2 pt-6 pb-8 md:space-y-5">
<h1 className="text-3xl leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">
About
</h1>
</div>
<div className="items-start space-y-2 xl:grid xl:grid-cols-3 xl:gap-x-8 xl:space-y-0">
<div className="flex flex-col items-center pt-8">
<div className="pt-8">
<div className="mb-8 flex flex-col-reverse items-center justify-between sm:flex-row sm:items-center">
<div className="text-center sm:text-left">
<h1 className="text-xl font-bold md:text-3xl lg:text-4xl">Lucas dos Santos Alves</h1>
<h2 className="text-sm font-normal md:text-base">
{occupation} <span className="font-semibold">{company}</span>
</h2>
</div>
<div>
<Image
src={avatar}
alt="avatar"
width="192px"
height="192px"
alt="Lucas dos Santos Alves"
height={130}
width={130}
src={avatar || ''}
className="h-48 w-48 rounded-full"
/>
<h3 className="pt-4 pb-2 text-2xl font-bold leading-8 tracking-tight">{name}</h3>
<div className="text-gray-500 dark:text-gray-400">{occupation}</div>
<div className="text-gray-500 dark:text-gray-400">{company}</div>
<div className="flex space-x-3 pt-6">
<SocialIcon kind="mail" href={`mailto:${email}`} />
<SocialIcon kind="github" href={github} />
<SocialIcon kind="linkedin" href={linkedin} />
<SocialIcon kind="twitter" href={twitter} />
</div>
</div>
<div className="prose max-w-none pt-8 pb-8 dark:prose-dark xl:col-span-2">{children}</div>
</div>
<div className="prose max-w-none pb-8 text-justify text-sm dark:prose-dark md:text-lg xl:col-span-2">
{children}
</div>
</div>
</>
Expand Down
51 changes: 12 additions & 39 deletions layouts/PostLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ export default function PostLayout({ frontMatter, authorDetails, next, prev, chi
<ScrollTopAndComment />
<article>
<div className="xl:divide-y xl:divide-gray-200 xl:dark:divide-gray-700">
<header className="pt-6 xl:pb-6">
<header className="space-y-1 rounded-lg bg-primary-500 py-4 px-2 text-center sm:py-6 md:py-10">
<div className="space-y-1 text-center">
<dl className="space-y-10">
<div>
<dt className="sr-only">Published on</dt>
<dd className="text-base font-medium leading-6 text-gray-500 dark:text-gray-400">
<dd className="text-base font-medium leading-6 text-white dark:text-white">
<time dateTime={date}>
{new Date(date).toLocaleDateString(siteMetadata.locale, postDateTemplate)}
</time>
Expand All @@ -44,49 +44,22 @@ export default function PostLayout({ frontMatter, authorDetails, next, prev, chi
<div>
<PageTitle>{title}</PageTitle>
</div>
<div>
{authorDetails.map((author) => (
<span className="text-white dark:text-white" key={author.name}>
{' '}
{author.name}
</span>
))}
</div>
</div>
</header>
<div
className="divide-y divide-gray-200 pb-8 dark:divide-gray-700 xl:grid xl:grid-cols-4 xl:gap-x-6 xl:divide-y-0"
style={{ gridTemplateRows: 'auto 1fr' }}
>
<dl className="pt-6 pb-10 xl:border-b xl:border-gray-200 xl:pt-11 xl:dark:border-gray-700">
<dt className="sr-only">Authors</dt>
<dd>
<ul className="flex justify-center space-x-8 sm:space-x-12 xl:block xl:space-x-0 xl:space-y-8">
{authorDetails.map((author) => (
<li className="flex items-center space-x-2" key={author.name}>
{author.avatar && (
<Image
src={author.avatar}
width="38px"
height="38px"
alt="avatar"
className="h-10 w-10 rounded-full"
/>
)}
<dl className="whitespace-nowrap text-sm font-medium leading-5">
<dt className="sr-only">Name</dt>
<dd className="text-gray-900 dark:text-gray-100">{author.name}</dd>
<dt className="sr-only">Twitter</dt>
<dd>
{author.twitter && (
<Link
href={author.twitter}
className="text-primary-500 hover:text-primary-600 dark:hover:text-primary-400"
>
{author.twitter.replace('https://twitter.com/', '@')}
</Link>
)}
</dd>
</dl>
</li>
))}
</ul>
</dd>
</dl>
<div className="divide-y divide-gray-200 dark:divide-gray-700 xl:col-span-3 xl:row-span-2 xl:pb-0">
<div className="prose max-w-none pt-10 pb-8 dark:prose-dark">{children}</div>
<div className="divide-y divide-gray-200 dark:divide-gray-700 xl:col-span-4 xl:row-span-2 xl:pb-0">
<div className="prose max-w-none pt-8 pb-8 dark:prose-dark">{children}</div>
</div>
<footer>
<div className="divide-gray-200 text-sm font-medium leading-5 dark:divide-gray-700 xl:col-start-1 xl:row-start-2 xl:divide-y">
Expand Down

0 comments on commit 8808dd2

Please sign in to comment.