diff --git a/api/projects.php b/api/projects.php new file mode 100644 index 0000000..5cafda4 --- /dev/null +++ b/api/projects.php @@ -0,0 +1,16 @@ +getProjects(); + + echo json_encode($projects); +} catch (Exception $e) { + http_response_code(500); + echo json_encode(['error' => $e->getMessage()]); +} diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..475cbf2 --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,30 @@ +body { + font-family: 'Lato', sans-serif; +} + +h1, h2, h3, h4, h5, h6 { + font-family: 'Merriweather', serif; +} + +.hero-section { + background: linear-gradient(to right, rgba(111, 66, 193, 0.9), rgba(253, 126, 20, 0.9)), url('https://picsum.photos/1600/900') no-repeat center center; + background-size: cover; + color: white; + padding: 150px 0; + margin-top: 56px; +} + +.card { + border-radius: 0.5rem; + box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); +} + +.btn-primary { + background-color: #6f42c1; + border-color: #6f42c1; +} + +.btn-primary:hover { + background-color: #59369a; + border-color: #59369a; +} diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..c777995 --- /dev/null +++ b/assets/js/main.js @@ -0,0 +1,39 @@ +document.addEventListener('DOMContentLoaded', function () { + const contactForm = document.getElementById('contact-form'); + const successMessage = document.getElementById('success-message'); + + if (contactForm) { + contactForm.addEventListener('submit', function (e) { + e.preventDefault(); + + const name = document.getElementById('name').value; + const email = document.getElementById('email').value; + const message = document.getElementById('message').value; + + if (name.trim() === '' || email.trim() === '' || message.trim() === '') { + alert('Please fill in all fields.'); + return; + } + + const formData = new FormData(contactForm); + + fetch('contact.php', { + method: 'POST', + body: formData + }) + .then(response => response.text()) + .then(data => { + if (data === 'success') { + contactForm.style.display = 'none'; + successMessage.style.display = 'block'; + } else { + alert('An error occurred. Please try again.'); + } + }) + .catch(error => { + console.error('Error:', error); + alert('An error occurred. Please try again.'); + }); + }); + } +}); diff --git a/azure/AzureDevOpsService.php b/azure/AzureDevOpsService.php new file mode 100644 index 0000000..28b9aa9 --- /dev/null +++ b/azure/AzureDevOpsService.php @@ -0,0 +1,43 @@ +config = getAzureDevOpsConfig(); + } + + private function sendRequest($url) { + $ch = curl_init(); + + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); + + $headers = [ + 'Authorization: Basic ' . base64_encode(':' . $this->config['pat']), + 'Content-Type: application/json', + ]; + + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + + $result = curl_exec($ch); + if (curl_errno($ch)) { + // Handle cURL error + http_response_code(500); + echo json_encode(['error' => 'cURL Error: ' . curl_error($ch)]); + exit; + } + curl_close($ch); + + return json_decode($result, true); + } + + public function getProjects() { + $url = $this->config['apiUrl'] . '/_apis/projects?api-version=6.0'; + return $this->sendRequest($url); + } +} diff --git a/azure/config.php b/azure/config.php new file mode 100644 index 0000000..a988832 --- /dev/null +++ b/azure/config.php @@ -0,0 +1,20 @@ + 'Azure DevOps configuration is missing. Please set AZURE_DEVOPS_ORGANIZATION and AZURE_DEVOPS_PAT environment variables.']); + exit; + } + + return [ + 'organization' => $organization, + 'pat' => $pat, + 'apiUrl' => "https://dev.azure.com/{$organization}" + ]; +} diff --git a/contact.php b/contact.php new file mode 100644 index 0000000..8e43565 --- /dev/null +++ b/contact.php @@ -0,0 +1,37 @@ +Name: {$name}

+

Email: {$email}

+

Message:

+

{$message}

+ "; + $txt = "Name: {$name} +Email: {$email} +Message: +{$message}"; + + $res = MailService::sendMail($to, $subject, $html, $txt, ['reply_to' => $email]); + + if (!empty($res['success'])) { + echo "success"; + } else { + echo "error"; + } +} else { + echo "error"; +} +?> diff --git a/index.php b/index.php index 7205f3d..4878f46 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,123 @@ - - + - - - New Style - - - - - - - - - - - - - - - - - - - + + + api-azure + + + + + + + + + + + -
-
-

Analyzing your requirements and generating your website…

-
- Loading… -
-

AI is collecting your requirements and applying the first changes.

-

This page will update automatically as the plan is implemented.

-

Runtime: PHP — UTC

-
-
- + + + +
+
+

Azure DevOps Dashboard

+

Your entire organization at a glance.

+ Sign In to Get Started +
+
+ +
+
+

About Me

+

This is a placeholder for the about me section.

+
+
+ +
+
+

Portfolio

+
+
+
+ Portfolio item 1 +
+
Project 1
+

A brief description of the project.

+
+
+
+
+
+ Portfolio item 2 +
+
Project 2
+

A brief description of the project.

+
+
+
+
+
+
+ +
+
+

Testimonials

+

This is a placeholder for the testimonials section.

+
+
+ +
+
+

Contact Me

+
+
+
+ + +
+
+ + +
+
+ + +
+ +
+
+ +
+
+ + + + + - + \ No newline at end of file diff --git a/privacy.php b/privacy.php new file mode 100644 index 0000000..0246da9 --- /dev/null +++ b/privacy.php @@ -0,0 +1,18 @@ + + + + + + Privacy Policy - api-azure + + + + + +
+

Privacy Policy

+

This is a placeholder for the privacy policy.

+ Go back to the homepage +
+ +