@@ -7,6 +7,7 @@ import { BlogWidget } from '../components/BlogWidget';
7
7
import { ContactWidget } from '../components/ContactWidget' ;
8
8
import { Layout } from '../components/Layout' ;
9
9
import { LCDWidget } from '../components/LCDWidget' ;
10
+ import { MLWidget } from '../components/MLWidget' ;
10
11
import { NowPlaying } from '../components/NowPlaying' ;
11
12
import { PodcastsWidget } from '../components/PodcastsWidget' ;
12
13
import { RunningWidget } from '../components/RunningWidget' ;
@@ -51,6 +52,11 @@ interface Props {
51
52
description : string ;
52
53
blurDataURL : string ;
53
54
} ;
55
+ MLImage : {
56
+ url : string ;
57
+ description : string ;
58
+ blurDataURL : string ;
59
+ } ;
54
60
contact : string ;
55
61
}
56
62
@@ -76,6 +82,7 @@ const Home: NextPage<Props> = function (props) {
76
82
< RunningWidget />
77
83
< PodcastsWidget podcasts = { props . favoritePodcasts } />
78
84
< Web3Widget />
85
+ < MLWidget bgImage = { props . MLImage } />
79
86
< NowPlaying />
80
87
< ContactWidget text = { props . contact } />
81
88
</ Layout >
@@ -138,6 +145,12 @@ export const getStaticProps: GetStaticProps = async ({ preview = false }) => {
138
145
description
139
146
}
140
147
}
148
+ MLImage: assetCollection(where: {title: "Makersleague.de"}, limit: 1, preview: false) {
149
+ items {
150
+ url
151
+ description
152
+ }
153
+ }
141
154
}` ,
142
155
preview
143
156
) ;
@@ -163,6 +176,11 @@ export const getStaticProps: GetStaticProps = async ({ preview = false }) => {
163
176
size : 10 ,
164
177
} ) ;
165
178
LCDImage . blurDataURL = LCDImageBase64 ;
179
+ const MLImage = response . data . MLImage . items [ 0 ] ;
180
+ const { base64 : MLImageBase64 } = await getPlaiceholder ( MLImage . url , {
181
+ size : 10 ,
182
+ } ) ;
183
+ MLImage . blurDataURL = MLImageBase64 ;
166
184
167
185
let aboutTeaser = person . cvText ;
168
186
aboutTeaser = stripFirstLine ( aboutTeaser ) ;
@@ -190,6 +208,7 @@ export const getStaticProps: GetStaticProps = async ({ preview = false }) => {
190
208
smartHomeFootnote : await markdownToHTML ( smartHomeFootnoteText ) ,
191
209
favoritePodcasts,
192
210
LCDImage,
211
+ MLImage,
193
212
contact : await markdownToHTML ( contactText ) ,
194
213
} ,
195
214
} ;
0 commit comments