Make map responsive
Keep all visible in nav
This commit is contained in:
@@ -14,7 +14,7 @@ class Map extends React.Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const CeremonyGoogleMap = withGoogleMap(() => (
|
||||
const GMap = withGoogleMap(() => (
|
||||
<GoogleMap
|
||||
defaultZoom={this.props.defaultZoom}
|
||||
defaultCenter={{ lat: this.props.lat, lng: this.props.lng }}
|
||||
@@ -29,12 +29,25 @@ class Map extends React.Component {
|
||||
</GoogleMap>
|
||||
));
|
||||
return (
|
||||
<CeremonyGoogleMap
|
||||
<GMap
|
||||
containerElement={
|
||||
<div style={{ height: '360px', width: '360px' }} />
|
||||
<div
|
||||
style={{
|
||||
height: '360px',
|
||||
width: '100%',
|
||||
'max-width': '480px',
|
||||
overflow: 'hidden',
|
||||
}}
|
||||
/>
|
||||
}
|
||||
mapElement={
|
||||
<div style={{ height: '360px', width: '360px' }} />
|
||||
<div
|
||||
style={{
|
||||
height: '360px',
|
||||
width: '100%',
|
||||
'max-width': '480px',
|
||||
}}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -17,16 +17,13 @@
|
||||
}
|
||||
|
||||
.link,
|
||||
.link:active,
|
||||
.link:visited {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
|
||||
.active,
|
||||
.link:active,
|
||||
.link:hover {
|
||||
color: rgba(255, 255, 255, 1);
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
.active {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,3 @@
|
||||
.hotelLink:focus {
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
|
||||
.map {
|
||||
width: 360px;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,6 @@ class Accomodation extends React.Component {
|
||||
<li key={index}><a className={s.hotelLink} href={hotel.url}>{hotel.title}</a></li>
|
||||
))}
|
||||
</ul>
|
||||
<div className={s.map}>
|
||||
<Map
|
||||
defaultZoom={12}
|
||||
lat={offley[0].lat}
|
||||
@@ -65,7 +64,6 @@ class Accomodation extends React.Component {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,3 @@
|
||||
color: #fff;
|
||||
text-shadow: 1px 1px 4px var(--colour-nearblack);
|
||||
}
|
||||
|
||||
.map {
|
||||
width: 360px;
|
||||
}
|
||||
|
||||
@@ -30,14 +30,12 @@ class Ceremony extends React.Component {
|
||||
<p>The Church is located at the southern end of Kings Langley high street.
|
||||
Parking is available across the road at the Rose and Crown pub
|
||||
(Dan may be there before 1pm 😉).</p>
|
||||
<div className={s.map}>
|
||||
<Map
|
||||
defaultZoom={14}
|
||||
lat={markers[0].lat}
|
||||
lng={markers[0].lng}
|
||||
markers={markers}
|
||||
/>
|
||||
</div>
|
||||
<h3>About the church</h3>
|
||||
<p>All Saints Church is a medieval church with parts dating from the 13th century.
|
||||
The main features of the body of the Church are the beautiful reredos, depicting
|
||||
|
||||
@@ -46,7 +46,3 @@
|
||||
color: #fff;
|
||||
text-shadow: 1px 1px 4px var(--colour-nearblack);
|
||||
}
|
||||
|
||||
.map {
|
||||
width: 360px;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@ class Reception extends React.Component {
|
||||
followed by music until late.</p>
|
||||
<h3>Where</h3>
|
||||
<p>The venue is approximately 30 minute drive from the Church.</p>
|
||||
<div className={s.map}>
|
||||
<Map
|
||||
defaultZoom={12}
|
||||
lat={offley[0].lat}
|
||||
@@ -43,7 +42,6 @@ class Reception extends React.Component {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user