Retro Friends Sidebar - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Retro Friends Sidebar</title> <style> body { margin: 0; font-family: 'Courier New', monospace; background: #f3f3f3; } .sidebar { position: fixed; left: 0; top: 0; height: 100%; width: 260px; background: #ff6347; color: #fff; transition: transform 0.3s ease-in-out; transform: translateX(-100%); } .sidebar.active { transform: translateX(0); } .sidebar-header { padding: 20px; background: #ff4500; text-align: center; font-size: 24px; font-weight: bold; } .sidebar-header .toggle-btn { position: absolute; right: 20px; top: 20px; cursor: pointer; } .sidebar-header .toggle-btn span { font-size: 18px; } .friends-list { padding: 20px; } .friend { display: flex; align-items: center; margin-bottom: 15px; padding: 10px; border-radius: 5px; background: #ff7f50; transition: background 0.3s; } .friend:hover { background: #ff8c69; } .friend img { width: 50px; height: 50px; border-radius: 50%; margin-right: 15px; } .friend-info { flex: 1; } .friend-info h4 { margin: 0; font-size: 18px; } .friend-info p { margin: 5px 0 0; font-size: 14px; } .open-sidebar { position: absolute; left: 0; top: 50%; transform: translateY(-50%); cursor: pointer; padding: 10px; background: #ff6347; color: #fff; border-radius: 0 5px 5px 0; transition: background 0.3s; } .open-sidebar:hover { background: #ff4500; } </style> </head> <body> <div class="open-sidebar" id="open-sidebar"> <span>☰ Friends</span> </div> <div class="sidebar" id="sidebar"> <div class="sidebar-header"> Friends <div class="toggle-btn" id="toggle-btn"> <span>✕</span> </div> </div> <div class="friends-list"> <div class="friend"> <img src="https://via.placeholder.com/50" alt="Friend 1"> <div class="friend-info"> <h4>John Doe</h4> <p>Online</p> </div> </div> <div class="friend"> <img src="https://via.placeholder.com/50" alt="Friend 2"> <div class="friend-info"> <h4>Jane Smith</h4> <p>Offline</p> </div> </div> <!-- Add more friends here --> </div> </div> <script> document.getElementById('open-sidebar').addEventListener('click', function() { document.getElementById('sidebar').classList.add('active'); }); document.getElementById('sidebar').addEventListener('click', function() { document.getElementById('sidebar').classList.remove('active'); }); </script> </body> </html>