These are chat archives for jescalan/roots

5th
May 2016
Dhaabi
@dhaabi
May 05 2016 09:14
Hello there guys. I have run into this small error running the roots-contentful plugin. Im trying to create a modal window and since the it needs to be initialised, i was wondering if there was anyway to insert the value inside the jquery selector using the roots-contentful post. inside the a script on compilation.
                    -var modalLinkHash= "#" + post.modalLink
                    -var modalLink= post.modalLink

                    figure
                        img(src= asset(post.imageFile, {w: 330, h: 247, q: 100,}))
                        figcaption= post.caption
                        a(id=modalLink, href=modalLinkHash).btn Details


                    div(id= modalLinkHash)
                        h1= post.name
                        p= post.details

                    script
                        $(post.modalLink).Modal()
Jeff Escalante
@jescalan
May 05 2016 16:37
hi @dhaabi -- i'm sorry but I'm afraid I don't understand what you're trying to do here or what the error is that you're running into
Dhaabi
@dhaabi
May 05 2016 16:46
@jenius - sorry about that. i was trying to insert the jquery selector using the - for post in contentful.posts upon compilation into the script tag. I couldn't manage to access the post data inside the script though
Randy Champagne
@champagne-randy
May 05 2016 19:07
Hi @jenius , I'm starting work on a roots-shopify extension that integrates Shopify's Buy API with Roots. Will I be able to pick your brain on the design? I'm developing this during my residency at Shopify's Partner Studio this summer in NYC.
Jeff Escalante
@jescalan
May 05 2016 19:52
@dhaabi script= 'window.data = ' + JSON.stringify(contentful)
that will expose the data to your js
@champagne-randy absolutely, around all day erry day