2 Commits

Author SHA1 Message Date
Suvodip
dd8b979915 about page text justifyed 2025-03-21 19:20:52 +05:30
Suvodip
6907bf2852 s11 2025-03-21 18:08:06 +05:30
3 changed files with 130 additions and 113 deletions

View File

@@ -30,7 +30,8 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
const [dnsVerified, setDnsVerified] = useState({
cname: false,
ns: false,
a: false
a: false,
ip: false
});
// Form validation
@@ -61,7 +62,7 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
}
validateForm();
}, [useCustomDomain, dnsVerified.cname, dnsVerified.ns, domainType, dnsMethod]);
}, [useCustomDomain, dnsVerified.cname, dnsVerified.ns, dnsVerified.ns, domainType, dnsMethod]);
// Show toast notification
const showToast = (message) => {
@@ -110,7 +111,8 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
setDnsVerified({
cname: false,
ns: false,
a: false
a: false,
ip: false
});
} else {
// Force SiliconPin subdomain to be checked if custom domain is checked
@@ -187,45 +189,23 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
setValidationMessage('');
setShowDnsConfig(false);
fetch('/validate-domain', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
domain,
type: domainType
})
})
.then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
})
.then(data => {
const checkResult = data.status === "success";
console.log("finding:: checkResult:: ", checkResult, data);
// Simulate an API call to validate the domain
setTimeout(() => {
// Simulate a real domain check - in a real app this would be an API call
const checkResult = true; // Assume domain is valid for demo
setIsValidating(false);
setIsValidDomain(checkResult);
setIsValidating(false);
setIsValidDomain(checkResult);
if (checkResult) {
setValidationMessage('Domain is valid and registered.');
setShowDnsConfig(true);
} else {
setValidationMessage('Domain appears to be unregistered or unavailable.');
}
if (checkResult) {
setValidationMessage('Domain is valid and registered.');
setShowDnsConfig(true);
} else {
setValidationMessage('Domain appears to be unregistered or unavailable.');
}
validateForm();
})
.catch(error => {
console.error('Error validating domain:', error);
setIsValidating(false);
setIsValidDomain(false);
setValidationMessage('Error checking domain. Please try again.');
validateForm();
});
validateForm();
}, 1500);
};
// Check DNS configuration
@@ -268,6 +248,10 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
setFormValid(false);
return;
}
if (dnsMethod === 'ip' && !dnsVerified.ip) {
setFormValid(false);
return;
}
}
setFormValid(true);
@@ -283,20 +267,7 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
}
// In a real app, this would submit the form data to the server
console.log({
deploymentType,
appType,
sampleWebAppType,
sourceType,
repoUrl,
deploymentKey,
useSubdomain,
useCustomDomain,
customDomain,
customSubdomain,
domainType,
dnsMethod
});
console.log([{ deploymentType, appType, sampleWebAppType, sourceType, repoUrl, deploymentKey, useSubdomain, useCustomDomain, customDomain, customSubdomain, domainType, dnsMethod}]);
showToast('Form submitted successfully!');
};
@@ -572,9 +543,10 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
{/* Domain Validation */}
<button
disabled={!customDomain}
type="button"
onClick={validateDomain}
className="px-4 py-2 bg-neutral-600 text-white font-medium rounded-md hover:bg-neutral-500 transition-colors focus:outline-none focus:ring-2 focus:ring-neutral-500"
className={`px-4 py-2 ${!customDomain ? 'bg-neutral-600 cursor-not-allowed' : 'bg-[#6d9e37] focus:ring-[#6d9e37] transition-colors'} text-white font-medium rounded-md transition-colors focus:outline-none`}
>
Validate Domain
</button>
@@ -604,7 +576,7 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
{/* CNAME Record Option */}
<div className="p-4 bg-neutral-700/30 rounded-md border border-neutral-600 space-y-3">
<div className="flex items-start">
<label for="dns-cname" className="flex items-start cursor-pointer">
<input
type="radio"
id="dns-cname"
@@ -644,67 +616,114 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
</button>
</div>
</div>
</div>
</label>
</div>
{/* Nameserver Option (only for full domains, not subdomains) */}
{domainType === 'domain' && (
<div className="p-4 bg-neutral-700/30 rounded-md border border-neutral-600 space-y-3">
<div className="flex items-start">
<input
type="radio"
id="dns-ns"
name="dns-method"
value="ns"
checked={dnsMethod === 'ns'}
onChange={handleDnsMethodChange}
className="mt-1 mr-2"
/>
<div className="flex-1">
<label htmlFor="dns-ns" className="block text-white font-medium">Use Our Nameservers</label>
<p className="text-sm text-neutral-300">Update your domain's nameservers to use ours</p>
<>
<div className="p-4 bg-neutral-700/30 rounded-md border border-neutral-600 space-y-3">
<label for="dns-ns" className="flex items-start cursor-pointer">
<input
type="radio"
id="dns-ns"
name="dns-method"
value="ns"
checked={dnsMethod === 'ns'}
onChange={handleDnsMethodChange}
className="mt-1 mr-2"
/>
<div className="flex-1">
<label htmlFor="dns-ns" className="block text-white font-medium">Use Our Nameservers</label>
<p className="text-sm text-neutral-300">Update your domain's nameservers to use ours</p>
<div className="mt-3 space-y-2">
<div className="flex items-center">
<div className="bg-neutral-800 p-2 rounded font-mono text-sm text-neutral-300">ns1.siliconpin.com</div>
<button
type="button"
onClick={() => copyToClipboard('ns1.siliconpin.com')}
className="ml-2 text-[#6d9e37] hover:text-white"
aria-label="Copy nameserver value"
>
<span className="text-lg">📋</span>
</button>
<div className="mt-3 space-y-2">
<div className="flex items-center">
<div className="bg-neutral-800 p-2 rounded font-mono text-sm text-neutral-300">ns1.siliconpin.com</div>
<button
type="button"
onClick={() => copyToClipboard('ns1.siliconpin.com')}
className="ml-2 text-[#6d9e37] hover:text-white"
aria-label="Copy nameserver value"
>
<span className="text-lg">📋</span>
</button>
</div>
<div className="flex items-center">
<div className="bg-neutral-800 p-2 rounded font-mono text-sm text-neutral-300">ns2.siliconpin.com</div>
<button
type="button"
onClick={() => copyToClipboard('ns2.siliconpin.com')}
className="ml-2 text-[#6d9e37] hover:text-white"
aria-label="Copy nameserver value"
>
<span className="text-lg">📋</span>
</button>
</div>
</div>
<div className="flex items-center">
<div className="bg-neutral-800 p-2 rounded font-mono text-sm text-neutral-300">ns2.siliconpin.com</div>
<div className="mt-2 text-right">
<button
type="button"
onClick={() => copyToClipboard('ns2.siliconpin.com')}
className="ml-2 text-[#6d9e37] hover:text-white"
aria-label="Copy nameserver value"
onClick={() => checkDnsConfig('ns')}
className={`px-3 py-1 text-white text-sm rounded
${dnsVerified.ns
? 'bg-green-700 hover:bg-green-600'
: 'bg-neutral-600 hover:bg-neutral-500'}`}
>
<span className="text-lg">📋</span>
{dnsVerified.ns ? '✓ Nameservers Verified' : 'Check Nameservers'}
</button>
</div>
</div>
<div className="mt-2 text-right">
<button
type="button"
onClick={() => checkDnsConfig('ns')}
className={`px-3 py-1 text-white text-sm rounded
${dnsVerified.ns
? 'bg-green-700 hover:bg-green-600'
: 'bg-neutral-600 hover:bg-neutral-500'}`}
>
{dnsVerified.ns ? '✓ Nameservers Verified' : 'Check Nameservers'}
</button>
</div>
</div>
</label>
</div>
</div>
<div className="p-4 bg-neutral-700/30 rounded-md border border-neutral-600 space-y-3">
<label for="dns-ip" className="flex items-start cursor-pointer">
<input
type="radio"
id="dns-ip"
name="dns-method"
value="ip"
checked={dnsMethod === 'ip'}
onChange={handleDnsMethodChange}
className="mt-1 mr-2"
/>
<div className="flex-1">
<label htmlFor="dns-ip" className="block text-white font-medium">Use Our IP Address</label>
<p className="text-sm text-neutral-300">Update your domain's nameservers to use ours</p>
<div className="mt-3 space-y-2">
<div className="flex items-center">
<div className="bg-neutral-800 p-2 rounded font-mono text-sm text-neutral-300">xxx.xxx.x.xx</div>
<button
type="button"
onClick={() => copyToClipboard('xxx.xxx.x.xx')}
className="ml-2 text-[#6d9e37] hover:text-white"
aria-label="Copy nameserver value"
>
<span className="text-lg">📋</span>
</button>
</div>
</div>
<div className="mt-2 text-right">
<button
type="button"
onClick={() => checkDnsConfig('ip')}
className={`px-3 py-1 text-white text-sm rounded
${dnsMethod === 'ip'
? 'bg-green-700 hover:bg-green-600'
: 'bg-neutral-600 hover:bg-neutral-500'}`}
>
{/* {dnsVerified.ip ? ' IP Address Verified' : 'Check IP Address'} */}
Proceed to Pay
</button>
</div>
</div>
</label>
</div>
</>
)}
</div>
)}
@@ -714,7 +733,6 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
</div>
</div>
</div>
{/* Form Submit Button */}
<button
type="submit"
@@ -728,7 +746,6 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
Start the Deployment
</button>
</form>
<Toast visible={toast.visible} message={toast.message} />
</div>
);

View File

@@ -24,17 +24,17 @@ const pageImage = "https://images.unsplash.com/photo-1551731409-43eb3e517a1a?q=8
<div class="max-w-4xl mx-auto space-y-12">
<section class="bg-neutral-800 rounded-lg p-6 sm:p-8 border border-neutral-700">
<h2 class="text-2xl font-bold text-white mb-4">Our Story</h2>
<p class="text-neutral-300 mb-4">
<p class="text-neutral-300 mb-4 text-justify">
SiliconPin was founded in 2021 with a clear mission: to provide businesses of all sizes with reliable, high-performance hosting solutions that enable growth and innovation. What started as a small team of passionate developers and system administrators has grown into a trusted hosting provider serving clients across various industries.
</p>
<p class="text-neutral-300">
<p class="text-neutral-300 text-justify">
Based in Habra, West Bengal, India, our team combines technical expertise with a deep understanding of business needs to deliver hosting solutions that are not just technically sound but also aligned with our clients' business objectives.
</p>
</section>
<section class="bg-neutral-800 rounded-lg p-6 sm:p-8 border border-neutral-700">
<h2 class="text-2xl font-bold text-white mb-4">Our Mission</h2>
<p class="text-neutral-300">
<p class="text-neutral-300 text-justify">
At SiliconPin, our mission is to empower businesses through technology by providing reliable, secure, and scalable hosting solutions. We believe that technology should enable businesses to focus on what they do best, without worrying about infrastructure management or technical complexities.
</p>
</section>
@@ -44,25 +44,25 @@ const pageImage = "https://images.unsplash.com/photo-1551731409-43eb3e517a1a?q=8
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<h3 class="text-xl font-medium text-[#6d9e37] mb-2">Reliability</h3>
<p class="text-neutral-300">
<p class="text-neutral-300 text-justify">
We understand that downtime means lost business. That's why we prioritize reliability in everything we do, from our infrastructure to our customer service.
</p>
</div>
<div>
<h3 class="text-xl font-medium text-[#6d9e37] mb-2">Security</h3>
<p class="text-neutral-300">
<p class="text-neutral-300 text-justify">
In an increasingly digital world, security is paramount. We implement robust security measures to protect our clients' data and applications.
</p>
</div>
<div>
<h3 class="text-xl font-medium text-[#6d9e37] mb-2">Innovation</h3>
<p class="text-neutral-300">
<p class="text-neutral-300 text-justify">
We continuously explore new technologies and methodologies to improve our services and provide our clients with cutting-edge solutions.
</p>
</div>
<div>
<h3 class="text-xl font-medium text-[#6d9e37] mb-2">Customer Focus</h3>
<p class="text-neutral-300">
<p class="text-neutral-300 text-justify">
Our clients' success is our success. We work closely with our clients to understand their needs and provide tailored solutions that help them achieve their goals.
</p>
</div>
@@ -71,7 +71,7 @@ const pageImage = "https://images.unsplash.com/photo-1551731409-43eb3e517a1a?q=8
<section class="bg-neutral-800 rounded-lg p-6 sm:p-8 border border-neutral-700">
<h2 class="text-2xl font-bold text-white mb-4">Why Choose SiliconPin?</h2>
<ul class="list-disc list-inside space-y-3 text-neutral-300">
<ul class="list-disc list-inside space-y-3 text-neutral-300 text-justify">
<li>24/7 expert technical support</li>
<li>99.9% uptime guarantee</li>
<li>Scalable infrastructure to grow with your business</li>

View File

@@ -133,7 +133,7 @@ const contactSchema = {
<span class="text-neutral-300 font-medium">Sunday:</span>
<span class="text-white">Closed</span>
</div>
<div class="pt-3 border-t border-neutral-700">
<div class="pt-3 border-t border-neutral-700 flex items-center justify-between">
<span class="text-neutral-300">Technical Support:</span>
<span class="text-[#6d9e37] font-semibold block mt-1">24/7</span>
</div>