Skip to content

Commit 702df66

Browse files
committed
adding all
1 parent 813e45a commit 702df66

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+37393
-3213
lines changed

.env

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
NEXT_PUBLIC_SANITY_DATASET=production
2+
NEXT_PUBLIC_SANITY_PROJECT_ID=l60cf4d9
3+
NEXT_PUBLIC_BASE_URL=http://localhost:3000

.eslintrc.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"extends": "next/core-web-vitals"
2+
"extends": "next/core-web-vitals",
3+
"rules": {
4+
"@next/next/no-img-element": "off"
5+
}
36
}

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
/.next/
1313
/out/
1414

15+
sanity/node_modules
16+
1517
# production
1618
/build
1719

@@ -33,3 +35,5 @@ yarn-error.log*
3335
# typescript
3436
*.tsbuildinfo
3537
next-env.d.ts
38+
39+
.vercel

.sanity/runtime/app.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
// This file is auto-generated on 'sanity dev'
3+
// Modifications to this file is automatically discarded
4+
import {renderStudio} from "sanity"
5+
import studioConfig from "..\\..\\sanity.config.ts"
6+
7+
renderStudio(
8+
document.getElementById("sanity"),
9+
studioConfig,
10+
{reactStrictMode: false, basePath: "/"}
11+
)

.sanity/runtime/index.html

+203
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
<!DOCTYPE html><html lang="en">
2+
<!--
3+
This file is auto-generated from "sanity dev".
4+
Modifications to this file are automatically discarded.
5+
-->
6+
<head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/><meta name="robots" content="noindex"/><meta name="referrer" content="same-origin"/><link rel="icon" href="/static/favicon.ico" sizes="any"/><link rel="icon" href="/static/favicon.svg" type="image/svg+xml"/><link rel="apple-touch-icon" href="/static/apple-touch-icon.png"/><link rel="manifest" href="/static/manifest.webmanifest"/><title>Sanity Studio</title><script>
7+
;(function () {
8+
var _caughtErrors = []
9+
10+
var errorChannel = (function () {
11+
var subscribers = []
12+
13+
function publish(msg) {
14+
for (var i = 0; i < subscribers.length; i += 1) {
15+
subscribers[i](msg)
16+
}
17+
}
18+
19+
function subscribe(subscriber) {
20+
subscribers.push(subscriber)
21+
22+
return function () {
23+
var idx = subscribers.indexOf(subscriber)
24+
25+
if (idx > -1) {
26+
subscribers.splice(idx, 1)
27+
}
28+
}
29+
}
30+
31+
return {publish, subscribe, subscribers}
32+
})()
33+
34+
// NOTE: Store the error channel instance in the global scope so that the Studio application can
35+
// access it and subscribe to errors.
36+
window.__sanityErrorChannel = {
37+
subscribe: errorChannel.subscribe,
38+
}
39+
40+
function _nextTick(callback) {
41+
setTimeout(callback, 0)
42+
}
43+
44+
function _handleError(error, params) {
45+
_nextTick(function () {
46+
// - If there are error channel subscribers, then we notify them (no console error).
47+
// - If there are no subscribers, then we log the error to the console and render the error overlay.
48+
if (errorChannel.subscribers.length) {
49+
errorChannel.publish({error, params})
50+
} else {
51+
console.error(error)
52+
53+
_renderErrorOverlay(error, params)
54+
}
55+
})
56+
}
57+
58+
var ERROR_BOX_STYLE = [
59+
'background: #fff',
60+
'border-radius: 6px',
61+
'box-sizing: border-box',
62+
'color: #121923',
63+
'flex: 1',
64+
"font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue','Liberation Sans',Helvetica,Arial,system-ui,sans-serif",
65+
'font-size: 16px',
66+
'line-height: 21px',
67+
'margin: 0 auto',
68+
'max-width: 960px',
69+
'overflow: auto',
70+
'padding: 20px',
71+
'width: 100%',
72+
].join(';')
73+
74+
var ERROR_CODE_STYLE = [
75+
'color: #972E2A',
76+
"font-family: -apple-system-ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace",
77+
'font-size: 13px',
78+
'line-height: 17px',
79+
'margin: 0',
80+
].join(';')
81+
82+
function _renderErrorOverlay(error, params) {
83+
var errorElement = document.querySelector('#__sanityError') || document.createElement('div')
84+
var colno = params.event.colno
85+
var lineno = params.event.lineno
86+
var filename = params.event.filename
87+
88+
errorElement.id = '__sanityError'
89+
errorElement.innerHTML = [
90+
'<div style="' + ERROR_BOX_STYLE + '">',
91+
'<div style="font-weight: 700;">Uncaught error: ' + error.message + '</div>',
92+
'<div style="color: #515E72; font-size: 13px; line-height: 17px; margin: 10px 0;">' +
93+
filename +
94+
':' +
95+
lineno +
96+
':' +
97+
colno +
98+
'</div>',
99+
'<pre style="' + ERROR_CODE_STYLE + '">' + error.stack + '</pre>',
100+
'</div>',
101+
].join('')
102+
103+
errorElement.style.position = 'fixed'
104+
errorElement.style.zIndex = 1000000
105+
errorElement.style.top = 0
106+
errorElement.style.left = 0
107+
errorElement.style.right = 0
108+
errorElement.style.bottom = 0
109+
errorElement.style.padding = '20px'
110+
errorElement.style.background = 'rgba(16,17,18,0.66)'
111+
errorElement.style.display = 'flex'
112+
errorElement.style.alignItems = 'center'
113+
errorElement.style.justifyContent = 'center'
114+
115+
document.body.appendChild(errorElement)
116+
}
117+
118+
// NOTE:
119+
// Yes – we're attaching 2 error listeners below 👀
120+
// This is because React makes the same error throw twice (in development mode).
121+
// See: https://github.com/facebook/react/issues/10384
122+
123+
// Error listener #1
124+
window.onerror = function (event, source, lineno, colno, error) {
125+
_nextTick(function () {
126+
if (_caughtErrors.indexOf(error) !== -1) return
127+
128+
_caughtErrors.push(error)
129+
130+
_handleError(error, {
131+
event,
132+
lineno,
133+
colno,
134+
source,
135+
})
136+
137+
_nextTick(function () {
138+
var idx = _caughtErrors.indexOf(error)
139+
140+
if (idx > -1) _caughtErrors.splice(idx, 1)
141+
})
142+
})
143+
144+
// IMPORTANT: this callback must return `true` to prevent the error from being rendered in
145+
// the browser’s console.
146+
return true
147+
}
148+
149+
// Error listener #2
150+
window.addEventListener('error', function (event) {
151+
if (_caughtErrors.indexOf(event.error) !== -1) return true
152+
153+
_caughtErrors.push(event.error)
154+
155+
_handleError(event.error, {
156+
event,
157+
lineno: event.lineno,
158+
colno: event.colno,
159+
})
160+
161+
_nextTick(function () {
162+
_nextTick(function () {
163+
var idx = _caughtErrors.indexOf(event.error)
164+
165+
if (idx > -1) _caughtErrors.splice(idx, 1)
166+
})
167+
})
168+
169+
return true
170+
})
171+
})()
172+
</script><style>
173+
html {
174+
background-color: #f1f3f6;
175+
}
176+
html,
177+
body,
178+
#sanity {
179+
height: 100%;
180+
}
181+
body {
182+
margin: 0;
183+
-webkit-font-smoothing: antialiased;
184+
}
185+
</style></head><body><div id="sanity"></div><script type="module" src="/.sanity\runtime\app.js"></script><noscript><div class="sanity-app-no-js__root"><div class="sanity-app-no-js__content"><style type="text/css">
186+
.sanity-app-no-js__root {
187+
position: absolute;
188+
top: 0;
189+
right: 0;
190+
left: 0;
191+
bottom: 0;
192+
background: #fff;
193+
}
194+
195+
.sanity-app-no-js__content {
196+
position: absolute;
197+
top: 50%;
198+
left: 50%;
199+
transform: translate(-50%, -50%);
200+
text-align: center;
201+
font-family: helvetica, arial, sans-serif;
202+
}
203+
</style><h1>JavaScript disabled</h1><p>Please <a href="https://www.enable-javascript.com/">enable JavaScript</a> in your browser and reload the page to proceed.</p></div></div></noscript></body></html>

components/About.tsx

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import React from 'react'
2+
import { motion } from 'framer-motion'
3+
import { PageInfo } from '../typing'
4+
import { urlFor } from '@component/sanity'
5+
6+
type Props = {
7+
pageInfo: PageInfo
8+
}
9+
10+
export default function About ({pageInfo}: Props) {
11+
return (
12+
<motion.div
13+
initial={{ x: -200, opacity: 0, }}
14+
whileInView={{ x: 0, opacity: 1,}}
15+
transition={{duration: 1.2,}}
16+
className='h-screen flex flex-col relative text-center md:text-left md:flex-row max-w-7xl px-10 justify-evenly mx-auto items-center'>
17+
<h3 className='absolute top-24 uppercase tracking-[20px] text-gray-500 text-2xl'>About</h3>
18+
<motion.img
19+
initial={{ x: -200, opacity: 0,}}
20+
whileInView={{ x: 0, opacity: 1,}}
21+
transition={{duration: 1.2,}}
22+
className='-mb-20 md:mb-0 mt-10 md:mt-0 flex-shrink-0 md:rounded-lg md:w-56 md:h-72 w-48 h-48 object-cover rounded-full' src={urlFor(pageInfo.profilePic).url()} alt='/'/>
23+
24+
<div className='space-y-4 md:space-y-10 px-0 md:px-10'>
25+
<h4 className='text-2xl md:text-4xl font-semibold'>Here&apos;s a <span className='underline underline-offset-2 decoration-[#e6cf74]/90'>little</span> background</h4>
26+
<p className='text-base'>{pageInfo.backgroundInformation}</p>
27+
</div>
28+
</motion.div>
29+
)
30+
}
31+

components/BackgroundCircles.tsx

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import React from 'react'
2+
import { motion } from 'framer-motion';
3+
4+
5+
type Props = {
6+
7+
}
8+
9+
export default function BackgroundCircles ( props: Props) {
10+
return (
11+
<motion.div
12+
initial={{ opacity: 0, scale:0.4}}
13+
animate={{ opacity: 1, scale: 1}}
14+
transition={{duration: 1.3}}
15+
className='relative flex justify-center items-center'>
16+
<div className='absolute border border-[#333333] rounded-full h-[200px] w-[200px] mt-52 animate-ping'/>
17+
<div className='absolute border border-[#333333] rounded-full h-[300px] w-[300px] mt-52'/>
18+
<div className='absolute border border-[#333333] rounded-full h-[500px] w-[500px] mt-52'/>
19+
{/* <div className='absolute border border-[#F7AB0A] rounded-full h-[650px] w-[650px] mt-52 animate-pulse'/> */}
20+
<div className='absolute border border-[#f7790ab7] rounded-full h-[650px] w-[650px] mt-52 animate-pulse'/>
21+
<div className='absolute border border-[#333333] rounded-full h-[800px] w-[800px] mt-52'/>
22+
</motion.div>
23+
)
24+
}
25+

components/ContactMe.tsx

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import React from 'react'
2+
import { PhoneIcon, MapPinIcon, EnvelopeIcon } from '@heroicons/react/24/solid'
3+
import { useForm, SubmitHandler } from "react-hook-form";
4+
5+
6+
type Props = {
7+
}
8+
type Inputs = {
9+
name: string,
10+
email: string,
11+
subject: string,
12+
message: string,
13+
};
14+
15+
export default function ContactMe (props : Props) {
16+
17+
const { register, handleSubmit } = useForm<Inputs>();
18+
const onSubmit: SubmitHandler<Inputs> = (formData) => (window.location.href = `mailto:[email protected]?subject=${formData.subject}&body=Hi, my name is ${formData.name}. ${formData.message}`)
19+
20+
21+
return (
22+
<div className='h-screen flex flex-col relative text-center md:text-left md:flex-row max-w-7xl px-10 justify-evenly mx-auto items-center'>
23+
<h3 className='absolute top-24 md:top-16 uppercase tracking-[20px] text-gray-500 text-2xl'>Contact</h3>
24+
<div className='flex flex-col space-y-7 md:space-y-5 md:mt-[60px]'>
25+
<h4 className='text-3xl font-semibold text-center'>I have got just what you need. <span className='underline decoration-yellow-200'>Let&apos;s Talk</span></h4>
26+
27+
<div className='space-y-5 md:space-y-3'>
28+
29+
<div className='flex items-center space-x-5 justify-center'>
30+
<PhoneIcon className='text-[#F7AB0A] h-7 w-7 animate-pulse'/>
31+
<p className='text-xl'>+918804772137</p>
32+
</div>
33+
34+
<div className='flex items-center space-x-5 justify-center'>
35+
<EnvelopeIcon className='text-[#F7AB0A] h-7 w-7 animate-pulse'/>
36+
<p className='text-xl'>[email protected]</p>
37+
</div>
38+
39+
<div className='flex items-center space-x-5 justify-center'>
40+
<MapPinIcon className='text-[#F7AB0A] h-7 w-7 animate-pulse'/>
41+
<p className='text-xl'>Main Road Dumraon, India</p>
42+
</div>
43+
</div>
44+
45+
<div>
46+
<form onSubmit={handleSubmit(onSubmit)} className='flex flex-col space-y-2 w-fit mx-auto'>
47+
<div className='flex md:space-x-2 flex-col space-y-2 w-fit md:space-y-0 md:flex-row '>
48+
<input {...register("name")} placeholder='Name' className='contactInput' type="text" />
49+
<input {...register("email")} placeholder='Email' className='contactInput' type="email" />
50+
</div>
51+
<input {...register("subject")} placeholder='Subject' className='contactInput' type="text" />
52+
<textarea {...register("message")} placeholder='Message' className='contactInput'/>
53+
<button type='submit' className='bg-[#F7AB0A] py-5 px-10 rounded-md text-black font-bold'>Submit</button>
54+
</form>
55+
</div>
56+
57+
</div>
58+
59+
</div>
60+
)
61+
}

0 commit comments

Comments
 (0)