Fallback to image URLs everywhere. Clean up later.
This commit is contained in:
1 parent
6be69ed1f7
commit
e0f6ed6372
6 files changed
+98
-21
No files matched your search
+12
-5
@@ -80,7 +80,14 @@ export const BookingPage = () => {
|
|||||||
{hasFeaturedMedia && (
|
{hasFeaturedMedia && (
|
||||||
<div className="page-hero">
|
<div className="page-hero">
|
||||||
<div className="page-hero_image">
|
<div className="page-hero_image">
|
||||||
<Img fluid={featuredMedia.localFile.childImageSharp.fluid} />
|
{featuredMedia.localFile.childImageSharp ? (
|
||||||
|
<Img fluid={featuredMedia.localFile.childImageSharp.fluid} />
|
||||||
|
) : (
|
||||||
|
<img
|
||||||
|
src={featuredMedia.localFile.url}
|
||||||
|
alt={featuredMedia.caption || ''}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
{featuredMedia.caption && (
|
{featuredMedia.caption && (
|
||||||
<div
|
<div
|
||||||
@@ -101,10 +108,10 @@ export const BookingPage = () => {
|
|||||||
Med vår 3D-løsning har du muligheten til å navigere deg rundt på
|
Med vår 3D-løsning har du muligheten til å navigere deg rundt på
|
||||||
huset! Du kan bevege deg mellom etasjer ved å trykke på tallene i
|
huset! Du kan bevege deg mellom etasjer ved å trykke på tallene i
|
||||||
lille kolonnen nederst til høyre. Dra deg rundt fra rom til rom ved
|
lille kolonnen nederst til høyre. Dra deg rundt fra rom til rom ved
|
||||||
å klikke dit du vil. Den røde og hvite kompassnålen lar deg rotere bildet. Pluss- og
|
å klikke dit du vil. Den røde og hvite kompassnålen lar deg rotere
|
||||||
minus-knappene i høyre hjørne kan brukes for å zoome inn eller ut.
|
bildet. Pluss- og minus-knappene i høyre hjørne kan brukes for å
|
||||||
Du starter i foajeen i 1. etasje – men ta gjerne en
|
zoome inn eller ut. Du starter i foajeen i 1. etasje – men ta
|
||||||
titt på lokalene i alle etasjer!
|
gjerne en titt på lokalene i alle etasjer!
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<iframe
|
<iframe
|
||||||
|
|||||||
@@ -18,7 +18,11 @@ export const AssociationTemplate = ({
|
|||||||
<h1 className="page-title">{title}</h1>
|
<h1 className="page-title">{title}</h1>
|
||||||
{hasFeaturedMedia && (
|
{hasFeaturedMedia && (
|
||||||
<div className="association-logo">
|
<div className="association-logo">
|
||||||
<Img fluid={featuredMedia.localFile.childImageSharp.fluid} />
|
{featuredMedia.localFile.childImageSharp ? (
|
||||||
|
<Img fluid={featuredMedia.localFile.childImageSharp.fluid} />
|
||||||
|
) : (
|
||||||
|
<img src={featuredMedia.localFile.url} alt={title} />
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{homepage && (
|
{homepage && (
|
||||||
@@ -73,6 +77,7 @@ export const associationQuery = graphql`
|
|||||||
association_homepage
|
association_homepage
|
||||||
featured_media {
|
featured_media {
|
||||||
localFile {
|
localFile {
|
||||||
|
url
|
||||||
...FluidImage
|
...FluidImage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,7 +118,14 @@ export const EventTemplate = ({
|
|||||||
{hasFeaturedMedia && (
|
{hasFeaturedMedia && (
|
||||||
<>
|
<>
|
||||||
<div className="event-hero_image">
|
<div className="event-hero_image">
|
||||||
<Img fluid={featuredMedia.localFile.childImageSharp.fluid} />
|
{featuredMedia.localFile.childImageSharp ? (
|
||||||
|
<Img fluid={featuredMedia.localFile.childImageSharp.fluid} />
|
||||||
|
) : (
|
||||||
|
<img
|
||||||
|
src={featuredMedia.localFile.url}
|
||||||
|
alt={featuredMedia.caption || ''}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
{/* {featuredMedia.caption && (
|
{/* {featuredMedia.caption && (
|
||||||
<div
|
<div
|
||||||
@@ -237,6 +244,7 @@ export const eventQuery = graphql`
|
|||||||
featured_media {
|
featured_media {
|
||||||
caption
|
caption
|
||||||
localFile {
|
localFile {
|
||||||
|
url
|
||||||
...FluidImage
|
...FluidImage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,14 @@ export const PageTemplate = ({ title, content, featuredMedia }) => {
|
|||||||
{hasFeaturedMedia && (
|
{hasFeaturedMedia && (
|
||||||
<div className="page-hero">
|
<div className="page-hero">
|
||||||
<div className="page-hero_image">
|
<div className="page-hero_image">
|
||||||
<Img fluid={featuredMedia.localFile.childImageSharp.fluid} />
|
{featuredMedia.localFile.childImageSharp ? (
|
||||||
|
<Img fluid={featuredMedia.localFile.childImageSharp.fluid} />
|
||||||
|
) : (
|
||||||
|
<img
|
||||||
|
src={featuredMedia.localFile.url}
|
||||||
|
alt={featuredMedia.caption || ''}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
{featuredMedia.caption && (
|
{featuredMedia.caption && (
|
||||||
<div
|
<div
|
||||||
@@ -68,6 +75,7 @@ export const pageQuery = graphql`
|
|||||||
featured_media {
|
featured_media {
|
||||||
caption
|
caption
|
||||||
localFile {
|
localFile {
|
||||||
|
url
|
||||||
...FluidImage
|
...FluidImage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,8 +18,7 @@ export const BlogPostTemplate = ({
|
|||||||
author,
|
author,
|
||||||
featuredMedia,
|
featuredMedia,
|
||||||
}) => {
|
}) => {
|
||||||
const hasFeaturedMedia =
|
const hasFeaturedMedia = featuredMedia && !!featuredMedia.localFile
|
||||||
featuredMedia && (!!featuredMedia.localFile || !!featuredMedia.url)
|
|
||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
className={`post-page ${
|
className={`post-page ${
|
||||||
@@ -114,7 +113,6 @@ export const pageQuery = graphql`
|
|||||||
...GatsbyImageSharpFluid
|
...GatsbyImageSharpFluid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
url
|
|
||||||
}
|
}
|
||||||
fragment PostFields on wordpress__POST {
|
fragment PostFields on wordpress__POST {
|
||||||
id
|
id
|
||||||
@@ -145,6 +143,7 @@ export const pageQuery = graphql`
|
|||||||
featured_media {
|
featured_media {
|
||||||
caption
|
caption
|
||||||
localFile {
|
localFile {
|
||||||
|
url
|
||||||
...FluidImage
|
...FluidImage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+60
-10
@@ -46,21 +46,70 @@ export class VenueTemplate extends React.Component {
|
|||||||
/>
|
/>
|
||||||
{hasFeaturedMedia && (
|
{hasFeaturedMedia && (
|
||||||
<div className="venue-featured-image">
|
<div className="venue-featured-image">
|
||||||
<Img fluid={featuredMedia.localFile.childImageSharp.fluid} />
|
{featuredMedia.localFile.childImageSharp ? (
|
||||||
|
<Img fluid={featuredMedia.localFile.childImageSharp.fluid} />
|
||||||
|
) : (
|
||||||
|
<img src={featuredMedia.localFile.url} alt={title} />
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="venue-text">
|
<div className="venue-text">
|
||||||
<div className="venue-meta">
|
<div className="venue-meta">
|
||||||
<table>
|
<table>
|
||||||
{floor && <tr><td>Etasje</td><td>{floor}</td></tr>}
|
{floor && (
|
||||||
{capacityLegal && <tr><td>Branntillatelse for</td><td>{capacityLegal}</td></tr>}
|
<tr>
|
||||||
{capacityStanding && <tr><td>Stående</td><td>{capacityStanding}</td></tr>}
|
<td>Etasje</td>
|
||||||
{capacitySitting && <tr><td>Sittende</td><td>{capacitySitting}</td></tr>}
|
<td>{floor}</td>
|
||||||
{usedFor && <tr><td>Bruk</td><td>{usedFor}</td></tr>}
|
</tr>
|
||||||
{bar && <tr><td>Bar</td><td>{bar}</td></tr>}
|
)}
|
||||||
{audio && <tr><td>Lyd</td><td>{audio}</td></tr>}
|
{capacityLegal && (
|
||||||
{lighting && <tr><td>Lys</td><td>{lighting}</td></tr>}
|
<tr>
|
||||||
{audioVideo && <tr><td>A/V</td><td>{audioVideo}</td></tr>}
|
<td>Branntillatelse for</td>
|
||||||
|
<td>{capacityLegal}</td>
|
||||||
|
</tr>
|
||||||
|
)}
|
||||||
|
{capacityStanding && (
|
||||||
|
<tr>
|
||||||
|
<td>Stående</td>
|
||||||
|
<td>{capacityStanding}</td>
|
||||||
|
</tr>
|
||||||
|
)}
|
||||||
|
{capacitySitting && (
|
||||||
|
<tr>
|
||||||
|
<td>Sittende</td>
|
||||||
|
<td>{capacitySitting}</td>
|
||||||
|
</tr>
|
||||||
|
)}
|
||||||
|
{usedFor && (
|
||||||
|
<tr>
|
||||||
|
<td>Bruk</td>
|
||||||
|
<td>{usedFor}</td>
|
||||||
|
</tr>
|
||||||
|
)}
|
||||||
|
{bar && (
|
||||||
|
<tr>
|
||||||
|
<td>Bar</td>
|
||||||
|
<td>{bar}</td>
|
||||||
|
</tr>
|
||||||
|
)}
|
||||||
|
{audio && (
|
||||||
|
<tr>
|
||||||
|
<td>Lyd</td>
|
||||||
|
<td>{audio}</td>
|
||||||
|
</tr>
|
||||||
|
)}
|
||||||
|
{lighting && (
|
||||||
|
<tr>
|
||||||
|
<td>Lys</td>
|
||||||
|
<td>{lighting}</td>
|
||||||
|
</tr>
|
||||||
|
)}
|
||||||
|
{audioVideo && (
|
||||||
|
<tr>
|
||||||
|
<td>A/V</td>
|
||||||
|
<td>{audioVideo}</td>
|
||||||
|
</tr>
|
||||||
|
)}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -176,6 +225,7 @@ export const pageQuery = graphql`
|
|||||||
audio_video
|
audio_video
|
||||||
featured_media {
|
featured_media {
|
||||||
localFile {
|
localFile {
|
||||||
|
url
|
||||||
...FluidImage
|
...FluidImage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user