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

refactor: adjust max content width #545

Merged
merged 5 commits into from
Apr 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/design/components/Layout/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
grid-template-columns: repeat(4, minmax(0, 1fr)) 246px;

&--alpha {
gap: 40px;
gap: 30px;

.bgm-layout__left {
grid-column: span 4 / span 4;
Expand Down
1 change: 1 addition & 0 deletions packages/design/theme/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@
@sm: 640px;
@md: 768px;
@lg: 1024px;
@max-width: 1260px;
3 changes: 2 additions & 1 deletion packages/website/src/components/Footer/style.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
}

.footerMain {
width: 1380px;
box-sizing: border-box;
width: @max-width;
height: 100%;
background-color: #f47a81; // Fallback background color
background-image: url('../../assets/footer-cover.png');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
.contentWrapper {
flex: 1 0 auto;
width: 100%;
max-width: 1440px;
max-width: @max-width;
margin: 0 auto;
padding: 24px 30px;
box-sizing: border-box;
Expand Down
4 changes: 1 addition & 3 deletions packages/website/src/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React, { useState } from 'react';
import { Link, useLocation } from 'react-router-dom';

import { Avatar, Button, Divider, Input, Menu } from '@bangumi/design';
import { Notification, Search as SearchIcon, Setting } from '@bangumi/icons';
import { Notification, Search as SearchIcon } from '@bangumi/icons';
import { UnreadableCodeError } from '@bangumi/utils';
import { useNotify } from '@bangumi/website/hooks/use-notify';

Expand Down Expand Up @@ -158,8 +158,6 @@ const Header: FC = () => {
>
<Notification />
</Link>

<Setting className={style.icon} />
<Avatar src={user.avatar.large} wrapperClass={style.avatar} />
</>
) : (
Expand Down
12 changes: 7 additions & 5 deletions packages/website/src/components/Header/style.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@
.justify-between();
.h-full();

max-width: 1440px;
box-sizing: border-box;
max-width: @max-width;
padding: 0 30px 0 24px;
margin: 0 auto;
}

.logo {
position: relative;
margin-left: 24px;
flex-shrink: 0;
width: 193px;
height: @header-height;
Expand Down Expand Up @@ -57,11 +58,11 @@
.nav {
display: flex;
align-items: center;
margin: 0 0 0 63px;
margin: 0 0 0 30px;

.divider {
display: inline-block;
margin: 0 35px;
margin: 0 27px;
height: 19px;
}

Expand All @@ -86,6 +87,7 @@
.flex();
.items-center();

// Todo: add `flex-gap-polyfill`
gap: 12px;
}

Expand Down Expand Up @@ -197,7 +199,7 @@
}

/* 临时的移动端适配 */
@media screen and (max-width: 1440px) {
@media screen and (max-width: @max-width) {
.avatar {
margin-right: 10px;
}
Expand Down