Initial pass at homepage layout

This commit is contained in:
2021-05-31 01:40:05 -07:00
parent 8fcae96197
commit d8ed13477d
9 changed files with 1089 additions and 83 deletions

View File

@@ -2,8 +2,9 @@ import * as React from "react"
import { graphql } from 'gatsby'
import { GatsbyImage, getImage } from "gatsby-plugin-image"
import "../styles/gallery.scss"
import "../styles/index.scss"
import '../styles/global.css';
// import "../styles/gallery.scss"
// import "../styles/index.scss"
// markup
const IndexPage = ({ data }) => {
@@ -11,30 +12,60 @@ const IndexPage = ({ data }) => {
console.log('images', images)
return (
<main >
<title>Home Page</title>
<h1 >
<main className="">
<section className="m-2 py-6 intro flex flex-col justify-center flex-auto bg-black rounded-xl">
<div className="mx-auto px-4 md:px-2 w-full md:w-8 ">
<h1 className="text-6xl text-pink-600">Chuck Dries</h1>
<h2 className="text-blue-300">Software Engineer in web &amp; VR</h2>
<ul>
<li>Software Developer, <span className="text-gray-300 italic">Axosoft</span></li>
<li><a className="hover:text-pink-400 underline" href="mailto:chuck@chuckdries.com">chuck@chuckdries.com</a> / <span>602.618.0414</span></li>
<li>
<a className="mr-1 hover:text-pink-400 underline" href="http://github.com/chuckdries">Github</a>/
<a className="mx-1 hover:text-pink-400 underline" href="https://www.linkedin.com/in/chuckdries/">LinkedIn</a>/
<a className="mx-1 hover:text-pink-400 underline" href="https://devpost.com/chuckdries">Devpost</a>/
<a className="mx-1 hover:text-pink-400 underline" href="CharlesDriesResumeCurrent.pdf">Resume [pdf]</a>/
<a className="mx-1 hover:text-pink-400 underline" href="https://medium.com/@chuckdries">Medium (blog)</a>
{/* <a href="https://pgp.mit.edu/pks/lookup?op=get&search=0x2BD9D0871DB5A518">Public Key</a> */}
</li>
</ul>
</div>
</section>
{/* <h1 >
Congratulations
<br />
<span >— you just made a Gatsby site! </span>
<span role="img" aria-label="Party popper emojis">
🎉🎉🎉
</span>
</h1>
<div className="gallery">
{images.map(image => {
const name = image.childImageSharp.fields.imageMeta.iptc.object_name || image.base
console.log('name', name)
// const file = data.allFile
// console.log(fileName)
// return <></>
return <GatsbyImage key={image.base} image={getImage(image)} alt={name} />;
})}
</div>
<img
alt="Gatsby G Logo"
src="data:image/svg+xml,%3Csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2a10 10 0 110 20 10 10 0 010-20zm0 2c-3.73 0-6.86 2.55-7.75 6L14 19.75c3.45-.89 6-4.02 6-7.75h-5.25v1.5h3.45a6.37 6.37 0 01-3.89 4.44L6.06 9.69C7 7.31 9.3 5.63 12 5.63c2.13 0 4 1.04 5.18 2.65l1.23-1.06A7.959 7.959 0 0012 4zm-8 8a8 8 0 008 8c.04 0 .09 0-8-8z' fill='%23639'/%3E%3C/svg%3E"
/>
</h1> */}
<section className="mt-0 m-2 max-w-full flex flex-col bg-black text-gray-200 py-2 rounded-xl">
<h2 className="ml-6 text-2xl">Photography</h2>
<div className="gallery gallery flex-auto flex overflow-x-scroll w-full scroll-snap-x scroll-padding-6 ">
{images.map(image => {
const name = image.childImageSharp.fields.imageMeta.iptc.object_name || image.base
console.log('name', name)
// const file = data.allFile
// console.log(fileName)
// return <></>
return (
// <div style={{ maxHeight: '500px' }} className="flex-shrink-0 mr-4 scroll-snap-start bg-red-300">
// .
<GatsbyImage
className="gallery-img h-full flex-shrink-0 scroll-snap-start mr-4"
style={{
// maxHeight: "800px"
// width: '400px',
// height: '100%'
}}
key={image.base}
image={getImage(image)}
alt={name} />
// </div>
);
})}
</div>
</section>
</main>
)
}
@@ -48,7 +79,13 @@ query HomePageGallery {
relativePath,
base,
childImageSharp{
gatsbyImageData(width: 400)
gatsbyImageData(
layout: CONSTRAINED,
placeholder: BLURRED,
# width: 400
# height: 900
height: 400
)
fields {
imageMeta {
meta {

View File

@@ -0,0 +1,31 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
* {
box-sizing: border-box;
}
@layer utilities {
.scroll-snap-none {
scroll-snap-type: none;
}
.scroll-snap-x {
scroll-snap-type: x mandatory;
}
.scroll-snap-y {
scroll-snap-type: y mandatory;
}
.scroll-snap-start {
scroll-snap-align: start;
}
.scroll-padding-6 {
scroll-padding: theme('spacing.6')
}
}
.gallery-img:first-child {
margin-left: theme('spacing.6')
}
body {
@apply bg-gray-900 text-white;
}