-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
145 lines (123 loc) · 4.81 KB
/
header.php
File metadata and controls
145 lines (123 loc) · 4.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Artado Devs</title>
<link rel="icon" type="image/x-icon" href="logo.png">
<script src="https://cdn.tailwindcss.com"></script>
<style>
/* Popup açılış animasyonu */
@keyframes popup-enter {
0% {
transform: scale(0.9) translateX(-20px);
opacity: 0;
}
100% {
transform: scale(1) translateX(0);
opacity: 1;
}
}
.popup-enter {
animation: popup-enter 0.3s ease-out forwards;
}
.popup-exit {
animation: fadeOut 0.3s ease-out forwards;
}
@keyframes fadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
/* Açık siyah arka plan ve ince beyaz detaylar */
.bg-light-black {
background-color: #000000; /* Daha açık siyah */
}
.border-white-light {
border-color: rgba(255, 255, 255, 0.4);
}
body.announcement-page header {
padding-left: 0;
padding-right: 0;
}
flex items-center space-x-4 {
margin-left: 0;
margin-right: 0;
padding: 1.5rem;
}
body.announcement-page header {
padding-left: 0;
padding-right: 0;
}
body.announcement-page .announcement {
margin-left: 0;
margin-right: 0;
padding: 1.5rem;
}
</style>
</head>
<body class="bg-light-black text-white">
<?php
require_once 'includes/database.php';
require_once 'includes/auth.php';
// Kullanıcı oturum kontrolü
$user_id = $_SESSION['user_id'] ?? null;
// Varsayılan profil fotoğrafı
$default_profile_photo = 'logo.png';
// Kullanıcı bilgilerini çek
if ($user_id) {
$stmt = $db->prepare("SELECT profile_photo FROM users WHERE id = :user_id");
$stmt->bindParam(':user_id', $user_id);
$stmt->execute();
$user = $stmt->fetch(PDO::FETCH_ASSOC);
require_once 'includes/functions.php';
// Header kök dizinde olduğu için $is_in_user_dir = false (varsayılan)
$profile_photo = get_user_avatar($user['profile_photo'] ?? null);
} else {
$profile_photo = $default_profile_photo;
}
?>
<!-- Açık siyah header -->
<header class="bg-light-black text-white shadow-lg border-b border-white-light">
<div class="container mx-auto px-6 py-4 flex justify-between items-center">
<!-- Logo -->
<div class="flex items-center space-x-4">
<img src="/public/logo.png" alt="Logo" class="w-10 h-10"> <span class="text-2xl font-bold tracking-wide">Artado Devs</span>
</div>
<!-- Navigation -->
<nav class="hidden md:flex space-x-8 text-lg font-medium">
<a href="./" class="hover:underline hover:text-gray-300 transition">Ana Sayfa</a>
<a href="https://forum.artado.xyz" class="hover:underline hover:text-gray-300 transition">Forum</a>
<a href="https://artado.xyz" class="hover:underline hover:text-gray-300 transition">Hizmetler</a>
<a href="mailto:arda@artadosearch.com" class="hover:underline hover:text-gray-300 transition">İletişim</a>
</nav>
<!-- Profil & Hamburger Menüsü -->
</div>
<!-- Mobil Menü -->
<nav id="mobile-menu" class="hidden md:hidden bg-light-black border-t border-white-light">
<ul class="flex flex-col items-center space-y-4 py-4">
<li><a href="./" class="hover:underline hover:text-gray-300 transition">Ana Sayfa</a></li>
<li><a href="https://forum.artado.xyz" class="hover:underline hover:text-gray-300 transition">Forum</a></li>
<li><a href="https://artado.xyz" class="hover:underline hover:text-gray-300 transition">Hizmetler</a></li>
<li><a href="mailto:arda@artadosearch.com" class="hover:underline hover:text-gray-300 transition">İletişim</a></li>
</ul>
</nav>
</header>
<script>
const menuToggle = document.getElementById('menu-toggle');
const mobileMenu = document.getElementById('mobile-menu');
const profilePhoto = document.getElementById('profile-photo');
const username = document.getElementById('username');
const profilePopup = document.getElementById('profile-popup');
const closePopup = document.getElementById('close-popup');
menuToggle.addEventListener('click', () => mobileMenu.classList.toggle('hidden'));
[profilePhoto, username].forEach(el => el.addEventListener('click', () => {
profilePopup.classList.remove('hidden');
}));
closePopup.addEventListener('click', () => profilePopup.classList.add('hidden'));
</script>
</body>
</html>