resources/views/themes/adventra/.
Directory structure
resources/views/admin/.
Key layout files
app.blade.php — public layout
All public-facing pages extend this layout. It loads the dynamic color CSS, tripfy.css, and tripfy.js. It sets data-theme on <html> from the authenticated user’s preference, or defaults to light:
| Point | Usage |
|---|---|
@yield('content') | Main page content |
@stack('scripts') | Page-specific JavaScript |
user.blade.php — user dashboard
Authenticated dashboard pages extend this layout instead. It includes the sidebar, the dashboard header partial (user_dashboard_header.blade.php), and also loads tripfy.css and tripfy.js with Tripfy branding.
Admin layout
Admin pages useresources/views/admin/layouts/app.blade.php, which is a separate layout that loads admin/css/tripfy-admin.css for the admin-specific branding. It uses the same dynamic-colors.css so admin brand colors stay consistent with the frontend.
Partials
Header (partials/header.blade.php)
The header includes the navigation bar, the user dropdown (when authenticated), and the theme toggle button. It reads the active menu items from getHeaderMenuData() and renders them dynamically:
.tf-theme-toggle class is automatically detected by tripfy.js and wired to the theme toggle function.
Footer (partials/footer.blade.php)
Renders footer navigation links, social icons, and the copyright line. Content is managed through Admin → Manage Content → Footer.
PWA popup (partials/pwa.blade.php)
Renders the “Add to Home Screen” install prompt and registers the service worker. The popup is branded as Tripfy Africa and appears after a configurable delay.
Frontend page components
Package listing (frontend/package/list.blade.php)
The primary package listing page renders a card grid. Controllers pass an $packages paginated collection that the view iterates:
.tf-reveal class enables scroll-reveal animation via tripfy.js.
Checkout flow (frontend/checkout/)
The checkout is a multi-step form managed by tripfy.js’s goToStep(n) function. The steps are:
Package detail (frontend/package/details.blade.php)
Shows the full package description, photo gallery, itinerary, reviews, and a booking sidebar. The photo gallery uses tripfy.js’s image zoom: clicking any .open-modal[data-image] element opens a full-screen overlay.
Passing data from controllers to views
Controllers pass data to views using a$data array or compact. The view receives these as named variables:
Reusable component pattern
The theme uses@component / @endcomponent for shared UI pieces. Components live under resources/views/themes/adventra/partials/components/.
- Package card
- Form input
- Alert
package-card component accepts compact mode for use in sidebars and related-package lists, and shows discount badges, featured badges, ratings, and a wishlist toggle automatically.