mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update sidebar styles in mobile view (#285)
* 添加移动端点击自动关闭侧边栏 * 添加移动端点击自动关闭侧边栏 * 添加移动端点击自动关闭侧边栏 * move closeSidebar function to utils * move closeSidebar function to utils * 侧边栏优化 * 移动端侧边栏优化 * 移动端侧边栏优化 * 移动端侧边栏优化
This commit is contained in:
@ -134,3 +134,10 @@ export const parseHTMLToRawText = (htmlStr: string): string => {
|
||||
const text = tempEl.innerText;
|
||||
return text;
|
||||
};
|
||||
|
||||
export function closeSidebar() {
|
||||
const sidebarEl = document.body.querySelector(".sidebar-wrapper") as HTMLDivElement;
|
||||
const maskEl = document.body.querySelector(".mask") as HTMLDivElement;
|
||||
sidebarEl.classList.replace("open-sidebar", "close-sidebar");
|
||||
maskEl.classList.replace("show-mask", "hide-mask");
|
||||
}
|
||||
|
Reference in New Issue
Block a user