Add photo's city on Photo viewer
This commit is contained in:
@@ -105,6 +105,7 @@
|
|||||||
id
|
id
|
||||||
title
|
title
|
||||||
}
|
}
|
||||||
|
city
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`)
|
`)
|
||||||
@@ -198,7 +199,17 @@
|
|||||||
<h1 class="title-medium">{currentPhoto.title}</h1>
|
<h1 class="title-medium">{currentPhoto.title}</h1>
|
||||||
|
|
||||||
<div class="detail text-info">
|
<div class="detail text-info">
|
||||||
<Icon class="icon" icon="map-pin" label="Map pin" /><span>{location.name}, {location.country.name}</span> <span class="sep">·</span> <time datetime={dayjs(currentPhoto.date_taken).format('YYYY-MM-DD')}>{dayjs(currentPhoto.date_taken).format('MMMM, Do YYYY')}</time>
|
<a href="/{location.country.slug}/{location.slug}">
|
||||||
|
<Icon class="icon" icon="map-pin" label="Map pin" />
|
||||||
|
<span>
|
||||||
|
{#if currentPhoto.city}
|
||||||
|
{currentPhoto.city}, {location.name}, {location.country.name}
|
||||||
|
{:else}
|
||||||
|
{location.name}, {location.country.name}
|
||||||
|
{/if}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
<span class="sep">·</span> <time datetime={dayjs(currentPhoto.date_taken).format('YYYY-MM-DD')}>{dayjs(currentPhoto.date_taken).format('MMMM, Do YYYY')}</time>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -258,12 +269,16 @@
|
|||||||
id
|
id
|
||||||
title
|
title
|
||||||
}
|
}
|
||||||
|
city
|
||||||
}
|
}
|
||||||
|
|
||||||
location (filter: { slug: { _eq: "${page.params.location}" }}) {
|
location (filter: { slug: { _eq: "${page.params.location}" }}) {
|
||||||
name
|
name
|
||||||
slug
|
slug
|
||||||
country { name }
|
country {
|
||||||
|
name
|
||||||
|
slug
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`)
|
`)
|
||||||
|
|||||||
@@ -186,7 +186,7 @@
|
|||||||
}
|
}
|
||||||
@include bp (lg) {
|
@include bp (lg) {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 60% 40%;
|
grid-template-columns: 50% 50%;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,7 +215,17 @@
|
|||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
padding-left: 16px;
|
padding-left: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $color-tertiary;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.3s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $color-secondary-light;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Icon
|
// Icon
|
||||||
@@ -224,7 +234,7 @@
|
|||||||
width: 17px;
|
width: 17px;
|
||||||
height: 17px;
|
height: 17px;
|
||||||
margin-top: -5px;
|
margin-top: -5px;
|
||||||
margin-right: 12px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
// Separator
|
// Separator
|
||||||
.sep {
|
.sep {
|
||||||
|
|||||||
Reference in New Issue
Block a user