-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
213 lines (192 loc) · 15.6 KB
/
Copy pathindex.html
File metadata and controls
213 lines (192 loc) · 15.6 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hafitz P. H. A. S.</title>
<meta property="og:title" content="Hafitz | Official Link & Blog">
<meta property="og:site_name" content="Hafitz">
<meta property="og:description" content="Let's connect! Tap here to find all my Social Media profiles.">
<meta property="og:type" content="profile">
<meta property="og:image" content="https://raw.githubusercontent.com/breakdowns/website/refs/heads/master/images/me.jpg">
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css">
<style>
.bg-discord-dark { background-color: #202225; }
.bg-discord-sidebar { background-color: #2f3136; }
.bg-discord-main { background-color: #36393f; }
.bg-discord-blurple { background-color: #5865F2; }
.text-discord-muted { color: #b9bbbe; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
@keyframes fadeInSlide {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeInSlide 0.25s ease-out forwards; }
</style>
<script src="./data/gaming.js"></script>
<script src="./data/music.js"></script>
<script src="./data/coding.js"></script>
</head>
<body class="bg-discord-dark text-white font-sans flex flex-col md:flex-row min-h-screen w-full overflow-x-hidden select-none">
<div class="hidden md:flex w-60 bg-discord-sidebar flex-col justify-between flex-shrink-0 border-r border-zinc-800 min-h-screen sticky top-0">
<div>
<div class="h-12 border-b border-zinc-800 flex items-center px-4 font-bold shadow-sm text-sm uppercase tracking-wider truncate">🌐 Breakdowns Blog</div>
<div class="p-2 space-y-1">
<p class="text-xs font-semibold text-discord-muted px-2 uppercase tracking-wider">Info & Links</p>
<button onclick="switchRoom('welcome-links')" id="btn-welcome-links" class="w-full flex items-center gap-2 px-2 py-1.5 rounded text-sm font-medium transition-colors text-left bg-zinc-700 text-white">
<span class="text-xl text-discord-muted">#</span> welcome-links
</button>
<p class="text-xs font-semibold text-discord-muted px-2 uppercase tracking-wider mt-4">Blog Categories</p>
<button onclick="switchRoom('gaming')" id="btn-gaming" class="w-full flex items-center gap-2 px-2 py-1.5 rounded text-sm font-medium transition-colors text-left text-discord-muted hover:bg-zinc-700/50 hover:text-white"><span class="text-xl">#</span> gaming</button>
<button onclick="switchRoom('music')" id="btn-music" class="w-full flex items-center gap-2 px-2 py-1.5 rounded text-sm font-medium transition-colors text-left text-discord-muted hover:bg-zinc-700/50 hover:text-white"><span class="text-xl">#</span> music</button>
<button onclick="switchRoom('coding')" id="btn-coding" class="w-full flex items-center gap-2 px-2 py-1.5 rounded text-sm font-medium transition-colors text-left text-discord-muted hover:bg-zinc-700/50 hover:text-white"><span class="text-xl">#</span> coding</button>
</div>
</div>
<div class="p-2 bg-[#292b2f] flex items-center justify-between">
<div class="flex items-center gap-2">
<div class="relative">
<img src="https://raw.githubusercontent.com/breakdowns/website/refs/heads/master/images/me.jpg" class="w-8 h-8 rounded-full object-cover">
<div class="absolute bottom-0 right-0 w-2.5 h-2.5 bg-green-500 rounded-full border-2 border-[#292b2f]"></div>
</div>
<div><p class="text-xs font-bold leading-tight">hafitz</p><p class="text-[10px] text-discord-muted leading-none">#0001</p></div>
</div>
</div>
</div>
<div class="block md:hidden bg-discord-dark p-3 border-b border-zinc-800 w-full flex-shrink-0 sticky top-0 z-50">
<div class="flex items-center gap-2 mb-2"><span class="text-sm font-bold tracking-wide">🎮 Breakdowns Room</span></div>
<div class="w-full overflow-x-scroll no-scrollbar touch-pan-x">
<div class="flex flex-nowrap gap-2 pb-1 w-max">
<button onclick="switchRoom('welcome-links')" id="mbtn-welcome-links" class="text-xs font-medium px-3 py-1.5 rounded-md whitespace-nowrap bg-discord-blurple text-white"># welcome-links</button>
<button onclick="switchRoom('gaming')" id="mbtn-gaming" class="text-xs font-medium px-3 py-1.5 rounded-md whitespace-nowrap bg-[#2f3136] text-discord-muted hover:text-white"># gaming</button>
<button onclick="switchRoom('music')" id="mbtn-music" class="text-xs font-medium px-3 py-1.5 rounded-md whitespace-nowrap bg-[#2f3136] text-discord-muted hover:text-white"># music</button>
<button onclick="switchRoom('coding')" id="mbtn-coding" class="text-xs font-medium px-3 py-1.5 rounded-md whitespace-nowrap bg-[#2f3136] text-discord-muted hover:text-white"># coding</button>
</div>
</div>
</div>
<div class="flex-1 bg-discord-main flex flex-col min-w-0 min-h-screen">
<div class="hidden md:flex h-12 border-b border-zinc-800 items-center px-4 shadow-sm text-sm font-bold gap-2 flex-shrink-0">
<span class="text-xl text-discord-muted">#</span> <span id="room-header-title">welcome-links</span>
<span class="text-xs font-normal text-discord-muted border-l border-zinc-700 pl-2" id="room-header-desc">Social media directory for Breakdowns Blog</span>
</div>
<div class="p-6 space-y-6 flex-1 overflow-y-auto w-full max-w-5xl mx-auto pb-24 md:pb-12 no-scrollbar">
<div id="welcome-links-view" class="space-y-6 w-full">
<div class="pt-6 pb-2">
<div class="w-16 h-16 bg-zinc-700 rounded-full flex items-center justify-center mb-4 shadow-md">
<i class="fa-solid fa-book-open text-3xl text-white"></i>
</div>
<h1 class="text-3xl font-extrabold tracking-wide text-white">Selamat datang di #welcome-links!</h1>
<p class="text-sm text-discord-muted mt-1">Ini adalah awal mula dari direktori link sosial media resmi Hafitz P. H. A. S.</p>
</div>
<div class="border-b border-zinc-700/50 pb-5 flex items-center gap-4 w-full">
<img src="https://raw.githubusercontent.com/breakdowns/website/refs/heads/master/images/me.jpg" class="w-14 h-14 rounded-full object-cover border border-zinc-600 shadow-lg">
<div>
<span class="text-xl font-bold text-white block">Hafitz P. H. A. S.</span>
<p class="text-xs text-discord-muted">| Tempat nongkrong & link sosmed resmi.</p>
</div>
</div>
<div id="sosmed-container" class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-x-4.5 row-gap-5 w-full"></div>
</div>
<div id="blog-posts-view" class="hidden space-y-6 w-full"></div>
</div>
</div>
<script>
const descriptions = { 'welcome-links': 'Social media directory for Breakdowns Blog', 'gaming': 'Tempat ulasan jujur seputar game.', 'music': 'Jamming session & track harian.', 'coding': 'Catatan development & update tech log.' };
const sosmedList = [
{ name: "Instagram", user: "@hftzphas", url: "https://www.instagram.com/hftzphas", icon: "fa-brands fa-instagram", bg: "bg-pink-600/20 text-pink-500" },
{ name: "X / Twitter", user: "@hftzphas", url: "https://x.com/hftzphas", icon: "fa-brands fa-x-twitter", bg: "bg-zinc-700/40 text-zinc-300" },
{ name: "GitHub", user: "@breakdowns", url: "https://github.com/breakdowns", icon: "fa-brands fa-github", bg: "bg-zinc-900/40 text-zinc-300" },
{ name: "Discord", user: "View Profile", url: "https://discord.com/users/455173359924412434", icon: "fa-brands fa-discord", bg: "bg-indigo-600/20 text-indigo-400" },
{ name: "Telegram", user: "@hafitzXD", url: "https://t.me/hafitzXD", icon: "fa-brands fa-telegram", bg: "bg-blue-500/20 text-blue-400" },
{ name: "YouTube", user: "@hafitz", url: "https://youtube.com/@hafitz", icon: "fa-brands fa-youtube", bg: "bg-red-600/20 text-red-500" },
{ name: "TikTok", user: "@hftzphas", url: "https://www.tiktok.com/@hftzphas", icon: "fa-brands fa-tiktok", bg: "bg-zinc-800 text-white" },
{ name: "Threads", user: "@hftzphas", url: "https://www.threads.net/@hftzphas", icon: "fa-brands fa-threads", bg: "bg-zinc-700/50 text-white" },
{ name: "Facebook", user: "hftzphas", url: "https://www.facebook.com/hftzphas", icon: "fa-brands fa-facebook", bg: "bg-blue-600/20 text-blue-500" },
{ name: "Spotify", user: "Music Playlist", url: "https://open.spotify.com/user/7wxw9ydcqjc4ta495h73jpcjf", icon: "fa-brands fa-spotify", bg: "bg-green-500/20 text-green-400" },
{ name: "Reddit", user: "u/hftzphas", url: "https://reddit.com/u/hftzphas", icon: "fa-brands fa-reddit", bg: "bg-orange-600/20 text-orange-500" },
{ name: "Mastodon", user: "@hftzphas", url: "https://mastodon.social/@hftzphas", icon: "fa-brands fa-mastodon", bg: "bg-purple-600/20 text-purple-400" }
];
document.getElementById('sosmed-container').innerHTML = sosmedList.map(s => `
<div class="bg-[#2f3136] rounded-md border border-zinc-700/50 p-4 min-h-[76px] flex justify-between items-center hover:border-discord-blurple hover:bg-[#393c43] transform hover:-translate-y-0.5 transition-all duration-200 gap-3 w-full">
<div class="flex items-center gap-3.5 min-w-0">
<div class="w-10 h-10 ${s.bg} rounded flex items-center justify-center text-xl flex-shrink-0"><i class="${s.icon}"></i></div>
<div class="min-w-0"><h3 class="font-bold text-sm text-white truncate">${s.name}</h3><p class="text-xs text-discord-muted truncate mt-0.5">${s.user}</p></div>
</div>
<a href="${s.url}" target="_blank" class="bg-discord-blurple hover:bg-[#4752C4] text-xs font-bold px-4 py-2 rounded transition-colors flex-shrink-0 shadow-sm">Open</a>
</div>
`).join('');
function switchRoom(roomName) {
document.getElementById('room-header-title').innerText = roomName;
document.getElementById('room-header-desc').innerText = descriptions[roomName] || '';
const menus = ['welcome-links', 'gaming', 'music', 'coding'];
menus.forEach(m => {
const dBtn = document.getElementById(`btn-${m}`);
const mBtn = document.getElementById(`mbtn-${m}`);
if(m === roomName) {
if(dBtn) dBtn.className = "w-full flex items-center gap-2 px-2 py-1.5 rounded text-sm font-medium transition-colors text-left bg-zinc-700 text-white";
if(mBtn) mBtn.className = "text-xs font-medium px-3 py-1.5 rounded-md whitespace-nowrap bg-discord-blurple text-white";
} else {
if(dBtn) dBtn.className = "w-full flex items-center gap-2 px-2 py-1.5 rounded text-sm font-medium transition-colors text-left text-discord-muted hover:bg-zinc-700/50 hover:text-white";
if(mBtn) mBtn.className = "text-xs font-medium px-3 py-1.5 rounded-md whitespace-nowrap bg-[#2f3136] text-discord-muted hover:text-white";
}
});
const sosmedView = document.getElementById('welcome-links-view');
const blogView = document.getElementById('blog-posts-view');
blogView.classList.remove('animate-fade-in');
sosmedView.classList.remove('animate-fade-in');
void blogView.offsetWidth; void sosmedView.offsetWidth;
if (roomName === 'welcome-links') {
sosmedView.classList.remove('hidden');
blogView.classList.add('hidden');
sosmedView.classList.add('animate-fade-in');
} else {
sosmedView.classList.add('hidden');
blogView.classList.remove('hidden');
blogView.classList.add('animate-fade-in');
let posts = [];
if(roomName === 'gaming') posts = window.dataGaming || [];
if(roomName === 'music') posts = window.dataMusic || [];
if(roomName === 'coding') posts = window.dataCoding || [];
let htmlContent = `
<div class="border-b border-zinc-700/50 pb-4 w-full">
<div class="w-12 h-12 bg-zinc-700 rounded-full flex items-center justify-center mb-2"><i class="fa-solid fa-hashtag text-2xl text-white"></i></div>
<h1 class="text-2xl font-bold">Selamat datang di #${roomName}!</h1>
<p class="text-sm text-discord-muted">Ini adalah awal mula dari channel #${roomName}.</p>
</div>
`;
posts.forEach(post => {
htmlContent += `
<div class="flex gap-3 items-start hover:bg-zinc-800/20 p-2 rounded transition-colors w-full">
<img src="https://raw.githubusercontent.com/breakdowns/website/refs/heads/master/images/me.jpg" class="w-10 h-10 rounded-full object-cover flex-shrink-0">
<div class="w-full min-w-0">
<div class="flex items-baseline gap-2">
<span class="font-bold text-sm text-white hover:underline cursor-pointer">hafitz</span>
<span class="text-[10px] text-discord-muted font-normal">#0001</span>
<span class="text-[10px] text-discord-muted font-normal">${post.timestamp}</span>
</div>
<div class="text-sm text-zinc-200 mt-1 space-y-2 w-full">
${post.title ? `<p class="font-semibold text-discord-blurple text-base">${post.title}</p>` : ''}
<p>${post.content}</p>
${post.spotifyEmbed ? `
<div class="mt-3 max-w-2xl w-full rounded-xl overflow-hidden shadow-2xl border border-zinc-700/40">
<iframe src="${post.spotifyEmbed}" width="100%" height="380" frameBorder="0" allowfullscreen="" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe>
</div>
` : ''}
</div>
<div class="flex items-center gap-1 mt-2">
<div class="bg-[#2f3136] hover:bg-zinc-600 px-2 py-1 rounded text-xs flex items-center gap-1.5 cursor-pointer border border-zinc-700/50 select-none">
<span>${post.emoji}</span> <span class="text-discord-muted font-bold text-[11px]">${post.reactions}</span>
</div>
</div>
</div>
</div>
`;
});
blogView.innerHTML = htmlContent;
}
document.querySelector('.overflow-y-auto').scrollTop = 0;
}
</script>
</body>
</html>