Skip to content

Commit

Permalink
Merge pull request #1109 from nextstrain/fix-login-button-on-mobile-962
Browse files Browse the repository at this point in the history
Fix login button on mobile [#962]
  • Loading branch information
genehack authored Jan 15, 2025
2 parents 40be39b + fe047d4 commit d862472
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
10 changes: 6 additions & 4 deletions static-site/components/nav/nav-logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ const LogoType = (): React.ReactElement => {
);

return (
<a href="/" className={styles.wordmark}>
{rainbowTitle}
{groupsApp && <SubTitle />}
</a>
<div className={styles.responsiveTitle}>
<a href="/" className={styles.wordmark}>
{rainbowTitle}
{groupsApp && <SubTitle />}
</a>
</div>
);
};
6 changes: 6 additions & 0 deletions static-site/components/nav/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
@media (max-width: 768px) {
.responsiveTitle {
display: none;
}
}

.nav {
align-items: center;
display: flex;
Expand Down
13 changes: 10 additions & 3 deletions static-site/src/components/nav-bar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,21 @@ const NavBar = ({ minified }: {
const SubTitle = styled.div`
color: black;
`;
const ResponsiveTitle = styled.div`
@media (max-width: 768px) {
display: none;
}
`;

return (
minified ?
<div/>
:
<a href="/">
{rainbowTitle}
{groupsApp &&
<SubTitle>Groups Server</SubTitle>}
<ResponsiveTitle>
{rainbowTitle}
{groupsApp && <SubTitle>Groups Server</SubTitle>}
</ResponsiveTitle>
</a>
);
}
Expand Down

0 comments on commit d862472

Please sign in to comment.