34078-vm/index.php
Flatlogic Bot 3e970d5b6e v3
2025-09-17 16:03:10 +00:00

161 lines
8.0 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Interactive Loan Calculator</title>
<meta name="description" content="A simple, interactive loan calculator to estimate your monthly payments.">
<meta name="robots" content="index, follow">
<!-- Open Graph / Twitter -->
<meta property="og:title" content="Interactive Loan Calculator">
<meta property="og:description" content="Instantly calculate loan payments with this easy-to-use tool.">
<meta property="og:image" content="https://picsum.photos/seed/finance-hero/1200/630">
<meta property="og:url" content="[YOUR_APP_URL]">
<meta property="og:type" content="website">
<meta name="twitter:card" content="summary_large_image">
<!-- Bootstrap 5 CDN -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap" rel="stylesheet">
<!-- Custom CSS -->
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
<div class="container">
<a class="navbar-brand fw-bold" href="#">Calc.io</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#about">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#contact">Contact</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Hero Section -->
<header class="hero-section text-white text-center">
<div class="container">
<h1 class="display-4 fw-bold">Instant Loan Calculator</h1>
<p class="lead my-3">Estimate your monthly payments with our simple and fast calculator.</p>
<div class="calculator-widget shadow">
<div class="row g-4">
<!-- Inputs -->
<div class="col-lg-8">
<div class="mb-4">
<label for="loanAmount" class="form-label">Loan Amount: <span class="fw-bold" id="loanAmountLabel">$10,000</span></label>
<input type="range" class="form-range" id="loanAmount" min="1000" max="100000" step="1000" value="10000">
</div>
<div class="mb-4">
<label for="interestRate" class="form-label">Interest Rate: <span class="fw-bold" id="interestRateLabel">5%</span></label>
<input type="range" class="form-range" id="interestRate" min="0.1" max="20" step="0.1" value="5">
</div>
<div>
<label for="loanTerm" class="form-label">Loan Term: <span class="fw-bold" id="loanTermLabel">5 Years</span></label>
<input type="range" class="form-range" id="loanTerm" min="1" max="30" step="1" value="5">
</div>
</div>
<!-- Outputs -->
<div class="col-lg-4 results-panel">
<h5 class="mb-3">Your Results</h5>
<div class="result-item">
<small>Monthly Payment</small>
<h3 id="monthlyPayment" class="fw-bold">$0.00</h3>
</div>
<hr>
<div class="result-item">
<small>Total Interest</small>
<p id="totalInterest" class="mb-0 fw-light">$0.00</p>
</div>
<div class="result-item">
<small>Total Paid</small>
<p id="totalPaid" class="mb-0 fw-light">$0.00</p>
</div>
</div>
</div>
</div>
<?php
require_once 'php/functions.php';
$rates = getPolishInterestRates();
if ($rates) {
?>
<div class="interest-rates shadow-sm">
<h6 class="text-white">Current Polish Interest Rates (NBP)</h6>
<div class="rates-grid">
<?php foreach ($rates['series'] as $rate): ?>
<div class="rate-item">
<small class="rate-name"><?php echo htmlspecialchars($rate['description']); ?></small>
<p class="rate-value"><?php echo htmlspecialchars($rate['observations'][0]['value']); ?>%</p>
</div>
<?php endforeach; ?>
</div>
<small class="text-white-50">Effective Date: <?php echo htmlspecialchars($rates['series'][0]['observations'][0]['date']); ?></small>
</div>
<?php } ?>
</div>
</header>
<!-- About Section -->
<section id="about" class="py-5">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-6">
<h2 class="fw-bold">Simple & Transparent</h2>
<p class="text-muted">We believe financial tools should be easy to use and understand. Our calculator gives you a clear picture of your potential loan commitments without any hidden fees or complex jargon. Plan your future with confidence.</p>
</div>
<div class="col-lg-6 text-center">
<img src="https://picsum.photos/seed/about-us/500/400" class="img-fluid rounded shadow-sm" alt="A person using a laptop and a calculator, planning their finances.">
</div>
</div>
</div>
</section>
<!-- Contact Section -->
<section id="contact" class="py-5 bg-light">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-6 text-center">
<img src="https://picsum.photos/seed/contact-us/500/400" class="img-fluid rounded shadow-sm" alt="A modern desk with a keyboard, mouse, and a cup of coffee.">
</div>
<div class="col-lg-6">
<h2 class="fw-bold">Get in Touch</h2>
<p class="text-muted">Have questions or suggestions? We'd love to hear from you. A full contact form will be available soon. For now, feel free to reach out via our social channels.</p>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="py-4 bg-dark text-white text-center">
<div class="container">
<p class="mb-0">&copy; <?php echo date("Y"); ?> Calc.io. All Rights Reserved.</p>
</div>
</footer>
<!-- Bootstrap 5 JS Bundle -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
<!-- Custom JS -->
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
</body>
</html>