www_projectmycelium_io/poc_threefold/static/css/menu.css

273 lines
4.9 KiB
CSS
Raw Normal View History

2024-11-08 15:31:50 +00:00
.tf_nav {
background: var(--body-background);
padding: 0.3rem;
position: sticky;
top: 0;
z-index: 1000;
box-shadow: 0 1px 4px #00000022;
color: var(--text-color);
font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.tf_nav_container {
display: flex;
align-items: center;
justify-content: space-between;
max-width: 1200px;
margin: 0 auto;
padding: 0 1rem;
height: 32px;
}
.tf_logo {
display: flex;
align-items: center;
gap: 0.5rem;
margin-right: 4rem;
height: 100%;
color: var(--text-color);
text-decoration: none;
font-size: 0.95rem;
}
.tf_logo svg {
width: 20px;
height: 20px;
}
.tf_menu {
display: flex;
align-items: center;
gap: 0.75rem;
list-style: none;
margin: 0;
padding: 0;
height: 100%;
margin-right: auto;
}
.tf_menu_item {
position: relative;
height: 100%;
display: flex;
align-items: center;
}
.tf_menu_link {
color: var(--text-color);
text-decoration: none;
padding: 0.3rem;
display: flex;
align-items: center;
height: 100%;
transition: color 0.2s;
font-size: 0.8rem;
font-weight: 450;
}
.tf_menu_link:hover {
color: var(--hover-color);
}
.tf_dropdown {
position: absolute;
top: 100%;
left: 0;
background: var(--body-background);
min-width: 150px;
border-radius: 4px;
box-shadow: 0 4px 12px #00000033;
opacity: 0;
visibility: hidden;
transform: translateY(-10px);
transition: all 0.3s;
}
.tf_menu_item:hover .tf_dropdown {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.tf_dropdown_item {
padding: 0.4rem 0.8rem;
color: var(--text-color);
text-decoration: none;
display: block;
transition: background-color 0.2s;
font-size: 0.6rem;
}
.tf_dropdown_item:hover {
background-color: #80808019;
}
.tf_right_controls {
display: flex;
align-items: center;
gap: 2rem;
margin-left: 2rem;
}
.tf_theme_toggle {
background: none;
border: 1px solid var(--text-color);
border-radius: 50%;
cursor: pointer;
padding: 0.3rem;
color: var(--text-color);
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
width: 28px;
height: 28px;
}
.tf_theme_toggle:hover {
background-color: #80808019;
transform: scale(1.05);
}
.theme-icon {
width: 14px;
height: 14px;
transition: all 0.2s;
}
.light-theme .theme-icon.light {
display: none;
}
.light-theme .theme-icon.dark {
display: block;
}
.theme-icon.light {
display: block;
}
.theme-icon.dark {
display: none;
}
.tf_login_btn {
background: transparent;
border: 1px solid var(--text-color);
color: var(--text-color);
padding: 0.25rem 1rem;
border-radius: 4px;
text-decoration: none;
transition: all 0.2s;
font-weight: 500;
font-size: 0.8125rem;
cursor: pointer;
}
.tf_login_btn:hover {
background: var(--text-color);
color: var(--body-background);
transform: translateY(-1px);
box-shadow: 0 2px 4px #0000001A;
}
.hamburger-menu {
display: none;
cursor: pointer;
border: none;
background: none;
padding: 0.5rem;
color: var(--text-color);
}
.hamburger-menu svg {
width: 24px;
height: 24px;
color: var(--text-color);
}
.mobile-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 999;
opacity: 0;
transition: opacity 0.3s ease;
}
.mobile-overlay.active {
display: block;
opacity: 1;
}
@media (max-width: 768px) {
.tf_menu {
display: none;
position: fixed;
top: 48px;
left: 0;
right: 0;
background: var(--body-background);
flex-direction: column;
align-items: stretch;
padding: 1rem;
height: auto;
box-shadow: 0 4px 12px #00000033;
z-index: 1000;
max-height: calc(100vh - 48px);
overflow-y: auto;
transform: translateY(-100%);
transition: transform 0.3s ease;
}
.tf_menu.active {
display: flex;
transform: translateY(0);
}
.tf_menu_item {
height: auto;
flex-direction: column;
align-items: stretch;
}
.tf_menu_link {
padding: 0.8rem;
font-size: 1rem;
}
.tf_dropdown {
position: static;
opacity: 1;
visibility: visible;
transform: none;
box-shadow: none;
background: transparent;
margin: 0;
padding-left: 1rem;
}
.tf_dropdown_item {
font-size: 0.9rem;
padding: 0.6rem 1rem;
}
.tf_logo {
margin-right: 0;
}
.hamburger-menu {
display: block;
order: -1;
}
.tf_right_controls {
margin-left: auto;
gap: 1rem;
}
}