1
1
import Image from 'next/image' ;
2
-
3
-
4
- import clsx from 'clsx' ;
5
- import { allArticles , allSnippets } from 'contentlayer/generated' ;
6
- import type { Snippet } from 'contentlayer/generated' ;
7
-
2
+ import { allArticles } from 'contentlayer/generated' ;
8
3
import { Container } from '@/components/container' ;
9
4
import {
10
5
GitHubIcon ,
@@ -17,13 +12,13 @@ import Resume, { Experience } from '@/components/resume';
17
12
import logoGojek from '@/public/images/logos/gojek.jpeg' ;
18
13
import logoInfosys from '@/public/images/logos/infosys.jpeg' ;
19
14
import logoPagalguy from '@/public/images/logos/pg.jpeg' ;
20
- import { Card } from '@/components/card' ;
15
+
21
16
import type { Article } from 'contentlayer/generated' ;
22
17
import { formatDate } from '@/lib/formatDate' ;
23
18
import photos from '@/lib/photos' ;
24
19
25
20
const resume : Experience [ ] = [
26
- {
21
+ {
27
22
company : 'Gojek' ,
28
23
title : 'Senior Principal Architect' ,
29
24
logo : logoGojek ,
@@ -54,24 +49,13 @@ const resume: Experience[] = [
54
49
] ;
55
50
56
51
function Photos ( ) {
57
- let rotations = [
58
- 'rotate-2' ,
59
- '-rotate-2' ,
60
- 'rotate-2' ,
61
- 'rotate-2' ,
62
- '-rotate-2' ,
63
- ] ;
64
-
65
52
return (
66
- < div className = "mt-16 sm:mt-20 " >
67
- < div className = "-my-4 flex justify-center gap-5 overflow-hidden py-4 sm: gap-8 " >
68
- { photos . map ( ( image , imageIndex ) => (
53
+ < div className = "mt-6 " >
54
+ < div className = "grid grid-cols-3 gap-2 " >
55
+ { photos . slice ( 0 , 6 ) . map ( ( image , imageIndex ) => (
69
56
< div
70
57
key = { imageIndex }
71
- className = { clsx (
72
- 'relative aspect-[9/10] w-44 flex-none overflow-hidden rounded-xl bg-zinc-100 dark:bg-zinc-800 sm:w-72 sm:rounded-2xl' ,
73
- rotations [ imageIndex % rotations . length ]
74
- ) }
58
+ className = "relative aspect-square overflow-hidden rounded-lg"
75
59
>
76
60
< Image
77
61
src = { image . src }
@@ -88,98 +72,105 @@ function Photos() {
88
72
89
73
function Article ( { article } : { article : Article } ) {
90
74
return (
91
- < Card as = "article" >
92
- < Card . Title href = { article . slug } >
93
- { article . title }
94
- </ Card . Title >
95
- < Card . Eyebrow as = "time" dateTime = { article . date } decorate >
96
- { formatDate ( article . date ) }
97
- </ Card . Eyebrow >
98
- < Card . Description > { article . description } </ Card . Description >
99
- < Card . Cta > Read</ Card . Cta >
100
- </ Card >
101
- ) ;
102
- }
103
-
104
- function Snippet ( { snippet } : { snippet : Snippet } ) {
105
- return (
106
- < Card as = "article" >
107
- < Card . Title href = { snippet . slug } >
108
- { snippet . title }
109
- </ Card . Title >
110
- < Card . Eyebrow as = "time" dateTime = { snippet . date } decorate >
111
- { formatDate ( snippet . date ) }
112
- </ Card . Eyebrow >
113
- < Card . Cta > View</ Card . Cta >
114
- </ Card >
75
+ < article className = "group relative flex flex-col items-start" >
76
+ < div className = "absolute -inset-x-4 -inset-y-6 z-0 scale-95 bg-zinc-50 opacity-0 transition group-hover:scale-100 group-hover:opacity-100 dark:bg-zinc-800/50 sm:-inset-x-6 sm:rounded-2xl" />
77
+ < div className = "relative z-10 flex w-full items-center justify-between gap-4" >
78
+ < h2 className = "text-base font-semibold tracking-tight text-zinc-800 dark:text-zinc-100" >
79
+ < a href = { article . slug } >
80
+ < span className = "absolute -inset-x-4 -inset-y-6 z-20 sm:-inset-x-6 sm:rounded-2xl" />
81
+ < span className = "relative z-10" > { article . title } </ span >
82
+ </ a >
83
+ </ h2 >
84
+ < time
85
+ className = "flex items-center text-sm text-zinc-400 dark:text-zinc-500"
86
+ dateTime = { article . date }
87
+ >
88
+ { formatDate ( article . date ) }
89
+ </ time >
90
+ </ div >
91
+ < p className = "relative z-10 mt-2 text-sm text-zinc-600 dark:text-zinc-400" >
92
+ { article . description }
93
+ </ p >
94
+ < div className = "relative z-10 mt-4 flex items-center text-sm font-medium text-red-500" >
95
+ Read article
96
+ </ div >
97
+ </ article >
115
98
) ;
116
99
}
117
100
118
101
export default async function Home ( ) {
119
- const articles = allArticles . sort ( ( a , b ) => b . date . localeCompare ( a . date ) ) . slice ( 0 , 3 ) ;
120
- const snippets = allSnippets . sort ( ( a , b ) => b . date . localeCompare ( a . date ) ) . slice ( 0 , 3 ) ;
121
-
102
+ const articles = allArticles . sort ( ( a , b ) => b . date . localeCompare ( a . date ) ) ;
122
103
return (
123
104
< >
124
105
< Container className = "mt-9" >
125
- < div className = "mx-auto grid max-w-xl grid-cols-1 gap-y-20 lg:max-w-none lg:grid-cols-2" >
126
- < div >
127
- < h1 className = "text-4xl font-bold tracking-tight text-zinc-800 dark:text-zinc-100 sm:text-5xl" >
128
- Ravi Atluri.
129
- </ h1 >
130
- < p className = "mt-6 text-base text-zinc-600 dark:text-zinc-400" >
131
- Sr. Principal Architect at Gojek. Working scalable and reliable
132
- systems & abstractions for product engineering teams .
133
- </ p >
134
- < div className = "mt-6 flex gap-6" >
135
- < SocialLink
136
- href = "https://twitter.com/sonnes"
137
- aria-label = "Follow on Twitter"
138
- icon = { TwitterIcon }
139
- />
140
- < SocialLink
141
- href = "https://instagram.com/sonnes"
142
- aria-label = "Follow on Instagram"
143
- icon = { InstagramIcon }
144
- />
145
- < SocialLink
146
- href = "https://github.com/sonnes"
147
- aria-label = "Follow on GitHub"
148
- icon = { GitHubIcon }
149
- />
150
- < SocialLink
151
- href = "https://www.linkedin.com/in/atluriravi"
152
- aria-label = "Follow on LinkedIn"
153
- icon = { LinkedInIcon }
154
- />
106
+ < div className = "mx-auto grid max-w-xl grid-cols-1 gap-y-20 lg:max-w-none lg:grid-cols-[1fr,400px]" >
107
+ { /* Main Content (Left Side) */ }
108
+ < div className = "space-y-20" >
109
+ < div className = "md:border-l md:border-zinc-100 md:pl-6 md:dark:border-zinc-700/40" >
110
+ < div className = "flex flex-col space-y-16" >
111
+ { articles . map ( ( article ) => (
112
+ < Article key = { article . slug } article = { article } />
113
+ ) ) }
114
+ </ div >
155
115
</ div >
156
116
</ div >
157
- < div className = "space-y-10 lg:pl-16 xl:pl-24" >
117
+
118
+ { /* Sidebar (Right Side) */ }
119
+ < div className = "space-y-10 lg:pl-16" >
120
+ { /* Bio Section */ }
121
+ < div >
122
+ < p className = "mt-6 text-base text-zinc-600 dark:text-zinc-400" >
123
+ Sr. Principal Architect at Gojek. Working on scalable and reliable
124
+ systems & abstractions for product engineering teams .
125
+ </ p >
126
+ < div className = "mt-6 flex gap-6" >
127
+ < SocialLink
128
+ href = "https://twitter.com/sonnes"
129
+ aria-label = "Follow on Twitter"
130
+ icon = { TwitterIcon }
131
+ />
132
+ < SocialLink
133
+ href = "https://instagram.com/sonnes"
134
+ aria-label = "Follow on Instagram"
135
+ icon = { InstagramIcon }
136
+ />
137
+ < SocialLink
138
+ href = "https://github.com/sonnes"
139
+ aria-label = "Follow on GitHub"
140
+ icon = { GitHubIcon }
141
+ />
142
+ < SocialLink
143
+ href = "https://www.linkedin.com/in/atluriravi"
144
+ aria-label = "Follow on LinkedIn"
145
+ icon = { LinkedInIcon }
146
+ />
147
+ </ div >
148
+ </ div >
149
+
150
+
151
+ { /* Work History */ }
158
152
< Resume resume = { resume } />
159
- </ div >
160
- </ div >
161
- </ Container >
162
- < Photos />
163
- < Container className = "mt-24 md:mt-28" >
164
- < div className = "mx-auto grid max-w-xl grid-cols-1 gap-y-20 lg:max-w-none lg:grid-cols-2" >
165
- < div className = "flex flex-col gap-16" >
166
- < h2 className = "text-2xl font-bold tracking-tight text-zinc-800 dark:text-zinc-100 sm:text-3xl" >
167
- Articles
168
- </ h2 >
169
- { articles . map ( ( article ) => (
170
- < Article key = { article . slug } article = { article } />
171
- ) ) }
172
- </ div >
173
153
174
- < div className = "flex flex-col gap-16" >
175
- < h2 className = "text-2xl font-bold tracking-tight text-zinc-800 dark:text-zinc-100 sm:text-3xl" >
176
- Snippets
177
- </ h2 >
178
- { snippets . map ( ( snippet ) => (
179
- < Snippet key = { snippet . slug } snippet = { snippet } />
180
- ) ) }
181
- </ div >
154
+ { /* Categories Section */ }
155
+ < div >
156
+ < h2 className = "mb-4 text-sm font-semibold text-zinc-800 dark:text-zinc-100" >
157
+ Tags
158
+ </ h2 >
159
+ < div className = "flex flex-wrap gap-2" >
160
+ { [ 'XDB' , 'ALS' , 'Accessibility' , 'Go' ] . map ( ( category ) => (
161
+ < span
162
+ key = { category }
163
+ className = "rounded-full bg-zinc-100 px-3 py-1 text-sm text-zinc-800 dark:bg-zinc-800 dark:text-zinc-100"
164
+ >
165
+ { category }
166
+ </ span >
167
+ ) ) }
168
+ </ div >
169
+ </ div >
182
170
171
+ { /* Photos Section */ }
172
+ < Photos />
173
+ </ div >
183
174
</ div >
184
175
</ Container >
185
176
</ >
0 commit comments