<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Grant Smith</title>
    <description>The latest articles on DEV Community by Grant Smith (@granttransition).</description>
    <link>https://dev.to/granttransition</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F241358%2Ff9ad87f8-b0ad-40be-806c-31de596f90dc.jpeg</url>
      <title>DEV Community: Grant Smith</title>
      <link>https://dev.to/granttransition</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/granttransition"/>
    <language>en</language>
    <item>
      <title>Eleventy: Loop through a collection from within a layout?</title>
      <dc:creator>Grant Smith</dc:creator>
      <pubDate>Wed, 20 May 2020 10:44:24 +0000</pubDate>
      <link>https://dev.to/granttransition/eleventy-loop-through-a-collection-from-within-a-layout-1h4i</link>
      <guid>https://dev.to/granttransition/eleventy-loop-through-a-collection-from-within-a-layout-1h4i</guid>
      <description>&lt;p&gt;I have a home page which is made up of sections. Each section is currently pulled into my index.html using partials &lt;code&gt;{% include sections/_section_01.html -%}&lt;/code&gt; for example. One of my sections has a bunch of cards which is well suited to be a collection.&lt;/p&gt;

&lt;p&gt;How do I loop through a collection from within a section?&lt;/p&gt;

&lt;p&gt;I may be going about this all wrong, but here is what I am doing currently.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;index.html&lt;/code&gt; is using &lt;code&gt;layout: 'layouts/base.liquid'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;layouts/base.liquid&lt;/code&gt; looks as such…&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{% include partials/_head.html %}
{% include partials/_header.html %}

  {% block content %}
    {{ content | safe }}
  {% endblock content %}
  {% block productContent %}{% endblock productContent %}

{% include partials/_footer.html %}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;code&gt;products.liquid&lt;/code&gt; is my layout for the cards and looks like this…&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{% block productContent %}
&amp;lt;section aria-label="Product overview"&amp;gt;
  &amp;lt;div class="container"&amp;gt;
    &amp;lt;div class="columns"&amp;gt;
      {% for product in collections.products %}
      &amp;lt;div class="col"&amp;gt;
        &amp;lt;h2&amp;gt;{{ product.data.title }}&amp;lt;/h2&amp;gt;
        {{ product.data.description }}
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="col"&amp;gt;
        &amp;lt;figure class="image 5by4"&amp;gt;
          &amp;lt;img src="assets/img/{{ product.data.img }}" alt="{{ product.data.imgAlt }}" width="648" height="521"&amp;gt;
        &amp;lt;/figure&amp;gt;
      &amp;lt;/div&amp;gt;
      {% endfor %}
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/section&amp;gt;
{% endblock productContent %}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I've tried including a section on my home page which looks at the correct layout. As per the following…&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Index.html
---
layout: 'layouts/base.liquid'
---
    &amp;lt;main role="main"&amp;gt;
      {% include sections/_section_01.html -%}
      {% include sections/_section_02.html -%}
      {% include sections/_section_03.html -%}

      {% include sections/_section_04.md -%}

      {% include sections/_section_05.html -%}
      {% include sections/_section_06.html -%}
      {% include sections/_section_07.html -%}
    &amp;lt;/main&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;_section_04.md
---
layout: "layouts/products.liquid"
---
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I know the above isn't correct as it isn't working, is it just not possible or is there a way to loop through a collection from with a layout?&lt;/p&gt;

</description>
      <category>eleventy</category>
      <category>help</category>
    </item>
    <item>
      <title>Longitude latitude generator</title>
      <dc:creator>Grant Smith</dc:creator>
      <pubDate>Fri, 03 Apr 2020 21:13:24 +0000</pubDate>
      <link>https://dev.to/granttransition/longitude-latitude-generator-2f10</link>
      <guid>https://dev.to/granttransition/longitude-latitude-generator-2f10</guid>
      <description>&lt;p&gt;Dev friends. Anyone aware of a reliable batch longitude latitude generator from addresses?&lt;/p&gt;

</description>
      <category>help</category>
    </item>
    <item>
      <title>Improving my counter</title>
      <dc:creator>Grant Smith</dc:creator>
      <pubDate>Sat, 29 Feb 2020 09:46:00 +0000</pubDate>
      <link>https://dev.to/granttransition/improving-my-counter-110k</link>
      <guid>https://dev.to/granttransition/improving-my-counter-110k</guid>
      <description>&lt;p&gt;I've created a count-up clock that I'd like some help refining if you wouldn't mind. Currently, I have two issues that are bugging (pun intended!) me.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The counter doesn't count up the hours, when it reaches two hours, it goes back to 01:01:01&lt;/li&gt;
&lt;li&gt;The numbers jump around&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is my code so far…&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Counter&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!!&lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;counter&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;minutesLabel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;minutes&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;secondsLabel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;seconds&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;totalSeconds&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;secondsLabel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;totalMinutes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;minutesLabel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nx"&gt;setInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;setTime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;setTime&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="nx"&gt;totalSeconds&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="nx"&gt;secondsLabel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerHTML&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;pad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;totalSeconds&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
   &lt;span class="nx"&gt;minutesLabel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerHTML&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;pad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;parseInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;totalMinutes&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;totalSeconds&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;pad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;val&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;valString&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;val&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;valString&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;valString&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;valString&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// End Counter&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nf"&gt;#counter&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#ee1a25&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="err"&gt;//&lt;/span&gt; &lt;span class="py"&gt;TODO&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Change&lt;/span&gt; &lt;span class="n"&gt;this&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;pattern&lt;/span&gt;
  &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="err"&gt;.counter_wrapper&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;column&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="err"&gt;@include&lt;/span&gt; &lt;span class="err"&gt;desktop&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="err"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.counter_container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="err"&gt;.counter_number&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;regular&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;60px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;family-primary&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

      &lt;span class="nl"&gt;font-feature-settings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;"tnum"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;font-variant-numeric&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;tabular-nums&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="err"&gt;@include&lt;/span&gt; &lt;span class="err"&gt;widescreen&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;133px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="err"&gt;}&lt;/span&gt;

    &lt;span class="nc"&gt;.divider&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;16px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

      &lt;span class="err"&gt;@include&lt;/span&gt; &lt;span class="err"&gt;widescreen&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;34px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;16px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;60px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="err"&gt;}&lt;/span&gt;
  &lt;span class="err"&gt;}&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I'd apprecitate any help and advice offered please&lt;/p&gt;

</description>
      <category>help</category>
      <category>javascript</category>
      <category>css</category>
    </item>
    <item>
      <title>Vue/Nuxt Component Card</title>
      <dc:creator>Grant Smith</dc:creator>
      <pubDate>Tue, 11 Feb 2020 21:23:16 +0000</pubDate>
      <link>https://dev.to/granttransition/vue-nuxt-component-card-4nck</link>
      <guid>https://dev.to/granttransition/vue-nuxt-component-card-4nck</guid>
      <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I've been trying to learn Vue + Nuxt for static site generation. Whilst I can write the following in a way that will render out the correct HTML. I want to get my head around some of the more advanced features.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Aim:&lt;/strong&gt;&lt;br&gt;
Write a repeating card component that allows me to easily change elements within the component.&lt;/p&gt;

&lt;p&gt;Here is where I am at…&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Component:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;div class="column is-4 has-text-centered"&amp;gt;
    &amp;lt;div class="icon_block"&amp;gt;
      &amp;lt;img src=":image.src" alt=":image.alt" width=":image.width" height=":image.height" /&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;h4&amp;gt;{{ title }}&amp;lt;/h4&amp;gt;
    &amp;lt;a href=":link.url" title=":link.title"&amp;gt;{{ link.anchor }}&amp;lt;/a&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/template&amp;gt;

&amp;lt;script&amp;gt;
export default {
  name: "ContactCard",
  data: {
    contacts: [
        {
          id: '',
          image: {
            src: '',
            alt: '',
            width: ,
            height: ,
          },
          title: '',
          link: {
            url: '',
            title: '',
            anchor: ''
          }
    ]
  }
};
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Template:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;div class="footer_top"&amp;gt;
    &amp;lt;div class="container"&amp;gt;
      &amp;lt;div class="columns"&amp;gt;
        &amp;lt;ContactCard
          v-for="contact in contacts" :key="id"
          :src="image.src"
          :alt="image.alt"
          :width="image.width"
          :height="image.height"
          :title="title"
          :url="link.url"
          :linkTitle="link.title"
          :anchor="link.anchor"
        &amp;gt;
        &amp;lt;/ContactCard&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/template&amp;gt;

&amp;lt;script&amp;gt;
import ContactCard from "~/components/ContactCard.vue";

export default {
  components: {
    ContactCard
  },
  data() function {
    return {
      contacts: [
        {
          id: '1',
          image: {
            src: '~assets/svg/address.svg',
            alt: 'Image Alt',
            width: 17,
            height: 30,
          },
          title: 'Address',
          link: {
            url: 'https://pagetolinkto',
            title: 'Title of link',
            anchor: 'Anchor Text'
          }
        },
      ]
    },
};
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Needless to say, this isn't working and hence I was hoping someone might be able point me in the right direction.&lt;/p&gt;

</description>
      <category>help</category>
      <category>vue</category>
      <category>nuxt</category>
    </item>
    <item>
      <title>Using external scripts with NuxtJS</title>
      <dc:creator>Grant Smith</dc:creator>
      <pubDate>Sun, 03 Nov 2019 09:43:39 +0000</pubDate>
      <link>https://dev.to/granttransition/using-external-scripts-with-nuxtjs-2cog</link>
      <guid>https://dev.to/granttransition/using-external-scripts-with-nuxtjs-2cog</guid>
      <description>&lt;p&gt;I'm very new to Nuxt and I can't work out how to import other Javascript libraries.&lt;/p&gt;

&lt;p&gt;For example, I am using Bulma in my project and find the &lt;a href="https://bulmajs.tomerbe.co.uk/docs/0.10/1-getting-started/2-installation/"&gt;BulmaJS&lt;/a&gt; library very useful as it saves me a lot of time. I appear not to be importing BulmaJs correctly into my project, but cannot figure out what I am missing?&lt;/p&gt;

&lt;p&gt;After research, I have reached the following conclusions which may or may not be correct.&lt;/p&gt;

&lt;p&gt;After installing &lt;code&gt;npm install --save-dev @vizuaalog/bulmajs&lt;/code&gt; I have added the following code.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/plugins/navbar.js&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import Navbar from '@vizuaalog/bulmajs/src/plugins/Navbar';
export default Navbar;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;code&gt;/nuxtconfig.js&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;plugins: [
 '@/plugins/navbar.js'
],
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This results in a SyntaxError Unexpected identifier error?&lt;/p&gt;

&lt;p&gt;I have found most other aspects of Nuxt very logical, but seem to be missing the point when it comes to using Javascript within projects. Another example was using &lt;a href="https://browser-update.org/"&gt;Browser Update&lt;/a&gt;, I added this as a static file and used in my footer component, again a bunch of warnings.&lt;/p&gt;

&lt;p&gt;What am I not understanding?&lt;/p&gt;

</description>
      <category>vue</category>
      <category>beginners</category>
      <category>help</category>
    </item>
    <item>
      <title>SASS VS Code extension - Missing</title>
      <dc:creator>Grant Smith</dc:creator>
      <pubDate>Mon, 14 Oct 2019 15:30:56 +0000</pubDate>
      <link>https://dev.to/granttransition/sass-vs-code-extension-missing-jai</link>
      <guid>https://dev.to/granttransition/sass-vs-code-extension-missing-jai</guid>
      <description>&lt;p&gt;Good afternoon,&lt;/p&gt;

&lt;p&gt;A little while ago I changed computers and although I had a backup, it obviously didn't contain all my VS Code extensions?&lt;/p&gt;

&lt;p&gt;I've tracked most of them down, however, there are some sass extensions I really miss…&lt;/p&gt;

&lt;p&gt;When I created a variable, &lt;code&gt;$black&lt;/code&gt; for example. Whilst writing my sass, upon typing &lt;code&gt;$&lt;/code&gt; I would get a list of recently used variables or suggestions. This was really handy.&lt;/p&gt;

&lt;p&gt;The second and probably the same extension would give a colour background of the variable if the code was referencing a colour. Such as the aforementioned variable would have a black background.&lt;/p&gt;

&lt;p&gt;Little things I know, but I would love to find the extension that provided these features.&lt;/p&gt;

&lt;p&gt;Thanks in advance on this trivial, but annoying issue 😀&lt;/p&gt;

</description>
      <category>extensions</category>
      <category>vscode</category>
      <category>help</category>
    </item>
    <item>
      <title>Should desktop sites have a max-width?</title>
      <dc:creator>Grant Smith</dc:creator>
      <pubDate>Wed, 02 Oct 2019 20:31:32 +0000</pubDate>
      <link>https://dev.to/granttransition/should-desktop-sites-have-a-max-width-4gd7</link>
      <guid>https://dev.to/granttransition/should-desktop-sites-have-a-max-width-4gd7</guid>
      <description>&lt;p&gt;I'm looking for opinions on the above. Personally, I when view sites on my 27" monitor that are full width, they tend to look less than ideal. Whereas, my laptop seems to really suit the format. However, having a load of white/grey on either side may be received negatively?&lt;/p&gt;

&lt;p&gt;So for my first post, I thought I would see if the community has opinions on the subject?&lt;/p&gt;

</description>
      <category>design</category>
      <category>layout</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
