UNPKG

hexo-theme-async

Version:

🎈 A simple, lightweight Hexo theme

122 lines (105 loc) • 2.14 kB
.trm-top-bar { position: fixed; left: 10px; right: 10px; z-index: 9; height: 80px; border-radius: var(--card-border-radius, 10px); box-shadow: var(--top-bar-box-shadow, 0 2px 4px 0 rgba(0, 0, 0, 0.15)); background-color: var(--theme-bg-color, #fcfcfe); &:after { content: ""; position: absolute; left: 30px; height: 8px; width: calc(100% - 60px); background-color: var(--theme-bg-color, #fcfcfe); border-radius: 0 0 5px 5px; opacity: 0.3; } .container { display: flex; justify-content: space-between; align-items: center; .trm-left-side { height: 100%; display: flex; align-items: center; justify-content: center; width: 33%; .trm-logo-frame { display: flex; align-items: center; height: 80px; .trm-logo-text { position: relative; font-weight: 900; font-size: 22px; color: var(--theme-color, #00283a); letter-spacing: 0; span { color: var(--primary, #afb42b); } } img { width: 32px; margin-right: 10px; } } } .trm-right-side { height: 100%; display: flex; align-items: center; width: 66%; justify-content: flex-end; } .trm-search-btn { cursor: pointer; } .trm-mode-switcher-place + .trm-search-btn { margin-left: 20px; } } @media (max-width: 1200px) { .trm-logo-text { display: none; } .container { .trm-left-side { justify-content: start; } .trm-right-side { border-radius: 0 0 10px 10px; padding: 0 0 40px; display: flex; flex-direction: column; background-color: var(--theme-bg-color, #fcfcfe); position: absolute; z-index: -1; top: 80px; left: 0; height: auto; width: 100%; opacity: 0; pointer-events: none; box-shadow: var(--top-bar-box-shadow, 0 2px 4px 0 rgba(0, 0, 0, 0.15)); transform: translateY(20px); .transition-mixin(); &.trm-active { opacity: 1; pointer-events: all; transform: translateY(0); } } } } @media (max-width: 992px) { border-radius: 0; width: 100%; } @media (max-width: 768px) { left: 0; right: 0; } }