This commit is contained in:
Flatlogic Bot 2025-11-13 13:51:54 +00:00
parent 4552461d76
commit 9c72d549df
4 changed files with 183 additions and 38 deletions

View File

@ -26,6 +26,11 @@ body {
transform: scale(1.02); transform: scale(1.02);
} }
.qr-code-container {
text-align: center;
margin-bottom: 2rem;
}
.hero h1 { .hero h1 {
font-family: var(--font-family-headings); font-family: var(--font-family-headings);
font-weight: 700; font-weight: 700;

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

171
friends.php Normal file
View File

@ -0,0 +1,171 @@
<?php
require_once __DIR__ . '/db/config.php';
// Fetch attendees
$attendees = [];
$company_type_data = [];
$relation_data = [];
try {
$pdo = db();
$stmt = $pdo->query("SELECT name, company, occupation, relation, company_type, linkedin_url, created_at FROM attendees ORDER BY created_at DESC");
$attendees = $stmt->fetchAll(PDO::FETCH_ASSOC);
// Fetch data for charts
$company_type_stmt = $pdo->query("SELECT company_type, COUNT(*) as count FROM attendees WHERE company_type IS NOT NULL AND company_type != '' GROUP BY company_type");
$company_type_data = $company_type_stmt->fetchAll(PDO::FETCH_ASSOC);
$relation_stmt = $pdo->query("SELECT relation, COUNT(*) as count FROM attendees WHERE relation IS NOT NULL AND relation != '' GROUP BY relation");
$relation_data = $relation_stmt->fetchAll(PDO::FETCH_ASSOC);
} catch (PDOException $e) {
// Silently fail for now, or log error
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Friends List - Belarusians Worldwide</title>
<meta name="description" content="A friends list for the Belarusian Pavilion at Web Summit.">
<meta name="keywords" content="Belarusian Pavilion, Web Summit, Belarusians Worldwide, tech community, startups, networking, Belarusian founders, tech diaspora, Built with Flatlogic Generator">
<meta property="og:title" content="Belarusians Worldwide Friends">
<meta property="og:description" content="A friends list for the Belarusian Pavilion at Web Summit.">
<meta property="og:image" content="">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<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@700&family=Montserrat:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body>
<div class="container my-5">
<header class="hero text-center mb-5">
<h1>Our Friends & Associates</h1>
<p class="lead">A directory of the amazing people in the Belarusian tech community.</p>
<a href="index.php" class="btn btn-secondary">Back to Join the List</a>
</header>
<main>
<section class="charts-section mb-5">
<h2 class="text-center">Community Insights</h2>
<div class="row">
<div class="col-md-6">
<canvas id="companyTypeChart"></canvas>
</div>
<div class="col-md-6">
<canvas id="relationChart"></canvas>
</div>
</div>
</section>
<section class="list-section">
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead class="table-dark">
<tr>
<th>Name</th>
<th>Company / Startup</th>
<th>Occupation</th>
<th>Company Type</th>
<th>LinkedIn</th>
<th>Relation</th>
<th>Date Joined</th>
</tr>
</thead>
<tbody>
<?php if (empty($attendees)): ?>
<tr>
<td colspan="7" class="text-center">No friends yet. Be the first to join!</td>
</tr>
<?php else: ?>
<?php foreach ($attendees as $attendee): ?>
<tr>
<td><?php echo htmlspecialchars($attendee['name']); ?></td>
<td><?php echo htmlspecialchars($attendee['company']); ?></td>
<td><?php echo htmlspecialchars($attendee['occupation']); ?></td>
<td><?php echo htmlspecialchars($attendee['company_type']); ?></td>
<td><a href="<?php echo htmlspecialchars($attendee['linkedin_url']); ?>" target="_blank">View Profile</a></td>
<td><?php echo htmlspecialchars($attendee['relation']); ?></td>
<td><?php echo date('M d, Y', strtotime($attendee['created_at'])); ?></td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
</div>
</section>
</main>
<footer class="text-center text-muted mt-5">
<p>Built with ❤️ by the Belarusian Worldwide community.</p>
</footer>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
const companyTypeData = <?php echo json_encode($company_type_data); ?>;
const relationData = <?php echo json_encode($relation_data); ?>;
const generateChart = (ctx, label, data, dataLabel, chartType) => {
const labels = data.map(item => item[dataLabel]);
const values = data.map(item => item.count);
new Chart(ctx, {
type: chartType,
data: {
labels: labels,
datasets: [{
label: label,
data: values,
backgroundColor: [
'rgba(255, 99, 132, 0.7)',
'rgba(54, 162, 235, 0.7)',
'rgba(255, 206, 86, 0.7)',
'rgba(75, 192, 192, 0.7)',
'rgba(153, 102, 255, 0.7)',
'rgba(255, 159, 64, 0.7)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
}]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'top',
},
title: {
display: true,
text: label
}
}
}
});
};
const companyTypeCtx = document.getElementById('companyTypeChart').getContext('2d');
generateChart(companyTypeCtx, 'Users by Company Type', companyTypeData, 'company_type', 'pie');
const relationCtx = document.getElementById('relationChart').getContext('2d');
generateChart(relationCtx, 'Users by Relation', relationData, 'relation', 'pie');
});
</script>
</body>
</html>

View File

@ -37,6 +37,10 @@ try {
<div class="container my-5"> <div class="container my-5">
<header class="hero text-center mb-5"> <header class="hero text-center mb-5">
<div class="qr-code-container">
<h2>Join Now</h2>
<img src="assets/pasted-20251113-135132-33815403.png" alt="QR Code for joining" class="img-fluid">
</div>
<h1>Belarusians Worldwide Friends</h1> <h1>Belarusians Worldwide Friends</h1>
<p class="lead">A welcoming corner at Web Summit where Belarusian founders, engineers, investors, creatives, and ecosystem builders meet, share, and show that we keep building - wherever we are.</p> <p class="lead">A welcoming corner at Web Summit where Belarusian founders, engineers, investors, creatives, and ecosystem builders meet, share, and show that we keep building - wherever we are.</p>
</header> </header>
@ -92,44 +96,9 @@ try {
<button type="submit" class="btn btn-primary btn-lg">Join the List</button> <button type="submit" class="btn btn-primary btn-lg">Join the List</button>
</form> </form>
</section> </section>
<div class="text-center mt-4">
<section class="list-section"> <a href="friends.php" class="btn btn-secondary">View the Friends List</a>
<h2>Our Friends & Associates</h2>
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead class="table-dark">
<tr>
<th>Name</th>
<th>Company / Startup</th>
<th>Occupation</th>
<th>Company Type</th>
<th>LinkedIn</th>
<th>Relation</th>
<th>Date Joined</th>
</tr>
</thead>
<tbody>
<?php if (empty($attendees)): ?>
<tr>
<td colspan="5" class="text-center">Be the first to join the list!</td>
</tr>
<?php else: ?>
<?php foreach ($attendees as $attendee): ?>
<tr>
<td><?php echo htmlspecialchars($attendee['name']); ?></td>
<td><?php echo htmlspecialchars($attendee['company']); ?></td>
<td><?php echo htmlspecialchars($attendee['occupation']); ?></td>
<td><?php echo htmlspecialchars($attendee['company_type']); ?></td>
<td><a href="<?php echo htmlspecialchars($attendee['linkedin_url']); ?>" target="_blank">View Profile</a></td>
<td><?php echo htmlspecialchars($attendee['relation']); ?></td>
<td><?php echo date('M d, Y', strtotime($attendee['created_at'])); ?></td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
</div> </div>
</section>
</main> </main>
<footer class="text-center text-muted mt-5"> <footer class="text-center text-muted mt-5">