Skip to content

Commit d398716

Browse files
Merge pull request #45 from ekrishnachaitanya2004/my-new-feature
My new feature
2 parents d29628e + 92c2cc4 commit d398716

File tree

3 files changed

+61
-7
lines changed

3 files changed

+61
-7
lines changed

src/config/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
"params": {
2929
"contact_form_action": "#",
30-
"copyright": "Designed And Developed by [Krishna](https://ekrishnachaitanya2004.netlify.app/)"
30+
"copyright": "© 2025 Developer Blogs. All rights open-sourced.<br>Built with ❤️ by the KHC community"
3131
},
3232

3333
"navigation_button": {
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: John Doe
3+
4+
image: "/images/authors/john-doe.jpg"
5+
description: A technology enthusiast and software architect with years of experience in modern application development.
6+
social:
7+
- name: facebook
8+
icon: FaFacebook
9+
link: https://www.facebook.com
10+
11+
- name: twitter
12+
icon: FaTwitter
13+
link: https://www.twitter.com
14+
15+
- name: instagram
16+
icon: FaInstagram
17+
link: https://www.instagram.com
18+
19+
---
20+
21+
John Doe is a seasoned software architect and technology enthusiast with a passion for building modern, scalable applications. With extensive experience in various technology stacks and architectural patterns, John helps organizations leverage cutting-edge technologies to create robust and efficient solutions.
22+
23+
His expertise spans across cloud computing, microservices architecture, and modern development practices. Through his writing, John aims to share practical insights and best practices in software development and system design.

src/pages/[...lang]/contact.astro

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export function getStaticPaths() {
1616
const { lang } = Astro.params;
1717
const contact = await getListPage("contact", lang as keyof ContentEntryMap);
1818
19-
const { contact_form_action }: { contact_form_action: string } = config.params;
2019
const { title, description, meta_title, image } = contact[0].data;
2120
2221
const {
@@ -39,18 +38,24 @@ const {
3938
<div class="container">
4039
<div class="row">
4140
<div class="mx-auto md:col-10 lg:col-6">
42-
<form action={contact_form_action} method="POST">
41+
<form
42+
action="https://docs.google.com/forms/d/e/1FAIpQLSdKLON3GrQN1OrGxmj0S3HCKeiVg-MjmeqDHLufys7CzkDm1g/formResponse"
43+
method="POST"
44+
target="_blank"
45+
onsubmit="return window.submitGoogleForm(this);"
46+
>
4347
<div class="mb-6">
4448
<label for="name" class="form-label">
4549
{full_name}
4650
<span class="text-red-500">*</span>
4751
</label>
4852
<input
4953
id="name"
50-
name="name"
54+
name="entry.713430944"
5155
class="form-input"
5256
placeholder="Krishna Chaitanya Ethamukkala"
5357
type="text"
58+
required
5459
/>
5560
</div>
5661
<div class="mb-6">
@@ -60,10 +65,11 @@ const {
6065
</label>
6166
<input
6267
id="email"
63-
name="email"
68+
name="entry.1244225098"
6469
class="form-input"
6570
placeholder="[email protected]"
6671
type="email"
72+
required
6773
/>
6874
</div>
6975
<div class="mb-6">
@@ -73,13 +79,38 @@ const {
7379
</label>
7480
<textarea
7581
id="message"
76-
name="message"
82+
name="entry.618640668"
7783
class="form-input"
7884
placeholder={contact_message_placeholder}
79-
rows="8"></textarea>
85+
rows="8"
86+
required
87+
></textarea>
88+
</div>
89+
<div id="form-status" class="mb-6 hidden">
90+
<p class="text-success">Thank you for your message! We'll get back to you soon.</p>
8091
</div>
8192
<button type="submit" class="btn btn-primary">{submit}</button>
8293
</form>
94+
95+
<script is:inline>
96+
window.submitGoogleForm = function(form) {
97+
const formData = new FormData(form);
98+
fetch(form.action, {
99+
method: 'POST',
100+
body: formData,
101+
mode: 'no-cors'
102+
})
103+
.then(() => {
104+
form.reset();
105+
document.getElementById('form-status').classList.remove('hidden');
106+
setTimeout(() => {
107+
document.getElementById('form-status').classList.add('hidden');
108+
}, 5000);
109+
})
110+
.catch(error => console.error('Error:', error));
111+
return false;
112+
};
113+
</script>
83114
</div>
84115
</div>
85116
</div>

0 commit comments

Comments
 (0)