mirror of
https://github.com/kremalicious/blog.git
synced 2024-11-15 09:35:21 +01:00
dark map fixes
This commit is contained in:
parent
99a4792c68
commit
5c996c9c66
3
.gitignore
vendored
3
.gitignore
vendored
@ -4,6 +4,7 @@ yarn.lock
|
|||||||
package-lock.json
|
package-lock.json
|
||||||
public
|
public
|
||||||
.cache
|
.cache
|
||||||
src/components/svg
|
|
||||||
plugins/gatsby-redirect-from
|
plugins/gatsby-redirect-from
|
||||||
coverage
|
coverage
|
||||||
|
.env
|
||||||
|
.env.development
|
@ -63,4 +63,12 @@
|
|||||||
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
height: 220px;
|
height: 220px;
|
||||||
|
|
||||||
|
img {
|
||||||
|
border-radius: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
> div:first-child {
|
||||||
|
background: none !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,7 @@ import Map from 'pigeon-maps'
|
|||||||
import Marker from 'pigeon-marker'
|
import Marker from 'pigeon-marker'
|
||||||
import useDarkMode from 'use-dark-mode'
|
import useDarkMode from 'use-dark-mode'
|
||||||
|
|
||||||
const MAPBOX_ACCESS_TOKEN =
|
const mapbox = (mapboxId: string) => (
|
||||||
'pk.eyJ1Ijoia3JlbWFsaWNpb3VzIiwiYSI6ImNqbTE2NHpkYjJmNm8zcHF4eDVqZzk3ejEifQ.1uwPzM6MSTgL2e1Hxcmuqw'
|
|
||||||
|
|
||||||
const mapbox = (mapboxId: string, accessToken: string) => (
|
|
||||||
x: string,
|
x: string,
|
||||||
y: string,
|
y: string,
|
||||||
z: string,
|
z: string,
|
||||||
@ -14,11 +11,11 @@ const mapbox = (mapboxId: string, accessToken: string) => (
|
|||||||
) =>
|
) =>
|
||||||
`https://api.mapbox.com/styles/v1/mapbox/${mapboxId}/tiles/256/${z}/${x}/${y}${
|
`https://api.mapbox.com/styles/v1/mapbox/${mapboxId}/tiles/256/${z}/${x}/${y}${
|
||||||
dpr >= 2 ? '@2x' : ''
|
dpr >= 2 ? '@2x' : ''
|
||||||
}?access_token=${accessToken}`
|
}?access_token=${process.env.GATSBY_MAPBOX_ACCESS_TOKEN}`
|
||||||
|
|
||||||
const providers = {
|
const providers = {
|
||||||
light: mapbox('light-v10', MAPBOX_ACCESS_TOKEN),
|
light: mapbox('light-v10'),
|
||||||
dark: mapbox('dark-v10', MAPBOX_ACCESS_TOKEN)
|
dark: mapbox('dark-v10')
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ExifMap({
|
export default function ExifMap({
|
||||||
|
Loading…
Reference in New Issue
Block a user