The editors' meeting has been canceled for technical reasons.

MediaWiki:Vector.css: Difference between revisions

From Center of NeuroWiki
Jump to navigation Jump to search
Created page with "→‎All CSS here will be loaded for users of the Vector skin: →‎Ensure the content is responsive: body { margin: 0; padding: 0; } #content { width: auto; margin: 0 1em; } →‎Navigation bar adjustments: #p-personal ul, #p-navigation ul, #p-tb ul { display: flex; flex-wrap: wrap; justify-content: space-around; } →‎Adjust the sidebar for mobile screens: @media screen and (max-width: 600px) { #mw-panel { display: none; /* H..."
 
No edit summary
Line 1: Line 1:
/* All CSS here will be loaded for users of the Vector skin */
/* All CSS here will be loaded for users of the Vector skin */
/* Ensure the content is responsive */
  /* 基本响应式设置 */
body {
  @media (max-width: 768px) {
    margin: 0;
      /* 调整主要内容区域的宽度 */
    padding: 0;
      #content, .mw-body {
}
          width: 100%;
          padding: 10px;
      }


#content {
      /* 导航栏调整 */
    width: auto;
      #p-navigation, #p-tb, #p-personal, #p-cactions, #p-lang {
    margin: 0 1em;
          display: none; /* 隐藏不必要的侧边栏 */
}
      }


/* Navigation bar adjustments */
      /* 头部调整 */
#p-personal ul,
      #mw-head, #mw-head-bg {
#p-navigation ul,
          padding: 10px;
#p-tb ul {
      }
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}


/* Adjust the sidebar for mobile screens */
      /* 操作菜单折叠 */
@media screen and (max-width: 600px) {
      .vector-menu-content {
    #mw-panel {
          display: none; /* 初始隐藏菜单内容 */
        display: none; /* Hide sidebar on small screens */
      }
    }


    #content {
      /* 添加移动端菜单按钮 */
        margin: 0;
      #mobile-menu-toggle {
        padding: 0 10px;
          display: block;
    }
          position: absolute;
   
          top: 10px;
    #p-cactions {
          right: 10px;
        display: none; /* Hide actions like edit/view history on small screens */
          background-color: #f8f9fa;
    }
          border: 1px solid #ddd;
   
          padding: 5px 10px;
    .mw-body {
          cursor: pointer;
        padding: 0;
          z-index: 1000;
    }
      }
}
  }
 
  /* 欢迎移动端菜单按钮 */
  #mobile-menu-toggle {
      display: none;
  }
 
  /* 展开菜单 */
  .menu-open .vector-menu-content {
      display: block;
  }
 
  /* 样式调整 */
  @media (max-width: 768px) {
      /* 调整字体大小 */
      body {
          font-size: 16px;
      }
 
      /* 更改图片和表格的显示 */
      img, table {
          max-width: 100%;
          height: auto;
      }
  }

Revision as of 12:12, 25 October 2024

/* All CSS here will be loaded for users of the Vector skin */
  /* 基本响应式设置 */
   @media (max-width: 768px) {
       /* 调整主要内容区域的宽度 */
       #content, .mw-body {
           width: 100%;
           padding: 10px;
       }

       /* 导航栏调整 */
       #p-navigation, #p-tb, #p-personal, #p-cactions, #p-lang {
           display: none; /* 隐藏不必要的侧边栏 */
       }

       /* 头部调整 */
       #mw-head, #mw-head-bg {
           padding: 10px;
       }

       /* 操作菜单折叠 */
       .vector-menu-content {
           display: none; /* 初始隐藏菜单内容 */
       }

       /* 添加移动端菜单按钮 */
       #mobile-menu-toggle {
           display: block;
           position: absolute;
           top: 10px;
           right: 10px;
           background-color: #f8f9fa;
           border: 1px solid #ddd;
           padding: 5px 10px;
           cursor: pointer;
           z-index: 1000;
       }
   }

   /* 欢迎移动端菜单按钮 */
   #mobile-menu-toggle {
       display: none;
   }

   /* 展开菜单 */
   .menu-open .vector-menu-content {
       display: block;
   }

   /* 样式调整 */
   @media (max-width: 768px) {
       /* 调整字体大小 */
       body {
           font-size: 16px;
       }

       /* 更改图片和表格的显示 */
       img, table {
           max-width: 100%;
           height: auto;
       }
   }