diff --git a/assets/css/custom.css b/assets/css/custom.css index 8c54725..925ddbe 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -60,7 +60,7 @@ h1, h2, h3, h4, h5, h6 { } .hero { - background: linear-gradient(135deg, rgba(74, 144, 226, 0.9), rgba(80, 227, 194, 0.9)), url('https://picsum.photos/seed/hero/1600/900'); + background: linear-gradient(135deg, rgba(74, 144, 226, 0.9), rgba(80, 227, 194, 0.9)), url('../images/pexels/7688336.jpg'); background-size: cover; background-position: center; color: white; diff --git a/assets/images/pexels/14979020.jpg b/assets/images/pexels/14979020.jpg new file mode 100644 index 0000000..ef9b78f Binary files /dev/null and b/assets/images/pexels/14979020.jpg differ diff --git a/assets/images/pexels/25626512.jpg b/assets/images/pexels/25626512.jpg new file mode 100644 index 0000000..9361452 Binary files /dev/null and b/assets/images/pexels/25626512.jpg differ diff --git a/assets/images/pexels/4515793.jpg b/assets/images/pexels/4515793.jpg new file mode 100644 index 0000000..f3abeb4 Binary files /dev/null and b/assets/images/pexels/4515793.jpg differ diff --git a/assets/images/pexels/7688336.jpg b/assets/images/pexels/7688336.jpg new file mode 100644 index 0000000..ac6c177 Binary files /dev/null and b/assets/images/pexels/7688336.jpg differ diff --git a/includes/pexels.php b/includes/pexels.php new file mode 100644 index 0000000..4aebd2d --- /dev/null +++ b/includes/pexels.php @@ -0,0 +1,49 @@ + 0 ? $k : 'Vc99rnmOhHhJAbgGQoKLZtsaIVfkeownoQNbTj78VemUjKh08ZYRbf18'; +} +function pexels_get($url) { + $ch = curl_init(); + curl_setopt_array($ch, [ + CURLOPT_URL => $url, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => [ 'Authorization: '. pexels_key() ], + CURLOPT_TIMEOUT => 15, + ]); + $resp = curl_exec($ch); + $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + if ($code >= 200 && $code < 300 && $resp) return json_decode($resp, true); + return null; +} +function download_to($srcUrl, $destPath) { + // Ensure the destination directory exists. + $dir = dirname($destPath); + if (!is_dir($dir)) { + if (!mkdir($dir, 0775, true)) { + error_log("Failed to create directory: $dir"); + return false; + } + } + + $context = stream_context_create([ + "ssl" => [ + "verify_peer" => false, + "verify_peer_name" => false, + ], + ]); + + $data = file_get_contents($srcUrl, false, $context); + if ($data === false) { + error_log("Failed to download image from: $srcUrl"); + return false; + } + + if (file_put_contents($destPath, $data) === false) { + error_log("Failed to save image to: $destPath"); + return false; + } + + return true; +} diff --git a/index.php b/index.php index d579de1..5038bfe 100644 --- a/index.php +++ b/index.php @@ -83,7 +83,7 @@

Web Design

Stunning, user-centric designs that capture your brand and engage your audience. Mobile-first and responsive.

- A close-up of a user interface design on a tablet. + A close-up of a user interface design on a tablet.
@@ -94,7 +94,7 @@

Web Development

Clean, scalable, and performant code. From landing pages to complex web applications, we build solutions that work.

- Code on a computer screen representing web development. + Code on a computer screen representing web development.
@@ -105,7 +105,7 @@

Digital Strategy

Data-driven strategies to boost your online presence. SEO, content marketing, and analytics to help you grow.

- A chart showing upward trends, representing business growth. + A chart showing upward trends, representing business growth.