Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Position Wiki TOC/Sidebar above/below content in mobile view #20975

Closed
tepozoa opened this issue Aug 27, 2022 · 1 comment · Fixed by #25460
Closed

Position Wiki TOC/Sidebar above/below content in mobile view #20975

tepozoa opened this issue Aug 27, 2022 · 1 comment · Fixed by #25460
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@tepozoa
Copy link

tepozoa commented Aug 27, 2022

Feature Description

(1.17.x+) The new auto-generated TOC is great, and the new mobile view looks fantastic. However, the side-by-side positioning of both the content view and the TOC / Sidebar view causes the TOC/Sidebar to be "really squished up and unreadable" (very narrow), and limits the content view as you scroll downwards.

Can we position the TOC and/or Sidebar above or below the content? (maybe TOC above, Sidebar below?)

Screenshots

This will vary by mobile device, visit this URL from your specific mobile:

@tepozoa tepozoa added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Aug 27, 2022
@tepozoa
Copy link
Author

tepozoa commented Aug 28, 2022

FWIW, I banged around in the Firefox Inspector and moved <div> tag for the TOC out of the nested content to above it, and the Sidebar div tag to be outside the nest below (like the Footer) and it seems to work fine (with a small few class updates to make the spacing look better). Didn't have to really do more than that, so with luck this is just a template logic reflow for if-mobile.

techknowlogick pushed a commit that referenced this issue Jun 23, 2023
Close #20976
Close #20975

1. Fix the bug: the TOC in footer was incorrectly rendered as main
content's TOC
2. Fix the layout: on mobile, the TOC is put above the main content,
while the sidebar is put below the main content
3. Auto collapse the TOC on mobile

ps: many styles of "wiki.css" are moved from old css files, so leave
nits to following PRs.
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Jun 23, 2023
Close go-gitea#20976
Close go-gitea#20975

1. Fix the bug: the TOC in footer was incorrectly rendered as main
content's TOC
2. Fix the layout: on mobile, the TOC is put above the main content,
while the sidebar is put below the main content
3. Auto collapse the TOC on mobile

ps: many styles of "wiki.css" are moved from old css files, so leave
nits to following PRs.
lunny pushed a commit that referenced this issue Jun 24, 2023
Backport #25460 by @wxiaoguang

Close #20976
Close #20975

1. Fix the bug: the TOC in footer was incorrectly rendered as main
content's TOC
2. Fix the layout: on mobile, the TOC is put above the main content,
while the sidebar is put below the main content
3. Auto collapse the TOC on mobile

ps: many styles of "wiki.css" are moved from old css files, so leave
nits to following PRs.

### for desktop


![image](https://github.com/go-gitea/gitea/assets/2114189/6c84201c-0648-465a-99e6-c53cdaee53c0)

### for mobile


![image](https://github.com/go-gitea/gitea/assets/2114189/9cb4fdfe-b6ab-4e6f-ae82-219ddb8fa27e)

### other changed pages

<details>


![image](https://github.com/go-gitea/gitea/assets/2114189/ef077736-2c3e-4e3d-82fe-d9bf1ebcca98)


![image](https://github.com/go-gitea/gitea/assets/2114189/bb528429-ad5f-4258-a5c4-05f997c624ea)

</details>

Co-authored-by: wxiaoguang <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant