feat: basic support in mobile mode. including:

navbar show and hide,
similar fade animation,
auto close when select new convo,
mobile title will change with convo,
new chat button.
This commit is contained in:
Wentao Lyu 2023-03-12 00:32:03 +08:00
parent fb9f77ae5e
commit 070fee2ece
5 changed files with 160 additions and 33 deletions

55
client/src/mobile.css Normal file
View file

@ -0,0 +1,55 @@
.nav-mask {
position: fixed;
z-index: 998;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: rgba(86, 88, 105, .75);
padding-left: 420px;
padding-top: 12px;
opacity: 0;
transition: all .5s;
pointer-events: none;
}
.nav {
transition: all .5s;
}
.nav-close-button {
display: none;
}
@media (max-width: 767px) {
.nav-close-button {
display: block;
position: absolute;
left: 100%;
top: 12px;
margin-left: 20px;
}
.nav {
position: fixed;
z-index: 999;
left: calc(-100%);;
top: 0;
bottom: 0;
max-width: 400px;
width: calc(100% - 60px);
opacity: 0;
}
.nav.active {
left: 0;
opacity: 1;
}
.nav-mask.active {
opacity: 1;
pointer-events: auto;
}
}