mirror of
https://github.com/typecho/typecho.git
synced 2025-04-21 02:01:52 +02:00
fix menu
This commit is contained in:
parent
c90c5a3b7a
commit
bfd67d5aaf
File diff suppressed because one or more lines are too long
@ -1,9 +1,9 @@
|
||||
<?php if (!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<header class="typecho-head-nav" role="navigation">
|
||||
<details class="menu-bar">
|
||||
<summary><?php _e('菜单'); ?></summary>
|
||||
</details>
|
||||
<nav>
|
||||
<details class="menu-bar">
|
||||
<summary><?php _e('菜单'); ?></summary>
|
||||
</details>
|
||||
<menu>
|
||||
<?php $menu->output(); ?>
|
||||
<li class="operate">
|
||||
|
@ -144,26 +144,40 @@ $color-nav-child-focus: #6DA1BB;
|
||||
.menu-bar {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: $color-nav-bg;
|
||||
z-index: 10;
|
||||
|
||||
summary {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&[open] ~ nav {
|
||||
display: block;
|
||||
&[open] {
|
||||
summary {
|
||||
border-bottom: $border-nav;
|
||||
}
|
||||
|
||||
& ~ menu {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nav {
|
||||
overflow-y: auto;
|
||||
max-height: calc(80vh - 36px);
|
||||
width: 100vw;
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
background: $color-nav-btn-hover;
|
||||
|
||||
&:has(.menu-bar[open]) {
|
||||
width: 70vw;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
& > menu {
|
||||
display: none;
|
||||
flex-flow: column;
|
||||
|
||||
& > li {
|
||||
@ -197,8 +211,7 @@ $color-nav-child-focus: #6DA1BB;
|
||||
border-width: 1px 0;
|
||||
display: flex;
|
||||
min-width: auto;
|
||||
max-width: 100vw;
|
||||
width: 100vw;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
&.operate {
|
||||
@ -216,7 +229,11 @@ $color-nav-child-focus: #6DA1BB;
|
||||
}
|
||||
|
||||
@include screen(phone, max) {
|
||||
body:has(.menu-bar[open]) {
|
||||
position: fixed;
|
||||
body {
|
||||
padding-top: 36px;
|
||||
|
||||
&:has(.menu-bar[open]) {
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user