Skip to content

Commit

Permalink
Print styles.
Browse files Browse the repository at this point in the history
  • Loading branch information
theruther4d committed Jul 27, 2021
1 parent 335ebdd commit 51f7ca7
Show file tree
Hide file tree
Showing 12 changed files with 244 additions and 15 deletions.
56 changes: 56 additions & 0 deletions src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,20 @@ html {
fill: white;
font-size: 16px;
overflow-x: hidden;

@media print {
background: white;
color: black;
fill: black;
}
}

body {
padding: 2rem 0 0;

@media print {
padding: 0;
}
}

h1,
Expand All @@ -41,6 +51,10 @@ h6 {
em {
color: $primary;
font-style: normal;

@media print {
color: black;
}
}
}

Expand All @@ -49,6 +63,11 @@ h3 {
line-height: 2.625rem;
font-weight: 800;
margin: 0.5rem auto;

@media print {
font-size: 1.25rem;
line-height: 1.25rem;
}
}

p {
Expand All @@ -57,13 +76,24 @@ p {
line-height: 2rem;
color: rgba(255, 255, 255, 0.7);
margin: 2rem auto;

@media print {
color: black;
margin: 0.25rem auto;
font-size: 1rem;
line-height: 1.25rem;
}
}

section {
max-width: $max_width;
margin: 0 auto;
padding: 0 $gutter;
overflow: hidden;

@media print {
max-width: none;
}
}

section + section {
Expand All @@ -72,11 +102,20 @@ section + section {
@media all and (min-width: 1000px) {
margin-top: 4rem;
}

@media print {
margin-top: 0.5rem;
}
}

a {
color: $primary;
text-decoration: underline;

@media print {
color: black;
text-decoration: none;
}
}

.breakable {
Expand Down Expand Up @@ -112,4 +151,21 @@ button.link {
&:disabled {
color: desaturate($color: $primary, $amount: 75);
}

@media print {
color: black;
text-decoration: none;
}
}

.noprint {
@media print {
display: none !important;
}
}

.noscreen {
@media screen {
display: none;
}
}
2 changes: 1 addition & 1 deletion src/contributions/Contributions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function Contributions() {
}, 0);

return (
<section className="contributions">
<section className="contributions noprint">
<h3 className="breakable">Code Contributions ({totalContributions})</h3>
{isLoading ? (
<p>Loading...</p>
Expand Down
17 changes: 13 additions & 4 deletions src/footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function Footer() {

return (
<footer className="footer">
<div className="contact" id="get-in-touch">
<div className="contact noprint" id="get-in-touch">
<figure className={failed ? "failed" : copied ? "copied" : ""}>
<img
className="uncopied-img"
Expand Down Expand Up @@ -132,15 +132,24 @@ export function Footer() {
</div>
<div className="meta">
<div className="social">
<a href="https://github.com/theruther4d">
<a
href="https://github.com/theruther4d"
data-something="https://github.com/theruther4d"
>
<span className="offscreen">Github</span>
<Github width={36} height={36} />
</a>
<a href="https://codepen.io/the_ruther4d">
<a
href="https://codepen.io/the_ruther4d"
data-something="https://codepen.io/the_ruther4d"
>
<span className="offscreen">Codepen</span>
<Codepen width={36} height={36} />
</a>
<a href="https://www.linkedin.com/in/josh-rutherford-b10b2190">
<a
href="https://www.linkedin.com/in/josh-rutherford-b10b2190"
data-something="https://www.linkedin.com/in/josh-rutherford-b10b2190"
>
<span className="offscreen">Linkedin</span>
<Linkedin width={36} height={36} />
</a>
Expand Down
32 changes: 32 additions & 0 deletions src/footer/footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ $img_size: 173px;
margin-bottom: 2rem;
text-shadow: 0 0 4px black;
}

@media print {
max-width: none;
}
}

.meta {
Expand All @@ -110,6 +114,10 @@ $img_size: 173px;
padding: 2rem $gutter 0;
border-top: 1px solid rgba(white, 0.5);
overflow: hidden;

@media print {
max-width: none;
}
}

.copyright,
Expand All @@ -129,6 +137,22 @@ $img_size: 173px;
+ a {
margin-left: 1rem;
}

@media print {
display: flex;
align-items: center;
flex-wrap: wrap;

&:after {
content: attr(href);
}

svg {
width: 1.5rem;
height: 1.5rem;
margin-right: 0.5rem;
}
}
}
}

Expand All @@ -144,6 +168,10 @@ $img_size: 173px;
vertical-align: middle;
margin-right: 0.5rem;
}

@media print {
color: black;
}
}

@media all and (min-width: $horizontal_breakpoint) {
Expand Down Expand Up @@ -295,6 +323,10 @@ $img_size: 173px;

.fill-target {
fill: white;

@media print {
fill: black;
}
}

a:hover {
Expand Down
4 changes: 2 additions & 2 deletions src/hero/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function Hero() {
return (
<section className="hero">
<header>
<figure>
<figure className="noprint">
<img
src={waving}
alt="Cartoon of me waving"
Expand All @@ -27,7 +27,7 @@ export function Hero() {
last 5 years working primarily with React and Typescript.{" "}
{showMore ? null : (
<button
className="link"
className="link noprint"
onClick={function toggle() {
setShowMore((showing) => !showing);
}}
Expand Down
26 changes: 26 additions & 0 deletions src/hero/hero.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,32 @@ $horizontal_breakpoint: 724px;
gap: 2rem;
grid-template-columns: (minmax(auto, 30rem));

@media print {
grid-template-columns: none;
gap: 0.5rem;
}

h1 {
font-size: 3.5rem;
line-height: 3rem;
margin: 0;
color: $primary;

@media print {
font-size: 1.75rem;
color: black;
}
}

h2 {
font-size: 1.25rem;
margin: 0.25rem 0 0;

@media print {
font-size: 1rem;
margin: 0;
color: rgba(black, 0.5);
}
}

p {
Expand Down Expand Up @@ -54,6 +70,16 @@ $horizontal_breakpoint: 724px;
&:not(.visible) {
@extend .offscreen;
}

@media print {
width: unset !important;
height: unset !important;
overflow: unset !important;
position: unset !important;
top: unset !important;
left: unset !important;
grid-column: unset;
}
}

@media all and (min-width: $horizontal_breakpoint) {
Expand Down
36 changes: 30 additions & 6 deletions src/history/History.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ReactComponent as RiskMatch } from "./logos/riskmatch.svg";
import { ReactComponent as Vertafore } from "./logos/vertafore.svg";

import "./history.scss";
import { Fragment, MouseEvent } from "react";
import { MouseEvent } from "react";

const today = new Date();
const contactId = "get-in-touch";
Expand All @@ -27,7 +27,7 @@ export function History() {

return (
<section className="history">
<header>
<header className="noprint">
<h3>
I've been lucky to work on some <em>amazing</em> teams.
</h3>
Expand All @@ -43,8 +43,7 @@ export function History() {
<article className="card">
<div className="card-content">
<h3>
Employment
<br />
Employment <br className="noprint" />
History
</h3>
<dl>
Expand All @@ -54,7 +53,7 @@ export function History() {
const duration = formatDistance(start, end);

return (
<Fragment key={`${job.name}-${job.title}`}>
<li key={`${job.name}-${job.title}`} className="item">
<dt>{job.name}</dt>
<dd>
<figure>
Expand All @@ -75,8 +74,13 @@ export function History() {
{" - "}
<time>{duration}</time>
</span>
<ul className="notes noscreen">
{job.notes.map((note) => (
<li key={note}>{note}</li>
))}
</ul>
</dd>
</Fragment>
</li>
);
})}
</dl>
Expand All @@ -94,33 +98,53 @@ export const jobs = [
start: "July 1 2013",
end: "November 30 2015",
Logo: Sourcebits,
notes: [
"Built app marketing websites",
"After 1 year hired and trained junior developers offshore",
],
},
{
name: "Apple",
title: "Sr. UI Developer",
start: "December 1 2015",
end: "May 31 2016",
Logo: Apple,
notes: ["Built product marketing pages for apple.com"],
},
{
name: "RiskMatch",
title: "UI Prototype Developer",
start: "June 1 2016",
end: "May 31 2017",
Logo: RiskMatch,
notes: [
"Prototyped new UI features and wrote production CSS",
"Converted from legacy PHP setup to React + Webpack + Typescript",
"Unified Prototyping and frontend development processes to save speed up delivery",
],
},
{
name: "RiskMatch",
title: "UI Development Team Lead",
start: "Jun 1 2017",
end: "December 31 2020",
Logo: RiskMatch,
notes: [
"Promoted to head of UI development in a year",
"Hired, trained, and managed team of 3-4 junior developers",
"Oversaw development of InsureTech web app",
"Used React, Typescript, Redux, MobX, SCSS, Webpack",
],
},
{
name: "Vertafore",
title: "Staff Architect",
start: "January 1 2021",
Logo: Vertafore,
notes: [
"Promoted to core architechture group at parent company",
"Oversee UI development for entire companies portfolio of products",
],
},
];
const jobsDescending = [...jobs].reverse();
Expand Down
Loading

1 comment on commit 51f7ca7

@vercel
Copy link

@vercel vercel bot commented on 51f7ca7 Jul 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.