Files
dockersyshome/resources/views/contato.blade.php
T
marco 38295e7e88 feat(cms): implement complete SysSiteCMS content management system
Initial implementation of the HomeSysPanel CMS built with Laravel 13.0.
Includes complete admin panel, content management, user authentication,
modular architecture for products/services/chatbot, and marketing tools.

Key features:
- User authentication with email verification and password reset
- Role-based access control (Admin/User with granular permissions)
- Content management (pages, news, FAQ, downloads, galleries, banners)
- Contact management system with subjects and responses
- Marketing tools (email campaigns, visitor analytics, social sharing)
- Modular architecture (Products, Services, Chatbot modules)
- AI Chatbot integration with OpenRouter.ai and LlamaCpp support
- Visitor tracking with geolocation
- SEO optimization with meta tags and Open Graph
- Responsive design with Bootstrap 5
- Dark mode support
- Maintenance mode
- Feature request system
2026-09-07 19:06:53 -03:00

219 lines
13 KiB
PHP
Executable File

@extends('layouts.app')
@section('title', $page ? $page->title : 'Contato')
@section('meta_description', $page ? $page->meta_description : 'Entre em contato com a Syspanel.')
@section('meta_keywords', $page ? $page->meta_keywords : '')
@section('og_title', $page ? $page->og_title : '')
@section('og_description', $page ? $page->og_description : '')
@section('og_image', $page ? $page->og_image : '')
@section('canonical', $page ? $page->canonical_url : '')
@section('content')
<!-- Breadcrumb -->
<nav aria-label="breadcrumb" class="bg-light py-3 border-bottom mb-5 shadow-sm">
<div class="container">
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item"><a href="{{ route('home') }}" class="text-decoration-none">Início</a></li>
<li class="breadcrumb-item active" aria-current="page">Contato</li>
</ol>
</div>
</nav>
<section class="py-5 mb-5">
<div class="container">
<h2 class="display-4 fw-bold text-center mb-5 text-primary">Fale Conosco</h2>
<div class="row g-5">
<!-- Informações de Contato -->
<div class="col-lg-5 order-lg-2">
<div class="bg-primary text-white p-5 rounded-4 shadow-lg h-100">
<h3 class="fw-bold mb-4">Informações de Contato</h3>
<p class="mb-4">Entre em contato conosco para tirar dúvidas, solicitar orçamentos ou agendar uma visita técnica.</p>
<div class="d-flex align-items-center mb-4">
<i class="bi bi-geo-alt fs-2 me-4 text-light"></i>
<div>
<h5 class="fw-bold mb-0">Localização</h5>
<p class="mb-0">{{ $company->address ?? 'Endereço não informado' }}</p>
</div>
</div>
<div class="d-flex align-items-center mb-4">
<i class="bi bi-telephone fs-2 me-4 text-light"></i>
<div>
<h5 class="fw-bold mb-0">Telefone e WhatsApp</h5>
<p class="mb-0">{{ $company->phone ?? 'Não informado' }}</p>
</div>
</div>
<div class="d-flex align-items-center mb-4">
<i class="bi bi-envelope fs-2 me-4 text-light"></i>
<div>
<h5 class="fw-bold mb-0">E-mail</h5>
<p class="mb-0">{{ $company->email ?? 'Não informado' }}</p>
</div>
</div>
<div class="d-flex align-items-center">
<i class="bi bi-clock fs-2 me-4 text-light"></i>
<div>
<h5 class="fw-bold mb-0">Horário de Atendimento</h5>
<p class="mb-0 text-white-50">{{ $company->hours ?? 'Não informado' }}</p>
</div>
</div>
<hr class="my-5 border-light border-2 opacity-25">
<h5 class="fw-bold mb-4">Redes Sociais</h5>
<div class="d-flex gap-3 fs-3">
@if($company->facebook)
<a href="{{ $company->facebook }}" class="text-white text-decoration-none hover-scale" target="_blank"><i class="bi bi-facebook"></i></a>
@endif
@if($company->instagram)
<a href="{{ $company->instagram }}" class="text-white text-decoration-none hover-scale" target="_blank"><i class="bi bi-instagram"></i></a>
@endif
@if($company->linkedin)
<a href="{{ $company->linkedin }}" class="text-white text-decoration-none hover-scale" target="_blank"><i class="bi bi-linkedin"></i></a>
@endif
@if($company->phone)
<a href="https://wa.me/{{ preg_replace('/\D/', '', $company->phone) }}" class="text-white text-decoration-none hover-scale" target="_blank"><i class="bi bi-whatsapp"></i></a>
@endif
</div>
</div>
</div>
<!-- Formulário de Contato -->
<div class="col-lg-7 order-lg-1">
<div class="bg-white p-5 border border-light-subtle rounded-4 shadow-sm h-100">
<h3 class="fw-bold mb-4 text-dark">Envie uma Mensagem</h3>
@if(session('success'))
<div class="alert alert-success border-0 shadow-sm mb-4">
{{ session('success') }}
</div>
@endif
<form action="{{ route('contato.send') }}" method="POST">
@csrf
<div class="row g-3">
<div class="col-md-6">
<div class="form-floating mb-3">
<input type="text" name="name" class="form-control @error('name') is-invalid @enderror" id="name" value="{{ old('name') }}" placeholder="Seu Nome Completo" required>
<label for="name">Seu Nome</label>
@error('name') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
</div>
<div class="col-md-6">
<div class="form-floating mb-3">
<input type="email" name="email" class="form-control @error('email') is-invalid @enderror" id="email" value="{{ old('email') }}" placeholder="nome@exemplo.com" required>
<label for="email">Seu E-mail</label>
@error('email') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
</div>
<div class="col-md-6">
<div class="form-floating mb-3">
<input type="text" name="company" class="form-control @error('company') is-invalid @enderror" id="company" value="{{ old('company') }}" placeholder="Nome da Empresa">
<label for="company">Sua Empresa (Opcional)</label>
@error('company') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
</div>
<div class="col-md-6">
<div class="form-floating mb-3">
<input type="text" name="website" class="form-control @error('website') is-invalid @enderror" id="website" value="{{ old('website') }}" placeholder="https://exemplo.com">
<label for="website">Seu Site (Opcional)</label>
@error('website') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
</div>
<div class="col-md-6">
<div class="form-floating mb-3">
<input type="tel" name="whatsapp" class="form-control @error('whatsapp') is-invalid @enderror" id="whatsapp" value="{{ old('whatsapp') }}" placeholder="(11) 98765-4321">
<label for="whatsapp">Seu WhatsApp</label>
@error('whatsapp') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
</div>
<div class="col-md-6">
<div class="form-floating mb-3">
<select name="subject_id" class="form-select @error('subject_id') is-invalid @enderror" id="subject" required>
<option value="" disabled {{ old('subject_id') ? '' : 'selected' }}>Selecione um Assunto</option>
@foreach($subjects as $subject)
<option value="{{ $subject->id }}" {{ old('subject_id') == $subject->id ? 'selected' : '' }}>{{ $subject->name }}</option>
@endforeach
</select>
<label for="subject">Assunto</label>
@error('subject_id') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
</div>
<div class="col-12">
<div class="form-floating mb-4">
<textarea name="message" class="form-control @error('message') is-invalid @enderror" placeholder="Escreva sua mensagem aqui" id="message" style="height: 150px" required>{{ old('message') }}</textarea>
<label for="message">Sua Mensagem</label>
@error('message') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
</div>
<!-- Sistema de Captcha Simples -->
<div class="col-12 mb-4">
<div class="p-3 bg-light rounded-3 border">
<label class="form-label fw-bold mb-2">Verificação de Segurança</label>
<div class="d-flex align-items-center gap-3">
@php
$n1 = rand(1, 9);
$n2 = rand(1, 9);
session(['captcha_result' => $n1 + $n2]);
@endphp
<div class="bg-white px-3 py-2 rounded border fw-bold fs-5 shadow-sm text-primary" style="letter-spacing: 2px;">
{{ $n1 }} + {{ $n2 }} = ?
</div>
<div class="flex-grow-1">
<input type="number" name="captcha" class="form-control form-control-lg @error('captcha') is-invalid @enderror" placeholder="Resultado" required>
@error('captcha') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
</div>
<small class="text-muted mt-2 d-block">Por favor, resolva a conta acima para provar que você não é um robô.</small>
</div>
</div>
<div class="col-12">
<button type="submit" class="btn btn-primary btn-lg w-100 py-3 fw-bold shadow-sm rounded-pill">Enviar Mensagem</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
@php
$mapIframe = \App\Models\Setting::get('company_map_iframe');
// Sanitize iframe: only allow iframes from trusted domains
$allowedDomains = ['google.com', 'maps.google.com', 'www.google.com', 'openstreetmap.org', 'www.openstreetmap.org'];
$safeIframe = null;
if ($mapIframe && preg_match('/<iframe[^>]*src=["\']https?:\/\/([^"\']+)["\'][^>]*>/i', $mapIframe, $matches)) {
$iframeDomain = parse_url('https://' . $matches[1], PHP_URL_HOST);
$isTrusted = false;
foreach ($allowedDomains as $allowed) {
if (str_ends_with($iframeDomain, $allowed)) {
$isTrusted = true;
break;
}
}
if ($isTrusted) {
$safeIframe = $mapIframe;
}
}
@endphp
@if($safeIframe)
<section class="py-0 mb-5 border-top">
<div class="container-fluid p-0">
<div class="map-responsive">
{!! $safeIframe !!}
</div>
</div>
</section>
@endif
@endsection