add some photos, add dates to GalleryImage, sort photos on homepage
This commit is contained in:
parent
17494d9a76
commit
46bcc43688
BIN
data/gallery/20160530-DSC09108.jpg
(Stored with Git LFS)
Normal file
BIN
data/gallery/20160530-DSC09108.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
data/gallery/20180424-DSC07948.jpg
(Stored with Git LFS)
Normal file
BIN
data/gallery/20180424-DSC07948.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
data/gallery/20200215-DSC02584.jpg
(Stored with Git LFS)
Normal file
BIN
data/gallery/20200215-DSC02584.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
data/gallery/DSC06161.jpg
(Stored with Git LFS)
Normal file
BIN
data/gallery/DSC06161.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
data/gallery/_DSC4224.jpg
(Stored with Git LFS)
Normal file
BIN
data/gallery/_DSC4224.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -69,6 +69,7 @@ const GalleryImage = ({ data, pageContext }) => {
|
|||||||
const orientationClasses = ar > 1 ? 'flex-col mx-auto' : 'portrait:mx-auto landscape:mx-5 landscape:flex-row-reverse portrait:flex-col';
|
const orientationClasses = ar > 1 ? 'flex-col mx-auto' : 'portrait:mx-auto landscape:mx-5 landscape:flex-row-reverse portrait:flex-col';
|
||||||
console.log(ar, orientationClasses);
|
console.log(ar, orientationClasses);
|
||||||
const shutterSpeed = React.useMemo(() => getShutterFractionFromExposureTime(meta.exif.ExposureTime || 0), [meta]);
|
const shutterSpeed = React.useMemo(() => getShutterFractionFromExposureTime(meta.exif.ExposureTime || 0), [meta]);
|
||||||
|
const dateTaken = React.useMemo(() => new Date(meta.dateTaken), [meta]);
|
||||||
return (<>
|
return (<>
|
||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{name} - Gallery | Chuck Dries</title>
|
<title>{name} - Gallery | Chuck Dries</title>
|
||||||
@ -127,6 +128,16 @@ const GalleryImage = ({ data, pageContext }) => {
|
|||||||
<p className="landscape:mr-2">{meta.iptc.caption}</p>
|
<p className="landscape:mr-2">{meta.iptc.caption}</p>
|
||||||
</div>
|
</div>
|
||||||
{<div className="portrait:border-t-2 border-muted-light portrait:mt-2 mr-2 portrait:mb-1" style={{width: 30}}></div>}
|
{<div className="portrait:border-t-2 border-muted-light portrait:mt-2 mr-2 portrait:mb-1" style={{width: 30}}></div>}
|
||||||
|
{dateTaken &&
|
||||||
|
<div className={classnames('flex items-baseline ml-2 text-lg',
|
||||||
|
ar <= 1 ? 'flex-row-reverse' : 'portrait:flex-row-reverse')}
|
||||||
|
title="shutter speed"
|
||||||
|
>
|
||||||
|
<span className="icon-offset mr-1">
|
||||||
|
<ion-icon name="calendar"></ion-icon>
|
||||||
|
</span>
|
||||||
|
<span className="mr-1">{dateTaken.toLocaleDateString()}</span>
|
||||||
|
</div>}
|
||||||
{(locationString) &&
|
{(locationString) &&
|
||||||
<div className={classnames('flex items-baseline ml-2 text-lg',
|
<div className={classnames('flex items-baseline ml-2 text-lg',
|
||||||
ar <= 1 ? 'flex-row-reverse' : 'portrait:flex-row-reverse')}
|
ar <= 1 ? 'flex-row-reverse' : 'portrait:flex-row-reverse')}
|
||||||
|
@ -141,7 +141,7 @@ const IndexPage = ({ data: { allFile: { edges } } }) => {
|
|||||||
title="view image details"
|
title="view image details"
|
||||||
to={`/photogallery/${image.base}/`}
|
to={`/photogallery/${image.base}/`}
|
||||||
>
|
>
|
||||||
<span className="icon-offset"><ion-icon name="expand"></ion-icon></span>
|
<span className="icon-offset"><ion-icon name="image"></ion-icon></span>
|
||||||
</Link>
|
</Link>
|
||||||
<button
|
<button
|
||||||
className={classnames(
|
className={classnames(
|
||||||
@ -182,7 +182,8 @@ export const query = graphql`
|
|||||||
# images that don't work well
|
# images that don't work well
|
||||||
# base: {nin: ["DSC06517.jpg"]}
|
# base: {nin: ["DSC06517.jpg"]}
|
||||||
# childrenImageSharp: {elemMatch: {fluid: {aspectRatio: {lte: 1.3}}}}
|
# childrenImageSharp: {elemMatch: {fluid: {aspectRatio: {lte: 1.3}}}}
|
||||||
}
|
},
|
||||||
|
sort: {order: DESC, fields: childrenImageSharp___fields___imageMeta___dateTaken}
|
||||||
) {
|
) {
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
|
@ -54,8 +54,8 @@ const GalleryPage = ({ data }) => {
|
|||||||
|
|
||||||
export const query = graphql`
|
export const query = graphql`
|
||||||
query GalleryPageQuery {
|
query GalleryPageQuery {
|
||||||
allFile(filter: {
|
allFile(
|
||||||
sourceInstanceName: { eq: "gallery" }}
|
filter: { sourceInstanceName: { eq: "gallery" } }
|
||||||
sort: {order: DESC, fields: childrenImageSharp___fields___imageMeta___dateTaken}
|
sort: {order: DESC, fields: childrenImageSharp___fields___imageMeta___dateTaken}
|
||||||
) {
|
) {
|
||||||
edges {
|
edges {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user