-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-archive-js-1636dccb8be3a357da03.js.map
1 lines (1 loc) · 9.71 KB
/
component---src-pages-archive-js-1636dccb8be3a357da03.js.map
1
{"version":3,"file":"component---src-pages-archive-js-1636dccb8be3a357da03.js","mappings":"qLAWMA,EAAuBC,EAAAA,QAAAA,IAAAA,WAAU,wEAAVA,CAAU,grCA2GzB,YAAQ,SAALC,MAAkBC,OAAOC,UAAU,IA4HpD,UA/GoB,SAAH,GAA4B,IAAtBC,EAAQ,EAARA,SACfC,EAD6B,EAAJC,KACTC,kBAAkBC,MAClCC,GAAcC,EAAAA,EAAAA,QAAO,MACrBC,GAAcD,EAAAA,EAAAA,QAAO,MACrBE,GAAiBF,EAAAA,EAAAA,QAAO,IACxBG,GAAuBC,EAAAA,EAAAA,MAY7B,OAVAC,EAAAA,EAAAA,YAAU,WACJF,IAIJG,EAAAA,EAAAA,OAAUP,EAAYQ,SAASC,EAAAA,EAAAA,aAC/BF,EAAAA,EAAAA,OAAUL,EAAYM,SAASC,EAAAA,EAAAA,UAAS,IAAK,IAC7CN,EAAeK,QAAQE,SAAQ,SAACC,EAAKC,GAAC,OAAKL,EAAAA,EAAAA,OAAUI,GAAKF,EAAAA,EAAAA,UAAa,GAAJG,GAAQ,IAC7E,GAAG,IAGD,gBAAC,KAAM,CAACjB,SAAUA,GAChB,gBAAC,IAAM,CAACkB,MAAM,YAEd,4BACE,0BAAQF,IAAKX,GACX,sBAAIc,UAAU,eAAc,WAC5B,qBAAGA,UAAU,YAAW,wCAG1B,gBAACxB,EAAoB,CAACqB,IAAKT,GACzB,6BACE,6BACE,0BACE,0BAAI,QACJ,0BAAI,SACJ,sBAAIY,UAAU,kBAAiB,WAC/B,sBAAIA,UAAU,kBAAiB,cAC/B,0BAAI,UAGR,6BACGlB,EAASmB,OAAS,GACjBnB,EAASoB,KAAI,WAAWJ,GAAO,IAC7B,EADkB,EAAJK,KAULC,YARPC,EAAI,EAAJA,KACAC,EAAM,EAANA,OACAC,EAAQ,EAARA,SACAC,EAAG,EAAHA,IACAC,EAAO,EAAPA,QACAV,EAAK,EAALA,MACAW,EAAI,EAAJA,KACAC,EAAO,EAAPA,QAEF,OACE,sBAAIC,IAAKd,EAAGD,IAAK,SAAAgB,GAAE,OAAKxB,EAAeK,QAAQI,GAAKe,CAAE,GACpD,sBAAIb,UAAU,iBAAe,GAAK,IAAIc,KAAKT,GAAMU,eAEjD,sBAAIf,UAAU,SAASD,GAEvB,sBAAIC,UAAU,0BACXW,EAAU,4BAAOA,GAAkB,4BAAM,MAG5C,sBAAIX,UAAU,wBACXU,aAAI,EAAJA,EAAMT,QAAS,GACdS,EAAKR,KAAI,SAACc,EAAMlB,GAAC,OACf,wBAAMc,IAAKd,GACRkB,EACA,GACAlB,IAAMY,EAAKT,OAAS,GAAK,wBAAMD,UAAU,aAAY,KACjD,KAIb,sBAAIA,UAAU,SACZ,2BACGO,GACC,qBAAGU,KAAMV,EAAU,aAAW,iBAC5B,gBAAC,KAAI,CAACW,KAAK,cAGdZ,GACC,qBAAGW,KAAMX,EAAQ,aAAW,eAC1B,gBAAC,KAAI,CAACY,KAAK,YAGdV,GACC,qBAAGS,KAAMT,EAAK,aAAW,wBACvB,gBAAC,KAAI,CAACU,KAAK,cAGdT,GACC,qBAAGQ,KAAMR,EAAS,aAAW,0BAC3B,gBAAC,KAAI,CAACS,KAAK,iBAOzB,QAOhB,C","sources":["webpack://v4/./src/pages/archive.js"],"sourcesContent":["import React, { useRef, useEffect } from 'react';\r\nimport { graphql } from 'gatsby';\r\nimport PropTypes from 'prop-types';\r\nimport { Helmet } from 'react-helmet';\r\nimport styled from 'styled-components';\r\nimport { srConfig } from '@config';\r\nimport sr from '@utils/sr';\r\nimport { Layout } from '@components';\r\nimport { Icon } from '@components/icons';\r\nimport { usePrefersReducedMotion } from '@hooks';\r\n\r\nconst StyledTableContainer = styled.div`\r\n margin: 100px -20px;\r\n\r\n @media (max-width: 768px) {\r\n margin: 50px -10px;\r\n }\r\n\r\n table {\r\n width: 100%;\r\n border-collapse: collapse;\r\n\r\n .hide-on-mobile {\r\n @media (max-width: 768px) {\r\n display: none;\r\n }\r\n }\r\n\r\n tbody tr {\r\n &:hover,\r\n &:focus {\r\n background-color: var(--light-navy);\r\n }\r\n }\r\n\r\n th,\r\n td {\r\n padding: 10px;\r\n text-align: left;\r\n\r\n &:first-child {\r\n padding-left: 20px;\r\n\r\n @media (max-width: 768px) {\r\n padding-left: 10px;\r\n }\r\n }\r\n &:last-child {\r\n padding-right: 20px;\r\n\r\n @media (max-width: 768px) {\r\n padding-right: 10px;\r\n }\r\n }\r\n\r\n svg {\r\n width: 20px;\r\n height: 20px;\r\n }\r\n }\r\n\r\n tr {\r\n cursor: default;\r\n\r\n td:first-child {\r\n border-top-left-radius: var(--border-radius);\r\n border-bottom-left-radius: var(--border-radius);\r\n }\r\n td:last-child {\r\n border-top-right-radius: var(--border-radius);\r\n border-bottom-right-radius: var(--border-radius);\r\n }\r\n }\r\n\r\n td {\r\n &.year {\r\n padding-right: 20px;\r\n\r\n @media (max-width: 768px) {\r\n padding-right: 10px;\r\n font-size: var(--fz-sm);\r\n }\r\n }\r\n\r\n &.title {\r\n padding-top: 15px;\r\n padding-right: 20px;\r\n color: var(--lightest-slate);\r\n font-size: var(--fz-xl);\r\n font-weight: 600;\r\n line-height: 1.25;\r\n }\r\n\r\n &.company {\r\n font-size: var(--fz-lg);\r\n white-space: nowrap;\r\n }\r\n\r\n &.tech {\r\n font-size: var(--fz-xxs);\r\n font-family: var(--font-mono);\r\n line-height: 1.5;\r\n .separator {\r\n margin: 0 5px;\r\n }\r\n span {\r\n display: inline-block;\r\n }\r\n }\r\n\r\n &.links {\r\n min-width: 100px;\r\n\r\n div {\r\n display: flex;\r\n align-items: center;\r\n\r\n a {\r\n ${({ theme }) => theme.mixins.flexCenter};\r\n flex-shrink: 0;\r\n }\r\n\r\n a + a {\r\n margin-left: 10px;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n`;\r\n\r\nconst ArchivePage = ({ location, data }) => {\r\n const projects = data.allMarkdownRemark.edges;\r\n const revealTitle = useRef(null);\r\n const revealTable = useRef(null);\r\n const revealProjects = useRef([]);\r\n const prefersReducedMotion = usePrefersReducedMotion();\r\n\r\n useEffect(() => {\r\n if (prefersReducedMotion) {\r\n return;\r\n }\r\n\r\n sr.reveal(revealTitle.current, srConfig());\r\n sr.reveal(revealTable.current, srConfig(200, 0));\r\n revealProjects.current.forEach((ref, i) => sr.reveal(ref, srConfig(i * 10)));\r\n }, []);\r\n\r\n return (\r\n <Layout location={location}>\r\n <Helmet title=\"Archive\" />\r\n\r\n <main>\r\n <header ref={revealTitle}>\r\n <h1 className=\"big-heading\">Archive</h1>\r\n <p className=\"subtitle\">A big list of things I’ve worked on</p>\r\n </header>\r\n\r\n <StyledTableContainer ref={revealTable}>\r\n <table>\r\n <thead>\r\n <tr>\r\n <th>Year</th>\r\n <th>Title</th>\r\n <th className=\"hide-on-mobile\">Made at</th>\r\n <th className=\"hide-on-mobile\">Built with</th>\r\n <th>Link</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n {projects.length > 0 &&\r\n projects.map(({ node }, i) => {\r\n const {\r\n date,\r\n github,\r\n external,\r\n ios,\r\n android,\r\n title,\r\n tech,\r\n company,\r\n } = node.frontmatter;\r\n return (\r\n <tr key={i} ref={el => (revealProjects.current[i] = el)}>\r\n <td className=\"overline year\">{`${new Date(date).getFullYear()}`}</td>\r\n\r\n <td className=\"title\">{title}</td>\r\n\r\n <td className=\"company hide-on-mobile\">\r\n {company ? <span>{company}</span> : <span>—</span>}\r\n </td>\r\n\r\n <td className=\"tech hide-on-mobile\">\r\n {tech?.length > 0 &&\r\n tech.map((item, i) => (\r\n <span key={i}>\r\n {item}\r\n {''}\r\n {i !== tech.length - 1 && <span className=\"separator\">·</span>}\r\n </span>\r\n ))}\r\n </td>\r\n\r\n <td className=\"links\">\r\n <div>\r\n {external && (\r\n <a href={external} aria-label=\"External Link\">\r\n <Icon name=\"External\" />\r\n </a>\r\n )}\r\n {github && (\r\n <a href={github} aria-label=\"GitHub Link\">\r\n <Icon name=\"GitHub\" />\r\n </a>\r\n )}\r\n {ios && (\r\n <a href={ios} aria-label=\"Apple App Store Link\">\r\n <Icon name=\"AppStore\" />\r\n </a>\r\n )}\r\n {android && (\r\n <a href={android} aria-label=\"Google Play Store Link\">\r\n <Icon name=\"PlayStore\" />\r\n </a>\r\n )}\r\n </div>\r\n </td>\r\n </tr>\r\n );\r\n })}\r\n </tbody>\r\n </table>\r\n </StyledTableContainer>\r\n </main>\r\n </Layout>\r\n );\r\n};\r\nArchivePage.propTypes = {\r\n location: PropTypes.object.isRequired,\r\n data: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default ArchivePage;\r\n\r\nexport const pageQuery = graphql`\r\n {\r\n allMarkdownRemark(\r\n filter: { fileAbsolutePath: { regex: \"/content/projects/\" } }\r\n sort: { fields: [frontmatter___date], order: DESC }\r\n ) {\r\n edges {\r\n node {\r\n frontmatter {\r\n date\r\n title\r\n tech\r\n github\r\n external\r\n ios\r\n android\r\n company\r\n }\r\n html\r\n }\r\n }\r\n }\r\n }\r\n`;\r\n"],"names":["StyledTableContainer","styled","theme","mixins","flexCenter","location","projects","data","allMarkdownRemark","edges","revealTitle","useRef","revealTable","revealProjects","prefersReducedMotion","usePrefersReducedMotion","useEffect","sr","current","srConfig","forEach","ref","i","title","className","length","map","node","frontmatter","date","github","external","ios","android","tech","company","key","el","Date","getFullYear","item","href","name"],"sourceRoot":""}