@php
$heroBgType = $home['hero_bg_type'] ?? 'video';
$heroBgColor = $home['hero_bg_color'] ?? '#09383a';
$heroBgImage = !empty($home['hero_bg_image']) ? asset($home['hero_bg_image']) : asset($home['hero_video_poster'] ?? 'storage/website/poster.jpg');
@endphp
{{ $home['hero_line_1'] ?? 'Flourishing Forests' }}
{{ $home['hero_line_2'] ?? 'Thriving Farms' }}
{{ $home['hero_line_3'] ?? 'Prospering People' }}
@if($heroBgType === 'video')
@elseif($heroBgType === 'image')
@else
@endif
@php
$aboutBgType = $home['about_bg_type'] ?? (!empty($home['about_bg_image']) ? 'image' : 'color');
$aboutBgStyle = '';
if ($aboutBgType === 'image' && !empty($home['about_bg_image'])) {
$aboutBgStyle = "background-image: url('" . asset($home['about_bg_image']) . "'); background-size: cover; background-position: center;";
} else {
$aboutBgStyle = 'background-color: ' . ($home['about_bg_color'] ?? '#ffffff') . ';';
}
@endphp
{{ $home['about_intro'] ?? 'Farmers for Forests (F4F) protects and restores biodiverse farms and forests by harnessing deep community engagement, scientific best practices and AI. We fight climate change and poverty at scale in India.' }}
@if(!empty($home['about_highlight']))
{{ $home['about_highlight'] }}
@endif
@if(isset($programs) && count($programs))
@php
$progBgType = $home['programs_bg_type'] ?? (!empty($home['programs_bg_image']) ? 'image' : 'color');
$progBgStyle = '';
if ($progBgType === 'image' && !empty($home['programs_bg_image'])) {
$progBgStyle = "background-image: url('" . asset($home['programs_bg_image']) . "'); background-size: cover; background-position: center;";
} else {
$progBgStyle = 'background-color: ' . ($home['programs_bg_color'] ?? '#143823') . ';';
}
@endphp
{{ $home['programs_eyebrow'] ?? 'Our Work on the Ground' }}
{{ $home['programs_title'] ?? 'Five programs. One integrated vision.' }}
{{ $home['programs_intro'] ?? 'Our work spans five interconnected programs — with agroforestry at the centre, supported by forest protection, human-wildlife coexistence, urban biodiversity, and ecology education. Each program is designed to create lasting ecological and livelihood impact, working hand-in-hand with local communities.' }}
@foreach($programs as $i => $p)
@php
$isActive = $i === 0;
$desc = $p->card_description ?: ($p->excerpt ?: \Illuminate\Support\Str::limit(strip_tags((string) $p->description), 200));
@endphp
{{ $p->title }}
{{ $desc }}
@endforeach
@endif
@php
$impactBgType = $home['impact_bg_type'] ?? (!empty($home['impact_bg_image']) ? 'image' : 'color');
$impactBgStyle = '';
if ($impactBgType === 'image' && !empty($home['impact_bg_image'])) {
$impactBgStyle = "background-image: url('" . asset($home['impact_bg_image']) . "'); background-size: cover; background-position: center;";
} else {
$impactBgStyle = 'background-color: ' . ($home['impact_bg_color'] ?? '#ffffff') . ';';
}
@endphp
{{ $home['impact_eyebrow'] ?? 'Our Impact' }}
{{ $home['impact_title'] ?? 'Numbers that matter' }}
{{ $home['impact_sub'] ?? 'Real outcomes for people, forests, and climate.' }}
@foreach(($impacts ?? []) as $impact)
@php
$isImg = $impact->is_image ?? false;
$iconSrc = $impact->icon_url ?? null;
$faClass = $impact->fa_class ?? 'fa-solid fa-leaf';
if (!$iconSrc && !empty($impact->icon)) {
$rawIcon = (string) $impact->icon;
$lc = strtolower($rawIcon);
if (str_ends_with($lc, '.png') || str_ends_with($lc, '.svg') || str_ends_with($lc, '.jpg') || str_ends_with($lc, '.webp')) {
$isImg = true;
$iconSrc = preg_match('#^(https?://|assets/|storage/)#', $rawIcon) ? asset($rawIcon) : asset('storage/' . $rawIcon);
}
}
@endphp
@if($isImg && $iconSrc)
@else
@endif
{{ $impact->value }}
{{ $impact->label }}
@endforeach
@php
$approachBgType = $home['approach_bg_type'] ?? (!empty($home['approach_bg_image']) ? 'image' : 'color');
$approachBgStyle = '';
if ($approachBgType === 'image' && !empty($home['approach_bg_image'])) {
$approachBgStyle = "background-image: url('" . asset($home['approach_bg_image']) . "'); background-size: cover; background-position: center;";
} else {
$approachBgStyle = 'background-color: ' . ($home['approach_bg_color'] ?? '#fbfaf6') . ';';
}
$displayedHowWeWork = ($howWeWorkItems ?? collect())->take(3);
$howWeWorkCount = $displayedHowWeWork->count();
@endphp
{{ $home['approach_eyebrow'] ?? 'How We Work' }}
{{ $home['approach_title'] ?? 'Our Approach' }}
{{ $home['approach_intro'] ?? 'The evidence is unambiguous: nature-based solutions succeed when they are rooted in farmer agency, deliver tangible economic returns, and are backed by rigorous monitoring. Our approach is built on three interlocking principles drawn from the latest global research and our own experience on the ground in India.' }}
@if($howWeWorkCount > 0)
@foreach($displayedHowWeWork as $item)
@if($item->is_image_icon)
@else
@endif
{{ $item->title }}
{{ $item->description }}
@if(!empty($item->citations) && is_array($item->citations))
@foreach($item->citations as $cite)
@if(!empty($cite['label']))
{{ $cite['label'] }}
@endif
@endforeach
@endif
@endforeach
@else
Principles will appear here once added in admin.
@endif
@php
$partnersBgType = $home['partners_bg_type'] ?? (!empty($home['partners_bg_image']) ? 'image' : 'color');
$partnersBgStyle = '';
if ($partnersBgType === 'image' && !empty($home['partners_bg_image'])) {
$partnersBgStyle = "background-image: url('" . asset($home['partners_bg_image']) . "'); background-size: cover; background-position: center;";
} else {
$partnersBgStyle = 'background-color: ' . ($home['partners_bg_color'] ?? '#ffffff') . ';';
}
@endphp
{{ $home['partners_eyebrow'] ?? 'Organisations Supporting Our Work' }}
{{ $home['partners_title'] ?? 'Backed by partners who share our vision' }}
@if(!empty($partners) && count($partners))
@foreach($partners as $partner)
@if($partner->logo_url)
@else
{{ $partner->partner_name }}
@endif
@endforeach
@foreach($partners as $partner)
@if($partner->logo_url)
@else
{{ $partner->partner_name }}
@endif
@endforeach
@endif
@php
$techBgType = $home['tech_bg_type'] ?? (!empty($home['tech_bg_image']) ? 'image' : 'color');
$techBgStyle = '';
if ($techBgType === 'image' && !empty($home['tech_bg_image'])) {
$techBgStyle = "background-image: url('" . asset($home['tech_bg_image']) . "'); background-size: cover; background-position: center;";
} else {
$techBgStyle = 'background-color: ' . ($home['tech_bg_color'] ?? '#0c3540') . ';';
}
@endphp
{{ $home['tech_eyebrow'] ?? 'Open-Source Technology' }}
{{ $home['tech_title_line1'] ?? 'Built to verify.' }}{{ $home['tech_title_line2'] ?? 'Built to scale.' }}
{{ $home['tech_body'] ?? 'Manual tree counts were slow, and satellite data lacked the resolution we needed — so we built our own. Project Anāhitā is our open-source tech stack for farmer engagement (ChutkiAI), field operations (FieldHQ), drone and satellite data collection, and AI-powered tree and carbon monitoring (TreeLens) — turning field data into transparent, verifiable impact, freely available to the conservation community.' }}
{{ $home['tech_tag_1'] ?? 'TreeLens' }}
{{ $home['tech_tag_2'] ?? 'Impact Dashboard' }}
{{ $home['tech_tag_3'] ?? 'FieldHQ' }}
{{ $home['tech_tag_4'] ?? 'Chutki AI' }}
@php
$projectsBgType = $home['projects_bg_type'] ?? (!empty($home['projects_bg_image']) ? 'image' : 'color');
$projectsBgStyle = '';
if ($projectsBgType === 'image' && !empty($home['projects_bg_image'])) {
$projectsBgStyle = "background-image: url('" . asset($home['projects_bg_image']) . "'); background-size: cover; background-position: center;";
} elseif (!empty($home['projects_bg_color'])) {
$projectsBgStyle = 'background-color: ' . $home['projects_bg_color'] . ';';
}
@endphp
{{ $home['projects_eyebrow'] ?? 'Our Work in Action' }}
{{ $home['projects_title'] ?? 'From degraded land to thriving agroforests' }}
{{ $home['projects_sub'] ?? 'See how our projects are transforming landscapes and livelihoods across India.' }}
@if(!empty($projects))
@else
Featured projects will appear here once added in admin.
@endif
@php
$fieldBgType = $home['field_bg_type'] ?? (!empty($home['field_bg_image']) ? 'image' : 'color');
$fieldBgStyle = '';
if ($fieldBgType === 'image' && !empty($home['field_bg_image'])) {
$fieldBgStyle = "background-image: url('" . asset($home['field_bg_image']) . "'); background-size: cover; background-position: center;";
} else {
$fieldBgStyle = 'background-color: ' . ($home['field_bg_color'] ?? '#fbfaf6') . ';';
}
@endphp
@if(!empty($connectedNews) && $connectedNews->isNotEmpty())
@php
$fieldItems = $connectedNews;
if ($connectedNews->count() < 8) {
$fieldItems = $connectedNews->concat($connectedNews);
}
@endphp
@endif
@endsection
@section('scripts')
@include('partials.programs-map-script')
@endsection