-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #197 from sthlmio/feature/viktor-cv
Adjustments to cv. Adjustments to projects component. Print css
- Loading branch information
Showing
7 changed files
with
467 additions
and
167 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
export const DownloadPdfButton = ({ href }) => { | ||
return ( | ||
<> | ||
<a className="downloadPdf" href={href} download> | ||
Download as PDF | ||
</a> | ||
{/*language=SCSS*/} | ||
<style jsx>{` | ||
.downloadPdf { | ||
display: inline-block; | ||
text-transform: uppercase; | ||
background: #3e46cf; | ||
color: #fff; | ||
border: 0; | ||
outline: none; | ||
padding: 20px 40px; | ||
cursor: pointer; | ||
font-size: 18px; | ||
font-family: 'Overpass', sans-serif; | ||
font-weight: 300; | ||
-webkit-appearance: none; | ||
-webkit-border-radius: 0px; | ||
margin: 20px 0; | ||
text-decoration: none; | ||
&:hover { | ||
background: #4c52c1; | ||
} | ||
&:hover, | ||
&:visited { | ||
color: #fff; | ||
} | ||
} | ||
@media print { | ||
.downloadPdf { | ||
display: none; | ||
} | ||
} | ||
`}</style> | ||
</> | ||
) | ||
} |
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,44 +1,55 @@ | ||
import React, { Component } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
import { Tags } from './tags' | ||
|
||
export const Project = ({ from, to, role, title, children, tags }) => ( | ||
<article> | ||
<h4>{title}</h4> | ||
<p className="text"> | ||
{role}, {from} - {to} | ||
</p> | ||
<article className="project"> | ||
<h3> | ||
{title} | ||
<span className="role"> | ||
{role ? `${role}, ` : ''} | ||
{from} - {to} | ||
</span> | ||
</h3> | ||
{children} | ||
<ul className="tags"> | ||
{tags.map(tag => ( | ||
<li key={tag}>{tag}</li> | ||
))} | ||
</ul> | ||
<Tags tags={tags} /> | ||
{/*language=SCSS*/} | ||
<style jsx> | ||
{` | ||
.tags { | ||
list-style-type: none; | ||
padding: 0; | ||
.project { | ||
display: block; | ||
} | ||
.tags li { | ||
float: left; | ||
background: #f5f5f5; | ||
padding: 5px 10px; | ||
margin-right: 10px; | ||
margin-bottom: 5px; | ||
font-weight: 600; | ||
font-size: 14px; | ||
text-transform: uppercase; | ||
.role { | ||
font-family: 'Overpass Mono'; | ||
display: block; | ||
font-size: 16px; | ||
line-height: 1.2em; | ||
margin-top: 0.3em; | ||
font-weight: 400; | ||
} | ||
h3 { | ||
font-size: 16px; | ||
} | ||
@media screen and (min-width: 500px) { | ||
h3 { | ||
font-size: 20px; | ||
} | ||
.role { | ||
font-size: 18px; | ||
} | ||
} | ||
`} | ||
</style> | ||
</article> | ||
); | ||
) | ||
|
||
Project.propTypes = { | ||
from: PropTypes.string, | ||
to: PropTypes.string, | ||
role: PropTypes.string, | ||
title: PropTypes.node, | ||
tags: PropTypes.arrayOf(PropTypes.string) | ||
}; | ||
tags: PropTypes.arrayOf(PropTypes.string), | ||
} |
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,65 @@ | ||
import React, { Component } from 'react' | ||
import PropTypes from 'prop-types' | ||
|
||
export const Tags = ({ tags }) => ( | ||
<> | ||
<ul className="tags"> | ||
{tags.map((tag) => ( | ||
<li key={tag}>{tag}</li> | ||
))} | ||
</ul> | ||
{/*language=SCSS*/} | ||
<style jsx> | ||
{` | ||
.tags { | ||
list-style-type: none; | ||
padding: 0; | ||
display: flex; | ||
flex-wrap: wrap; | ||
} | ||
.tags li { | ||
background: #f5f5f5; | ||
padding: 5px 10px; | ||
margin-right: 10px; | ||
margin-bottom: 5px; | ||
font-weight: 600; | ||
font-size: 12px; | ||
text-transform: uppercase; | ||
} | ||
@media screen and (min-width: 500px) { | ||
font-size: 14px; | ||
} | ||
@media print { | ||
.tags li { | ||
background: none; | ||
padding: 0; | ||
font-weight: normal; | ||
padding: 0; | ||
margin-right: 0; | ||
margin-bottom: 0; | ||
line-height: 1.6em; | ||
font-weight: 600; | ||
font-size: 12px; | ||
text-transform: uppercase; | ||
&:after { | ||
content: '|'; | ||
margin: 0 5px; | ||
display: inline-block; | ||
} | ||
&:last-child:after { | ||
display: none; | ||
} | ||
} | ||
} | ||
`} | ||
</style> | ||
</> | ||
) | ||
|
||
Tags.propTypes = { | ||
tags: PropTypes.arrayOf(PropTypes.string), | ||
} |
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.