Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

option to specify screen width at which point navbar is merged into sidebar

未關閉
#1,272 1 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 8 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
48/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
javascript
領域
frontend

研究方向

首先追蹤現有的 mergeNavbar 功能,以及視窗大小變更時更新 Docsify 應用程式的執行時路徑。檢查提議的 mergeNavbarAtWidth 選項應如何與目前的行動裝置閾值互動,然後驗證跨越設定寬度調整視窗大小時,navbar 是否會如預期合併和分離。

由索引模型根據 Issue 內容生成。

描述

Feature request

The existing mergeSidebar option is nifty: it allows you to merge the navbar into the sidebar for smaller screens, otherwise it won't look right.

However, the navbar can still look funky at certain sizes that are bigger than the mobile size (768px and up).

For example:

bad-navbar

What problem does this feature solve?

An option would prevent cases when the navbar doesn't fit well at the top, even if the screen width is bigger than mobile.

What does the proposed API look like?

A new option (maybe something like mergeNavbarAtWidth) would allow us to specify a width at which the navbar should be merged.

How should this be implemented in your opinion?

We need to update the mergeNavbar feature to operate at runtime any time the width of the Docsify app is updated, instead of only at the beginning. Then, we need to merge the navbar when the width is below the specified size in the mergeNavbarAtWidth option.

We need to make this operate on resizes because people may resize their window.

At the moment, the merging only happens once initially, but if we resize our window from desktop size to mobile size then the navbar will not be merged. In this video I shrink my window and the menu does not get merged:

no-merge

If you visit the site on your mobile phone (https://lume.io/docs), or do a refresh when your desktop browser window is on mobile size, then you will see the menu inside of the sidebar like the following:

mobile-menu

Are you willing to work on this yourself?
主要語言
JavaScript
星號
31.6k
分支
5.8k
平均合併
7 天 18 小時
30 天內合併 PR
9

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

docsifyjs/docsify 的其他 Issue

查看 docsifyjs/docsify 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。