- had to edit the UI Kit gulp file to copy
_headers to dist - switched to toml file. This finally worked.
[[headers]]
for = "*/*.woff"
[headers.values]
Access-Control-Allow-Origin = "*"
Content-Type = "font/woff"
[[headers]]
for = "*/*.woff2"
[headers.values]
Access-Control-Allow-Origin = "*"
Content-Type = "font/woff2"
[[headers]]
for = "*/*.ttf"
[headers.values]
Access-Control-Allow-Origin = "*"
Content-Type = "font/ttf"
- Got srcset working with prismic thumbnails
- upload the retina image, let it make a thumbnail of the non-retina and let the non-retina be "main"
<li v-for="(brand, index) in brands" :key="index">
<img
:srcset="brand.brand_image.url + ', ' + brand.brand_image.retina.url + ' 2x'"
:src="brand.brand_image.url"
:alt="brand.brand_image.alt"
>
</li>
- feel like I've struggled with this before, and gave up. Found a good way o build an object and count duplicates using the find method.
response.data.records.map(t => {
t.fields.Tags.map(g => {
if (!this.state.tags.find(o => { return o.name === g })) {
this.state.tags.push({ name: g, count: 1 })
} else {
this.state.tags.find(o => { return o.name === g }).count++
}
})
})