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

Fix/mobile view #94

Merged
merged 5 commits into from
Mar 20, 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 src/layout/BurgerMenu/BurgerMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const BurgerMenu = ({ isOpen, children }: BurgerMenuProps) => {
initial="closed"
variants={variants}
id="burger_menu"
className="flex fixed top-20 left-0 z-10 flex-col justify-center items-center pb-2 w-screen bg-zinc-100 shadow-md lg:hidden"
className="flex fixed top-[70px] left-0 z-10 flex-col justify-center items-center py-2 w-screen bg-zinc-100 shadow-md lg:hidden"
>
{children}
</motion.div>
Expand Down
2 changes: 1 addition & 1 deletion src/layout/GithubCorner/GithubCorner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default function GithubCorner() {
<a
href="https://github.com/Ryczko/Employee-pulse"
target="_blank"
className="github-corner"
className="hidden small-sm:block github-corner"
aria-label="View source on GitHub"
rel="noreferrer"
>
Expand Down
2 changes: 1 addition & 1 deletion src/layout/Logo/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function Logo({ classNames = '' }: LogoProps) {
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
<a
className={clsx(
'block ml-14 font-serif text-2xl text-zinc-600 translate-y-[-2px] md:ml-11',
'block font-serif text-2xl text-zinc-600 translate-y-[-2px] md:ml-11 small-sm:ml-14',
classNames
)}
>
Expand Down
12 changes: 9 additions & 3 deletions src/layout/Navigation/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { useApplicationContext } from 'src/features/application/context';
import AvatarIcon from '../../../public/images/avatar.svg';
import GithubCorner from '../GithubCorner/GithubCorner';


function Navigation() {
const { user, loading, displayName } = useApplicationContext();

Expand All @@ -35,7 +34,11 @@ function Navigation() {
<nav className="flex fixed z-10 items-center w-full h-[70px] bg-zinc-100 border-b border-neutral-200">
<GithubCorner />

<div className="flex grow justify-between items-center px-4 md:px-8">
<div
className={`flex grow ${
user ? 'justify-between' : 'justify-center small-sm:justify-between'
} items-center px-4 md:px-8`}
>
<Logo />
{!loading && user ? (
<div className="flex md:space-x-4">
Expand Down Expand Up @@ -112,7 +115,10 @@ function Navigation() {
</div>
) : (
<Link href={'/login'} passHref>
<ButtonLink variant={ButtonVariant.OUTLINE_PRIMARY}>
<ButtonLink
className="hidden px-4 sm:px-6 small-sm:block"
variant={ButtonVariant.OUTLINE_PRIMARY}
>
Sign In
</ButtonLink>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion src/layout/PageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function PageLayout({ children }: PageLayoutProps) {
<>
<AnimatePresence>{loading && <GlobalLoader />}</AnimatePresence>
<Navigation />
<div className="overflow-hidden px-6 pt-32 m-auto min-h-screen sm:px-4">
<div className="overflow-hidden px-6 pt-24 m-auto mb-8 min-h-full sm:px-4 md:pt-32">
<Background />
<AnimatePresence exitBeforeEnter initial={false}>
{children}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function IndexPage() {
<div className="flex overflow-hidden flex-col">
<section className="relative">
<div className="px-4 mx-auto max-w-6xl sm:px-6">
<div className="pt-32 pb-12 md:pt-40 md:pb-20">
<div className="pt-28 pb-12 md:pt-40 md:pb-20 md:32">
<div className="pb-12 text-center md:pb-16">
<h1 className="mb-4 text-4xl font-extrabold tracking-tighter md:text-6xl leading-tighter">
How are you&nbsp;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ interface HeaderProps {

export default function Header({ children }: HeaderProps) {
return (
<h1 className="pb-8 mx-auto max-w-4xl text-3xl font-bold text-center md:text-4xl">
<h1 className="pb-8 mx-auto max-w-4xl text-2xl font-bold text-center md:text-4xl">
{children}
</h1>
);
Expand Down
3 changes: 3 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ module.exports = {
display: ['Montserrat', 'system-ui', 'sans-serif'],
body: ['Montserrat', 'system-ui', 'sans-serif'],
},
screens: {
'small-sm': '370px',
},
},
},
plugins: [],
Expand Down