blob: 8a6a9bb00f15ae5d14530e9107a2ab1c58121f99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import * as types from 'site/types'
import FontFaceObserver from 'fontfaceobserver'
import actions from 'site/actions'
import { dispatch } from 'site/store'
export const loadMuseum = () => {
Promise.all([
loadFonts,
actions.site.loadGraph('thelastmuseum'),
])
.then(() => dispatch({ type: types.site.load_site }))
}
const loadFonts = () => {
const fonts = [
new FontFaceObserver('Gruk'),
new FontFaceObserver('Gruk Wide', { style: 'italic' }),
new FontFaceObserver('Gruk Medium'),
]
return Promise.all(fonts.map(font => font.load()))
}
|