-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/6 mobile friendly #14
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
207f31b
style: add breakpoints and make mobile friendly
okaziya 66d3b01
style: :art: make header responsive
okaziya 31a48d9
Merge branch 'main' into feature/6-mobile-friendly
okaziya 0cc7ffc
Rename Glasses-white.png to glasses-white.png
okaziya 8d77191
fix: attempt to fix layout bug
okaziya 9e9af2d
refactor: minor stylistic improvments
okaziya 5decb71
style: :art: safe pdf icon for the future use
okaziya 7cdf0f9
style: change style of the download PDF button based on the matching …
okaziya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
"use client"; | ||
|
||
import styled from "styled-components"; | ||
import { media } from "../../styles/media"; | ||
|
||
export const ContactSectionWrapper = styled.section` | ||
display: flex; | ||
|
||
${media.tablet` | ||
flex-direction: column | ||
`} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from "react"; | ||
import { montserratExtraBold } from "../../styles/fonts"; | ||
import { getTranslations } from "../../lib/getTranslations"; | ||
|
||
import { Locale } from "../../types"; | ||
import ContactInformation from "../ContactInformation"; | ||
import { ContactSectionWrapper } from "./ContactSection.styles"; | ||
|
||
export default function ContactSection({ locale }: { locale: Locale }) { | ||
const translations = getTranslations(locale); | ||
|
||
return ( | ||
<ContactSectionWrapper> | ||
<div className="section-first-column"> | ||
<h2 className={montserratExtraBold.className}> | ||
{translations.contact.title} | ||
</h2> | ||
</div> | ||
<div> | ||
<ContactInformation locale={locale} /> | ||
</div> | ||
</ContactSectionWrapper> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from "./ContactSection"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
"use client" | ||
"use client"; | ||
|
||
import styled from "styled-components"; | ||
|
||
export const ExperienceItemArticle = styled.article` | ||
margin-bottom: 40px; | ||
.company-title { | ||
margin-bottom: 40px; | ||
|
||
h5 { | ||
font-weight: 700; | ||
|
||
&.company-title { | ||
font-weight: 300; | ||
} | ||
} | ||
|
||
ul { | ||
color: rgba(255, 255, 255, 0.7); | ||
font-weight: 300; | ||
font-size: 20px; | ||
padding-left: 20px; | ||
li { | ||
padding-top: 16px; | ||
line-height: 28px; | ||
} | ||
ul { | ||
color: ${({ theme }) => theme.colors.textMuted}; | ||
font-size: 20px; | ||
padding-left: 20px; | ||
font-weight: 400; | ||
li { | ||
padding-top: 16px; | ||
line-height: 28px; | ||
} | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
"use client"; | ||
|
||
import { Locale } from "../../types"; | ||
import { getImagePath } from "../../utils/imagePath"; | ||
import Image from "next/image"; | ||
import { getTranslations } from "../../lib/getTranslations"; | ||
import useIsMobile from "../../hooks/useIsMobile"; | ||
import { PrimaryButton } from "./DownloadPdfButton.styles"; | ||
|
||
export default function DownloadPdfButton({ locale }: { locale: Locale }) { | ||
const translations = getTranslations(locale); | ||
|
||
const isMobile = useIsMobile(); | ||
|
||
console.log("isMobile", isMobile); | ||
return ( | ||
<PrimaryButton className="btn btn-primary btn-lg ml-1"> | ||
{isMobile ? ( | ||
<span className="pe-1 fw-light">CV</span> | ||
) : ( | ||
translations.downloadCv | ||
)} | ||
{isMobile && ( | ||
<Image | ||
src={getImagePath("/download.png")} | ||
alt={"download icon for the PDF file"} | ||
width={20} | ||
height={20} | ||
priority | ||
unoptimized | ||
/> | ||
)} | ||
</PrimaryButton> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,27 @@ | ||
"use client"; | ||
|
||
import styled from "styled-components"; | ||
import { media } from "../../styles/media"; | ||
|
||
export const StyledHeader = styled.header` | ||
max-width: ${({ theme }) => theme.maxWidth.desktop}; | ||
height: 60px; | ||
max-width: ${({ theme }) => theme.breakpoints.desktop}; | ||
min-height: 60px; | ||
|
||
${media.mobile` | ||
min-height: 76px; | ||
`} | ||
`; | ||
|
||
export const ImageWrapper = styled.div` | ||
width: 100%; | ||
max-width: 80px; | ||
margin-bottom: 12px; | ||
img { | ||
width: 100%; | ||
height: auto; | ||
} | ||
|
||
${media.mobile` | ||
max-width: 56px; | ||
`} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On desktop it looks really nice as it is! When looking at the header in mobile mode, I think that the top 3 centimeters of the screen looks quite cramped. When in mobile-portrait mode, I think it would look better if the "Ladda ner CV" text was abbreviated to "PDF" or "PDF ⬇️" or "⬇️". Probably it would be better if dropping the sun glasses too, on mobile. What does @mkl-adsn think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about that?