-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-archive-js-830f8013dfe5e63694e7.js.map
1 lines (1 loc) · 9.44 KB
/
component---src-pages-archive-js-830f8013dfe5e63694e7.js.map
1
{"version":3,"sources":["webpack:///./src/pages/archive.js"],"names":["StyledTableContainer","styled","div","theme","mixins","flexCenter","ArchivePage","location","projects","data","allMarkdownRemark","edges","revealTitle","useRef","revealTable","revealProjects","useEffect","sr","reveal","current","srConfig","forEach","ref","i","title","className","length","map","node","frontmatter","date","github","external","ios","android","tech","company","key","el","Date","getFullYear","item","href","aria-label","name"],"mappings":"2FAAA,oHAUMA,EAAuBC,IAAOC,IAAV,mFAAGD,CAAH,grCA2GZ,qBAAGE,MAAkBC,OAAOC,cAuH3BC,UA1GK,SAAC,GAAwB,IAAtBC,EAAqB,EAArBA,SACfC,EADoC,EAAXC,KACTC,kBAAkBC,MAClCC,EAAcC,iBAAO,MACrBC,EAAcD,iBAAO,MACrBE,EAAiBF,iBAAO,IAQ9B,OANAG,qBAAU,WACRC,IAAGC,OAAON,EAAYO,QAASC,sBAC/BH,IAAGC,OAAOJ,EAAYK,QAASC,mBAAS,IAAK,IAC7CL,EAAeI,QAAQE,SAAQ,SAACC,EAAKC,GAAN,OAAYN,IAAGC,OAAOI,EAAKF,mBAAa,GAAJG,SAClE,IAGD,kBAAC,IAAD,CAAQhB,SAAUA,GAChB,kBAAC,IAAD,CAAQiB,MAAM,YAEd,8BACE,4BAAQF,IAAKV,GACX,wBAAIa,UAAU,eAAd,WACA,uBAAGA,UAAU,YAAb,wCAGF,kBAACzB,EAAD,CAAsBsB,IAAKR,GACzB,+BACE,+BACE,4BACE,oCACA,qCACA,wBAAIW,UAAU,kBAAd,WACA,wBAAIA,UAAU,kBAAd,cACA,sCAGJ,+BACGjB,EAASkB,OAAS,GACjBlB,EAASmB,KAAI,WAAWJ,GAAO,IAAD,IAAdK,KAULC,YARPC,EAF0B,EAE1BA,KACAC,EAH0B,EAG1BA,OACAC,EAJ0B,EAI1BA,SACAC,EAL0B,EAK1BA,IACAC,EAN0B,EAM1BA,QACAV,EAP0B,EAO1BA,MACAW,EAR0B,EAQ1BA,KACAC,EAT0B,EAS1BA,QAEF,OACE,wBAAIC,IAAKd,EAAGD,IAAK,SAAAgB,GAAE,OAAKvB,EAAeI,QAAQI,GAAKe,IAClD,wBAAIb,UAAU,iBAAd,GAAkC,IAAIc,KAAKT,GAAMU,eAEjD,wBAAIf,UAAU,SAASD,GAEvB,wBAAIC,UAAU,0BACXW,EAAU,8BAAOA,GAAkB,oCAGtC,wBAAIX,UAAU,uBACXU,EAAKT,OAAS,GACbS,EAAKR,KAAI,SAACc,EAAMlB,GAAP,OACP,0BAAMc,IAAKd,GACRkB,EACA,GACAlB,IAAMY,EAAKT,OAAS,GAAK,0BAAMD,UAAU,aAAhB,UAKlC,wBAAIA,UAAU,SACZ,6BACGO,GACC,uBAAGU,KAAMV,EAAUW,aAAW,iBAC5B,kBAAC,IAAD,CAAMC,KAAK,cAGdb,GACC,uBAAGW,KAAMX,EAAQY,aAAW,eAC1B,kBAAC,IAAD,CAAMC,KAAK,YAGdX,GACC,uBAAGS,KAAMT,EAAKU,aAAW,wBACvB,kBAAC,IAAD,CAAMC,KAAK,cAGdV,GACC,uBAAGQ,KAAMR,EAASS,aAAW,0BAC3B,kBAAC,IAAD,CAAMC,KAAK","file":"component---src-pages-archive-js-830f8013dfe5e63694e7.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\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\r\n useEffect(() => {\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\n// uncomment if more projects added\r\n// export const pageQuery = graphql`\r\n// {\r\n// allMarkdownRemark(\r\n// filter: { fileAbsolutePath: { regex: \"/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"],"sourceRoot":""}