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

[知乎美化] 调整宽度到1800px, 适配1080P屏幕 #11

Closed
SLKun opened this issue Dec 26, 2020 · 3 comments
Closed

[知乎美化] 调整宽度到1800px, 适配1080P屏幕 #11

SLKun opened this issue Dec 26, 2020 · 3 comments

Comments

@SLKun
Copy link

SLKun commented Dec 26, 2020

基本把能看到的页面都改了改, 改宽会变得奇怪的页面就没改了
因为是个体力活, 所以发一下希望后人能够省事
作者也可以考虑基于这个加一个自定义显示宽度的功能

侧栏的宽度保证原宽度(296px)不变只拉宽主内容, 顺便把私信的模态框也变大了

/*AppHeader*/
.AppHeader-inner,.TopstoryPageHeader,.ColumnPageHeader-content,.ColumnPageHeader-content,.ShelfTopNav-content-s2Ys3 {
  width: 1780px !important;
  max-width: 1780px !important;
}
/*SubHeader*/
.QuestionHeader-content,.QuestionHeader-footer-inner,.SearchTabs-inner,.ProfileHeader,.ClubHeaderInfo {
  width: 1800px !important;
}
/*Two Column*/
/*Content Container*/
.Topstory-container,.Question-main,.Search-container,.QuestionWaiting,.Profile-main,.QuestionLater,.DraftList,.Collections-container,.CollectionsDetailPage,.Balance-Layout,.Notifications-Layout,.ContentLayout,.PubIndex-book,.Club-container {
  width: 1800px !important;
}
/*Main Content (Side: 306px)*/
.Topstory-mainColumn,.Question-mainColumn,.SearchMain,.QuestionWaiting-mainColumn,.Profile-mainColumn,.QuestionLater-mainColumn,.DraftList-mainColumn,.Collections-mainColumn,.CollectionsDetailPage-mainColumn,.Balance-Main,.Notifications-Main,.ContentLayout-mainColumn,.PubIndex-book-main,.Club-mainColumn {
  width: 1494px !important;
}
/*One Column*/
.Community-ContentLayout-mainColumn,.ColumnDrafts-drafts,.Chat,.Modal--fullPage,.SettingsMain,.ClubHeaderInfo-container,.LiveDetailsPage-root-cX47U,.LiveFooter-wrapper-c3WFg,.App-root-LPTY,.App-root-xejbw,.App-root-fNRdG,.App-root-63J6a,.css-ssvpr2,.css-1xy3kyp,.css-1voxft1,.css-8txec3 {
  width: 1494px !important;
  max-width: 1494px !important;
}
/*Article*/
.TitleImage,.Post-NormalMain .Post-Header,.Post-NormalMain>div,.Post-NormalSub>div {
  width: 1494px !important;
}
.Post-SideActions {
  left: calc(50vw - 897px) !important;
}
/*Creator Center*/
.Creator{
  max-width: 1800px !important;
}
.Creator-mainColumn {
  flex: 1 1 1590px !important;
}
.css-7hb6gj {
  flex: 1 1 1284px !important;
}
/*Private Message*/
.ChatBox {
  min-height: 900px !important;
}
.ChatBoxModal {
  width: 900px !important;
}
/*Salt Content*/
.Directory-pc-oGvJ9 .Directory-directory-wnMb2 {
  left: calc(50% - 747px);
}
@XIU2
Copy link
Owner

XIU2 commented Dec 27, 2020

试了下,感觉有点太宽了。。。

还有一些地方没做好,比如:右侧间距、产生横向滚动条等。

我个人还是喜欢 1000px 的宽度,我也是 1080P,默认的 100% 缩放会看起来很小很费眼,所以我会针对不同网站去进行网页缩放,知乎是 130% ,缩放后网页所有内容就会等比例放大(当然不会模糊,反而会更清晰),看起来舒服多了。

@XIU2 XIU2 changed the title 调整宽度到1800px, 适配1080P屏幕 [知乎美化] 调整宽度到1800px, 适配1080P屏幕 Dec 27, 2020
@SLKun
Copy link
Author

SLKun commented Dec 28, 2020

我的意思是可以做成宽度可设置
除了私信框900px是凭感觉的以外, 其他都是保证侧边栏是原宽度计算出来的

1780px = 1800px - 20px
1494px = 1800px - 306px
897px = (1800px - 306px)/2  + 150px
1590px = 1800px - 210px
1284px = 1590px - 306px

最合适的其实是设计成@media响应式布局比较好, 这样也就没有横向滚动问题
至于右侧间距问题没太懂...

@XIU2
Copy link
Owner

XIU2 commented Dec 28, 2020

我看了下,是因为我的网页缩放是 130% 所以宽度超标,导致出现横向滚动条,右侧都跑到屏幕外边了。

至于自定义宽度,还要保证响应式布局,感觉有点麻烦。。。
最主要的是,个人感觉太宽还不如 1000px 的,我对当前宽度还是很满意的(我需要网页缩放来解决字体小的问题,所以如果太宽就会出问题),而且 [知乎美化] 这个脚本也没几个人用,因此没什么动力去折腾这些比较麻烦又不敢兴趣的功能。

如果以后我又感兴趣了,或者说还有其他人有这个需求,我再去折腾吧。

@XIU2 XIU2 closed this as completed Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants