612 lines
18 KiB
HTML
612 lines
18 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Glass UI Elements</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 25%, #4a90e2 50%, #7bb3f0 75%, #a8d0f0 100%);
|
|
min-height: 100vh;
|
|
padding: 80px 20px 40px 20px;
|
|
position: relative;
|
|
}
|
|
|
|
body::before {
|
|
content: '';
|
|
position: fixed;
|
|
top: -50%;
|
|
left: -50%;
|
|
width: 200%;
|
|
height: 200%;
|
|
background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
|
|
radial-gradient(circle at 70% 80%, rgba(173,216,230,0.2) 0%, transparent 50%),
|
|
radial-gradient(circle at 20% 70%, rgba(135,206,235,0.15) 0%, transparent 50%);
|
|
animation: aurora 20s ease-in-out infinite;
|
|
pointer-events: none;
|
|
z-index: -1;
|
|
}
|
|
|
|
@keyframes aurora {
|
|
0%, 100% { transform: rotate(0deg) scale(1); }
|
|
33% { transform: rotate(120deg) scale(1.1); }
|
|
66% { transform: rotate(240deg) scale(0.9); }
|
|
}
|
|
|
|
.container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 30px;
|
|
padding: 20px;
|
|
}
|
|
|
|
.left-column {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 30px;
|
|
}
|
|
|
|
.right-column {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 30px;
|
|
}
|
|
|
|
.glass-panel {
|
|
background: rgba(255, 255, 255, 0.15);
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
border-radius: 8px;
|
|
padding: 25px;
|
|
box-shadow:
|
|
0 8px 32px rgba(0, 0, 0, 0.3),
|
|
inset 0 1px 0 rgba(255, 255, 255, 0.3);
|
|
position: relative;
|
|
overflow: visible;
|
|
}
|
|
|
|
.glass-panel::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 1px;
|
|
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
|
|
}
|
|
|
|
.form {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.form h2 {
|
|
color: #fff;
|
|
margin-bottom: 20px;
|
|
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
|
font-weight: 300;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 18px;
|
|
}
|
|
|
|
.form-group label {
|
|
display: block;
|
|
margin-bottom: 6px;
|
|
color: #fff;
|
|
font-size: 13px;
|
|
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
|
|
}
|
|
|
|
.form-group input,
|
|
.form-group select,
|
|
.form-group textarea {
|
|
width: 100%;
|
|
padding: 8px 12px;
|
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
border-radius: 4px;
|
|
background: rgba(255, 255, 255, 0.9);
|
|
font-size: 13px;
|
|
transition: all 0.3s ease;
|
|
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.form-group input:focus,
|
|
.form-group select:focus,
|
|
.form-group textarea:focus {
|
|
outline: none;
|
|
border-color: #4a90e2;
|
|
box-shadow:
|
|
inset 0 1px 3px rgba(0, 0, 0, 0.1),
|
|
0 0 8px rgba(74, 144, 226, 0.6);
|
|
}
|
|
|
|
.btn {
|
|
background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
|
|
border: 1px solid rgba(255, 255, 255, 0.4);
|
|
border-radius: 4px;
|
|
padding: 8px 16px;
|
|
color: #fff;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
|
|
box-shadow:
|
|
0 2px 4px rgba(0, 0, 0, 0.2),
|
|
inset 0 1px 0 rgba(255, 255, 255, 0.3);
|
|
margin: 5px;
|
|
}
|
|
|
|
.btn:hover {
|
|
background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.2) 100%);
|
|
box-shadow:
|
|
0 4px 8px rgba(0, 0, 0, 0.3),
|
|
inset 0 1px 0 rgba(255, 255, 255, 0.4);
|
|
}
|
|
|
|
.btn:active {
|
|
background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.3) 100%);
|
|
box-shadow:
|
|
inset 0 2px 4px rgba(0, 0, 0, 0.2),
|
|
0 1px 2px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.btn-primary {
|
|
background: linear-gradient(180deg, #5aa3f0 0%, #4a90e2 100%);
|
|
border: 1px solid #3a7bc8;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: linear-gradient(180deg, #6bb4ff 0%, #5aa3f0 100%);
|
|
}
|
|
|
|
.button-panel h3 {
|
|
color: #fff;
|
|
margin-bottom: 15px;
|
|
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
|
font-weight: 300;
|
|
}
|
|
|
|
.dropdown-container {
|
|
position: relative;
|
|
display: inline-block;
|
|
}
|
|
|
|
.dropdown-btn {
|
|
background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
|
|
border: 1px solid rgba(255, 255, 255, 0.4);
|
|
border-radius: 4px;
|
|
padding: 8px 16px;
|
|
color: #fff;
|
|
cursor: pointer;
|
|
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
|
|
box-shadow:
|
|
0 2px 4px rgba(0, 0, 0, 0.2),
|
|
inset 0 1px 0 rgba(255, 255, 255, 0.3);
|
|
transition: all 0.2s ease;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.dropdown-btn::after {
|
|
content: '▼';
|
|
font-size: 10px;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.dropdown-menu {
|
|
position: absolute;
|
|
top: 100%;
|
|
left: 0;
|
|
background: rgba(255, 255, 255, 0.95);
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
border-radius: 4px;
|
|
min-width: 150px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
|
z-index: 1000;
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
transform: translateY(-10px);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.dropdown-menu.show {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.dropdown-item {
|
|
padding: 10px 16px;
|
|
cursor: pointer;
|
|
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
transition: background 0.2s ease;
|
|
color: #333;
|
|
}
|
|
|
|
.dropdown-item:hover {
|
|
background: rgba(74, 144, 226, 0.1);
|
|
}
|
|
|
|
.dropdown-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.popup-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
backdrop-filter: blur(5px);
|
|
z-index: 10000;
|
|
display: none;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.popup-window {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
backdrop-filter: blur(15px);
|
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
border-radius: 8px;
|
|
width: 90%;
|
|
max-width: 400px;
|
|
box-shadow: 0 16px 64px rgba(0, 0, 0, 0.4);
|
|
animation: popupSlideIn 0.3s ease;
|
|
}
|
|
|
|
@keyframes popupSlideIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: scale(0.9) translateY(-20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: scale(1) translateY(0);
|
|
}
|
|
}
|
|
|
|
.popup-header {
|
|
background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
|
|
border-radius: 8px 8px 0 0;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.popup-title {
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
color: #333;
|
|
}
|
|
|
|
.popup-close {
|
|
background: none;
|
|
border: none;
|
|
font-size: 18px;
|
|
cursor: pointer;
|
|
color: #666;
|
|
padding: 0;
|
|
width: 24px;
|
|
height: 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 2px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.popup-close:hover {
|
|
background: rgba(255, 0, 0, 0.1);
|
|
color: #ff4444;
|
|
}
|
|
|
|
.popup-content {
|
|
padding: 20px;
|
|
color: #333;
|
|
}
|
|
|
|
.popup-actions {
|
|
padding: 16px;
|
|
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
|
display: flex;
|
|
gap: 8px;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.info-panel h3 {
|
|
color: #fff;
|
|
margin-bottom: 15px;
|
|
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
|
font-weight: 300;
|
|
}
|
|
|
|
.info-panel p {
|
|
color: rgba(255, 255, 255, 0.9);
|
|
line-height: 1.5;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.status-indicator {
|
|
display: inline-block;
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: #4CAF50;
|
|
margin-right: 8px;
|
|
box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
|
|
}
|
|
|
|
.demo-section {
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.demo-section h3 {
|
|
color: #fff;
|
|
margin-bottom: 15px;
|
|
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
|
font-weight: 300;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.container {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
.top-bar {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
background: rgba(255, 255, 255, 0.15);
|
|
backdrop-filter: blur(10px);
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
|
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
|
|
z-index: 1000;
|
|
padding: 0 20px;
|
|
height: 60px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.top-bar::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 1px;
|
|
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
|
|
}
|
|
|
|
.top-bar-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 20px;
|
|
}
|
|
|
|
.top-bar-logo {
|
|
color: #fff;
|
|
font-size: 18px;
|
|
font-weight: 300;
|
|
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
|
}
|
|
|
|
.top-bar-nav {
|
|
display: flex;
|
|
gap: 15px;
|
|
}
|
|
|
|
.top-bar-item {
|
|
color: rgba(255, 255, 255, 0.9);
|
|
text-decoration: none;
|
|
font-size: 14px;
|
|
padding: 8px 12px;
|
|
border-radius: 4px;
|
|
transition: all 0.2s ease;
|
|
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
|
|
}
|
|
|
|
.top-bar-item:hover {
|
|
background: rgba(255, 255, 255, 0.2);
|
|
color: #fff;
|
|
}
|
|
|
|
.top-bar-item.active {
|
|
background: rgba(255, 255, 255, 0.25);
|
|
color: #fff;
|
|
}
|
|
|
|
.top-bar-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 15px;
|
|
}
|
|
|
|
.top-bar-dropdown {
|
|
position: relative;
|
|
}
|
|
|
|
.top-bar-dropdown-btn {
|
|
background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
|
|
border: 1px solid rgba(255, 255, 255, 0.4);
|
|
border-radius: 4px;
|
|
padding: 6px 12px;
|
|
color: #fff;
|
|
cursor: pointer;
|
|
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
|
|
box-shadow:
|
|
0 2px 4px rgba(0, 0, 0, 0.2),
|
|
inset 0 1px 0 rgba(255, 255, 255, 0.3);
|
|
transition: all 0.2s ease;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.top-bar-dropdown-btn::after {
|
|
content: '▼';
|
|
font-size: 8px;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.top-bar-dropdown-menu {
|
|
position: absolute;
|
|
top: 100%;
|
|
right: 0;
|
|
background: rgba(255, 255, 255, 0.95);
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
border-radius: 4px;
|
|
min-width: 150px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
|
z-index: 1100;
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
transform: translateY(-10px);
|
|
transition: all 0.3s ease;
|
|
margin-top: 5px;
|
|
}
|
|
|
|
.top-bar-dropdown-menu.show {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.top-bar-dropdown-item {
|
|
padding: 10px 16px;
|
|
cursor: pointer;
|
|
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
transition: background 0.2s ease;
|
|
color: #333;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.top-bar-dropdown-item:hover {
|
|
background: rgba(74, 144, 226, 0.1);
|
|
}
|
|
|
|
.top-bar-dropdown-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.top-bar-nav {
|
|
display: none;
|
|
}
|
|
|
|
.top-bar-logo {
|
|
font-size: 16px;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="top-bar">
|
|
<div class="top-bar-left">
|
|
<div class="top-bar-logo">TopBar UI</div>
|
|
<nav class="top-bar-nav">
|
|
<a href="#" class="top-bar-item active">Dashboard</a>
|
|
<a href="#" class="top-bar-item">Home</a>
|
|
<a href="#" class="top-bar-item">Settings</a>
|
|
<a href="#" class="top-bar-item">Help</a>
|
|
</nav>
|
|
</div>
|
|
<div class="top-bar-right">
|
|
<div class="top-bar-dropdown">
|
|
<button class="top-bar-dropdown-btn" onclick="toggleTopBarDropdown()">
|
|
Menu
|
|
</button>
|
|
<div class="top-bar-dropdown-menu" id="topBarDropdownMenu">
|
|
<div class="top-bar-dropdown-item" onclick="selectTopBarItem('Profile')">Profile</div>
|
|
<div class="top-bar-dropdown-item" onclick="selectTopBarItem('Settings')">Settings</div>
|
|
<div class="top-bar-dropdown-item" onclick="selectTopBarItem('Logout')">Logout</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function toggleDropdown() {
|
|
const menu = document.getElementById('dropdownMenu');
|
|
menu.classList.toggle('show');
|
|
}
|
|
|
|
function selectItem(item) {
|
|
document.getElementById('selectedItem').textContent = item;
|
|
document.getElementById('dropdownMenu').classList.remove('show');
|
|
}
|
|
|
|
document.addEventListener('click', function(event) {
|
|
const dropdown = document.querySelector('.dropdown-container');
|
|
if (!dropdown.contains(event.target)) {
|
|
document.getElementById('dropdownMenu').classList.remove('show');
|
|
}
|
|
});
|
|
|
|
function toggleTopBarDropdown() {
|
|
const menu = document.getElementById('topBarDropdownMenu');
|
|
menu.classList.toggle('show');
|
|
}
|
|
|
|
function selectTopBarItem(item) {
|
|
console.log('Selected:', item);
|
|
document.getElementById('topBarDropdownMenu').classList.remove('show');
|
|
}
|
|
|
|
document.addEventListener('click', function(event) {
|
|
const topBarDropdown = document.querySelector('.top-bar-dropdown');
|
|
if (!topBarDropdown.contains(event.target)) {
|
|
document.getElementById('topBarDropdownMenu').classList.remove('show');
|
|
}
|
|
});
|
|
|
|
function showPopup() {
|
|
const overlay = document.getElementById('popupOverlay');
|
|
overlay.style.display = 'flex';
|
|
setTimeout(() => {
|
|
overlay.style.opacity = '1';
|
|
}, 10);
|
|
}
|
|
|
|
function hidePopup() {
|
|
const overlay = document.getElementById('popupOverlay');
|
|
overlay.style.opacity = '0';
|
|
setTimeout(() => {
|
|
overlay.style.display = 'none';
|
|
}, 300);
|
|
}
|
|
|
|
document.getElementById('popupOverlay').addEventListener('click', function(event) {
|
|
if (event.target === this) {
|
|
hidePopup();
|
|
}
|
|
});
|
|
|
|
document.addEventListener('keydown', function(event) {
|
|
if (event.key === 'Escape') {
|
|
hidePopup();
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |