import React from 'react'; import { useStaticQuery, graphql } from 'gatsby'; import { makeStyles } from '@material-ui/core/styles'; import { Container, Typography } from '@material-ui/core'; import Section from '@components/Section'; import Technology from './Technology'; function Technologies() { const classes = useStyles(); const data = useStaticQuery(graphql` { allIcons: allFile( filter: { absolutePath: { regex: "/technologies/" } extension: { in: ["png", "jpeg", "jpg"] } } ) { edges { node { relativePath childImageSharp { id fixed(height: 40, quality: 100) { ...GatsbyImageSharpFixed } } } } } } `); const findIcon = path => { const edge = data.allIcons.edges.find( img => img.node.relativePath === path ); return edge?.node?.childImageSharp?.fixed ?? {}; }; return (
Technologies / tools I use
); } const useStyles = makeStyles(theme => ({ grid: { display: 'grid', gridTemplateColumns: `repeat(13, minmax(0, 1fr));`, gap: theme.spacing(1, 1), [theme.breakpoints.down('md')]: { gridTemplateColumns: `repeat(6, minmax(0, 1fr));`, '& > div:last-child': { gridColumnStart: '3', gridColumnEnd: 'span 2', display: 'flex', justifyContent: 'center', '& > div': { width: `calc(50% - ${theme.spacing(1)}px)`, }, }, }, [theme.breakpoints.down('xs')]: { gridTemplateColumns: `repeat(3, minmax(0, 1fr));`, '& > div:last-child': { display: 'block', gridColumnStart: '2', gridColumnEnd: '2', '& > div': { width: 'auto', }, }, }, }, hide: { [theme.breakpoints.down('md')]: { display: 'none', }, }, })); export default Technologies;