Developer Diary
  • Developer Diary
  • 2019

    • June 2019
    • July 2019
    • August 2019
    • September 2019
    • October 2019
    • November 2019
    • December, 2019
  • 2020

    • January 2020
    • February 2020
    • March 2020
    • April 2020
    • May, 2020
    • June 2020
    • July 2020
    • August 2020
    • September 2020
    • October 2020
    • November 2020
    • December 2020
  • 2021

    • January 2021
    • February 2021
    • February 2021
    • April 2021
    • May 2021
    • June 2021
    • July 2021
    • August 2021
    • September 2021
    • October 2021
    • November 2021
    • December 2021
  • 2022

    • January 2022
    • February 2022
    • March 2022
    • April 2022
    • May 2022
    • June 2022
    • July 2022
    • August 2022
    • September 2022
    • October 2022
    • November 2022
    • December 2022
  • 2023

    • January 2023
    • February 2023
    • March 2023
    • April 2023
    • May 2023
    • June 2023
    • July 2023
    • August 2023
    • September 2023
    • October 2023
    • November 2023
    • December 2023
  • 2024

    • January 2024
    • February 2024
    • March 2024
    • April 2024
    • May 2024
    • June 2024
    • July 2024
    • August, 2024
    • September 2024
    • October 2024
    • November 2024
    • December 2024
  • 2025

    • January 2025
    • February 2025
    • March 2025
    • April 2025
    • May 2025
    • June 2025
    • July 2025
    • August 2025
    • September 2025
    • October 2025
    • November 2025
    • December 2025
  • 2026

    • January 2026
    • February 2026

June 18, 2019

Trying to figure out route building in Nuxt

  • https://nuxtjs.org/api/configuration-generate/#speeding-up-dynamic-route-generation-with-code-payload-code-
  • https://www.raymondcamden.com/2019/03/12/an-example-of-nuxtjs-with-a-custom-generator
  • Extremely useful blog from Nebulab
  • Nothing breaking, but can't seem to get static stuff render
  • static stuff rendering, sitemap working
  • but, payload doesn't really work for me, it passes data to the static routes, not to the listing of routes. So probably will skip using payload

Made new prismic account with devops email

Working on Netlify headers for APIs and to be able to pull fonts from UI kit

  • 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"

Spun H up on TAP

Estimated some Ucommerce, totally guessing

Estimated some SBX animation stuff

Watching Jamstack videos

Starting some more CMS stuff and putting in JIRA

  • Wes Bos
    • Intersection Observer
    • Resize Observer
    • .closest
    • [.matches]
    • Bling.js !!!
    • Array.from
    • Remove array duplicates by passing into a Set

Started more Prismic cms + nuxt work

  • 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>

Personal project, my bookmark crud, building an object from tags in an api

  • 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++
    }
  })
})