<?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: Chris Dixon</title>
    <description>The latest articles on DEV Community by Chris Dixon (@chrisdixon161).</description>
    <link>https://dev.to/chrisdixon161</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%2F383079%2Fafeb3997-a1b4-4fe2-8d97-7da5f7540b14.png</url>
      <title>DEV Community: Chris Dixon</title>
      <link>https://dev.to/chrisdixon161</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chrisdixon161"/>
    <language>en</language>
    <item>
      <title>Learn In-Demand Web Development &amp; Coding Skills For Free</title>
      <dc:creator>Chris Dixon</dc:creator>
      <pubDate>Sat, 28 Jun 2025 18:15:17 +0000</pubDate>
      <link>https://dev.to/chrisdixon161/learn-in-demand-web-development-coding-skills-for-free-4mcd</link>
      <guid>https://dev.to/chrisdixon161/learn-in-demand-web-development-coding-skills-for-free-4mcd</guid>
      <description>&lt;p&gt;Like many others, when I first started learning web development, I leaned on lots of the free content the web has to offer. And still do today. &lt;/p&gt;

&lt;p&gt;The wonderful thing about the web is the huge amount of content on offer. We often take for granted being able to search for solutions to our coding problems, tutorials and guides to learn new languages, help with error messages, and just for those &lt;em&gt;why is this not working&lt;/em&gt; moments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why for free?
&lt;/h2&gt;

&lt;p&gt;Often the reason people create content is to give back to the same community they have learned from in the past. &lt;/p&gt;

&lt;p&gt;I have consumed my fair share of free content, I have also been creating video courses for over 10 years and had lots of notes, guides, and content built up. Also providing training bootcamps to companies and individuals for many years, teaching web development is something I am passionate about.&lt;/p&gt;

&lt;p&gt;I decided to use this as a foundation to give back to the community and offer a central learning resource for new and existing developers.&lt;/p&gt;

&lt;p&gt;This is why I created a completely free learning platform at &lt;a href="https://learn-webdevelopment.com/" rel="noopener noreferrer"&gt;Learn WebDevelopment.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://learn-webdevelopment.com/" rel="noopener noreferrer"&gt;Learn WebDevelopment.com&lt;/a&gt; includes comprehensive, project-based courses on JavaScript, Vue.js, Markdown, Image Performance, Command Line, JavaScript projects, and HTML/CSS. A more recent introduction is the reference pages, including focused pages relating to a specific topic, method, property etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  But there are lots of other learning sites!
&lt;/h2&gt;

&lt;p&gt;Yes, there are others out there. Many are great, but often overwhelming for beginners. Some are also very useful for simple examples, often providing generic examples that are not applied to real-world use cases. &lt;/p&gt;

&lt;p&gt;I like to think we pitch somewhere in the middle. We lean more towards project-based learning using practical use cases. Enough info to be detailed, but also a friendly enough language for newcomers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Current courses
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://learn-webdevelopment.com/course/javascript/introduction/lets-see-what-javascript-can-do" rel="noopener noreferrer"&gt;JavaScript&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn-webdevelopment.com/course/vue/getting-to-know-vue/introduction-to-vue" rel="noopener noreferrer"&gt;Vue.js 3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn-webdevelopment.com/course/introduction-to-website-image-performance/course/introduction" rel="noopener noreferrer"&gt;Introduction To Website Image Performance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn-webdevelopment.com/course/html-css-and-javascript-build-an-interactive-store/welcome/introduction-and-what-we-will-be-building" rel="noopener noreferrer"&gt;Beginner HTML, CSS, and JavaScript: Build an Online Store&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn-webdevelopment.com/course/markdown/introduction-to-markdown/introduction-to-markdown" rel="noopener noreferrer"&gt;Markdown&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn-webdevelopment.com/course/javascript-projects/quick-tip/creating-the-ui-with-html" rel="noopener noreferrer"&gt;JavaScript Projects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://learn-webdevelopment.com/course/command-line/getting-started/introduction-to-the-command-line" rel="noopener noreferrer"&gt;Command Line&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The future
&lt;/h2&gt;

&lt;p&gt;The project is relatively in the early stages, but new content is added on a regular basis, and we currently have 200+ pages of free, educational content, and growing every day.&lt;/p&gt;

&lt;p&gt;There are also many courses planned including Python, Rust, along with platform improvements such as interactive code, performance improvements, saving progress, and many more.&lt;/p&gt;

&lt;p&gt;Check us out at &lt;a href="https://learn-webdevelopment.com/" rel="noopener noreferrer"&gt;Learn WebDevelopment.com&lt;/a&gt; 😄&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Deleting Git Branches Locally And Remotely</title>
      <dc:creator>Chris Dixon</dc:creator>
      <pubDate>Mon, 07 Sep 2020 07:43:50 +0000</pubDate>
      <link>https://dev.to/chrisdixon161/deleting-git-branches-locally-and-remotely-4cm1</link>
      <guid>https://dev.to/chrisdixon161/deleting-git-branches-locally-and-remotely-4cm1</guid>
      <description>&lt;p&gt;When working with Git, we can create branches to work on new features and keep the code separate from the rest of the project.&lt;/p&gt;

&lt;p&gt;It is common to have a "main" master branch, and once we are happy with the changes made on the branch, we can then merge them in with the master.&lt;/p&gt;

&lt;p&gt;If the branch code does not work out and we want to remove it, or, after merging we can delete the branch. Let's begin by removing the branch locally.&lt;/p&gt;

&lt;p&gt;To delete a branch locally the first thing to do is to make sure we are not currently working on it. We can change branches, i.e back to the master like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   git checkout master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then to delete the branch, we have 2 options, depending if you have pushed and merged with the remote branch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   // -d (delete) to remove only if you have pushed and merged
   // it with your remote branch
   git branch -d branch_name

   // -D (delete/force) to remove even if you have not pushed and merged
   // it with your remote branch
   git branch -D branch_name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We have now successfully removed our local branch. We now need to remove it remotely too using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   git push &amp;lt;remote&amp;gt; --delete &amp;lt;branch_name&amp;gt;

   // which looks something like this with your variables:
   git push origin --delete new_checkout_flow
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enter your password, and all done! You can check GitHub and the branch should now be removed.&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>branches</category>
    </item>
    <item>
      <title>Learn Javascript By Building Projects (for free!)</title>
      <dc:creator>Chris Dixon</dc:creator>
      <pubDate>Thu, 06 Aug 2020 08:37:08 +0000</pubDate>
      <link>https://dev.to/chrisdixon161/learn-javascript-by-building-projects-for-free-39d4</link>
      <guid>https://dev.to/chrisdixon161/learn-javascript-by-building-projects-for-free-39d4</guid>
      <description>&lt;p&gt;This week, I have just released a &lt;em&gt;free&lt;/em&gt;, project based Javascript course.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://fun-javascript-projects.com" rel="noopener noreferrer"&gt;Fun Javascript Projects.com!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The course is aimed at beginners, and currently included 6 projects to see how HTML, CSS and Javascript all fit together.&lt;/p&gt;

&lt;p&gt;Although I do explain as we go, the intention is to just jump in and build things, to give beginners a portfolio of projects they can use, modify and reference in the future.&lt;/p&gt;

&lt;p&gt;What will you build? Let's take a look.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project 1- Quick Tip (tip calculator)
&lt;/h3&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%2F3pwy7vg6afdibcm7a5dh.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%2F3pwy7vg6afdibcm7a5dh.jpg" alt="tip calculator image" width="800" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://quick-tip.netlify.app/" rel="noopener noreferrer"&gt;https://quick-tip.netlify.app/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Project 2- Running Tracker App
&lt;/h3&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%2Fnmtruvi27kiqoyvtrc5z.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%2Fnmtruvi27kiqoyvtrc5z.jpg" alt="running tracker project" width="800" height="786"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://running-tracker.netlify.app/" rel="noopener noreferrer"&gt;https://running-tracker.netlify.app/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Project 3- Guess The Number Game
&lt;/h3&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%2Fhoauahufabmyk7kbpgzp.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%2Fhoauahufabmyk7kbpgzp.jpg" alt="Guess the number game image" width="800" height="678"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://guess-the-number-project.netlify.app/" rel="noopener noreferrer"&gt;https://guess-the-number-project.netlify.app/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Project 4- Number Match Game
&lt;/h3&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%2Fmjhqmm7xfb2hwgpuobsd.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%2Fmjhqmm7xfb2hwgpuobsd.jpg" alt="Number match game" width="800" height="490"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://number-match-game.netlify.app/" rel="noopener noreferrer"&gt;https://number-match-game.netlify.app/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Project 5- Photo Effects App
&lt;/h3&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%2F2mo4u8yulpa6jkcndtdh.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%2F2mo4u8yulpa6jkcndtdh.jpg" alt="Photo effects image" width="800" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://photo-effects-application.netlify.app/" rel="noopener noreferrer"&gt;https://photo-effects-application.netlify.app/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Project 6- Music Player App
&lt;/h3&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%2F36h2qd6s5z8psjs0hzi8.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%2F36h2qd6s5z8psjs0hzi8.jpg" alt="Music player image" width="800" height="863"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://music-player-project.netlify.app/" rel="noopener noreferrer"&gt;https://music-player-project.netlify.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This course is completely free, and the project can be taken at your own pace, in any order.&lt;/p&gt;

&lt;p&gt;Hope you enjoy!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>html</category>
      <category>css</category>
      <category>projects</category>
    </item>
    <item>
      <title>How To Create A Simple Parallax Style Effect With CSS</title>
      <dc:creator>Chris Dixon</dc:creator>
      <pubDate>Thu, 09 Jul 2020 09:45:51 +0000</pubDate>
      <link>https://dev.to/chrisdixon161/how-to-create-a-simple-parallax-style-effect-with-css-c74</link>
      <guid>https://dev.to/chrisdixon161/how-to-create-a-simple-parallax-style-effect-with-css-c74</guid>
      <description>&lt;p&gt;Adding a parallax style effect to our web page can really make it stand out.&lt;/p&gt;

&lt;p&gt;You may have seen this effect when scrolling on web pages or apps.&lt;/p&gt;

&lt;p&gt;It basically involves the background, in our case an image, scrolling at a different rate to the rest of the content on top of it.&lt;/p&gt;

&lt;p&gt;You can find a working codepen example here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codepen.io/chrisdixon161/pen/VwexxYO" rel="noopener noreferrer"&gt;https://codepen.io/chrisdixon161/pen/VwexxYO&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are many options out there to achieve a similar effect, and many making use of Javascript, but we are going to be doing a simple CSS only version.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EDIT: Some people have commented that this is not true parallax, please not this is labelled as parallax style and intended to be a quick and simple CSS effect. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;How? Let's take a look.&lt;/p&gt;

&lt;p&gt;First, we need some HTML content:&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;section&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"top"&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;
~ Scroll down ~
  &lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"parallax"&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;Some cool overlay text...&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bottom"&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;
~ Scroll up ~
  &lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will give us 3 sections, a top and bottom which is our "regular" content. And a middle section which contains the image.&lt;/p&gt;

&lt;p&gt;Now onto the CSS, to begin, this will just be some simple styling not related to the parallax:&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;.top&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;.bottom&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="no"&gt;lightslategray&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;100vh&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;span class="nt"&gt;section&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="c"&gt;/*  align text  */&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;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="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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will give a gray background to the top and bottom sections, and these sections will appear to move over the middle section soon.&lt;/p&gt;

&lt;p&gt;For the parallax to work, we need to add a background image to scroll over:&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;.parallax&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c"&gt;/* set image for background   */&lt;/span&gt;
  &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url('https://res.cloudinary.com/djn1ticju/image/upload/v1594285691/parallax-background.jpg')&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c"&gt;/*  full height image  */&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;100vh&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c"&gt;/*  image starting position- eg. top, right, left, bottom  */&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="c"&gt;/*  size of image, eg- 50%, 3rem, 500px etc.
    cover= scales the image as large as possible without stretching
  */&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will leave us with a pretty regular website with 3 sections, all scrolling together:&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%2F92qec03t12b2ryet5mkt.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%2F92qec03t12b2ryet5mkt.png" alt="Current webpage view with 3 sections" width="800" height="510"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To get the desired effect, the key part is to set this background image to be fixed&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;.parallax&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c"&gt;/*... at to rest of code in this .parallax selector: */&lt;/span&gt;

&lt;span class="c"&gt;/*  To get the desired effect, the key part is to set this background image to be fixed  */&lt;/span&gt;
  &lt;span class="nl"&gt;background-attachment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;fixed&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;Now try to scroll in the browser and see the effect!&lt;/p&gt;

</description>
      <category>css</category>
      <category>parallax</category>
    </item>
    <item>
      <title>Quick &amp; Easy Vue.js Search Facility</title>
      <dc:creator>Chris Dixon</dc:creator>
      <pubDate>Fri, 05 Jun 2020 08:57:09 +0000</pubDate>
      <link>https://dev.to/chrisdixon161/quick-easy-vue-js-search-facility-517a</link>
      <guid>https://dev.to/chrisdixon161/quick-easy-vue-js-search-facility-517a</guid>
      <description>&lt;p&gt;Adding a search facility to your project can be complex, but only if you need it to be. Sometimes, we just need a simple filter, and return the results.&lt;/p&gt;

&lt;p&gt;This post is going to show you how to do this in Vue.js, but the same principle can be applied to React or almost anything else.&lt;/p&gt;

&lt;p&gt;I am going to create a simple blog style app, with a search input to filter the posts by the post's content.&lt;/p&gt;

&lt;p&gt;You can find the finished demo app here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codesandbox.io/s/easy-vuejs-search-icrkf?file=/src/App.vue:751-969" rel="noopener noreferrer"&gt;Easy Vue.js Search on codesandbox&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And a video version on YouTube here:&lt;br&gt;
&lt;a href="https://youtu.be/mCl5LxO5FEc" rel="noopener noreferrer"&gt;https://youtu.be/mCl5LxO5FEc&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To follow along, you can either use &lt;a href="https://codesandbox.io/" rel="noopener noreferrer"&gt;Codesandbox&lt;/a&gt;, and create a new project with a Vue.js starter, or use the &lt;a href="https://cli.vuejs.org/guide/installation.html" rel="noopener noreferrer"&gt;Vue-CLI &lt;/a&gt;to create a new project.&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%2Fq6x9cndjk4lix510gst3.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%2Fq6x9cndjk4lix510gst3.png" alt="Easy Vue.js Search on codesandbox" width="800" height="518"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is how the starter looks in codesandbox.&lt;/p&gt;

&lt;p&gt;Remove HelloWorld.vue from the components folder, and clean up the App.vue to look like this:&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="c1"&gt;// App.vue&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;template&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;app&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/template&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;App&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;components&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/script&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;font&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Avenir&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Helvetica&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Arial&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;sans&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;webkit&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;font&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;smoothing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;antialiased&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;moz&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;osx&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;font&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;smoothing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;grayscale&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;center&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="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="nx"&gt;c3e50&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;margin&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="nx"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/style&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the components folder, create a new file called Post.vue, and add our basic Vue.js structure:&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="c1"&gt;// components/Post.vue&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;template&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;article&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nx"&gt;hi&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/article&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/template&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{};&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/script&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, to include the post into our app we need to register it, which I will do in the App.vue:&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="c1"&gt;// App.vue&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;template&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;app&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="c1"&gt;// 3. output component&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/post&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/template&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="c1"&gt;// 1. import component &lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Post&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./components/Post&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;App&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="c1"&gt;// 2. register component&lt;/span&gt;
  &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Post&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/script&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The browser should now show our message of "hi".&lt;/p&gt;

&lt;p&gt;We now need some sample blog posts to work with and display in the Post.vue component, for this example I will add some content into the App.vue "data" property:&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="c1"&gt;// App.vue&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Post&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./components/Post&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;App&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Post&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nf"&gt;data&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="c1"&gt;// add blog posts array:&lt;/span&gt;
      &lt;span class="na"&gt;posts&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="na"&gt;id&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="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Post 1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Vue.js is cool&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="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Post 2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Javascript is cool&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="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/script&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We now have 2 sample posts and with Vue.js, we can loop through each post and display the "Post" component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;// App.vue
&lt;span class="nt"&gt;&amp;lt;template&amp;gt;&lt;/span&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;"app"&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;v-for=&lt;/span&gt;&lt;span class="s"&gt;"post in posts"&lt;/span&gt; &lt;span class="na"&gt;:key=&lt;/span&gt;&lt;span class="s"&gt;"post.id"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;post&amp;gt;&amp;lt;/post&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;/template&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We should now see the "hi" message twice in the browser. This makes sense since we have 2 blog posts.&lt;/p&gt;

&lt;p&gt;However, we want to pass the blog post data to the Post.vue component, and we do this via props:&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="c1"&gt;// App.vue- add props to post:&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;post&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;post&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/post&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Back over in the Post.vue, we receive these props (note prop validation is skipped for simplicity):&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="c1"&gt;// components/Post.vue&lt;/span&gt;

&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;props&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;post&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/script&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And we can modify the template to output the blog title and body:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;// components/Post.vue
&lt;span class="nt"&gt;&amp;lt;template&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;article&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h3&amp;gt;&lt;/span&gt;{{ post.title }}&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;{{post.body}}&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And we should now see the posts display in the browser!&lt;/p&gt;

&lt;p&gt;But what about the filter? Let' begin with an input box to type in, inside of the App.vue:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;//App.vue
&lt;span class="nt"&gt;&amp;lt;template&amp;gt;&lt;/span&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;"app"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    // add input:
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;v-model=&lt;/span&gt;&lt;span class="s"&gt;"search"&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;v-for=&lt;/span&gt;&lt;span class="s"&gt;"post in posts"&lt;/span&gt; &lt;span class="na"&gt;:key=&lt;/span&gt;&lt;span class="s"&gt;"post.id"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;post&lt;/span&gt; &lt;span class="na"&gt;:post=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/post&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;/template&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice here we are using v-model, this is to create 2 way data binding with a data property called search, so we also need to add this to our data property:&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="c1"&gt;// App.vue&lt;/span&gt;
  &lt;span class="p"&gt;...&lt;/span&gt;

  &lt;span class="nf"&gt;data&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;search&lt;/span&gt;&lt;span class="p"&gt;:&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This search property will now hold the value typed into the input field by the user.&lt;/p&gt;

&lt;p&gt;We now need to get all blog posts, filter them using this search term, and return the new blog posts.&lt;/p&gt;

&lt;p&gt;To do this, I will use a computed property. This will be ideal to re-calculate the matching blog posts each time the input is updated:&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="c1"&gt;// App.vue- final script section:&lt;/span&gt;

&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Post&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./components/Post&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;App&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;Post&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nf"&gt;data&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;search&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;posts&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="na"&gt;id&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="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Post 1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Vue.js is cool&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="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Post 2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Javascript is cool&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="p"&gt;},&lt;/span&gt;
  &lt;span class="c1"&gt;// Add computed section:&lt;/span&gt;
  &lt;span class="na"&gt;computed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;filteredPosts&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="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;posts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;post&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
        &lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;search&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&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="p"&gt;};&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/script&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we are filtering the blog posts, and returning only the values which includes the search term.&lt;/p&gt;

&lt;p&gt;This search is matching any letter, word, phrase in the blog post body section. To make the search as inclusive as possible, we also make it case insensitive by lower casing all text.&lt;/p&gt;

&lt;p&gt;The final thing to do is to loop through this "filteredPosts" computed value, rather than all posts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;// App.js
...

&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;v-for=&lt;/span&gt;&lt;span class="s"&gt;"post in filteredPosts"&lt;/span&gt; &lt;span class="na"&gt;:key=&lt;/span&gt;&lt;span class="s"&gt;"post.id"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;post&lt;/span&gt; &lt;span class="na"&gt;:post=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/post&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;And thats it! Go ahead and give this a test in the browser.&lt;/p&gt;

&lt;p&gt;And now you can type into the input field, and only return blog posts which match...&lt;/p&gt;

</description>
      <category>vue</category>
      <category>search</category>
      <category>filter</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How to add a Gravatar in Vue.js</title>
      <dc:creator>Chris Dixon</dc:creator>
      <pubDate>Wed, 27 May 2020 11:06:09 +0000</pubDate>
      <link>https://dev.to/chrisdixon161/how-to-add-a-gravatar-in-vue-js-6pa</link>
      <guid>https://dev.to/chrisdixon161/how-to-add-a-gravatar-in-vue-js-6pa</guid>
      <description>&lt;p&gt;Adding a &lt;a href="http://en.gravatar.com/" rel="noopener noreferrer"&gt;Gravatar&lt;/a&gt; (Globally Recognised Avatar) is a nice way to personalise the users experience.&lt;/p&gt;

&lt;p&gt;It adds a familiar image, which the user uploads, to each site they visit which has it enabled:&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%2Fg99hs1q4om11vwh3xt1o.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%2Fg99hs1q4om11vwh3xt1o.png" alt="gravatar example image" width="800" height="96"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First of all, if you want to upload your own Gravatar image, head over to &lt;a href="http://en.gravatar.com/" rel="noopener noreferrer"&gt;http://en.gravatar.com/&lt;/a&gt;, sign in and upload from here.&lt;/p&gt;

&lt;p&gt;We are going to be focusing on the developer side, and how to enable it on your Vue.js website or app.&lt;/p&gt;

&lt;p&gt;The process is pretty simple, not authentication is needed, and there is only a few steps to take:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Get the users email (we will already assume you have this)&lt;/li&gt;
&lt;li&gt;Trim all of the email's leading and trailing whitespace&lt;/li&gt;
&lt;li&gt;Set email to lower case&lt;/li&gt;
&lt;li&gt;md5 hash the string&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Since we are using Vue.js, we will assume you have the user stored as a data property called user:&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="nf"&gt;data&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;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;awesome@coolcompany.com&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To hash, I am going to use the md5 NPM package, and install in our Vue project:&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="c1"&gt;// npm&lt;/span&gt;
&lt;span class="nx"&gt;npm&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="nx"&gt;md5&lt;/span&gt;

&lt;span class="c1"&gt;// yarn&lt;/span&gt;
&lt;span class="nx"&gt;yarn&lt;/span&gt; &lt;span class="nx"&gt;add&lt;/span&gt; &lt;span class="nx"&gt;md5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then import into our component's script section:&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;md5&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;md5&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&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;Next, we can use a computed property to calculate the value we need. This will also mean it will watch out for any changes in the user, and update the UI:&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="nx"&gt;computed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;gravatar&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using the md5 package, we can hash the users email:&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="nx"&gt;computed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;gravatar&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;md5&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;email&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;We then call the trim() method to remove the whitespace, and lower case the email too:&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="nx"&gt;computed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;gravatar&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;md5&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&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;Now we have the hash, we use it to create a URL to make a "GET" request, which looks like this:&lt;/p&gt;

&lt;p&gt;https&lt;span&gt;&lt;/span&gt;://www&lt;span&gt;&lt;/span&gt;.gravatar.com/avatar/HASH&lt;/p&gt;

&lt;p&gt;To create this, we just need to return the URL as our computed value:&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="nx"&gt;computed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;gravatar&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;md5&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`https://www.gravatar.com/avatar/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then in the template, we use the computed value as the image src (don't forget the colon before src since we are using a dynamic value):&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;img&lt;/span&gt; &lt;span class="na"&gt;:src=&lt;/span&gt;&lt;span class="s"&gt;"gravatar"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"user profile image"&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;And you should see a Gravatar in the browser!&lt;/p&gt;

&lt;p&gt;If you don't have your own Gravatar image set, you may see the default image. Personally, I like to change this.&lt;/p&gt;

&lt;p&gt;You can either use your own alternative default image, or change the default set by Gravatar.&lt;/p&gt;

&lt;p&gt;To use your own, you can add the ?d= parameter, with a URL to your chosen image:&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;return&lt;/span&gt; &lt;span class="s2"&gt;`https://www.gravatar.com/avatar/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;?d=https://upload.wikimedia.org/wikipedia/en/0/02/Homer_Simpson_2006.png`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or, use one of the other defaults provided by Gravatar (&lt;a href="http://en.gravatar.com/site/implement/images/" rel="noopener noreferrer"&gt;http://en.gravatar.com/site/implement/images/&lt;/a&gt;) like this:&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;return&lt;/span&gt; &lt;span class="s2"&gt;`https://www.gravatar.com/avatar/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;?d=robohash`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And you can also use the "s" parameter too, which will set the Gravatar size:&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;return&lt;/span&gt; &lt;span class="s2"&gt;`https://www.gravatar.com/avatar/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;?d=robohash&amp;amp;s=200`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Above we set the width to be 200px x 200px, but the accepted range can be 1px-2048px.&lt;/p&gt;

&lt;p&gt;You can also find some more options at &lt;a href="http://en.gravatar.com/site/implement/images/" rel="noopener noreferrer"&gt;http://en.gravatar.com/site/implement/images/&lt;/a&gt;, which is worth checking if you want further customisation.&lt;/p&gt;

</description>
      <category>gravatar</category>
      <category>vue</category>
    </item>
    <item>
      <title>Visual Studio Code Extensions You Might Not Know</title>
      <dc:creator>Chris Dixon</dc:creator>
      <pubDate>Thu, 21 May 2020 09:48:49 +0000</pubDate>
      <link>https://dev.to/chrisdixon161/visual-studio-extensions-you-might-not-know-d1b</link>
      <guid>https://dev.to/chrisdixon161/visual-studio-extensions-you-might-not-know-d1b</guid>
      <description>&lt;p&gt;Visual Studio Code has exploded in popularity over the last few years. By default, it has lots of features, but we can also download extensions to add almost any type of feature we need.&lt;/p&gt;

&lt;p&gt;I have used VS Code for a few years now, but there is always something to learn from others. I recently asked on Twitter for everybody's top 3 extensions, hoping to uncover some hidden gems, and I think I did just that.&lt;/p&gt;

&lt;p&gt;Why top 3? This was intentional. Yes, most of us have many more installed, but limiting it to 3 makes people think about what is really important. &lt;/p&gt;

&lt;p&gt;There was lots of extensions which got 1-2 votes, as you would expect, but also some emerging patterns too. If you want to find any of these extensions, open up VS Code, click on the extensions icon in the sidebar, and use the search box. &lt;/p&gt;

&lt;p&gt;Before we get started, you may notice a popular extension called Emmet is missing. This was a popular choice, but is now built into VS Code, so I have left this one off.&lt;/p&gt;

&lt;h3&gt;
  
  
  Top Picks
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Live Server&lt;/li&gt;
&lt;li&gt;Prettier&lt;/li&gt;
&lt;li&gt;Git Lens&lt;/li&gt;
&lt;li&gt;Bracket Pair Colorizer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These 4 were the most chosen extensions, by far. The next group also got a good share of the votes too:&lt;/p&gt;

&lt;h3&gt;
  
  
  Popular
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;ES Lint&lt;/li&gt;
&lt;li&gt;Live Share&lt;/li&gt;
&lt;li&gt;Indent Rainbow&lt;/li&gt;
&lt;li&gt;Quokka&lt;/li&gt;
&lt;li&gt;Vetur&lt;/li&gt;
&lt;li&gt;Snippet packages- React, ES7, GraphQL, Redux, Angular etc&lt;/li&gt;
&lt;li&gt;Git Graph&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These were also popular choices too, especially the snippets for different languages and frameworks.&lt;/p&gt;

&lt;p&gt;Next, there was also a long list of extensions with only 1-2 votes, but also worth checking out too, you might just uncover a useful one for your type of work:&lt;/p&gt;

&lt;h3&gt;
  
  
  Visual /color extensions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Indented Block Highlighting&lt;/li&gt;
&lt;li&gt;Better Comments&lt;/li&gt;
&lt;li&gt;Rainbow Brackets&lt;/li&gt;
&lt;li&gt;Color Highlight&lt;/li&gt;
&lt;li&gt;VSCode Icons&lt;/li&gt;
&lt;li&gt;Notes&lt;/li&gt;
&lt;li&gt;TODO Highlight&lt;/li&gt;
&lt;li&gt;Emoji &lt;/li&gt;
&lt;li&gt;Beautify&lt;/li&gt;
&lt;li&gt;VS Code Styled Components&lt;/li&gt;
&lt;li&gt;Peacock&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Improving workflow &amp;amp; productivity
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;IntelliSense for CSS class names in HTML&lt;/li&gt;
&lt;li&gt;Code Spell Checker&lt;/li&gt;
&lt;li&gt;Bookmarks&lt;/li&gt;
&lt;li&gt;Settings Sync&lt;/li&gt;
&lt;li&gt;REST Client&lt;/li&gt;
&lt;li&gt;Remote Development&lt;/li&gt;
&lt;li&gt;WakaTime&lt;/li&gt;
&lt;li&gt;Project Manager&lt;/li&gt;
&lt;li&gt;Version Lens&lt;/li&gt;
&lt;li&gt;Error lens&lt;/li&gt;
&lt;li&gt;Spellchecker&lt;/li&gt;
&lt;li&gt;TODO Tree&lt;/li&gt;
&lt;li&gt;TabNine&lt;/li&gt;
&lt;li&gt;Turbo Console Log&lt;/li&gt;
&lt;li&gt;Import Cost&lt;/li&gt;
&lt;li&gt;Better Comments&lt;/li&gt;
&lt;li&gt;Polacode&lt;/li&gt;
&lt;li&gt;Live SASS Compiler&lt;/li&gt;
&lt;li&gt;Node Exec&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Automating tools
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Auto Rename Tag&lt;/li&gt;
&lt;li&gt;Auto Complete Tag&lt;/li&gt;
&lt;li&gt;Auto Close Tag&lt;/li&gt;
&lt;li&gt;Auto Import&lt;/li&gt;
&lt;li&gt;Auto Save (lots of different varieties, search for "save" )&lt;/li&gt;
&lt;li&gt;Path Autocomplete&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Markdown tools
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Markdown All in One&lt;/li&gt;
&lt;li&gt;Markdown Preview&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Vim Tools
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Vim&lt;/li&gt;
&lt;li&gt;Neo Vim&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At the time of writing, a new tool called &lt;a href="https://kite.com/" rel="noopener noreferrer"&gt;Kite&lt;/a&gt; has also been released which may be worth checking out. It is a powerful, auto complete tool which uses machine learning to provide intelligent suggestions. It is currently available for Javascript and Python users. &lt;/p&gt;

&lt;p&gt;Many of the above tools depend on your type of coding, but hopefully you will discover some new ones to help you out.&lt;/p&gt;

</description>
      <category>visualstudiocode</category>
      <category>extensions</category>
    </item>
    <item>
      <title>Javascript: Check an array value is included in another array</title>
      <dc:creator>Chris Dixon</dc:creator>
      <pubDate>Mon, 18 May 2020 09:15:33 +0000</pubDate>
      <link>https://dev.to/chrisdixon161/javascript-check-an-array-value-is-included-in-another-array-1hk0</link>
      <guid>https://dev.to/chrisdixon161/javascript-check-an-array-value-is-included-in-another-array-1hk0</guid>
      <description>&lt;p&gt;A common situation is when we have 2 arrays, and want to know if the value of one is included in the other:&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;const&lt;/span&gt; &lt;span class="nx"&gt;array1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cheese&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dough&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sauce&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pepperoni&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;array2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;mozzarella&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;peppers&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;chicken&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cheese&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we see that "cheese" is in both arrays, but how we use Javascript to check?&lt;/p&gt;

&lt;p&gt;First of all, we need to decide what we want to be returned:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Do we want a boolean, if there is a match return true, if not return false&lt;/li&gt;
&lt;li&gt;Or, do we want the matching values returned i.e "cheese"&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For option 1, we can use the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some" rel="noopener noreferrer"&gt;some array method&lt;/a&gt; to get a boolean value. This is simple enough for checking one array, but we want to compare 2. So, we can also combine with the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes" rel="noopener noreferrer"&gt;includes array method&lt;/a&gt;:&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;const&lt;/span&gt; &lt;span class="nx"&gt;isIncluded&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;  &lt;span class="nx"&gt;array1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;some&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;array2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will get each "value" from array1, then check this value is included in array2.&lt;/p&gt;

&lt;p&gt;The true or false value is then stored in the &lt;em&gt;isIncluded&lt;/em&gt; constant.&lt;/p&gt;

&lt;p&gt;Next we can also store these matching values too. We can do this with the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter" rel="noopener noreferrer"&gt;filter array method&lt;/a&gt;, this will create a new array with the matching values:&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;const&lt;/span&gt; &lt;span class="nx"&gt;values&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;array1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;array2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="c1"&gt;// "cheese"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code above is the same as the first example, but using filter in place of some. Again checking each value in array1 is included in array2, then storing in the &lt;em&gt;values&lt;/em&gt; constant.&lt;/p&gt;

&lt;p&gt;You can also find a working Codepen demo here too: &lt;a href="https://codepen.io/chrisdixon161/pen/OJyPJdB" rel="noopener noreferrer"&gt;https://codepen.io/chrisdixon161/pen/OJyPJdB&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>sort</category>
      <category>includes</category>
      <category>filter</category>
    </item>
    <item>
      <title>Working From Home or Being at Home?</title>
      <dc:creator>Chris Dixon</dc:creator>
      <pubDate>Wed, 13 May 2020 13:54:19 +0000</pubDate>
      <link>https://dev.to/chrisdixon161/working-from-home-or-being-at-home-5k6</link>
      <guid>https://dev.to/chrisdixon161/working-from-home-or-being-at-home-5k6</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;Working From Home or Being at Home?&lt;/em&gt;&lt;/strong&gt; That is the big question. &lt;/p&gt;

&lt;p&gt;I have held off writing a “tips for working at home” article for a good few months. &lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;At the time of writing this, there is a global COVID-19 pandemic. Many people are being forced to work from home who previously made the daily commute. Some love it, some hate it, but everybody has an opinion, that is human nature.&lt;/p&gt;

&lt;p&gt;The reason I held off was because of that word “opinion”, everybody is different, and everybody has different circumstances. Eg. I have children at home, so why would my advice about being at home affect somebody who has none?&lt;/p&gt;

&lt;p&gt;Also, I am not the first, this type of article popped up from day 1, and they are very welcome too.&lt;/p&gt;

&lt;p&gt;Why is today different? Well, 2 main reasons. &lt;/p&gt;

&lt;p&gt;First, I feel I am in a good position to write this, since I already worked from home before it was forced upon us, so I can see it from both sides. I have had a little longer to go through the ‘ups and downs’.&lt;/p&gt;

&lt;p&gt;Second, if my tips can help even one person, that is enough for me. Also fuelled by a regular stream of Twitter DM’s asking for tips.&lt;/p&gt;

&lt;p&gt;I am not going to throw out a huge list of things to follow, I don’t think religiously following somebody else’s pattern is productive either. &lt;/p&gt;

&lt;p&gt;I also don’t want to write a “10 tips when working from home” kind of post, there is many great ones out there. Instead, I will share some of my experiences.&lt;/p&gt;

&lt;p&gt;So, here goes…&lt;/p&gt;

&lt;h2&gt;
  
  
  Social Media
&lt;/h2&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%2Fw8mgdfy4c9y1dgh6b7g5.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%2Fw8mgdfy4c9y1dgh6b7g5.jpg" alt="social media" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For me this was a big one. but also double edged. I have never been big into social media for personal use, I am quite a private person generally. At the beginning of the year I decided I was going to dedicate more time into social media for my work. An increased following seemed a good choice for my business, networking, and it turns out I have also met some great people along the way too.&lt;/p&gt;

&lt;p&gt;This also comes at a cost. Although I use social media for “work”, it was so easy to always keep a browser tab open. Yes growing my social media presence is important, and still a goal I am focused on, it was also beginning to eat into my regular work too much.&lt;/p&gt;

&lt;p&gt;Concentration on regular work tasks was reduced once I noticed the a notification in the browsers tab, clearly put there to entice a click to satisfy human curiosity.&lt;/p&gt;

&lt;p&gt;Close that tab, schedule a set amount of time or visits for social media, and stick to them. The notifications can be dealt with in “batches”, we don’t need to catch them as they come in.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Phone &amp;amp; Tablet
&lt;/h2&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%2F6np0rteog0u0a9ed4ps6.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%2F6np0rteog0u0a9ed4ps6.jpg" alt="phone image" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Which leads nicely onto this one! The big distraction for many, I am not going to tell you to put your phone away when working, or turn off alerts, you already know that.&lt;/p&gt;

&lt;p&gt;Quick side note, we have all seen the messages when visiting a social media site on our phones “Please download the app for a better experience” or something along those lines. Why do you think social media companies encourage you to download the app rather than use the phone browser?&lt;/p&gt;

&lt;p&gt;Yes the app is optimised for touch etc, but they can also use push notifications to get you back browsing. Social media companies are good at getting users back and retaining them. There is usually a team of people employed dedicated to this. For them, visits equal numbers, which equals higher advertising revenue.&lt;/p&gt;

&lt;p&gt;It also eats away at your time, possibly more that we want to be made aware of.&lt;/p&gt;

&lt;p&gt;Yes, you may now have an extra hour in your day from not commuting, but 1 hour can easily slide away when scrolling notifications.&lt;/p&gt;

&lt;p&gt;Just be more aware of the habits we get into. How many of us, possibly subconsciously, reach for the phone when nobody is even calling? We check things even if there is nothing to check. &lt;/p&gt;

&lt;p&gt;If we are being honest, how many of us close social media on a computer, and open it on the phone when we walk away?&lt;/p&gt;

&lt;p&gt;For me personally, already working from home, the phone blurred the line between being at home and working at home. When I finished work, closed the office door, the phone was the only link back to work. We carry it around, also carrying the temptation.&lt;/p&gt;

&lt;p&gt;I am guilty of answering student questions and checking social media on my phone late on an evening during busy periods. Is this giving my brain a break? Not at all. But I am getting better at being more aware of this and saying no.&lt;/p&gt;

&lt;h2&gt;
  
  
  Being productive and taking breaks.
&lt;/h2&gt;

&lt;p&gt;Just like the phone situation, I am not going to tell you the obvious. Drink water, exercise, take breaks, yeah we all know this. Do your best.&lt;/p&gt;

&lt;p&gt;Working from home seems to go hand in hand with a computer screen. As a web developer, I work at a screen all day. It is well known in my industry that when we hit a coding problem we are struggling with, a break from the screen gives us time to reflect. The problem always seems easier when returning with a fresh mind.&lt;/p&gt;

&lt;p&gt;I don’t get enough exercise. Probably because I don’t enjoy it unless it is disguised by playing some form of sport. I do have a dog and I find that a daily dog walk gives me the exercise and also the break from the screen. I time it in the middle of the day, then have lunch, to get a proper break. Remember, you don’t need a dog to go on a walk though!&lt;/p&gt;

&lt;p&gt;Having this routine also gives my work structure. I can focus on a task in the morning, and also a different one in the afternoon, depending on what I am working on.&lt;/p&gt;

&lt;p&gt;Also, many of us are productive at different times of the day. Personally, my brain functions better in the morning after a good sleep, I set aside time in the morning to write this article to give it my best.&lt;/p&gt;

&lt;p&gt;Therefore, I schedule the most difficult tasks into the morning.&lt;/p&gt;

&lt;p&gt;(On another side note from above, my sleep is definitely affected if I am working on my phone late at night before bed, my brain does not seem to want to switch off)&lt;/p&gt;

&lt;p&gt;Find your productive hours too. Not everybody has the luxury of having a full work day available at home. We all have busy lives. 3 dedicated hours in your productive “zone” is better than a distracted 6 hours in my opinion. &lt;/p&gt;

&lt;h2&gt;
  
  
  The famous checklist- but why so rigid?
&lt;/h2&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%2Fvqji0cmkwsy1lo3clyko.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%2Fvqji0cmkwsy1lo3clyko.jpg" alt="todo checklist" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I worked from home before the COVID-19 lockdown and had a nice routine. I had no checklist, I was pretty motivated and knew in my head what I was working on most days. Once i found myself at home with 2 kids, and my wife off work too, I got distracted. Not because they were all loud and going crazy, it was just different. It felt different.&lt;/p&gt;

&lt;p&gt;My productivity went down. Some days were good, some days were bad. I run my own business so when I work, I like to make the most of these hours.&lt;/p&gt;

&lt;p&gt;I turned to the checklist. Checklists are great, and give many people structure to their days. I believe even Richard Branson lives by them. So, I tried this for a few weeks.&lt;/p&gt;

&lt;p&gt;They did work well, I got more done and I would recommend writing one. Especially writing one when you finish work for the following day. This means you can wake up, get a coffee, head into the “office” and jump straight in.&lt;/p&gt;

&lt;p&gt;After a few weeks though, personally I felt as though these checklists were putting too much pressure on. Let me explain. I am aware this may be because I was overloading them, but I felt the day was turning into a constant battle to get through the list. Sometimes working later to get the last one ticked off.&lt;/p&gt;

&lt;p&gt;Recently I have tried a different approach. I still create a checklist of things I need to do, but not a daily list. This means I can start the day, choose what I feel like starting with, and work through things at my own pace, in my order.&lt;/p&gt;

&lt;p&gt;Obviously this may not work for everybody, especially for employed people who have a more rigid structure, but it worked for me and I feel happier this way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dedicated space
&lt;/h2&gt;

&lt;p&gt;So important, but not always possible I understand.&lt;/p&gt;

&lt;p&gt;For my first year working from home, I worked at a desk in the corner of my bedroom. I was so happy to start working from home on my business full time, that I didn’t care I had no dedicated space.&lt;/p&gt;

&lt;p&gt;As time passed, it did get harder. All of the little distractions added up. And also, there was very little separation between home and work. If you don’t have a dedicated space to escape to, you can only do your best with what you have. &lt;/p&gt;

&lt;p&gt;But, if there is somewhere you can take a little time to set up, you wont regret it.&lt;br&gt;
We recently extended our house and I now have the dedicated space, this has seen the biggest mind shift between being at home, and working at home.&lt;/p&gt;

&lt;h2&gt;
  
  
  Write things down
&lt;/h2&gt;

&lt;p&gt;This one is important for me in 2 ways. &lt;/p&gt;

&lt;p&gt;First, when working during normal times I often have ideas and thoughts pop into my head. I may see a design idea which inspires me, I may think of a better way to code something, but I may be working on something else. &lt;/p&gt;

&lt;p&gt;Get it out of your head and write it down. No more worry about forgetting, no more distractions.&lt;/p&gt;

&lt;p&gt;Secondly, it can also equally apply to out of work times too. Back to what I said earlier about evening distractions, inevitably work sometimes pops into your head, or an idea may suddenly appear. The temptation is to jump on it there and then, write it down, and it will still be there in the morning. I find this especially important when going to bed. If I don’t write it down and forget about it, you can guarantee it will cost me sleep.&lt;/p&gt;

&lt;p&gt;The idea for this article actually came to me when I went to bed, so what did I do? Wrote it down and forgot about it until the next morning. Keep a notepad by your bed, or use your phone to make a quick note if you need to.&lt;/p&gt;

&lt;p&gt;I can not take full credit for this one, but unfortunately I can not remember the source. But this is a big help to clear your mind so it is not always in work mode. &lt;/p&gt;

&lt;p&gt;If anybody knows and informs me, i will gladly credit it here.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;This is of course only scratching the surface of working from home, but I wanted to focus on some of the main things which can make a big difference.&lt;/p&gt;

&lt;p&gt;Lastly if you have children at home like I do, I am not going to tell you what is best. Everybody’s situation is different. I am fortunate that currently my wife is off work, so I have help, and they are also old enough to be left to themselves too. Yes, they distract me occasionally, but I love them and know the current circumstances are temporary.  Understandably not everybody has this luxury. We have to make the best of our own personal situation.&lt;/p&gt;

&lt;p&gt;Once the COVID-19 situation is over, when my wife returns to work and the kids return to school, the house may then seem lonely place, who knows?&lt;/p&gt;

&lt;p&gt;Just like the “real” workplace, working from home brings it’s own challenges, you have good days and bad days. Some days I also need to take my own advice, and surely writing down this article will help with that too. But, if any of the lessons I have learned can help even one of you, then that can only be a good thing.&lt;/p&gt;

</description>
      <category>workfromhome</category>
      <category>tips</category>
      <category>advice</category>
      <category>office</category>
    </item>
    <item>
      <title>Tailwind CSS Quickstart (inc project)</title>
      <dc:creator>Chris Dixon</dc:creator>
      <pubDate>Mon, 11 May 2020 14:54:21 +0000</pubDate>
      <link>https://dev.to/chrisdixon161/tailwind-css-quickstart-inc-project-2bm9</link>
      <guid>https://dev.to/chrisdixon161/tailwind-css-quickstart-inc-project-2bm9</guid>
      <description>&lt;p&gt;In this blog post, we are going to be discovering how to use the popular Tailwind CSS framework, by creating a simple Coffee Shop landing page.&lt;/p&gt;

&lt;p&gt;You can find the finished code here if you need it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/chrisdixon161/tailwind-coffee" rel="noopener noreferrer"&gt;Github repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Project images download:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chrisdixon.io/p/downloads" rel="noopener noreferrer"&gt;Images&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And also a YouTube link too if you prefer video:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/42j-hquLaaI" rel="noopener noreferrer"&gt;YouTube video&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/chrisdixon161/tailwind-coffee" rel="noopener noreferrer"&gt;&lt;/a&gt;The Tailwind CSS library has been seeing a huge rise in popularity recently, and with good reason. &lt;/p&gt;

&lt;p&gt;It is quick and easy to get started with, and enables you to create a great looking website or app in a short time.&lt;/p&gt;

&lt;p&gt;So, how does it work? First let's take a look at the popular Bootstrap 4 framework as a comparision:&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;form&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;"form-group"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"exampleInputEmail1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Email address&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"form-control"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"exampleInputEmail1"&lt;/span&gt; &lt;span class="na"&gt;aria-describedby=&lt;/span&gt;&lt;span class="s"&gt;"emailHelp"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;small&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"emailHelp"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"form-text text-muted"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;We'll never share your email with anyone else.&lt;span class="nt"&gt;&amp;lt;/small&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;"form-group"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"exampleInputPassword1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Password&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"password"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"form-control"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"exampleInputPassword1"&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;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"btn btn-primary"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Submit&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With Bootstrap we also have some utility classes available, but generally we make use of it's pre-built "component" structure. We are provided with elements and wrappers, combined with the CSS classes to create these components.&lt;/p&gt;

&lt;p&gt;Tailwind on the other hand takes a full "utility first" approach. This means we have no enforced HTML structure, we take our existing HTML, and add one or more classes to each individual element.&lt;/p&gt;

&lt;p&gt;We can style and layout our app without leaving our HTML markup. Want to set a container to use Flexbox? Just add a class:&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;ul&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"flex"&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;And we use as many of these "utility" classes as we would like to style our elements, each one with a name relating to the CSS property it adds, eg:&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;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"text-white p-4 text-2xl"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Tailwind Coffee&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Is the same as adding the following CSS manually:&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="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="m"&gt;#fff&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;1rem&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.5rem&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;Now we know a little about how Tailwind works, let's begin our project.&lt;/p&gt;

&lt;p&gt;This project is intended to be a quickstart to get you going fast. We will not be covering every CSS class Tailwind has to offer. This would be crazy, and take forever. Instead, it is designed to give you just enough to find your way.&lt;/p&gt;

&lt;p&gt;I would also recommend having open &lt;a href="https://tailwindcss.com/docs/installation/" rel="noopener noreferrer"&gt;https://tailwindcss.com/docs/installation/&lt;/a&gt; as you go through the course. The sidebar covers all of the available classes we have to use.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a new project folder in your desired location (documents/desktop etc)- named tailwind coffee&lt;/li&gt;
&lt;li&gt;Open up your preferred text editor, I use &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;Visual Studio Code &lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Open up your empty project folder in your text editor (file &amp;gt; open, or drag folder into editor)&lt;/li&gt;
&lt;li&gt;Create a new file in our project folder: index.html (file &amp;gt; new file)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now we are ready to create our basic HTML structure:&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="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Tailwind Coffee&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All of the code we write from now will also be in this same file.&lt;/p&gt;

&lt;p&gt;Starting at the top of the project we will create the header section, navbar and main image which you see 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%2Fi%2F2czvxv91wsiwfpqmx3s9.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%2F2czvxv91wsiwfpqmx3s9.png" alt="final project header section" width="800" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We are also going to need some images to use too. You can download your own, or use the same as me: using this link:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Download project images from &lt;a href="https://chrisdixon.io/p/downloads" rel="noopener noreferrer"&gt;https://chrisdixon.io/p/downloads&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Unzip &amp;amp; add images folder to your project folder&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Add the following code to the top of the body section:&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;header&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Tailwind Coffee&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;nav&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;home&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;store&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;locations&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/nav&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"images/background.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"coffee shop background"&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;Double click the index.html file to open in the browser.&lt;/p&gt;

&lt;p&gt;Not the best looking navbar, right? Let's fix this by adding some Tailwind.&lt;/p&gt;

&lt;p&gt;Head over to &lt;a href="https://tailwindcss.com/docs/installation/" rel="noopener noreferrer"&gt;https://tailwindcss.com/docs/installation/&lt;/a&gt;, where you will find the following CDN link:&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;link&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&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;Add this into the head section of our project:&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;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="c"&gt;&amp;lt;!-- Tailwind CDN Link: --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt;
      &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt;
      &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/1.4.4/tailwind.min.css"&lt;/span&gt;
    &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Tailwind Coffee&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Back over to the browser, we see a change. Bullets are removed from our list items and the fonts have changed.&lt;/p&gt;

&lt;p&gt;This means the tailwind "preflight" has taken effect. &lt;a href="https://tailwindcss.com/docs/preflight" rel="noopener noreferrer"&gt;Preflight&lt;/a&gt; is Tailwind's base CSS which gives us a blank canvas to begin with by removing default margins, unstyling headings and lists etc. It is also build on top of the popular normalize.css file.&lt;/p&gt;

&lt;p&gt;Now we can add some Tailwind utility classes to improve the styling, to begin, I am going to be styling "mobile first". I would recomment shrinking the browser to a narrow size.&lt;/p&gt;

&lt;p&gt;We can apply general stying we want throughtout the page in a parent container, such as the body:&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;body&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"font-serif text-xl text-gray-200 antialiased"&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;Here we set the font-family, size, color and also font smoothing properties.&lt;/p&gt;

&lt;p&gt;Then our initial mobile first styling for the header content:&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="c"&gt;&amp;lt;!-- display type flex, items centered, text/background colors and padding --&amp;gt;&lt;/span&gt;
    &lt;span class="c"&gt;&amp;lt;!-- py-6 = padding value of 6 (1.5rem) on y axis (top/bottom)  --&amp;gt;&lt;/span&gt;
    &lt;span class="c"&gt;&amp;lt;!-- px-2 - padding value of 2 (0.5rem) on x axis (left/right) --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;header&lt;/span&gt;
      &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"flex flex-col items-center bg-gray-600 text-gray-200 py-6 px-2"&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="c"&gt;&amp;lt;!-- pb-4 = padding value of 4 (1rem) on bottom only --&amp;gt;&lt;/span&gt;
      &lt;span class="c"&gt;&amp;lt;!-- font weight medium, font size 1.5rem --&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pb-4 font-medium text-2xl"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Tailwind Coffee&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;nav&amp;gt;&lt;/span&gt;
        &lt;span class="c"&gt;&amp;lt;!-- set flex container and a spacing value
             between child element of 4 (1rem) on the x axis --&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;ul&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"flex space-x-4"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;home&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;store&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;locations&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/nav&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Our header should now look like this:&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%2F0ev2igh46gbx5bqifqfo.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%2F0ev2igh46gbx5bqifqfo.png" alt="tailwind coffee header" width="800" height="558"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Stretch the browser to be a wider size (over 768px), and we can change the layout of the header for larger devices.&lt;/p&gt;

&lt;p&gt;To do this, Tailwind provides some default responsive sizes:&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="c"&gt;/* Small (sm) */&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;640px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c"&gt;/* ... */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* Medium (md) */&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;768px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c"&gt;/* ... */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* Large (lg) */&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1024px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c"&gt;/* ... */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* Extra Large (xl) */&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1280px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c"&gt;/* ... */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can use these prefixes of sm, md, lg and xl before any utility class, to only apply the styling on that size and over.&lt;/p&gt;

&lt;p&gt;For example, our header is currently set to the flex direction of column (flex-col), we can change it to be row on medium devices by adding &lt;strong&gt;md:flex-row&lt;/strong&gt;:&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;header&lt;/span&gt;
      &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"flex flex-col md:flex-row justify-between items-center bg-gray-600 text-gray-200 py-6 px-2"&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;We also add &lt;strong&gt;justify-between&lt;/strong&gt; above to add the spacing between the site title and links for the md size and over.&lt;/p&gt;

&lt;p&gt;So, to recap, the header will be column on all sizes, until the browser reaches 768px, then the layout will switch to row.&lt;/p&gt;

&lt;p&gt;The site title and links are not currently lined up ono the larger view, because we have some padding on the bottom of the title from the small screen view.&lt;/p&gt;

&lt;p&gt;Let's override this for the md size:&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="c"&gt;&amp;lt;!-- add md:pb-0 --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pb-4 md:pb-0 font-medium text-2xl"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Tailwind Coffee&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should now have a nice looking responsive header like this:&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%2F2czvxv91wsiwfpqmx3s9.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%2F2czvxv91wsiwfpqmx3s9.png" alt="medium size device header view" width="800" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we understand a bit more about how Tailwind works, the rest of the page should make more sense (add code below main image):&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;main&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"md:grid grid-cols-3 gap-4 text-gray-200 text-center mt-4"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;article&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-gray-600"&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;src=&lt;/span&gt;&lt;span class="s"&gt;"images/beans.jpg"&lt;/span&gt;
          &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"shop coffee beans"&lt;/span&gt;
          &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"rounded-t w-full"&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;"md:flex flex-col py-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;h3&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"font-medium text-2xl pb-12"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Our coffee beans&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Bulk bags of our responsibly sourced beans&lt;span class="nt"&gt;&amp;lt;/p&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;/article&amp;gt;&lt;/span&gt;

      &lt;span class="nt"&gt;&amp;lt;article&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-gray-600"&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;src=&lt;/span&gt;&lt;span class="s"&gt;"images/locations.jpg"&lt;/span&gt;
          &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"shop coffee beans"&lt;/span&gt;
          &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"rounded-t w-full"&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;"md:flex flex-col py-8 px-2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;h3&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"font-medium text-2xl pb-12"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Our locations&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;50 locations to choose from&lt;span class="nt"&gt;&amp;lt;/p&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;/article&amp;gt;&lt;/span&gt;

      &lt;span class="nt"&gt;&amp;lt;article&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-gray-600"&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;src=&lt;/span&gt;&lt;span class="s"&gt;"images/process.jpg"&lt;/span&gt;
          &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"shop coffee beans"&lt;/span&gt;
          &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"rounded-t w-full"&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;"md:flex flex-col py-8 px-2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;h3&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"font-medium text-2xl pb-12"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Learn about the process&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Jump into the art behind making great coffee&lt;span class="nt"&gt;&amp;lt;/p&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;/article&amp;gt;&lt;/span&gt;

      &lt;span class="nt"&gt;&amp;lt;article&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-gray-600"&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;src=&lt;/span&gt;&lt;span class="s"&gt;"images/coffee.jpg"&lt;/span&gt;
          &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"shop coffee beans"&lt;/span&gt;
          &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"rounded-t w-full"&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;"md:flex flex-col py-8 px-2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;h3&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"font-medium text-2xl pb-12"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Our coffee&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Discover our wide range of blends&lt;span class="nt"&gt;&amp;lt;/p&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;/article&amp;gt;&lt;/span&gt;

      &lt;span class="nt"&gt;&amp;lt;article&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-gray-600"&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;src=&lt;/span&gt;&lt;span class="s"&gt;"images/machines.jpg"&lt;/span&gt;
          &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"shop coffee beans"&lt;/span&gt;
          &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"rounded-t w-full"&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;"md:flex flex-col py-8 px-2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;h3&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"font-medium text-2xl pb-12"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Shop coffee machines&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Make the perfect coffee at home&lt;span class="nt"&gt;&amp;lt;/p&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;/article&amp;gt;&lt;/span&gt;

      &lt;span class="nt"&gt;&amp;lt;article&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-gray-600"&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;src=&lt;/span&gt;&lt;span class="s"&gt;"images/mugs.jpg"&lt;/span&gt;
          &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"shop coffee beans"&lt;/span&gt;
          &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"rounded-t w-full"&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;"md:flex flex-col py-8 px-2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;h3&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"font-medium text-2xl pb-12"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Branded mugs&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Check out all of our merch&lt;span class="nt"&gt;&amp;lt;/p&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;/article&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/main&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we create a main wrapper, on smaller devices, the content will naturally stack vertically.&lt;/p&gt;

&lt;p&gt;Then we set the display to be grid on medium size devices and above. 3 equal grid columns, and a grid gap of 4 (1 rem).&lt;/p&gt;

&lt;p&gt;This places all of the sections (article elements) into a grid formation, and these are made up of a image, title and subtitle, using some familiar utility classes.&lt;/p&gt;

&lt;p&gt;You should now have an area below the header which looks like this:&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%2F1hqoeh6137n3uytzkq1v.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%2F1hqoeh6137n3uytzkq1v.png" alt="grid sections of project" width="800" height="728"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope this has given you a good insight of how to get going with Tailwind.&lt;/p&gt;

&lt;p&gt;This is just scratching the surface of what it has to offer, there is many more utilities available, installation methods, customisation options etc which can make Tailwind truly flexible and customisable for your next project.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
