diff --git a/README.md b/README.md index 9d03c90..1d8333c 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ It showcases my **iOS development skills, projects, and experience** in a mobile ## πŸ“Έ Preview πŸ”— [**Visit Live Site**](https://csprasad.github.io/landing.html) -![webpage](data/webpage.png) +![webpage](https://portfolio-backend-p1.vercel.app/project-assets/webpage.png) --- @@ -41,4 +41,4 @@ It showcases my **iOS development skills, projects, and experience** in a mobile --- -## Contact - [LinkedIn](https://linkedin.com/in/csprasadios) | [GitHub](https://github.com/csprasad) | [Email](mailto:codealligator.csprasad@gmail.com) \ No newline at end of file +## Contact - [LinkedIn](https://linkedin.com/in/csprasadios) | [GitHub](https://github.com/csprasad) | [Email](mailto:codealligator.csprasad@gmail.com) diff --git a/data/portfolio.json b/data/portfolio.json deleted file mode 100644 index e84be86..0000000 --- a/data/portfolio.json +++ /dev/null @@ -1,360 +0,0 @@ -{ - "profile": { - "name": "Brahmendraprasad", - "alias": "CSPrasad", - "bio": "Experienced iOS Engineer with a background in startups and freelance projects, specializing in Swift, UIKit, and full app lifecycle development. Skilled at turning ideas into functional apps, solving technical challenges, and collaborating with teams to deliver polished products. πŸ”Ή Proven problem-solver – Debugged complex issues, optimized performance, and refactored legacy code in fast-paced environments. πŸ”Ή Startup-tested – Built apps from scratch, adapted to changing requirements, and contributed across the entire development stack. πŸ”Ή Freelance versatility – Delivered client projects with clean, maintainable code and seamless API integrations.Passionate about writing efficient code, improving user experience, and continuous learning. Looking to bring my practical skills and resilience to a forward-thinking engineering team.", - "intro": "iOS Developer with 7 years of experience, crafting both professional and indie apps using SwiftUI and UIKit", - "job_role": "iOS Developer", - "location": "Hyderabad", - "profile_picture": "../iPhone/assets/images/profile.jpg", - "website": "", - "social_links": { - "github": "https://github.com/csprasad", - "linkedin": "https://linkedin.com/in/csprasadios", - "twitter": "", - "instagram": "https://www.instagram.com/csprasad_ios/" - }, - "skills": [ - "Swift", - "Objective-C", - "SwiftUI", - "UIKit", - "CoreData", - "Combine", - "MVVM Architecture", - "Networking (URLSession, Alamofire)", - "Concurrency (GCD, Operations, async/await)", - "AutoLayout & Constraints", - "Unit & UI Testing (XCTest, XCTest UI)" - ], - "programming_languages": [ - "Swift", - "JavaScript", - "Python" - ], - "markup_languages": [ - "HTML", - "CSS", - "Markdown" - ], - "spoken_languages": [ - "Kannada", "Hindi", "English" - ], - "tech_stack": [ - "Xcode", "VSCode", "SwiftLint", "SwiftFormat", "Git" - ], - "workflow": "I follow a clean and maintainable code structure using MVVM architecture, ensuring scalability and efficiency in iOS development. I believe in test-driven development and writing reusable components.", - "hobbies": [ - "Reading tech blogs", - "Contributing to open-source", - "Experimenting with new iOS frameworks", - "Movies" - ] - }, - "experience": { - "map_bg_image": "../iPhone/assets/images/Map-iOS.png", - "marker_image": "url-to-marker-image", - "companies": [ - { - "company": "Purplesense Digital", - "role": "iOS Developer(Client Solutions Team)", - "duration": "Aug 2018 - Dec 2019", - "company_website": "", - "tech_stack": ["Swift", "UIKit", "Firebase", "MapKit", "Stripe SDK", "Alamofire"], - "responsibilities": [ - "Developed 3 MVP apps (fitness, ambulance booking, services).", - "Implemented Stripe/PayPal payment integrations.", - "Created real-time tracking using MapKit and Firebase.", - "Optimized app performance for low-bandwidth areas." - ], - "projects": [ - "Shipped all 3 apps under deadline despite changing requirements", - "Achieved <0.5% crash rate through rigorous testing", - "Designed offline-first architecture used for 2+ years post-launch", - "Reduced ambulance dispatch time by 30 seconds via geo-optimization" - ], - "achievements": [ - "Optimized database queries, reducing response time by 40%.", - "Improved frontend performance, cutting load times by 30%." - ], - "position": { "top": "90%", "left": "55%" } - }, - { - "company": "Medinin Labs", - "role": "iOS Engineer(Healthcare Tech Startup - Core Product Team)", - "duration": "Aug 2019 - Aug 2021", - "company_website": "", - "tech_stack": ["Swift", "UIKit", "CoreData", "Combine", "WebSocket", "PDFKit", "3D SceneKit"], - "responsibilities": [ - "Owned end-to-end development of patient/doctor apps (Swift, UIKit)", - "Designed architecture for multi-module healthcare system", - "Collaborated with medical professionals on UX for 3D model viewer", - "Implemented real-time sync for appointment booking system", - "Mentored junior developers in code reviews and best practices" - ], - "projects": [ - "Delivered 4 production apps from scratch to App Store within 2 years", - "Reduced prescription generation time by 40% through PDF optimization", - "Built reusable UI components library cutting dev time by 25%", - "Integrated WebSocket for live construction project updates", - "Scaled property search to handle 10,000+ listings with CoreData" - ], - "achievements": [ - "Optimized database queries, reducing response time by 40%.", - "Improved frontend performance, cutting load times by 30%." - ], - "position": { "top": "60%", "left": "30%" } - }, - { - "company": "Offshore India", - "role": "Delivered custom iOS solutions for startups and SMEs", - "duration": "Aug 2021 - Present", - "company_website": "", - "tech_stack": ["Swift", "SwiftUI", "UIKit", "Combine", "CoreData", "Firebase", "REST/GraphQL"], - "responsibilities": [ - "Full-Cycle Development – Designed and built 12+ iOS apps from scratch to App Store deployment using Swift/UIKit", - "Client Collaboration – Translated business requirements into technical specs with 5+ international clients", - "Performance Optimization – Reduced crash rates by 40% in legacy apps through systematic debugging", - "API Integration – Implemented REST/GraphQL solutions with robust error handling and caching", - "Code Modernization – Migrated 3 Objective-C codebases to Swift, improving maintainability", - "UI/UX Implementation – Built custom animations and responsive layouts matching designer prototypes" - ], - "projects": [ - "Developed a customer management dashboard with real-time analytics.", - "Implemented a notification system for an internal task management platform." - ], - "achievements": [ - "Optimized database queries, reducing response time by 40%.", - "Improved frontend performance, cutting load times by 30%." - ], - "position": { "top": "42%", "left": "72%" } - } - ] - }, - "apps": { - "macOS_apps": [ - { - "app_id": "1", - "name": "DevLint", - "platform": "macOS", - "category": "Developer Tools", - "icon": "assets/images/Projects/DevLint/DevLint.png", - "rating": 4.5, - "screenshots": ["assets/images/Projects/DevLint/DevLint-01.png", "assets/images/Projects/DevLint/DevLint-02.png"], - "description": "A lightweight macOS app for formatting, linting, and correcting Swift syntax.", - "app_store_link": "https://github.com/csprasad/DevLint", - "total_downloads": "10K+", - "size": "15MB" - } - ], - "iOS_apps": [ - { - "app_id": "11", - "name": "BGU", - "platform": "iOS", - "category": "Entertainment & Events", - "icon": "assets/images/Projects/BGU/BGU.jpg", - "rating": 4.6, - "screenshots": ["assets/images/Projects/BGU/BGU-01.jpeg", - "assets/images/Projects/BGU/BGU-02.jpeg", - "assets/images/Projects/BGU/BGU-03.jpeg", - "assets/images/Projects/BGU/BGU-04.jpeg", - "assets/images/Projects/BGU/BGU-05.jpeg"], - "description": "The Bengaluru Ganesh Utsav has been organized by Shree VidyaranyaYuvakaSangha , a social service organization since 1962.Eminent musicians, theatre groups and ballet troupes from across India have performed at the festival over the years. Year after year , over 5,00,000 people gather at the utsav to celebrate the cultural extravaganza that spans 11 days.", - "app_store_link": "https://appadvice.com/app/bengaluru-ganesh-utsava/1435029499", - "total_downloads": "35K+", - "size": "33MB" - }, - { - "app_id": "2", - "name": "Buildworks", - "platform": "iOS", - "category": "Productivity, Business & Utilities", - "icon": "assets/images/Projects/Buildworks/Buildworks.png", - "rating": 4.2, - "screenshots": ["assets/images/Projects/Buildworks/Buildworks-01.jpg", - "assets/images/Projects/Buildworks/Buildworks-02.jpg", - "assets/images/Projects/Buildworks/Buildworks-03.jpg", - "assets/images/Projects/Buildworks/Buildworks-04.jpg", - "assets/images/Projects/Buildworks/Buildworks-05.jpg", - "assets/images/Projects/Buildworks/Buildworks-06.jpg", - "assets/images/Projects/Buildworks/Buildworks-07.jpg", - "assets/images/Projects/Buildworks/Buildworks-08.jpg"], - "description": "Manage construction projects with Buildworks. Your tool for efficient, adaptable, and secure project management app.", - "app_store_link": "https://apps.apple.com/in/app/buildworks-manage-construction/id6472943406", - "total_downloads": "50K+", - "size": "30MB" - }, - { - "app_id": "3", - "name": "Medinin - Doc", - "platform": "iOS", - "category": "Medical, Health & Productivity", - "icon": "assets/images/Projects/Medinin%20Doc/Medinin.png", - "rating": 4.8, - "screenshots": ["assets/images/Projects/Medinin Doc/Medinin-01.jpg", - "assets/images/Projects/Medinin Doc/Medinin-02.jpg", - "assets/images/Projects/Medinin Doc/Medinin-03.jpg", - "assets/images/Projects/Medinin Doc/Medinin-04.jpg", - "assets/images/Projects/Medinin Doc/Medinin-05.jpg", - "assets/images/Projects/Medinin Doc/Medinin-06.jpg", - "assets/images/Projects/Medinin Doc/Medinin-07.jpg"], - "description": "An A.I Powered Unified Healthcare Management for - Doctors πŸ‘¨β€βš•οΈPatients πŸ€• Clinics/Hospitals πŸ₯ Laborists πŸ”¬ Pharmacists πŸ’Š Medinin, an Ai powered multi-app for healthcare makes managing your patients/clinic/hospital/diagnostic lab/pharmacy as easy as cake! Patients can also manage their medical profile and request consultation if needed. The app is built on a unique layer of unified users to connect all healthcare professionals under a single application where the features change based on the user logging in.", - "app_store_link": "https://apps.apple.com/us/app/medinin-for-doctors-clinics/id1489907918", - "total_downloads": "25K+", - "size": "40MB" - }, - { - "app_id": "4", - "name": "Medinin - Consult Doctor Nearby", - "platform": "iOS", - "category": "Medical & Health", - "icon": "assets/images/Projects/Medinin Patient/Medinin.png", - "rating": 4.6, - "screenshots": ["assets/images/Projects/Medinin Patient/Medinin-01.jpeg", - "assets/images/Projects/Medinin Patient/Medinin-02.jpeg", - "assets/images/Projects/Medinin Patient/Medinin-03.jpeg", - "assets/images/Projects/Medinin Patient/Medinin-04.jpeg", - "assets/images/Projects/Medinin Patient/Medinin-05.jpeg", - "assets/images/Projects/Medinin Patient/Medinin-06.jpeg", - "assets/images/Projects/Medinin Patient/Medinin-07.jpeg", - "assets/images/Projects/Medinin Patient/Medinin-08.jpeg"], - "description": "Effortlessly manage patient information, appointments, medical history, and more.", - "app_store_link": "https://apps.apple.com/us/app/medinin-consult-doctor-nearby/id1532246265", - "total_downloads": "20K+", - "size": "25MB" - }, - { - "app_id": "5", - "name": "Medinin Doc: Patient Manage", - "platform": "iOS", - "category": "Medical & Health", - "icon": "assets/images/Projects/Medinin Patient/Medinin.png", - "rating": 4.6, - "screenshots": ["assets/images/Projects/Medinin Patient/Medinin-01.jpeg", - "assets/images/Projects/Medinin Patient/Medinin-02.jpeg", - "assets/images/Projects/Medinin Patient/Medinin-03.jpeg", - "assets/images/Projects/Medinin Patient/Medinin-04.jpeg", - "assets/images/Projects/Medinin Patient/Medinin-05.jpeg", - "assets/images/Projects/Medinin Patient/Medinin-06.jpeg", - "assets/images/Projects/Medinin Patient/Medinin-07.jpeg", - "assets/images/Projects/Medinin Patient/Medinin-08.jpeg"], - "description": "Unified Personal Healthcare Management app for - Doctors managing their practice, patients & appointments in local storage.", - "app_store_link": "https://apps.apple.com/in/app/medinin-doc-patient-manage/id6448975196", - "total_downloads": "20K+", - "size": "25MB" - }, - { - "app_id": "6", - "name": "Nearlet", - "platform": "iOS", - "category": "Lifestyle & Utilities", - "icon": "assets/images/Projects/Nearlet/Nearlet.png", - "rating": 4.1, - "screenshots": ["assets/images/Projects/Nearlet/Nearlet-01.jpg", - "assets/images/Projects/Nearlet/Nearlet-02.jpg", - "assets/images/Projects/Nearlet/Nearlet-03.jpg", - "assets/images/Projects/Nearlet/Nearlet-04.jpg", - "assets/images/Projects/Nearlet/Nearlet-01.png", - "assets/images/Projects/Nearlet/Nearlet-02.png"], - "description": "Search property or list your properties quicker!", - "app_store_link": "https://apps.apple.com/in/app/nearlet-property-search/id1523263156", - "total_downloads": "75K+", - "size": "20MB" - }, - { - "app_id": "7", - "name": "Covid-19 Tracker", - "platform": "iOS", - "category": "Education & News", - "icon": "assets/images/Projects/Covid Tracker/Covid.png", - "rating": 4.3, - "screenshots": ["assets/images/Projects/Covid Tracker/Covid-01.jpg", - "assets/images/Projects/Covid Tracker/Covid-02.jpg"], - "description": "An app for tracking Covid-19 updates and statistics.", - "app_store_link": "#", - "total_downloads": "100K+", - "size": "18MB" - }, - { - "app_id": "8", - "name": "Mr.Tip", - "platform": "iOS", - "category": "Productivity", - "icon": "assets/images/Projects/MrTip/Mr.Tip.png", - "rating": 4.0, - "screenshots": ["assets/images/Projects/MrTip/Mr.Tip-01.png", - "assets/images/Projects/MrTip/Mr.Tip-02.png"], - "description": "A minimalist open-source tool for instant tip calculations in daily scenarios.", - "app_store_link": "https://github.com/csprasad/Mr-Tip", - "total_downloads": "15K+", - "size": "12MB" - }, - { - "app_id": "9", - "name": "Cyclopath", - "platform": "iOS", - "category": "Navigation, Travel & Fitness", - "icon": "assets/images/Projects/Cyclopath/Cyclopath.jpg", - "rating": 4.4, - "screenshots": ["assets/images/Projects/Cyclopath/Cyclopath-01.jpg", - "assets/images/Projects/Cyclopath/Cyclopath-02.jpg", - "assets/images/Projects/Cyclopath/Cyclopath-03.jpg", - "assets/images/Projects/Cyclopath/Cyclopath-04.jpg", - "assets/images/Projects/Cyclopath/Cyclopath-05.jpg"], - "description": "Cyclopath is a complete fitness management & cycling navigation and fitness tracking app that helps you to manage your fitness goals.", - "app_store_link": "https://cyclopath.en.aptoide.com/app", - "total_downloads": "30K+", - "size": "35MB" - } - ] - }, - "contact": { - "message": "", - "email": "codealligator.csprasad@email.com", - "website": "", - "social": [ - { - "platform": "GitHub", - "icon": "github.png", - "link": "https://github.com/csprasad" - }, - { - "platform": "Twitter", - "icon": "twitter.png", - "link": "https://twitter.com/prasadcarlozz" - }, - { - "platform": "Instagram", - "icon": "instagram.png", - "link": "https://instagram.com/csprasad_ios" - }, - { - "platform": "Exercism", - "icon": "exercism.png", - "link": "https://exercism.org/profiles/codealligator" - }, - { - "platform": "Linkedin", - "icon": "linkedin.png", - "link": "https://linkedin.com/in/csprasadios" - }, - { - "platform": "Threads", - "icon": "thread.png", - "link": "https://www.threads.net/@csprasad_ios" - }, - { - "platform": "Medium", - "icon": "medium.png", - "link": "https://codealligator.medium.com" - }, - { - "platform": "Buymeacoffee", - "icon": "buymeacoffee.png", - "link": "https://buymeacoffee.com/csprasad00i" - } - ] - } - } - diff --git a/data/webpage.png b/data/webpage.png deleted file mode 100644 index b323c4e..0000000 Binary files a/data/webpage.png and /dev/null differ diff --git a/iPhone/assets/images/Map-iOS.png b/iPhone/assets/images/Map-iOS.png deleted file mode 100644 index 0aeed7d..0000000 Binary files a/iPhone/assets/images/Map-iOS.png and /dev/null differ diff --git a/iPhone/assets/images/Map.png b/iPhone/assets/images/Map.png deleted file mode 100644 index 4a0c552..0000000 Binary files a/iPhone/assets/images/Map.png and /dev/null differ diff --git a/iPhone/assets/images/Projects/BGU/BGU-01.jpeg b/iPhone/assets/images/Projects/BGU/BGU-01.jpeg deleted file mode 100644 index 03f9902..0000000 Binary files a/iPhone/assets/images/Projects/BGU/BGU-01.jpeg and /dev/null differ diff --git a/iPhone/assets/images/Projects/BGU/BGU-02.jpeg b/iPhone/assets/images/Projects/BGU/BGU-02.jpeg deleted file mode 100644 index a135877..0000000 Binary files a/iPhone/assets/images/Projects/BGU/BGU-02.jpeg and /dev/null differ diff --git a/iPhone/assets/images/Projects/BGU/BGU-03.jpeg b/iPhone/assets/images/Projects/BGU/BGU-03.jpeg deleted file mode 100644 index 503b125..0000000 Binary files a/iPhone/assets/images/Projects/BGU/BGU-03.jpeg and /dev/null differ diff --git a/iPhone/assets/images/Projects/BGU/BGU-04.jpeg b/iPhone/assets/images/Projects/BGU/BGU-04.jpeg deleted file mode 100644 index 794d0da..0000000 Binary files a/iPhone/assets/images/Projects/BGU/BGU-04.jpeg and /dev/null differ diff --git a/iPhone/assets/images/Projects/BGU/BGU-05.jpeg b/iPhone/assets/images/Projects/BGU/BGU-05.jpeg deleted file mode 100644 index f47ad27..0000000 Binary files a/iPhone/assets/images/Projects/BGU/BGU-05.jpeg and /dev/null differ diff --git a/iPhone/assets/images/Projects/BGU/BGU.jpg b/iPhone/assets/images/Projects/BGU/BGU.jpg deleted file mode 100644 index cee7596..0000000 Binary files a/iPhone/assets/images/Projects/BGU/BGU.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Buildworks/Buildworks-01.jpg b/iPhone/assets/images/Projects/Buildworks/Buildworks-01.jpg deleted file mode 100644 index 21e3cc4..0000000 Binary files a/iPhone/assets/images/Projects/Buildworks/Buildworks-01.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Buildworks/Buildworks-02.jpg b/iPhone/assets/images/Projects/Buildworks/Buildworks-02.jpg deleted file mode 100644 index d19f339..0000000 Binary files a/iPhone/assets/images/Projects/Buildworks/Buildworks-02.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Buildworks/Buildworks-03.jpg b/iPhone/assets/images/Projects/Buildworks/Buildworks-03.jpg deleted file mode 100644 index 521242a..0000000 Binary files a/iPhone/assets/images/Projects/Buildworks/Buildworks-03.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Buildworks/Buildworks-04.jpg b/iPhone/assets/images/Projects/Buildworks/Buildworks-04.jpg deleted file mode 100644 index 9f20e15..0000000 Binary files a/iPhone/assets/images/Projects/Buildworks/Buildworks-04.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Buildworks/Buildworks-05.jpg b/iPhone/assets/images/Projects/Buildworks/Buildworks-05.jpg deleted file mode 100644 index fe3b18c..0000000 Binary files a/iPhone/assets/images/Projects/Buildworks/Buildworks-05.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Buildworks/Buildworks-06.jpg b/iPhone/assets/images/Projects/Buildworks/Buildworks-06.jpg deleted file mode 100644 index 4d999b0..0000000 Binary files a/iPhone/assets/images/Projects/Buildworks/Buildworks-06.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Buildworks/Buildworks-07.jpg b/iPhone/assets/images/Projects/Buildworks/Buildworks-07.jpg deleted file mode 100644 index 340b799..0000000 Binary files a/iPhone/assets/images/Projects/Buildworks/Buildworks-07.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Buildworks/Buildworks-08.jpg b/iPhone/assets/images/Projects/Buildworks/Buildworks-08.jpg deleted file mode 100644 index ff8063e..0000000 Binary files a/iPhone/assets/images/Projects/Buildworks/Buildworks-08.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Buildworks/Buildworks.png b/iPhone/assets/images/Projects/Buildworks/Buildworks.png deleted file mode 100644 index 156fe8b..0000000 Binary files a/iPhone/assets/images/Projects/Buildworks/Buildworks.png and /dev/null differ diff --git a/iPhone/assets/images/Projects/Covid Tracker/Covid-01.jpg b/iPhone/assets/images/Projects/Covid Tracker/Covid-01.jpg deleted file mode 100644 index 784bd74..0000000 Binary files a/iPhone/assets/images/Projects/Covid Tracker/Covid-01.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Covid Tracker/Covid-02.jpg b/iPhone/assets/images/Projects/Covid Tracker/Covid-02.jpg deleted file mode 100644 index 03d895a..0000000 Binary files a/iPhone/assets/images/Projects/Covid Tracker/Covid-02.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Covid Tracker/Covid.png b/iPhone/assets/images/Projects/Covid Tracker/Covid.png deleted file mode 100644 index e404f66..0000000 Binary files a/iPhone/assets/images/Projects/Covid Tracker/Covid.png and /dev/null differ diff --git a/iPhone/assets/images/Projects/Cyclopath/Cyclopath-01.jpg b/iPhone/assets/images/Projects/Cyclopath/Cyclopath-01.jpg deleted file mode 100644 index 825b996..0000000 Binary files a/iPhone/assets/images/Projects/Cyclopath/Cyclopath-01.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Cyclopath/Cyclopath-02.jpg b/iPhone/assets/images/Projects/Cyclopath/Cyclopath-02.jpg deleted file mode 100644 index 72ff070..0000000 Binary files a/iPhone/assets/images/Projects/Cyclopath/Cyclopath-02.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Cyclopath/Cyclopath-03.jpg b/iPhone/assets/images/Projects/Cyclopath/Cyclopath-03.jpg deleted file mode 100644 index 6f33671..0000000 Binary files a/iPhone/assets/images/Projects/Cyclopath/Cyclopath-03.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Cyclopath/Cyclopath-04.jpg b/iPhone/assets/images/Projects/Cyclopath/Cyclopath-04.jpg deleted file mode 100644 index b70ae14..0000000 Binary files a/iPhone/assets/images/Projects/Cyclopath/Cyclopath-04.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Cyclopath/Cyclopath-05.jpg b/iPhone/assets/images/Projects/Cyclopath/Cyclopath-05.jpg deleted file mode 100644 index d3742ff..0000000 Binary files a/iPhone/assets/images/Projects/Cyclopath/Cyclopath-05.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Cyclopath/Cyclopath.jpg b/iPhone/assets/images/Projects/Cyclopath/Cyclopath.jpg deleted file mode 100644 index 67f9616..0000000 Binary files a/iPhone/assets/images/Projects/Cyclopath/Cyclopath.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/DevLint/DevLint-01.png b/iPhone/assets/images/Projects/DevLint/DevLint-01.png deleted file mode 100644 index 666471a..0000000 Binary files a/iPhone/assets/images/Projects/DevLint/DevLint-01.png and /dev/null differ diff --git a/iPhone/assets/images/Projects/DevLint/DevLint-02.png b/iPhone/assets/images/Projects/DevLint/DevLint-02.png deleted file mode 100644 index f5947de..0000000 Binary files a/iPhone/assets/images/Projects/DevLint/DevLint-02.png and /dev/null differ diff --git a/iPhone/assets/images/Projects/DevLint/DevLint.png b/iPhone/assets/images/Projects/DevLint/DevLint.png deleted file mode 100644 index 9104526..0000000 Binary files a/iPhone/assets/images/Projects/DevLint/DevLint.png and /dev/null differ diff --git a/iPhone/assets/images/Projects/Medinin Doc/Medinin-01.jpg b/iPhone/assets/images/Projects/Medinin Doc/Medinin-01.jpg deleted file mode 100644 index b3d8d4c..0000000 Binary files a/iPhone/assets/images/Projects/Medinin Doc/Medinin-01.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Medinin Doc/Medinin-02.jpg b/iPhone/assets/images/Projects/Medinin Doc/Medinin-02.jpg deleted file mode 100644 index 3b1ef5b..0000000 Binary files a/iPhone/assets/images/Projects/Medinin Doc/Medinin-02.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Medinin Doc/Medinin-03.jpg b/iPhone/assets/images/Projects/Medinin Doc/Medinin-03.jpg deleted file mode 100644 index 90ee065..0000000 Binary files a/iPhone/assets/images/Projects/Medinin Doc/Medinin-03.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Medinin Doc/Medinin-04.jpg b/iPhone/assets/images/Projects/Medinin Doc/Medinin-04.jpg deleted file mode 100644 index 5f99b62..0000000 Binary files a/iPhone/assets/images/Projects/Medinin Doc/Medinin-04.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Medinin Doc/Medinin-05.jpg b/iPhone/assets/images/Projects/Medinin Doc/Medinin-05.jpg deleted file mode 100644 index 476640f..0000000 Binary files a/iPhone/assets/images/Projects/Medinin Doc/Medinin-05.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Medinin Doc/Medinin-06.jpg b/iPhone/assets/images/Projects/Medinin Doc/Medinin-06.jpg deleted file mode 100644 index a649aca..0000000 Binary files a/iPhone/assets/images/Projects/Medinin Doc/Medinin-06.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Medinin Doc/Medinin-07.jpg b/iPhone/assets/images/Projects/Medinin Doc/Medinin-07.jpg deleted file mode 100644 index 192487b..0000000 Binary files a/iPhone/assets/images/Projects/Medinin Doc/Medinin-07.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Medinin Doc/Medinin.png b/iPhone/assets/images/Projects/Medinin Doc/Medinin.png deleted file mode 100644 index 24ee69f..0000000 Binary files a/iPhone/assets/images/Projects/Medinin Doc/Medinin.png and /dev/null differ diff --git a/iPhone/assets/images/Projects/Medinin Patient/Medinin-01.jpeg b/iPhone/assets/images/Projects/Medinin Patient/Medinin-01.jpeg deleted file mode 100644 index 7367491..0000000 Binary files a/iPhone/assets/images/Projects/Medinin Patient/Medinin-01.jpeg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Medinin Patient/Medinin-02.jpeg b/iPhone/assets/images/Projects/Medinin Patient/Medinin-02.jpeg deleted file mode 100644 index 958359a..0000000 Binary files a/iPhone/assets/images/Projects/Medinin Patient/Medinin-02.jpeg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Medinin Patient/Medinin-03.jpeg b/iPhone/assets/images/Projects/Medinin Patient/Medinin-03.jpeg deleted file mode 100644 index 1d07f71..0000000 Binary files a/iPhone/assets/images/Projects/Medinin Patient/Medinin-03.jpeg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Medinin Patient/Medinin-04.jpeg b/iPhone/assets/images/Projects/Medinin Patient/Medinin-04.jpeg deleted file mode 100644 index 1f1fdf3..0000000 Binary files a/iPhone/assets/images/Projects/Medinin Patient/Medinin-04.jpeg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Medinin Patient/Medinin-05.jpeg b/iPhone/assets/images/Projects/Medinin Patient/Medinin-05.jpeg deleted file mode 100644 index b834383..0000000 Binary files a/iPhone/assets/images/Projects/Medinin Patient/Medinin-05.jpeg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Medinin Patient/Medinin-06.jpeg b/iPhone/assets/images/Projects/Medinin Patient/Medinin-06.jpeg deleted file mode 100644 index b463bcb..0000000 Binary files a/iPhone/assets/images/Projects/Medinin Patient/Medinin-06.jpeg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Medinin Patient/Medinin-07.jpeg b/iPhone/assets/images/Projects/Medinin Patient/Medinin-07.jpeg deleted file mode 100644 index 6d2d67a..0000000 Binary files a/iPhone/assets/images/Projects/Medinin Patient/Medinin-07.jpeg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Medinin Patient/Medinin-08.jpeg b/iPhone/assets/images/Projects/Medinin Patient/Medinin-08.jpeg deleted file mode 100644 index c957d5e..0000000 Binary files a/iPhone/assets/images/Projects/Medinin Patient/Medinin-08.jpeg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Medinin Patient/Medinin.png b/iPhone/assets/images/Projects/Medinin Patient/Medinin.png deleted file mode 100644 index 24ee69f..0000000 Binary files a/iPhone/assets/images/Projects/Medinin Patient/Medinin.png and /dev/null differ diff --git a/iPhone/assets/images/Projects/MrTip/Mr.Tip-01.png b/iPhone/assets/images/Projects/MrTip/Mr.Tip-01.png deleted file mode 100644 index e091e4b..0000000 Binary files a/iPhone/assets/images/Projects/MrTip/Mr.Tip-01.png and /dev/null differ diff --git a/iPhone/assets/images/Projects/MrTip/Mr.Tip-02.png b/iPhone/assets/images/Projects/MrTip/Mr.Tip-02.png deleted file mode 100644 index aaf0035..0000000 Binary files a/iPhone/assets/images/Projects/MrTip/Mr.Tip-02.png and /dev/null differ diff --git a/iPhone/assets/images/Projects/MrTip/Mr.Tip.png b/iPhone/assets/images/Projects/MrTip/Mr.Tip.png deleted file mode 100644 index cdecd70..0000000 Binary files a/iPhone/assets/images/Projects/MrTip/Mr.Tip.png and /dev/null differ diff --git a/iPhone/assets/images/Projects/Nearlet/Nearlet-01.jpg b/iPhone/assets/images/Projects/Nearlet/Nearlet-01.jpg deleted file mode 100644 index 297dedc..0000000 Binary files a/iPhone/assets/images/Projects/Nearlet/Nearlet-01.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Nearlet/Nearlet-01.png b/iPhone/assets/images/Projects/Nearlet/Nearlet-01.png deleted file mode 100644 index 8e716a6..0000000 Binary files a/iPhone/assets/images/Projects/Nearlet/Nearlet-01.png and /dev/null differ diff --git a/iPhone/assets/images/Projects/Nearlet/Nearlet-02.jpg b/iPhone/assets/images/Projects/Nearlet/Nearlet-02.jpg deleted file mode 100644 index d7fdfaf..0000000 Binary files a/iPhone/assets/images/Projects/Nearlet/Nearlet-02.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Nearlet/Nearlet-02.png b/iPhone/assets/images/Projects/Nearlet/Nearlet-02.png deleted file mode 100644 index ebe9b8e..0000000 Binary files a/iPhone/assets/images/Projects/Nearlet/Nearlet-02.png and /dev/null differ diff --git a/iPhone/assets/images/Projects/Nearlet/Nearlet-03.jpg b/iPhone/assets/images/Projects/Nearlet/Nearlet-03.jpg deleted file mode 100644 index ec7d1a1..0000000 Binary files a/iPhone/assets/images/Projects/Nearlet/Nearlet-03.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Nearlet/Nearlet-04.jpg b/iPhone/assets/images/Projects/Nearlet/Nearlet-04.jpg deleted file mode 100644 index 01f04f0..0000000 Binary files a/iPhone/assets/images/Projects/Nearlet/Nearlet-04.jpg and /dev/null differ diff --git a/iPhone/assets/images/Projects/Nearlet/Nearlet.png b/iPhone/assets/images/Projects/Nearlet/Nearlet.png deleted file mode 100644 index fad7dbe..0000000 Binary files a/iPhone/assets/images/Projects/Nearlet/Nearlet.png and /dev/null differ diff --git a/iPhone/assets/images/Projects/Truepulse/Sign up-11.png b/iPhone/assets/images/Projects/Truepulse/Sign up-11.png deleted file mode 100644 index 2f80f44..0000000 Binary files a/iPhone/assets/images/Projects/Truepulse/Sign up-11.png and /dev/null differ diff --git a/iPhone/assets/images/Projects/Truepulse/Sign up-3.png b/iPhone/assets/images/Projects/Truepulse/Sign up-3.png deleted file mode 100644 index 06a20a0..0000000 Binary files a/iPhone/assets/images/Projects/Truepulse/Sign up-3.png and /dev/null differ diff --git a/iPhone/assets/images/Projects/Truepulse/Sign up-4-1.png b/iPhone/assets/images/Projects/Truepulse/Sign up-4-1.png deleted file mode 100644 index 26d8480..0000000 Binary files a/iPhone/assets/images/Projects/Truepulse/Sign up-4-1.png and /dev/null differ diff --git a/iPhone/assets/images/Projects/Truepulse/Sign up-4.png b/iPhone/assets/images/Projects/Truepulse/Sign up-4.png deleted file mode 100644 index a79bc18..0000000 Binary files a/iPhone/assets/images/Projects/Truepulse/Sign up-4.png and /dev/null differ diff --git a/iPhone/assets/images/Projects/Truepulse/Sign up.png b/iPhone/assets/images/Projects/Truepulse/Sign up.png deleted file mode 100644 index e84905d..0000000 Binary files a/iPhone/assets/images/Projects/Truepulse/Sign up.png and /dev/null differ diff --git a/iPhone/assets/images/iPhone-15.webp b/iPhone/assets/images/iPhone-15.webp deleted file mode 100644 index 21a9ea4..0000000 Binary files a/iPhone/assets/images/iPhone-15.webp and /dev/null differ diff --git a/iPhone/assets/images/profile.jpg b/iPhone/assets/images/profile.jpg deleted file mode 100644 index 06c0383..0000000 Binary files a/iPhone/assets/images/profile.jpg and /dev/null differ diff --git a/iPhone/home.html b/iPhone/home.html index baa0ea9..a979dee 100644 --- a/iPhone/home.html +++ b/iPhone/home.html @@ -86,6 +86,8 @@

+ + diff --git a/iPhone/project-details.html b/iPhone/project-details.html index e3997e8..852b863 100644 --- a/iPhone/project-details.html +++ b/iPhone/project-details.html @@ -81,6 +81,7 @@ + diff --git a/iPhone/projects.html b/iPhone/projects.html index e8336ce..ceddca3 100644 --- a/iPhone/projects.html +++ b/iPhone/projects.html @@ -37,6 +37,7 @@ + \ No newline at end of file diff --git a/iPhone/scripts/home.js b/iPhone/scripts/home.js index 0604075..9552348 100644 --- a/iPhone/scripts/home.js +++ b/iPhone/scripts/home.js @@ -1,39 +1,43 @@ -document.addEventListener("DOMContentLoaded", function () { - fetch("../data/portfolio.json") // Adjusted path - .then(response => { - if (!response.ok) { - throw new Error(`HTTP error! Status: ${response.status}`); - } - return response.json(); - }) - .then(data => { - if (!data.profile) throw new Error("Profile data is missing!"); - - const profile = data.profile; - - // Update profile picture - const profileImage = document.querySelector(".widget-content img"); - if (profileImage && profile.profile_picture) { - profileImage.src = profile.profile_picture; - } - - // Update name and alias - const nameElement = document.querySelector(".magic-text"); - if (nameElement) { - nameElement.textContent = profile.name || "Username"; - } - - // Update intro - const introElement = document.querySelector(".widget-content p"); - if (introElement) { - introElement.textContent = profile.intro || "Intro here"; - } - }) - .catch(error => console.error("Error loading profile data:", error)); +document.addEventListener("DOMContentLoaded", async () => { + try { + const data = await getPortfolio(); + const base = data.BASE_URL; + + if (!data.profile) throw new Error("Profile data is missing!"); + + const profile = data.profile; + + // Update profile picture + const profileImage = document.querySelector(".widget-content img"); + if (profileImage && profile.profile_picture) { + profileImage.src = base + profile.profile_picture; + } + + // .home-screen + const homeScreen = document.querySelector(".home-screen"); + console.log(homeScreen); // Should not be null + if (homeScreen && profile.background_mock) { + homeScreen.style.backgroundImage = `url('${base}${profile.background_mock}')`; + homeScreen.style.backgroundSize = "cover"; + homeScreen.style.backgroundPosition = "center"; + } + + // Update name and alias + const nameElement = document.querySelector(".magic-text"); + if (nameElement) { + nameElement.textContent = profile.name || "Username"; + } + + // Update intro + const introElement = document.querySelector(".widget-content p"); + if (introElement) { + introElement.textContent = profile.intro || "Intro here"; + } + } catch (error) { + console.error("Error loading profile data:", error); + } }); - - // Sparkeling Effect let index = 0, interval = 2000; diff --git a/iPhone/scripts/project-details.js b/iPhone/scripts/project-details.js index b3b40db..1244aca 100644 --- a/iPhone/scripts/project-details.js +++ b/iPhone/scripts/project-details.js @@ -1,44 +1,49 @@ // project-details.js document.addEventListener("DOMContentLoaded", async () => { - const urlParams = new URLSearchParams(window.location.search); - const projectId = urlParams.get("id"); - const osType = urlParams.get("os"); - - // If this file is included on landing.html, quietly bail. - if (!projectId || !osType) return; - - try { - const response = await fetch("../data/portfolio.json"); - const data = await response.json(); - const apps = data.apps[`${osType}_apps`]; - - const project = apps.find(app => String(app.app_id) === String(projectId)); - if (!project) throw new Error("Project not found."); - - // Update UI - document.getElementById("app-icon").src = project.icon; - document.getElementById("app-name").textContent = project.name; - document.getElementById("app-category").textContent = project.category; - document.getElementById("description").textContent = project.description; - document.getElementById("action-button").href = project.app_store_link; - - // Render screenshots - const screenshotContainer = document.getElementById("screenshot-container"); - screenshotContainer.innerHTML = ""; - project.screenshots.forEach(image => { - const img = document.createElement("img"); - img.src = image; - img.alt = "Screenshot"; - img.classList.add("screenshot"); - screenshotContainer.appendChild(img); - }); - - // Hook up the modal (works here and in popup) - window.initScreenshotModal(screenshotContainer, project.screenshots); - - } catch (error) { - console.error(error); - const holder = document.querySelector(".app-container"); - if (holder) holder.innerHTML = `

${error.message}

`; - } + const urlParams = new URLSearchParams(window.location.search); + const projectId = urlParams.get("id"); + const osType = urlParams.get("os"); + + // If this file is included on a page without parameters, bail. + if (!projectId || !osType) return; + + try { + // Fetch portfolio from backend (cached by dataLoader.js) + const data = await getPortfolio(); + const base = data.BASE_URL; + + const apps = data.apps[`${osType}_apps`]; + if (!apps) throw new Error(`No apps found for OS: ${osType}`); + + const project = apps.find(app => String(app.app_id) === String(projectId)); + if (!project) throw new Error("Project not found."); + + // Update UI + document.getElementById("app-icon").src = base + project.icon; + document.getElementById("app-name").textContent = project.name; + document.getElementById("app-category").textContent = project.category; + document.getElementById("description").textContent = project.description; + document.getElementById("action-button").href = project.app_store_link; + + // Render screenshots + const screenshotContainer = document.getElementById("screenshot-container"); + screenshotContainer.innerHTML = ""; + project.screenshots.forEach(image => { + const img = document.createElement("img"); + img.src = base + image; // prepend base URL + img.alt = "Screenshot"; + img.classList.add("screenshot"); + screenshotContainer.appendChild(img); + }); + + // Hook up the modal (works here and in popup) + if (typeof window.initScreenshotModal === "function") { + window.initScreenshotModal(screenshotContainer, project.screenshots.map(img => base + img)); + } + + } catch (error) { + console.error(error); + const holder = document.querySelector(".app-container"); + if (holder) holder.innerHTML = `

${error.message}

`; + } }); diff --git a/iPhone/scripts/project.js b/iPhone/scripts/project.js index 42ea8be..3b2fe08 100644 --- a/iPhone/scripts/project.js +++ b/iPhone/scripts/project.js @@ -1,110 +1,113 @@ +// project.js document.addEventListener("DOMContentLoaded", async () => { - const projectContainer = document.querySelector(".list-section"); - - const fromLanding = document.referrer.includes("landing.html") || window.location.pathname.includes("landing.html"); - window.fromLanding = fromLanding; - - try { - const response = await fetch("../data/portfolio.json"); - const data = await response.json(); - const { macOS_apps, iOS_apps } = data.apps; - - const groupedApps = { - macOS: macOS_apps, - iOS: iOS_apps - }; - - // Clear existing content - projectContainer.innerHTML = ""; - - // Generate OS Categories (MacOS, iOS) - Object.keys(groupedApps).forEach(osType => { - if (!groupedApps[osType] || groupedApps[osType].length === 0) return; - - const osSection = document.createElement("div"); - osSection.classList.add("os-section"); - - // OS Heading - osSection.innerHTML = `

${osType} Apps

`; - - // App List - const appList = document.createElement("div"); - appList.classList.add("app-list"); - - groupedApps[osType].forEach(app => { - const iconPath = fromLanding ? `iPhone/${app.icon}` : app.icon; - const appItem = document.createElement("div"); - appItem.classList.add("list-item"); - - appItem.innerHTML = ` - ${app.name} -
- ${app.name} - ${app.category} -
- - `; - - appList.appendChild(appItem); - }); - - osSection.appendChild(appList); - projectContainer.appendChild(osSection); - }); - - } catch (error) { - console.error("Error loading projects:", error); - } -}); + const projectContainer = document.querySelector(".list-section"); + + const fromLanding = document.referrer.includes("landing.html") || window.location.pathname.includes("landing.html"); + window.fromLanding = fromLanding; + try { + // Fetch portfolio from backend (cached) + const data = await getPortfolio(); + const base = data.BASE_URL; + const { macOS_apps, iOS_apps } = data.apps; + + const groupedApps = { + macOS: macOS_apps, + iOS: iOS_apps + }; + + // Clear existing content + projectContainer.innerHTML = ""; + + // Generate OS Categories (MacOS, iOS) + Object.keys(groupedApps).forEach(osType => { + if (!groupedApps[osType] || groupedApps[osType].length === 0) return; + + const osSection = document.createElement("div"); + osSection.classList.add("os-section"); + + // OS Heading + osSection.innerHTML = `

${osType} Apps

`; + + // App List + const appList = document.createElement("div"); + appList.classList.add("app-list"); + + groupedApps[osType].forEach(app => { + const iconPath = base + app.icon; // prepend base URL + const appItem = document.createElement("div"); + appItem.classList.add("list-item"); + + appItem.innerHTML = ` + ${app.name} +
+ ${app.name} + ${app.category} +
+ + `; + + appList.appendChild(appItem); + }); + + osSection.appendChild(appList); + projectContainer.appendChild(osSection); + }); + + } catch (error) { + console.error("Error loading projects:", error); + } +}); -// Navigate to project details +// Navigate to project details or popup window.viewProject = async function viewProject(os, projectId) { - if (window.fromLanding) { try { - const response = await fetch("../data/portfolio.json"); - const data = await response.json(); - const apps = data.apps[`${os}_apps`]; - const project = apps.find(app => String(app.app_id) === String(projectId)); - if (!project) throw new Error("Project not found"); - renderProjectPopup(project); + const data = await getPortfolio(); + const base = data.BASE_URL; + const apps = data.apps[`${os}_apps`]; + const project = apps.find(app => String(app.app_id) === String(projectId)); + if (!project) throw new Error("Project not found"); + + if (window.fromLanding) { + renderProjectPopup(project, base); + } else { + window.location.href = `project-details.html?os=${os}&id=${projectId}`; + } } catch (err) { - console.error(err); + console.error(err); } - } else { - window.location.href = `project-details.html?os=${os}&id=${projectId}`; - } }; -function renderProjectPopup(project) { - const popup = document.getElementById("project-popup"); - const inner = document.getElementById("popup-inner"); - - inner.innerHTML = ` -
- ${project.name} -
- ${project.name} - ${project.category} -
- OPEN +// Render popup with proper base URL +function renderProjectPopup(project, base) { + const popup = document.getElementById("project-popup"); + const inner = document.getElementById("popup-inner"); + + inner.innerHTML = ` +
+ ${project.name} +
+ ${project.name} + ${project.category} +
+ OPEN +
+
-
-
-
- ${project.screenshots.map(src => ``).join("")} -
-
-

${project.description}

-
- `; - - popup.classList.remove("hidden"); - - document.getElementById("popup-close").onclick = () => popup.classList.add("hidden"); - popup.querySelector(".popup-overlay").onclick = () => popup.classList.add("hidden"); - - // πŸ”— Bind modal to the popup thumbnails - const container = inner.querySelector("#screenshot-container"); - window.initScreenshotModal(container); +
+ ${project.screenshots.map(src => ``).join("")} +
+
+

${project.description}

+
+ `; + + popup.classList.remove("hidden"); + + document.getElementById("popup-close").onclick = () => popup.classList.add("hidden"); + popup.querySelector(".popup-overlay").onclick = () => popup.classList.add("hidden"); + + // Bind modal to the popup thumbnails + const container = inner.querySelector("#screenshot-container"); + window.initScreenshotModal(container); } diff --git a/iPhone/scripts/work.js b/iPhone/scripts/work.js index 57eeb0f..53e1e40 100644 --- a/iPhone/scripts/work.js +++ b/iPhone/scripts/work.js @@ -1,85 +1,75 @@ -document.addEventListener("DOMContentLoaded", () => { - console.log("JavaScript loaded and DOM ready!"); - - fetch("../data/portfolio.json") // Ensure the correct path - .then(response => response.json()) - .then(data => { - console.log("Raw JSON response:", data); // Debugging log - - if (!data.experience || !data.experience.companies) { - console.error("No experience data found!"); - return; - } - - const workExperiences = data.experience.companies; // βœ… Corrected reference - - console.log("Work Experiences:", workExperiences); // Debugging log - - const mapContainer = document.querySelector(".page.app-page"); - const popup = document.getElementById("popup"); - const popupOverlay = document.getElementById("popup-overlay"); - const closePopup = document.querySelector(".close-popup"); - - if (mapContainer && data.experience.map_bg_image) { - mapContainer.style.background = `url('${data.experience.map_bg_image}') no-repeat center center`; - mapContainer.style.backgroundSize = "cover"; - } else { - console.warn("Map background image not found in JSON!"); - } - - if (!mapContainer || !popup || !popupOverlay || !closePopup) { - console.error("One or more elements are missing! Check your HTML."); - return; - } - - // Create and add markers - workExperiences.forEach((job, index) => { - console.log("Adding marker for:", job.company); // Debugging log - - const marker = document.createElement("div"); - marker.classList.add("map-marker"); - marker.style.top = job.position.top; - marker.style.left = job.position.left; - marker.dataset.index = index; - - // πŸ› οΈ Fix: Add missing inner elements - const markerTitle = document.createElement("div"); - markerTitle.classList.add("marker-title"); - markerTitle.textContent = job.company; // Use company name as title - marker.appendChild(markerTitle); - - const markerPin = document.createElement("div"); - markerPin.classList.add("marker-pin"); - marker.appendChild(markerPin); - - marker.addEventListener("click", () => { - console.log("Marker clicked:", job.company); - displayPopup(job); - }); - - mapContainer.appendChild(marker); - }); - - // Function to show popup - function displayPopup(job) { - document.getElementById("popup-company").textContent = job.company; - document.getElementById("popup-role").textContent = job.role; - document.getElementById("popup-duration").textContent = job.duration; - document.getElementById("popup-responsibilities").innerHTML = job.responsibilities.map(item => `
  • ${item}
  • `).join(""); - document.getElementById("popup-projects").innerHTML = job.projects.map(item => `
  • ${item}
  • `).join(""); - - popup.style.display = "block"; - popupOverlay.style.display = "block"; - } - - // Close popup - function closePopupFunction() { - popup.style.display = "none"; - popupOverlay.style.display = "none"; - } - - closePopup.addEventListener("click", closePopupFunction); - popupOverlay.addEventListener("click", closePopupFunction); - }) - .catch(error => console.error("Error loading profile data:", error)); +document.addEventListener("DOMContentLoaded", async () => { + try { + const data = await getPortfolio(); + const BASE_URL = data.BASE_URL || ""; // use backend base URL + + if (!data.experience || !data.experience.companies) { + console.error("No experience data found!"); + return; + } + + const workExperiences = data.experience.companies; + + const mapContainer = document.querySelector(".page.app-page"); + const popup = document.getElementById("popup"); + const popupOverlay = document.getElementById("popup-overlay"); + const closePopup = document.querySelector(".close-popup"); + + if (!mapContainer || !popup || !popupOverlay || !closePopup) { + console.error("Missing required elements"); + return; + } + + // Map background image + if (data.experience.map_bg_image) { + mapContainer.style.backgroundImage = `url('${BASE_URL}${data.experience.map_bg_image}')`; + mapContainer.style.backgroundRepeat = "no-repeat"; + mapContainer.style.backgroundPosition = "center center"; + mapContainer.style.backgroundSize = "cover"; + } + + // Add markers + workExperiences.forEach((job, index) => { + const marker = document.createElement("div"); + marker.classList.add("map-marker"); + marker.style.top = job.position.top; + marker.style.left = job.position.left; + marker.dataset.index = index; + + const markerTitle = document.createElement("div"); + markerTitle.classList.add("marker-title"); + markerTitle.textContent = job.company; + marker.appendChild(markerTitle); + + const markerPin = document.createElement("div"); + markerPin.classList.add("marker-pin"); + marker.appendChild(markerPin); + + marker.addEventListener("click", () => displayPopup(job)); + + mapContainer.appendChild(marker); + }); + + function displayPopup(job) { + document.getElementById("popup-company").textContent = job.company; + document.getElementById("popup-role").textContent = job.role; + document.getElementById("popup-duration").textContent = job.duration; + document.getElementById("popup-responsibilities").innerHTML = job.responsibilities.map(i => `
  • ${i}
  • `).join(""); + document.getElementById("popup-projects").innerHTML = job.projects.map(i => `
  • ${i}
  • `).join(""); + + popup.style.display = "block"; + popupOverlay.style.display = "block"; + } + + function closePopupFunction() { + popup.style.display = "none"; + popupOverlay.style.display = "none"; + } + + closePopup.addEventListener("click", closePopupFunction); + popupOverlay.addEventListener("click", closePopupFunction); + + } catch (err) { + console.error("Error loading portfolio data:", err); + } }); diff --git a/iPhone/styles/homescreen.css b/iPhone/styles/homescreen.css index 02faf16..eba3ea7 100644 --- a/iPhone/styles/homescreen.css +++ b/iPhone/styles/homescreen.css @@ -1,12 +1,12 @@ /* Home Screen Styles */ .home-screen { - background: linear-gradient(to bottom, #030509, #030a13); /* Blue-100 to Blue-200 */ + background: linear-gradient(to bottom, #030509, #030a13); border: 1px solid #000000; /* Black-300 */ border-radius: 2.5rem; - background-image: url('../assets/images/iPhone-15.webp'); background-size: cover; background-position: center; height: 100%; + width: 100%; display: flex; flex-direction: column; justify-content: space-between; /* Align content to the top */ diff --git a/iPhone/work.html b/iPhone/work.html index 9e0ced8..2a1f928 100644 --- a/iPhone/work.html +++ b/iPhone/work.html @@ -60,6 +60,7 @@
    + diff --git a/index.html b/index.html index 4569086..bcdadc0 100644 --- a/index.html +++ b/index.html @@ -65,7 +65,7 @@ diff --git a/scripts/dataLoader.js b/scripts/dataLoader.js new file mode 100644 index 0000000..97fbdc6 --- /dev/null +++ b/scripts/dataLoader.js @@ -0,0 +1,37 @@ +// /js/dataLoader.js +(function () { + const BASE_URL = "https://portfolio-backend-p1.vercel.app/"; + const URL = BASE_URL + "api/portfolio"; + const CACHE_KEY = "portfolioData"; + const CACHE_VER = "v1"; // bumps when you change schema + + async function fetchPortfolio() { + const res = await fetch(`${URL}?cb=${Date.now()}`, { cache: "no-store" }); + if (!res.ok) throw new Error("Failed to load portfolio.json"); + const data = await res.json(); + data.BASE_URL = BASE_URL; + return data; + } + + // public API + window.getPortfolio = async function () { + const cached = sessionStorage.getItem(CACHE_KEY); + const ver = sessionStorage.getItem(CACHE_KEY + ":ver"); + + if (cached && ver === CACHE_VER) { + try { + const data = JSON.parse(cached); + data.BASE_URL = BASE_URL; + return data; + } catch {} + } + + const data = await fetchPortfolio(); + sessionStorage.setItem(CACHE_KEY, JSON.stringify(data)); + sessionStorage.setItem(CACHE_KEY + ":ver", CACHE_VER); + return data; + }; + + // optional: warm it immediately on first page load + window.preloadPortfolio = function () { return window.getPortfolio(); }; +})(); diff --git a/scripts/landing.js b/scripts/landing.js index fa095a3..768a04c 100644 --- a/scripts/landing.js +++ b/scripts/landing.js @@ -1,11 +1,58 @@ -document.addEventListener("DOMContentLoaded", function () { - const buttons = document.querySelectorAll(".os-btn"); - const displayFrame = document.getElementById("os-display"); - - buttons.forEach(button => { - button.addEventListener("click", function () { - const platform = this.getAttribute("data-platform"); - displayFrame.src = `../${platform}/index.html`; +// landing.js +document.addEventListener("DOMContentLoaded", async () => { + try { + // Fetch portfolio data + const data = await getPortfolio(); + const BASE_URL = data.BASE_URL || ""; + + // PROFILE SECTION + const profile = data.profile; + + const profileImg = document.querySelector(".profile-img"); + if (profileImg) profileImg.src = BASE_URL + profile.profile_picture; + + const nameEl = document.querySelector(".name"); + if (nameEl) nameEl.textContent = profile.alias; + + const aliasEl = document.querySelector(".alias"); + if (aliasEl) aliasEl.textContent = `(${profile.name})`; + + const bioEl = document.querySelector(".intro"); + if (bioEl) bioEl.textContent = profile.intro || profile.bio; + + // const jobEl = document.querySelector(".company"); + // if (jobEl) jobEl.textContent = profile.job_role + " – " + profile.location; + + // SOCIAL LINKS + const socialContainer = document.querySelector(".social-links"); + if (socialContainer && profile.social_links) { + socialContainer.innerHTML = ""; + Object.entries(profile.social_links).forEach(([key, link]) => { + if (!link) return; + const a = document.createElement("a"); + a.href = link; + a.target = "_blank"; + a.rel = "noopener noreferrer"; + a.textContent = key.toUpperCase(); + socialContainer.appendChild(a); + }); + } + + // PROJECTS SECTION & POPUP FUNCTIONALITY is fetching from project.js & project-details.js + + + // OS Display Buttons + const buttons = document.querySelectorAll(".os-btn"); + const displayFrame = document.getElementById("os-display"); + + buttons.forEach(button => { + button.addEventListener("click", function () { + const platform = this.getAttribute("data-platform"); + displayFrame.src = `${BASE_URL}${platform}/index.html`; + }); }); - }); -}); \ No newline at end of file + + } catch (error) { + console.error("Error loading portfolio data:", error); + } +});