Skip to content

Commit

Permalink
🌐slider images updated
Browse files Browse the repository at this point in the history
  • Loading branch information
sinanptm committed Oct 6, 2024
1 parent a2d6c97 commit 7499c80
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 52 deletions.
22 changes: 14 additions & 8 deletions client/components/page-components/landing/about/HeroSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,23 @@ import { Card, CardContent } from "@/components/ui/card";
import { SliderImages } from "@/constants";

const HeroSection = () => {
const randomIndex = Math.floor(Math.random() * SliderImages.length);
const randomImage = SliderImages[randomIndex];

return (
<Card className="mb-12">
<CardContent className="flex flex-col md:flex-row items-center p-6">
<div className="md:w-1/2 mb-6 md:mb-0">
<Image
src={SliderImages[0]}
alt="AVM Ayurveda"
width={500}
height={300}
className="rounded-lg object-cover"
/>
<div className="relative w-full aspect-[16/9]">
<Image
src={randomImage}
alt="AVM Ayurveda"
fill
sizes="(max-width: 768px) 100vw, 50vw"
className="rounded-lg object-cover"
priority
/>
</div>
</div>
<div className="md:w-1/2 md:pl-6">
<h2 className="text-2xl font-semibold mb-4">Embracing Holistic Wellness</h2>
Expand All @@ -28,4 +34,4 @@ const HeroSection = () => {
);
};

export default HeroSection;
export default HeroSection;
11 changes: 7 additions & 4 deletions client/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,14 @@ export const OurServices = [
];

export const SliderImages: string[] = [
"/assets/images/ayurveda1.jpg",
"/assets/images/onboarding-img.png",
// "https://images.unsplash.com/photo-1485433592409-9018e83a1f0d?q=80&w=1814&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
// "https://images.unsplash.com/photo-1483982258113-b72862e6cff6?q=80&w=3456&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
// "https://images.unsplash.com/photo-1482189349482-3defd547e0e9?q=80&w=2848&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"https://images.unsplash.com/photo-1485433592409-9018e83a1f0d?q=80&w=1814&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"https://images.unsplash.com/photo-1483982258113-b72862e6cff6?q=80&w=3456&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"https://images.unsplash.com/photo-1482189349482-3defd547e0e9?q=80&w=2848&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"https://images.unsplash.com/photo-1519110756001-72f90e894646?q=80&w=1074&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"https://images.unsplash.com/photo-1514733670139-4d87a1941d55?q=80&w=1178&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"https://plus.unsplash.com/premium_photo-1674499074438-8f611a3569f6?q=80&w=1169&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"https://media.istockphoto.com/id/962679166/photo/kalaripayattu-martial-art-in-kerala-india.jpg?s=1024x1024&w=is&k=20&c=RIMZdul-lTSn1azRm5sY7SgrSNrdMRCXX7QkxoBN4MA="
];

export const DoctorDegrees = [
Expand Down
58 changes: 18 additions & 40 deletions client/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import path from "path";
import { fileURLToPath } from "url";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
Expand All @@ -14,48 +8,32 @@ const nextConfig = {
port: "",
pathname: "/**",
},
{
protocol: "https",
hostname: "images.unsplash.com",
port: "",
pathname: "/**",
},
{
protocol: "https",
hostname: "avm-ayurvedic.s3.eu-north-1.amazonaws.com",
port: "",
pathname: "/**",
},
{
protocol: "https",
hostname: "plus.unsplash.com",
port: "",
pathname: "/**",
},
{
protocol: "https",
hostname: "media.istockphoto.com",
port: "",
pathname: "/**",
},
],
},
// webpack(config) {
// // Enable verbose logging for debugging the PackFileCache strategy
// config.infrastructureLogging = {
// level: 'info', // Change to 'debug' for more detailed logs
// debug: /PackFileCache/,
// };

// // Example: Adjust cache settings to improve build performance
// config.cache = {
// type: 'filesystem', // Use filesystem caching to speed up builds
// cacheDirectory: path.resolve(__dirname, '.next/cache/webpack'), // Customize the cache directory
// buildDependencies: {
// config: [__filename], // Cache will be invalidated if this file changes
// },
// };

// // Example: Optimize for faster builds in development mode
// if (config.mode === 'development') {
// config.optimization = {
// minimize: false, // Disable minimization in development for faster builds
// splitChunks: false, // Disable chunk splitting in development
// };
// }

// return config;
// },

// // Enable experimental features for future-proofing
// experimental: {
// scrollRestoration: true, // Enables scroll restoration in the app
// },

// // Performance optimizations
// productionBrowserSourceMaps: false, // Disable source maps in production
};

export default nextConfig;

0 comments on commit 7499c80

Please sign in to comment.