Skip to content

Commit

Permalink
fix mobile styles incl Edit Profile button
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlanglen committed Nov 7, 2023
1 parent 4f193bf commit a950d51
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 14 deletions.
14 changes: 12 additions & 2 deletions apps/potlock/widget/Project/About.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ const Header = styled.div`
font-weight: 400;
`;

const HeaderContainer = styled.div`
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
gap: 24px;
`;

const DonationsInfo = () => (
<Widget
src={`${ownerId}/widget/Project.DonationsInfo`}
Expand Down Expand Up @@ -49,8 +57,10 @@ const Team = () => (

return (
<Container>
<Header>About {name}</Header>
<DonationsInfo />
<HeaderContainer>
<Header>About {name}</Header>
<DonationsInfo />
</HeaderContainer>
<About />
<Team />
</Container>
Expand Down
3 changes: 2 additions & 1 deletion apps/potlock/widget/Project/Actions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ const Container = styled.div`
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between';
justify-content: space-between;
width: 100%;
flex: 1;
@media screen and (max-width: 768px) {
flex-direction: column;
Expand Down
15 changes: 11 additions & 4 deletions apps/potlock/widget/Project/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const BodyContainer = styled.div`
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
gap: 48px;
gap: 16px;
@media screen and (max-width: 768px) {
max-width: 90vw;
Expand Down Expand Up @@ -48,7 +48,7 @@ const AccountInfoContainer = styled.div`
flex-direction: row;
align-items: center;
justify-content: flex-start;
margin-bottom: 32px;
margin-bottom: 16px;
`;

const AccountId = styled.div`
Expand Down Expand Up @@ -80,6 +80,13 @@ const ShareIconContainer = styled.svg`
}
`;

const Header = styled.div`
display: flex;
flex-direction: column;
// gap: 16px;
width: 100%;
`;

const ShareIcon = (
<ShareIconContainer>
<svg
Expand Down Expand Up @@ -112,7 +119,7 @@ const Actions = () => (

return (
<BodyContainer>
<div>
<Header>
<NameContainer>
<Name>{profile.name}</Name>
{props.projectId === context.accountId && (
Expand Down Expand Up @@ -145,7 +152,7 @@ return (
tags,
}}
/>
</div>
</Header>
<Actions />
<Widget
src={`${ownerId}/widget/Project.NavOptionsMobile`}
Expand Down
2 changes: 2 additions & 0 deletions apps/potlock/widget/Project/NavOptionsMobile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const NavOptionsContainer = styled.div`
overflow-x: auto;
white-space: nowrap;
-webkit-overflow-scrolling: touch; // For momentum scroll on iOS devices
border-bottom: 1px #dbdbdb solid;
margin-bottom: 16px;
@media screen and (max-width: 768px) {
display: flex;
Expand Down
14 changes: 12 additions & 2 deletions build/potlock/src/Project/About.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ const Header = styled.div`
font-weight: 400;
`;

const HeaderContainer = styled.div`
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
gap: 24px;
`;

const DonationsInfo = () => (
<Widget
src={`${ownerId}/widget/Project.DonationsInfo`}
Expand Down Expand Up @@ -49,8 +57,10 @@ const Team = () => (

return (
<Container>
<Header>About {name}</Header>
<DonationsInfo />
<HeaderContainer>
<Header>About {name}</Header>
<DonationsInfo />
</HeaderContainer>
<About />
<Team />
</Container>
Expand Down
3 changes: 2 additions & 1 deletion build/potlock/src/Project/Actions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ const Container = styled.div`
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between';
justify-content: space-between;
width: 100%;
flex: 1;
@media screen and (max-width: 768px) {
flex-direction: column;
Expand Down
15 changes: 11 additions & 4 deletions build/potlock/src/Project/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const BodyContainer = styled.div`
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
gap: 48px;
gap: 16px;
@media screen and (max-width: 768px) {
max-width: 90vw;
Expand Down Expand Up @@ -48,7 +48,7 @@ const AccountInfoContainer = styled.div`
flex-direction: row;
align-items: center;
justify-content: flex-start;
margin-bottom: 32px;
margin-bottom: 16px;
`;

const AccountId = styled.div`
Expand Down Expand Up @@ -80,6 +80,13 @@ const ShareIconContainer = styled.svg`
}
`;

const Header = styled.div`
display: flex;
flex-direction: column;
// gap: 16px;
width: 100%;
`;

const ShareIcon = (
<ShareIconContainer>
<svg
Expand Down Expand Up @@ -112,7 +119,7 @@ const Actions = () => (

return (
<BodyContainer>
<div>
<Header>
<NameContainer>
<Name>{profile.name}</Name>
{props.projectId === context.accountId && (
Expand Down Expand Up @@ -145,7 +152,7 @@ return (
tags,
}}
/>
</div>
</Header>
<Actions />
<Widget
src={`${ownerId}/widget/Project.NavOptionsMobile`}
Expand Down
2 changes: 2 additions & 0 deletions build/potlock/src/Project/NavOptionsMobile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const NavOptionsContainer = styled.div`
overflow-x: auto;
white-space: nowrap;
-webkit-overflow-scrolling: touch; // For momentum scroll on iOS devices
border-bottom: 1px #dbdbdb solid;
margin-bottom: 16px;
@media screen and (max-width: 768px) {
display: flex;
Expand Down

0 comments on commit a950d51

Please sign in to comment.