How rripollesg/portfolio works
Main Components
• Frontend Client (Browser): This is the user's interface where index.html and EN.html are rendered.
• Static HTML Files: index.html and EN.html serve as the primary entry points.
• Assets Directory: Contains subdirectories for CSS, JS, images, certificates (PDFs). Identify CSS (design/style), JavaScript (interactive behavior, service worker, swipe and timeline features), and images.
• Service Worker: service-worker.js which likely offers offline caching and Progressive Web App (PWA) features.
• External Resources/Dependencies: The vendor directory under assets (if used for third-party libraries) and any externally loaded frameworks or libraries.
Relationships & Data Flow
• The Browser loads the primary HTML file (index.html or EN.html).
• From these HTML files, the browser pulls in CSS for styling, JavaScript for interactivity (index.js, main.js, maintimeline.js, swipe-content.js, util.js), and images from assets.
• The service worker (service-worker.js) is registered by the HTML page and interacts with the browser, managing caching and handling offline scenarios.
• The certificates and other PDF files within the assets/certificados directory are static resources that can be accessed via links from the webpage.
Architectural Patterns and Design Principles
• Separation of Concerns: HTML, CSS, and JavaScript are in distinct directories, ensuring clear separation between presentation, style, and behavior.
• Static File Serving: With everything stored as static assets, the deployment is likely to be on a platform like GitHub Pages or similar content delivery networks.
• Progressive Enhancement: The presence of a service worker suggests that offline caching or enhanced load performance (a PWA-like feature) is implemented.
• Simple Design: The project does not include a backend or database: all logic is client-side and focused on delivering a professional portfolio experience.
Important Technologies, Frameworks, or Libraries
• HTML/CSS/JavaScript: The core web technologies used.
• Service Worker API: Used for offline caching and potentially making the site a PWA.
• Any external libraries in the assets/vendor folder should be recognized as building blocks for UI components or additional interactivity.
Putting It All Together
– A direct link to the HTML files.
– From the HTML, include branches that point to CSS for styling and to JavaScript files for functionality.
– Another branch from HTML should indicate access to the “assets” such as images and PDFs.
• Also, include a separate node for the Service Worker showing its registration by the HTML file and illustrating the flow for caching and offline handling.