<?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: Gabe</title>
    <description>The latest articles on DEV Community by Gabe (@gabe).</description>
    <link>https://dev.to/gabe</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%2F108592%2Fcf2785c6-2d80-47f9-8d12-49001e31da67.jpg</url>
      <title>DEV Community: Gabe</title>
      <link>https://dev.to/gabe</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gabe"/>
    <language>en</language>
    <item>
      <title>Running CSS Animations Once Per Session</title>
      <dc:creator>Gabe</dc:creator>
      <pubDate>Sat, 18 Jul 2020 22:35:53 +0000</pubDate>
      <link>https://dev.to/gabe/running-a-css-animation-once-per-session-3a84</link>
      <guid>https://dev.to/gabe/running-a-css-animation-once-per-session-3a84</guid>
      <description>&lt;p&gt;I was working on some intro animations the other day for my site and had an idea to have a user land on the homepage, and the word “hello” would slide in from the left greeting them.&lt;/p&gt;

&lt;p&gt;The animation bit was reasonably straightforward, I used CSS animations to translate the text’s X value from -100% to zero. When testing the animation, I got what I wanted; the text now slid in from the left.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@keyframes&lt;/span&gt; &lt;span class="n"&gt;slideInFromLeft&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="err"&gt;0&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;-100%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="err"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkvbo9s9le9tv6m3nf41t.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkvbo9s9le9tv6m3nf41t.gif" alt="Alt Text" width="600" height="416"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There was a problem though, every time I refreshed the page, the animation would replay, this got pretty annoying when navigating through the site and returning home. So I decided to use some JavaScript and the Window's session-storage property to solve my problem.&lt;/p&gt;

&lt;p&gt;For those who may be unfamiliar with the session-storage property: think of it like local-storage. With local-storage, we can store data that won't expire. The difference with session-storage is that the data expires after the window or browser tab is closed.&lt;/p&gt;

&lt;p&gt;I started with an if statement that read something like “If a property called animated within the session-storage property is equal to null, run the following code”&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sessionStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;animated&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Within that if statement code block, I targeted the text that would be animating, added the “animate” class to it, which contained the CSS animation rule, and then set the animated property within session-storage to 1.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sessionStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;animated&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;my&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;animate&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sessionStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;animated&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And now, the animation only fires once per session. A quick and easy way to ensure we don’t annoy our users with our fancy animations.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>css</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Bringing this 2-D Nebula Drawing to Life With Code</title>
      <dc:creator>Gabe</dc:creator>
      <pubDate>Mon, 16 Mar 2020 11:55:46 +0000</pubDate>
      <link>https://dev.to/gabe/bringing-this-2-d-nebula-drawing-to-life-with-parallax-js-2jn5</link>
      <guid>https://dev.to/gabe/bringing-this-2-d-nebula-drawing-to-life-with-parallax-js-2jn5</guid>
      <description>&lt;p&gt;A few weeks back, after wrapping up my space-themed drawing, I thought about how cool it would be if I could somehow go the extra step and potentially make my new scene interactive.&lt;/p&gt;

&lt;p&gt;After some digging, I realized the easiest way to go about this would be to make my drawing a parallax-like experience using Matthew Wagerfield's &lt;a href="https://matthew.wagerfield.com/parallax/" rel="noopener noreferrer"&gt;Parallax.js&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My goal was to turn this...&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjizeoquq6gyss9s7tdes.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjizeoquq6gyss9s7tdes.jpg" alt="Alt Text" width="400" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;...into this&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4maxb0pd7r5qq3wf15va.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4maxb0pd7r5qq3wf15va.gif" alt="Alt Text" width="1024" height="1024"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Preparing the assets
&lt;/h2&gt;

&lt;p&gt;Before I could dive into my code, I had to prepare my assets. I had to export each layer of my drawing as its own image, or PNG in this case. I ended up with a total of 9 PNGs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Faci2voarr9w5i24ruo8y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Faci2voarr9w5i24ruo8y.png" alt="Alt Text" width="300" height="245"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My assets were also pretty large in terms of file size, so to solve that, I used &lt;a href="https://tinypng.com/" rel="noopener noreferrer"&gt;TinyPNG&lt;/a&gt; to help reduce file size without compromising too much on the image quality.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Structure
&lt;/h2&gt;

&lt;p&gt;After optimizing my assets, I moved them into their own folder for the sake of organization. I downloaded the minified version of Parallax.js I found in the &lt;a href="https://github.com/wagerfield/parallax" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt; and placed it in the root of my project directory like so&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fliwvd4xuht66sxr3ve59.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fliwvd4xuht66sxr3ve59.png" alt="Alt Text" width="366" height="236"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Development
&lt;/h2&gt;

&lt;p&gt;With my files in place, I opened up &lt;code&gt;index.html&lt;/code&gt; and set up my images&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;      &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"scene"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/background.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/Nebula.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/Pink Haze_.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/Dark Haze.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/Stars.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/bottom.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/top.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"small-planets"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/Smallest Planets.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"main-planet"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/Main Planet.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With the images in place, I needed to add the &lt;code&gt;data-depth&lt;/code&gt; attributes to their parent divs. The closer something was to the foreground, the higher its &lt;code&gt;data-depth&lt;/code&gt; value.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The movement applied to each layer will be multiplied by its depth attribute.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;      &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"scene"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;data-depth=&lt;/span&gt;&lt;span class="s"&gt;"0.00"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/background.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;data-depth=&lt;/span&gt;&lt;span class="s"&gt;"0.00"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/Nebula.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;data-depth=&lt;/span&gt;&lt;span class="s"&gt;"0.00"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/Pink Haze_.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;data-depth=&lt;/span&gt;&lt;span class="s"&gt;"0.10"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/Dark Haze.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;data-depth=&lt;/span&gt;&lt;span class="s"&gt;"0.40"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/Stars.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;data-depth=&lt;/span&gt;&lt;span class="s"&gt;"0.60"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/bottom.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;data-depth=&lt;/span&gt;&lt;span class="s"&gt;"0.70"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/top.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;data-depth=&lt;/span&gt;&lt;span class="s"&gt;"1.00"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"small-planets"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/Smallest Planets.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;data-depth=&lt;/span&gt;&lt;span class="s"&gt;"0.80"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"main-planet"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/Main Planet.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I then targeted the scene with javascript and created a new parallax instance with that scene as the parameter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;      &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;scene&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="nf"&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;scene&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;parallax&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Parallax&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;scene&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I now had a functioning parallax experience. However, it was too large, and things were a bit out of place&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5u7dt1hto57dbjx19cwy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5u7dt1hto57dbjx19cwy.gif" alt="Alt Text" width="400" height="277"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I resolved this by adding some CSS, though ideally, I should have resized my actual images.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.scene&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="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;700px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;max-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;700px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;hidden&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="nt"&gt;data-depth&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;"0.80"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;25%&lt;/span&gt; &lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20%&lt;/span&gt; &lt;span class="cp"&gt;!important&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="nt"&gt;data-depth&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;"1.00"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;80%&lt;/span&gt; &lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;#main-planet&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;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4maxb0pd7r5qq3wf15va.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4maxb0pd7r5qq3wf15va.gif" alt="Alt Text" width="1024" height="1024"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and with that, I had my end product. If you'd like to see it for yourself, head on over to &lt;a href="https://gabesousa.com/works/parallax-galaxy.html" rel="noopener noreferrer"&gt;my site&lt;/a&gt; on a desktop browser and hover over the canvas. Enjoy!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>css</category>
      <category>html</category>
    </item>
    <item>
      <title>A little bit of CSS micro-interactions and some cards</title>
      <dc:creator>Gabe</dc:creator>
      <pubDate>Sun, 08 Mar 2020 04:14:45 +0000</pubDate>
      <link>https://dev.to/gabe/a-little-bit-of-css-micro-interactions-and-some-cards-5978</link>
      <guid>https://dev.to/gabe/a-little-bit-of-css-micro-interactions-and-some-cards-5978</guid>
      <description>&lt;p&gt;I recently reworked my site to feature cards on the homepage that acts as a gallery for some of the recent drawings that I’ve done. &lt;/p&gt;

&lt;p&gt;Initially, I had the cards pop a bit on hover by giving them a drop shadow. I played around with various other properties for a few hours before ending up with the following&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fibo0jrauamuyh5tvzex8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fibo0jrauamuyh5tvzex8.gif" alt="Demonstrating the zoom-in and text-stretch effect that happens on mouse hover" width="480" height="522"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A few micro-interactions are happening in the GIF above. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Zoom effect on the image&lt;/li&gt;
&lt;li&gt;Increased letter spacing in the title&lt;/li&gt;
&lt;li&gt;Box-shadow transitions between a subtle/noticeable state&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are all done in conjunction with CSS transitions, to give it a smooth effect, both in and out.&lt;/p&gt;

&lt;p&gt;To create that, I started with three divs. One is the actual card, the second is where we will house the background image, and the third is our title box.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card_background"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"title"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Parallax Galaxy&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CSS was a bit more involved. I also had to mess around with the transitions a bit until I got it just right.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.card&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;hidden&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;box-shadow&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;1px&lt;/span&gt; &lt;span class="m"&gt;3px&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.12&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;1px&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.24&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;all&lt;/span&gt; &lt;span class="m"&gt;.3s&lt;/span&gt; &lt;span class="n"&gt;cubic-bezier&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0.25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.card&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;box-shadow&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;14px&lt;/span&gt; &lt;span class="m"&gt;28px&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;0.25&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;10px&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.295&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.card_background&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cover&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-position&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;background-repeat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;no-repeat&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;100%&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;50vh&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;all&lt;/span&gt; &lt;span class="m"&gt;2s&lt;/span&gt; &lt;span class="n"&gt;cubic-bezier&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0.25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.card&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="nc"&gt;.card_background&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1.1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.card&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="nc"&gt;.title&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;letter-spacing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.title&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.5rem&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;400px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;all&lt;/span&gt; &lt;span class="m"&gt;3s&lt;/span&gt; &lt;span class="n"&gt;cubic-bezier&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0.25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;letter-spacing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;text-transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;uppercase&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.title&lt;/span&gt; &lt;span class="nt"&gt;h2&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;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&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;1.3rem&lt;/span&gt;&lt;span class="p"&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="m"&gt;700&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="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The end-effect functioning on multiple images. A relatively quick and easy way to spice-up any gallery.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9oe5k60k38wgxhuh2e7o.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9oe5k60k38wgxhuh2e7o.gif" alt="Alt Text" width="600" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
    </item>
    <item>
      <title>Landing Page development in 2019/2020</title>
      <dc:creator>Gabe</dc:creator>
      <pubDate>Mon, 04 Nov 2019 20:03:08 +0000</pubDate>
      <link>https://dev.to/gabe/landing-page-development-in-2019-2020-157a</link>
      <guid>https://dev.to/gabe/landing-page-development-in-2019-2020-157a</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;A landing page is a standalone web page, created specifically for the purposes of a marketing or advertising campaign. It’s where a visitor “lands” when they have clicked on a Google AdWords ad or similar. &lt;a href="https://unbounce.com/landing-page-articles/what-is-a-landing-page/" rel="noopener noreferrer"&gt;Unbounce&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;With services such as &lt;a href="https://www.wix.com/" rel="noopener noreferrer"&gt;Wix&lt;/a&gt; and Unbounce propping up, I wanted to ask the Dev community what it thought about Landing Page development in 2019/2020. &lt;/p&gt;

&lt;p&gt;Are developers still using WordPress or other CMSs to create landing pages? Or have people adopted using static-site-generators for such content? Could it be that people are abandoning these methods altogether in favor of site builders like Wix or Unbounce?&lt;/p&gt;

&lt;p&gt;If people are still using WordPress or other content management systems to spin up landing pages, are there tools you may have found or built to assist you in development?&lt;/p&gt;

&lt;p&gt;Any information on the topic is greatly appreciated.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Single File Components in Two Minutes</title>
      <dc:creator>Gabe</dc:creator>
      <pubDate>Sun, 20 Oct 2019 17:15:17 +0000</pubDate>
      <link>https://dev.to/gabe/two-minute-guide-to-single-file-components-5879</link>
      <guid>https://dev.to/gabe/two-minute-guide-to-single-file-components-5879</guid>
      <description>&lt;p&gt;Single-File-Components or SFC is a Vue.js feature that allows us to build our entire component - template, logic, and styles, in one &lt;code&gt;.vue&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;Below is an example of a component that displays a paragraph element with static text and a dynamic winner.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight vue"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;template&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;And the winner is: &lt;span class="si"&gt;{{&lt;/span&gt; &lt;span class="nx"&gt;winner&lt;/span&gt; &lt;span class="si"&gt;}}&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="k"&gt;template&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;script&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;function &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="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;winner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;You&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="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="k"&gt;script&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;


&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;style&lt;/span&gt; &lt;span class="na"&gt;scoped&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="k"&gt;style&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Template &amp;amp; Script
&lt;/h3&gt;

&lt;p&gt;The template portion of this example is a paragraph element with some template syntax that allows us to render data to the DOM. &lt;/p&gt;

&lt;p&gt;Templates in single-file components must be wrapped in one HTML tag, so if we wanted to include multiple paragraph elements in our example, we would have to wrap our elements in a &lt;code&gt;div&lt;/code&gt; or a similar container element.&lt;/p&gt;

&lt;p&gt;In between the script tags are where our logic and data are found. The data and DOM are linked allowing us to dynamically change our data, so if we were to change the winner data to say 'me', the DOM would reflect that change reactively.&lt;/p&gt;

&lt;h3&gt;
  
  
  Style
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight vue"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;style&lt;/span&gt; &lt;span class="na"&gt;scoped&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="k"&gt;style&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the example above, the style tag features the attribute &lt;code&gt;scoped&lt;/code&gt;. This attribute allows us to style the elements of the current component only. &lt;/p&gt;

&lt;p&gt;Meaning if this component is featured on a page with other paragraph elements, only the paragraph element in this component will take on the color blue, the rest will follow whatever default rules were set for the paragraph elements.&lt;/p&gt;




&lt;br&gt;&lt;br&gt;
For additional reading on single file components or the Vue framework in general, I recommend checking out the official &lt;a href="https://vuejs.org/v2/guide/" rel="noopener noreferrer"&gt; Vue.js documentation&lt;/a&gt;

</description>
      <category>vue</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>css</category>
    </item>
    <item>
      <title>Four Firefox Dev-Tools I use daily</title>
      <dc:creator>Gabe</dc:creator>
      <pubDate>Wed, 12 Jun 2019 00:51:56 +0000</pubDate>
      <link>https://dev.to/gabe/four-firefox-dev-tools-i-use-daily-212l</link>
      <guid>https://dev.to/gabe/four-firefox-dev-tools-i-use-daily-212l</guid>
      <description>&lt;p&gt;I love Firefox, and this is no secret. I find it to be a snappy browser with some phenomenal developer tools built right in.&lt;/p&gt;

&lt;p&gt;Most around me use Chrome, (or more recently &lt;a href="https://brave.com/" rel="noopener noreferrer"&gt;Brave&lt;/a&gt;) and swear by their dev tools. And I'll admit that they're pretty great, I even ended up switching over to Brave for a few weeks and found it to be a fantastic browser. However, after weeks of straight usage both at home and at work, I found myself switching back to Firefox. It felt like coming back home when I launched the developer tools and started working. Functionality-wise, both FF and Chrome are almost identical, &lt;em&gt;almost&lt;/em&gt;. I'll briefly highlight some of what I think are the most useful features of Firefox's dev tools.&lt;/p&gt;

&lt;h4&gt;
  
  
  Highlighting
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2jh87pswvo6t9jp8pu1s.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2jh87pswvo6t9jp8pu1s.gif" width="760" height="478"&gt;&lt;/a&gt;&lt;br&gt;
One of the most useful features of Firefox's inspector tool for me is the ability to highlight elements on a page matching any selector I choose. In my example GIF above, I highlight every anchor tag on my homepage, which contains the class &lt;code&gt;.wp-block-latest-posts&lt;/code&gt;. This feature is handy when I'm trying to figure out which item or items fall under a certain class name, or need the overview of a certain &lt;code&gt;div&lt;/code&gt; box-model while I inspect an element directly above it or below it, etc. Elements will stay highlighted even if you switch over to a different tab in your dev tools. So you can leave an element highlighted while you change over to the fonts tab or browser console. It's a small feature with many uses.&lt;/p&gt;

&lt;h4&gt;
  
  
  Fonts
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0bbthej123z324rp794w.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0bbthej123z324rp794w.gif" width="760" height="471"&gt;&lt;/a&gt;&lt;br&gt;
The fonts tab is a newer addition to the Firefox dev tools. Here, you can get a nice overview of the fonts being used on the current page as well as controls to quickly customize their appearance - from &lt;code&gt;font-weight&lt;/code&gt; to &lt;code&gt;font-size&lt;/code&gt; and even the &lt;code&gt;line-height&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Changes
&lt;/h4&gt;

&lt;p&gt;I am constantly using the inspector tool to highlight items and make CSS changes right then and there. If I like what I see, I backtrack through my changes and write out the code in my text editor. The changes tab conveniently takes all the CSS revisions that I have made in the inspector tool during my often long sessions and lumps them together so that I can quickly get an overview as to what exactly I did, Firefox even gives me the ability copy and paste directly from here. Gone are the days of painfully backtracking through an endless number of elements because I no longer remember what exactly I did to make something look as intended.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fouilh47rvjkjd9qu2vv1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fouilh47rvjkjd9qu2vv1.png" width="800" height="1050"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Scratchpad
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6xw5eusz23bo3qqeyza3.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6xw5eusz23bo3qqeyza3.gif" width="800" height="499"&gt;&lt;/a&gt;&lt;br&gt;
Scratchpad is cool; it allows you to write out some JavaScript and execute it when ready. It also allows you to inspect JS objects. What I like about Scratchpad is that it works more like a text-editor than a browser console. I can write out my JS as if I were in VS Code, and it won't execute until I tell it to run, as opposed to the console, which at times I have run mid-way through writing some JavaScript thanks to a slippery finger on the return key.&lt;/p&gt;

&lt;p&gt;There are so many other cool Firefox dev tool features I did not get to in this post, such as &lt;a href="https://twitter.com/nicolaschevobbe/status/1135798960361263104" rel="noopener noreferrer"&gt;real time CSS tips&lt;/a&gt;, or the &lt;a href="https://twitter.com/jensimmons/status/1126570959715098624" rel="noopener noreferrer"&gt;CSS Grid Inspector&lt;/a&gt;. For further reading into what Firefox's dev tools can do, you can hop on over to their &lt;a href="https://developer.mozilla.org/en-US/docs/Tools" rel="noopener noreferrer"&gt;DOCS&lt;/a&gt;, I'd also recommend giving their &lt;a href="https://twitter.com/FirefoxDevTools" rel="noopener noreferrer"&gt;twitter&lt;/a&gt; a follow for the latest on their developer tools. Enjoy friends!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>css</category>
    </item>
    <item>
      <title>Fluid Animated CSS Gradient Text Effect</title>
      <dc:creator>Gabe</dc:creator>
      <pubDate>Tue, 12 Feb 2019 02:36:20 +0000</pubDate>
      <link>https://dev.to/gabe/fluid-css-gradient-animation-3b2</link>
      <guid>https://dev.to/gabe/fluid-css-gradient-animation-3b2</guid>
      <description>&lt;p&gt;CSS animations are awesome. Not only do they make great &lt;a href="https://codepen.io/astrixsz/pen/RRxyKz" rel="noopener noreferrer"&gt;digital art pieces&lt;/a&gt;, they also give us the ability to add fluid design elements, right into our web pages. Recently, I integrated a CSS gradient animation in many of my blog links to give them a living, liquid feel to them. See my 'Recent Essays' module below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxb74y0wmhx6vp305si4k.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxb74y0wmhx6vp305si4k.gif" width="600" height="405"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;note: gif is sped up for demonstration purposes&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Neat, right? And fairly simple to accomplish. All we really need is CSS!&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9bu1gatjhjpd3rxatul3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9bu1gatjhjpd3rxatul3.png" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Let's deconstruct it
&lt;/h3&gt;

&lt;p&gt;So first thing in my CSS is the animation rules.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk4gurb3y8xs6eyt9gor9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk4gurb3y8xs6eyt9gor9.png" width="800" height="430"&gt;&lt;/a&gt;&lt;br&gt;
Here, I'm saying - play the animation named &lt;strong&gt;flow&lt;/strong&gt; for a duration of &lt;strong&gt;30 seconds&lt;/strong&gt;. Set the animation to &lt;strong&gt;ease in and out&lt;/strong&gt; for a smoother effect, and have the animation loop for an &lt;strong&gt;infinite&lt;/strong&gt; number of times.&lt;/p&gt;

&lt;p&gt;Then there are the background rules.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5mipy7kn56nzh0eiufqr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5mipy7kn56nzh0eiufqr.png" width="800" height="325"&gt;&lt;/a&gt;&lt;br&gt;
I set my background to be a &lt;strong&gt;linear-gradient&lt;/strong&gt; and give it my desired colors. &lt;em&gt;For beautiful gradients I use often &lt;a href="https://uigradients.com/" rel="noopener noreferrer"&gt;UI Gradients&lt;/a&gt; when I can't come up with anything nice.&lt;/em&gt; I then stretch out the background to 300% the size using the &lt;strong&gt;background-size&lt;/strong&gt; property to give the animation room to move. &lt;/p&gt;

&lt;p&gt;I then set the &lt;strong&gt;background-clip&lt;/strong&gt; to be &lt;strong&gt;text&lt;/strong&gt; and set the &lt;strong&gt;text-fill-color&lt;/strong&gt; to be &lt;strong&gt;transparent&lt;/strong&gt; so my default font color doesn't interfere with my gradient.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fengm14gjj10qfvf7j2zl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fengm14gjj10qfvf7j2zl.png" width="800" height="543"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now on to the actual animating. I create a keyframe animation named flow and set up keyframes at the zero, fifty, and one-hundred percent marks.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg3kyiy2gcrmwqcrkzpwy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg3kyiy2gcrmwqcrkzpwy.png" width="800" height="1102"&gt;&lt;/a&gt;&lt;br&gt;
Final result:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fezwkq4psz1j4ag310z75.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fezwkq4psz1j4ag310z75.gif" width="600" height="382"&gt;&lt;/a&gt;&lt;br&gt;
And there you have it - a nice, fluid animated gradient over text. Just another little fun design element courtesy of CSS.&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Setting up a 'Recent Posts' section using Twig</title>
      <dc:creator>Gabe</dc:creator>
      <pubDate>Sat, 09 Feb 2019 18:27:55 +0000</pubDate>
      <link>https://dev.to/gabe/setting-up-a-recent-posts-section-in-twig-4pb1</link>
      <guid>https://dev.to/gabe/setting-up-a-recent-posts-section-in-twig-4pb1</guid>
      <description>&lt;p&gt;I'm embarrassed to admit that when I initially setup my Grav blog, I did so without much forethought. My entire home page was coded directly into the WYSIWYG. It was pretty simple so I got away with it for a bit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwpf089ydp0vguz1cnyqw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwpf089ydp0vguz1cnyqw.png" width="800" height="696"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It wasn't until I went to update my "Recent Essays" section today that I realized how poorly I had setup my homepage. So I spun up my local environment and got to work on a quick fix.&lt;/p&gt;

&lt;h3&gt;
  
  
  Auto pull the five most recent posts
&lt;/h3&gt;

&lt;p&gt;Using &lt;a href="https://learn.getgrav.org/cookbook/twig-recipes" rel="noopener noreferrer"&gt;this post&lt;/a&gt; I found in the Grav documentation, I was able to take the first example and tailor it to my needs with ease. I came up with the following:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmpw2zx6w2jbfnr1gkyr2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmpw2zx6w2jbfnr1gkyr2.png" width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And with that, I no longer have to worry about manually updating my homepage every time I write a new blog post. I simply write, publish, and call it a day. &lt;/p&gt;

</description>
      <category>php</category>
      <category>productivity</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>A brief introduction to tiny CMS</title>
      <dc:creator>Gabe</dc:creator>
      <pubDate>Sat, 02 Feb 2019 23:47:49 +0000</pubDate>
      <link>https://dev.to/gabe/a-brief-introduction-to-tiny-cms-4ae1</link>
      <guid>https://dev.to/gabe/a-brief-introduction-to-tiny-cms-4ae1</guid>
      <description>&lt;p&gt;I recently setup my own &lt;a href="https://gabemade.com" rel="noopener noreferrer"&gt;blog&lt;/a&gt; using a 'flat-file' content management system known as &lt;a href="https://getgrav.org/" rel="noopener noreferrer"&gt;GRAV&lt;/a&gt;. If you are unaware of what a Flat File CMS is, it's essentially a CMS like WordPress in where it uses PHP to process logic. Where it's different is in it's lack of database, for storing posts and other data it uses flat text files. It's pretty neat. In the short time since my install, I've installed five amazing small plug-ins, and have built out my own custom theme using CSS and TWIG. It's been a fun experience working with the small CMS, I've especially enjoyed having a full blog at roughly 30mb in size. It's incredibly fast. So in this post I'm going to be giving a small introduction to the CMS. &lt;/p&gt;

&lt;p&gt;We're going to head on over to &lt;a href="https://getgrav.org/downloads" rel="noopener noreferrer"&gt;Grav's download page&lt;/a&gt; and grab the 'Grav Core + Admin Plugin' bundle. Once you've downloaded and extracted the zip, you'll find the entire CMS plus the admin plugin in that 20mb folder.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's in the box?
&lt;/h2&gt;

&lt;p&gt;I've attached a screenshot of an almost default folder structure below with the only modification being the addition of the .ddev folder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvw0idpl0xqp74h17osh8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvw0idpl0xqp74h17osh8.png" width="552" height="1580"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Pages
&lt;/h3&gt;

&lt;p&gt;Almost everything you need is located under the user folder. That's the really neat thing about this CMS. Rather than storing your posts in a database like a traditional CMS such as WordPress or Drupal, GRAV stores them right in your users/pages directory. The pages are then organized into folders that contain their respective markdown files. &lt;/p&gt;

&lt;h3&gt;
  
  
  Themes
&lt;/h3&gt;

&lt;p&gt;Themes could, and probably should, get it's own post. There's so much to go over when it comes to themes, and it's all really cool. I'm going to keep it brief for this post. Themes in GRAV are made using TWIG, a PHP template engine. For my own custom theme, I downloaded a &lt;a href="https://github.com/steroyle/grav-blank-theme" rel="noopener noreferrer"&gt;blank starter theme&lt;/a&gt;, and started with two template files, a 'blog.html.twig' for my blog posts and a 'default.html.twig' for any non-blog pages. In these TWIG files, there are PHP code that pull in my template partials, such as my footer, header, etc. from my partials folder and pieces them all together. I've attached a screenshot of the folder structure for the default theme, Quark to give a clearer image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2b0y6lf3ovsh8n3um0zj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2b0y6lf3ovsh8n3um0zj.png" width="520" height="1540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up a local
&lt;/h2&gt;

&lt;p&gt;In order to setup and start developing locally, we gotta do some prep work first. We need to install &lt;a href="https://docs.docker.com/docker-for-mac/install/" rel="noopener noreferrer"&gt;Docker&lt;/a&gt; and &lt;a href="https://ddev.readthedocs.io/en/stable/" rel="noopener noreferrer"&gt;DDEV&lt;/a&gt;. Docker is a straight forward install, create an account, download the DMG, slide the Docker.app into your applications folder. For DDEV, I chose to install it via &lt;a href="https://brew.sh/" rel="noopener noreferrer"&gt;BREW&lt;/a&gt;. Assuming you have BREW installed, we must first add the ddev repository using&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;brew tap drud/ddev&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 once it's added, we can run the following to install ddev onto our machine.&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;brew install ddev&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;We should at this point have DDEV and Docker installed, so now we're ready to get started. Let's move our Grav folder from downloads to a more secure location. I moved mine into my "Sites" folder in my home directory. Open Terminal and lets CD into our site folder. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgfnhd7jmxadir30ejc9m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgfnhd7jmxadir30ejc9m.png" width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once there, we want to run&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;ddev config&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 we will then be prompted to enter a name for our project. I chose grav-demo in this case.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy5yp6lkow1qv5w1o0ibh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy5yp6lkow1qv5w1o0ibh.png" width="800" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another prompt appears asking us the DocRoot location, leave it blank. Finally, the last prompt will ask us to enter the project type, in our case it is PHP. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3476slts6bqde9zp0dbh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3476slts6bqde9zp0dbh.png" width="800" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And now we run&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;ddev start&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;This may take a bit since it's building out our container. Once it's done it should spit out a nice link where we can view our local install. &lt;/p&gt;

&lt;h3&gt;
  
  
  Admin Panel
&lt;/h3&gt;

&lt;p&gt;The first screen you'll be presented with is the Admin User Creation screen, since we have the admin plug-in installed by default but no admin accounts. Create one and it'll throw you right into the admin panel.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F413dvwr3yw71091wzc8i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F413dvwr3yw71091wzc8i.png" width="800" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here we have a brief overview of our site's backup and update status, and the visitor count. In the sidebar, we can see quick links to our site configuration, pages, plug-ins, themes, etc. &lt;/p&gt;

&lt;h3&gt;
  
  
  Pages
&lt;/h3&gt;

&lt;p&gt;If we head into pages we can see the default pages that come with GRAV, HOME and TYPOGRAPHY. Here in this section, we can add folders and pages to our site and organize them however we like.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F11yfett60g5cwgxtyve8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F11yfett60g5cwgxtyve8.png" width="800" height="568"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we click on a page, we will be able to edit it via a WYSIWYG. By default it will look like the following, but you can install other &lt;a href="https://github.com/newbthenewbd/grav-plugin-tinymce-editor" rel="noopener noreferrer"&gt;more advanced editors&lt;/a&gt; if you so choose.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faszw1eincf9vsij2h30i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faszw1eincf9vsij2h30i.png" width="800" height="568"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Plug-ins
&lt;/h3&gt;

&lt;p&gt;Straight forward, installed plug-ins will show up here. You can even search for new plug-ins to install right in this section via the +add button which is super convenient. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feg4kfnk6h8phar4mnqgm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feg4kfnk6h8phar4mnqgm.png" width="800" height="568"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Themes
&lt;/h3&gt;

&lt;p&gt;Themes you create or install will show up in this section and can be activated/deactivated, here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkzuuidiom67mc0xku5ze.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkzuuidiom67mc0xku5ze.png" width="800" height="568"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;So there you have it, in a brief, 5 minute read - that was an intro to the tiny GRAV CMS. A small flat file CMS that can really do a lot! For me, experimenting with GRAV got me interested in other small content management systems such as &lt;a href="https://www.wondercms.com/" rel="noopener noreferrer"&gt;WonderCMS&lt;/a&gt; and &lt;a href="https://octobercms.com/" rel="noopener noreferrer"&gt;OctoberCMS&lt;/a&gt;. So far I've played around with WonderCMS, but am very curious to try out October for its Laravel framework. For now, I'll stick to working on my current GRAV install and experiment with the theming.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Nine months as a Jr. Web Developer</title>
      <dc:creator>Gabe</dc:creator>
      <pubDate>Sun, 27 Jan 2019 16:44:22 +0000</pubDate>
      <link>https://dev.to/gabe/nine-months-as-a-jr-web-developer-5bh5</link>
      <guid>https://dev.to/gabe/nine-months-as-a-jr-web-developer-5bh5</guid>
      <description>&lt;p&gt;It's been an extremely rewarding journey so far in my nine months as a jr. developer. I started off in the Summer of 2018 working as a Jr. Front-End contractor for Third &amp;amp; Grove, a web agency that specializes in Drupal located here in Boston. After working there for a few months I moved on to a permanent position as a Creative Technologist at Amp Agency. In my short time as a jr developer, I've been very fortunate to have had great leaders &amp;amp; teachers that I could reach out to for help, without them I would not be where I am today. So with that, I'll be going through some lessons I've learned throughout these nine months.&lt;/p&gt;

&lt;h2&gt;
  
  
  Third &amp;amp; Grove.
&lt;/h2&gt;

&lt;p&gt;At T&amp;amp;G right off the bat, I really learned how an agency functioned. My days were simple - I arrived at 8:30 AM, opened up JIRA, and booted up my vagrant boxes so I could start tackling tickets (often with the help of other more senior developers). It was fantastic. T&amp;amp;G was extremely aggressive about the quality of the code they engineered. They had beautifully written and strict, best-practices documentation that was closely followed by every single engineer. This was also frightening. As a brand new Jr. Dev, I, at times felt slow or even dumb because I couldn't provide them quality code 24/7. JavaScript and CSS tended to give me the biggest headaches - there were issues or tickets I would need to solve that at first, seemed like it should have been an easy task but as I would later learn, they were very actually pretty tricky. Whenever I encountered problems like these, I would buckle down and try to solve them myself so that I could feel like a 'real developer'. This was my first big mistake. By doing this, I sometimes ran over-allocated project time and caused headaches for the project managers, one of my managers would later confess this to me in my exit interview. She told me that in the future when I get stuck again - don't wait to reach out for help, do it ASAP! I personally didn't like reaching out to other developers "all the time" because it felt like I was bothering them. It felt like they were babysitting me. She assured me that there was nothing wrong with asking other developers for help, in fact, that's what many of them were there for - to help out us Jr devs. So always be willing to reach out for help.&lt;/p&gt;

&lt;p&gt;Another great tip I got was from our Director of Engineering, and that was to not let imposter syndrome grip you. I had never heard of the term 'Imposter Syndrome' but after he explained it, it perfectly described how I felt during my summer as a jr. For those that may not know&lt;/p&gt;
&lt;blockquote&gt;'Imposter syndrome is a psychological pattern in which an individual doubts their accomplishments and has a persistent internalized fear of being exposed as a fraud'.&lt;/blockquote&gt; Apparently, this is a common phenomenon amongst all developers, from juniors to seniors. During my exit interview he told me he could tell I was at the start of a great career in web development and that as long as I chose to stick with it and kept the same level of passion I was showing them all summer, I would do well. He later went on to post an amazing recommendation on my LinkedIn which, to be completely honest, is maybe the most beautiful piece of literature anyone has ever written about me.

&lt;p&gt;T&amp;amp;G made me feel like a champ after three months of being there. By the time I was done with T&amp;amp;G, I had set up close to 50 local WordPress/Drupal installations on my machine, masted source control via the CLI, and was comfortable using more advanced PHP/HTML/CSS such as TWIG and SCSS. All combined with some solid advice from my peers, which paved the way for the next step in my career, AMP Agency.&lt;/p&gt;

&lt;h2&gt;
  
  
  AMP Agency
&lt;/h2&gt;

&lt;p&gt;When I arrived at AMP Agency in September, I was excited to take on whatever tasks or projects I would soon be on, but also very nervous. I now had three months of agency experience under my belt and was a little more prepared to deal with agency life. However, unlike T&amp;amp;G, AMP was not a web agency, but rather a full marketing agency with a web team in Boston, and a dedicated web development branch in LA. So what's the difference? From my experience, at Third &amp;amp; Grove, I was just maintaining, theming and overall improving the client sites we were responsible for. At AMP Agency, I felt like more of a 'digital artist' than a 'software engineer'. Yes, technically both positions are considered to be jr. software engineer roles, but at AMP I'm wasn't just improving client sites, I was creating unique digital web experiences for our clients. I would go on to build-out HTML5 OLA banners, micro-sites, UX wire-frames, custom Gutenberg blocks, and even occasionally, leave my developer chair to star in &lt;a href="https://www.youtube.com/watch?v=FcJGo9_7RCY" rel="noopener noreferrer"&gt;our agency's holiday card&lt;/a&gt;! From day one at AMP, I got to constantly experiment with new technologies as I learned about them. It's a really cool experience to find an awesome framework or creative idea on your own time, then turn around and use it for your next client project.&lt;/p&gt;

&lt;h2&gt;
  
  
  So what have I learned?
&lt;/h2&gt;

&lt;p&gt;Way too much to list out. I'm serious - at AMP I have worn so many hats and have dived headfirst into so many different projects that I thought to myself "I would need to write out a book if I were to go through every little thing I've learned". So my supervisor recommended that I do just that, write out my thoughts. He recommended I start my own blog or even post here to Dev.to, and just catalog my thoughts and experiences throughout my journey as a jr dev. So I did! Using Grav, the flat-file CMS, I set up a blog on my server and began documenting cool finds. More recently, I began porting over my posts to Dev.to in hopes other developers provide feedback or just find something cool like I did. As I progress through my career and work on improving my development skills, it is my hope that my posts will reflect these improvements. My two goals for my blog are to keep track of my developer journey and to inspire others about the wonderful world of web development the same way I've been inspired.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>career</category>
    </item>
    <item>
      <title>Quick and Easy JS Parallax Effect</title>
      <dc:creator>Gabe</dc:creator>
      <pubDate>Sun, 27 Jan 2019 05:34:21 +0000</pubDate>
      <link>https://dev.to/gabe/quick-and-easy-js-parallax-effect-591l</link>
      <guid>https://dev.to/gabe/quick-and-easy-js-parallax-effect-591l</guid>
      <description>&lt;p&gt;I was recently tasked with creating a micro-site for one of our clients at work. This particular client wanted a small site that would showcase their new line of chips and dip. This being my first client deliverable at AMP, I was pretty excited to get started and show my team that I'm more than just a pretty face.&lt;/p&gt;

&lt;p&gt;So I meet with my project manager and we go over the designs and discuss the functionality that the page would have behind its different sections. It was pretty straight forward, a hero, a featured products grid, a store locator, a product carousel and a footer. The only thing is the hero would feature a parallax effect where some chips would pop out and move up the page as the user scrolls down. While this was going to take a bit of work, a major bonus for me was that most of the other pieces of the site were already built for me thanks to my co-worker Ethan who is a pro at cranking out these microsites for our clients. So I pull down his github repository and setup my local, we're using Zurb's Foundation framework for this client. I start putting together the pieces and building out the page according to the designer's comp. After about 3 - 4 hours I finish what I consider the base of the page. I have all the sections in place and all the components are functioning as expected. It was time to get to the parallax effect.&lt;/p&gt;

&lt;h2&gt;
  
  
  9 lines of JavaScript
&lt;/h2&gt;

&lt;p&gt;No bullshit. After hours of playing around with different parallax libraries to try and create the effect I wanted, my boss casually slides over in his chair and says "That looks fun. Send this to me, let me give it a shot". So I do. 15 minutes later he sends me over a JavaScript file and tells me that it's all set. I copy his code into my JavaScript file, compile it and open it up in FireFox to test it. It worked. It worked beautifully. I was so amazed, I kept scrolling back and forth making the chips move for what felt like hours. See the code below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ftkj8ixcf4asz0kk0rkco.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ftkj8ixcf4asz0kk0rkco.png" width="800" height="701"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pretty Cool. And wicked simple too. Granted with this version you need jQuery in order for it to run, but creating the same result in vanilla js is possible.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Selecting Auto-Generated Content with CSS</title>
      <dc:creator>Gabe</dc:creator>
      <pubDate>Sat, 26 Jan 2019 21:46:14 +0000</pubDate>
      <link>https://dev.to/gabe/selecting-auto-generated-content-with-css-46lh</link>
      <guid>https://dev.to/gabe/selecting-auto-generated-content-with-css-46lh</guid>
      <description>&lt;p&gt;Our agency's website was recently moved from WordPress to Hubspot. As a result, our team has been chipping away at JIRA tickets tackling any bugs that may exist from the migration. With that, I was tasked with building out a new contact page for the site, we currently have a contact modal that opens and overlays on top of whatever page you are on. I've never been a fan of this approach, I've encountered some major preformance issues when opening that modal on top of any video. The contact form would run so sluggishly at times, it was almost unusable. Thankfully, the new contact form was set to live in its own page - solving our preformance issues.&lt;br&gt;&lt;br&gt;
While we were building out the contact form, we ran into an issue with the way HubSpot handles forms. Normally to theme elements on any site I don't build myself, I use a browsers inspector tool to select the element I need, I can then see its styles, class names, IDS, etc. Today while attempting to theme some of the INPUT elements, I realized that HubSpot autogenerates the IDs of each input on what seemed like each page refresh. This made targeting the element difficult, but as I learned, not impossible. Though it was autogenerated, the first few characters seemed to be a machine name of the INPUT field. Which brings us to our CSS selector &lt;/p&gt;
&lt;pre&gt; &lt;code&gt;div[class^="foo"]&lt;/code&gt;&lt;/pre&gt; The selector targets an element, a div in this case, that has a classname that starts with foo. Pretty useful. There's also another selector that does similar &lt;pre&gt;&lt;code&gt;div[class*="foo"]&lt;/code&gt;&lt;/pre&gt; The difference in this one being the carrot symbol is now an asterisk, what that does is targets a div that has a classname that contains foo.

</description>
      <category>css</category>
      <category>beginners</category>
      <category>cms</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
