<?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: Nagy Szabolcs</title>
    <description>The latest articles on DEV Community by Nagy Szabolcs (@szhabolcs).</description>
    <link>https://dev.to/szhabolcs</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%2F204729%2Fd3d8a963-3ab4-4c27-9f0e-ec14d93013b9.jpg</url>
      <title>DEV Community: Nagy Szabolcs</title>
      <link>https://dev.to/szhabolcs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/szhabolcs"/>
    <language>en</language>
    <item>
      <title>Hugo - My DOHackathon submission</title>
      <dc:creator>Nagy Szabolcs</dc:creator>
      <pubDate>Fri, 08 Jan 2021 19:53:22 +0000</pubDate>
      <link>https://dev.to/szhabolcs/hugo-my-dohackathon-submission-1aj6</link>
      <guid>https://dev.to/szhabolcs/hugo-my-dohackathon-submission-1aj6</guid>
      <description>&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;I build a website that helps you send &lt;em&gt;special hugs&lt;/em&gt; to your loved ones! You're no longer limited by sending a gif of a hug, with Hugo you can send hugs they will &lt;em&gt;actually feel&lt;/em&gt;!&lt;/p&gt;

&lt;h3&gt;
  
  
  Category Submission:
&lt;/h3&gt;

&lt;p&gt;Program for the People&lt;/p&gt;

&lt;h3&gt;
  
  
  App Link
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://hugo-ptrq2.ondigitalocean.app/" rel="noopener noreferrer"&gt;https://hugo-ptrq2.ondigitalocean.app/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Screenshots
&lt;/h3&gt;

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

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fieg26jhlwv7i0yfmew09.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fieg26jhlwv7i0yfmew09.jpg"&gt;&lt;/a&gt;Hug making pages&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffji23sh2fy5j0hhxfe7b.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffji23sh2fy5j0hhxfe7b.jpg"&gt;&lt;/a&gt;Hug viewing page&lt;/p&gt;

&lt;h3&gt;
  
  
  Description
&lt;/h3&gt;

&lt;p&gt;How do you go by doing something like that? you may ask, well it's simple, haptic feedback (more specifically vibration).&lt;br&gt;
You can record a hug, and send it to anyone you'd like, then all they have to do, is place their phones on their chest, and feel your special hug! And don't worry if you're on desktop, the hugs can be played with sound too!&lt;/p&gt;

&lt;h3&gt;
  
  
  Link to Source Code
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/ToastedWaffle/hugo" rel="noopener noreferrer"&gt;GitHub repo&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Permissive License
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://commonsclause.com/" rel="noopener noreferrer"&gt;Apache 2.0 with Commons Clause&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;Well being stuck at home, far away from my friends, made me use the following gif more and more:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2FZBQhoZC0nqknSviPqT%2Fgiphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2FZBQhoZC0nqknSviPqT%2Fgiphy.gif" alt="hug gif"&gt;&lt;/a&gt;&lt;br&gt;
Then one day I stumbled upon this Hackathon and started thinking about ideas. &lt;br&gt;
I knew right from the start that I wanted to do something in the second category, because helping someone, or bringing someone a smile is one of my favorite things to do!&lt;br&gt;
So the idea of virtual hugs came into my mind, and I was thinking about ways I could make them better than a gif. They had to be something more than just a text on a screen.&lt;br&gt;
And then I remembered the times I hugged my phone whenever someone sent me something sweet, aaand bingo! 💭&lt;/p&gt;

&lt;p&gt;The idea of hugs you can feel came to life! 🎉&lt;/p&gt;

&lt;h3&gt;
  
  
  How I built it
&lt;/h3&gt;

&lt;p&gt;Using the platform was really really easy!&lt;br&gt;
Being a young and not that much experienced fellow in all the hosting setup stuff, starting off with App Platform was a breeze!&lt;/p&gt;

&lt;p&gt;First of all I made the frontend using the static site component. Setting it up was easy, I just had to type in my npm script and done!&lt;br&gt;
Then I added a PostgreSQL database, which worked surprisingly well with JSON data.&lt;br&gt;
And finally I added a node web service component for my API.&lt;/p&gt;

&lt;p&gt;And just like that, I connected them all and voila!&lt;br&gt;
You can read more about how I built the application &lt;a href="https://dev.to/szhabolcs/hugo-sending-hugs-you-really-feel-first-ideas-g92"&gt;from this series&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Resources/Info
&lt;/h3&gt;

&lt;p&gt;Notable resources:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=bxmDnn7lrnk&amp;amp;list=PL4cUxeGkcC9gpXORlEHjc5bgnIi5HEGhw" rel="noopener noreferrer"&gt;Tailwind tutorial by The Net Ninja&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Graphics from &lt;a href="https://storyset.com/" rel="noopener noreferrer"&gt;Storyset&lt;/a&gt; and &lt;a href="https://www.vecteezy.com/" rel="noopener noreferrer"&gt;Vecteezy&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Icons from &lt;a href="https://fontawesome.com/" rel="noopener noreferrer"&gt;Font Awesome&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tonejs.github.io/" rel="noopener noreferrer"&gt;Tone.js&lt;/a&gt; for audio management&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>dohackathon</category>
    </item>
    <item>
      <title>Hugo - sending hugs you really feel - Finishing touches</title>
      <dc:creator>Nagy Szabolcs</dc:creator>
      <pubDate>Fri, 08 Jan 2021 19:51:53 +0000</pubDate>
      <link>https://dev.to/szhabolcs/hugo-sending-hugs-you-really-feel-finishing-touches-4894</link>
      <guid>https://dev.to/szhabolcs/hugo-sending-hugs-you-really-feel-finishing-touches-4894</guid>
      <description>&lt;h1&gt;
  
  
  So here we are, as of writing this post, I finally finished my submission. 🎉
&lt;/h1&gt;

&lt;p&gt;The past posts have all been written today, because I did not have time to write them in the past. But I hope you enjoyed them nevertheless!&lt;/p&gt;

&lt;p&gt;So here are some things I've been working on!&lt;/p&gt;

&lt;h1&gt;
  
  
  Issue nr.1 WebKit doesn't support the vibration API 📵
&lt;/h1&gt;

&lt;p&gt;Well this is a bummer.&lt;br&gt;
This really upset me the first time I read about it, but it didn't stop me from finding a workaround. &lt;br&gt;
As you could see in the mockups there is a little checkbox saying "play sound instead of vibrating".&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--h3sbWFXQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vseamocypo5b2heia4qs.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h3sbWFXQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vseamocypo5b2heia4qs.jpg" alt="sound play checkbox"&gt;&lt;/a&gt;&lt;br&gt;
I initially intended to have this feature only available for desktops where vibration is not possible, but in the end I decided it should be available on all devices.&lt;br&gt;
I also placed a warning each time an unsupported browser is being used.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UF2tt86Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qy1sbgw4kkfrcwnnvoiv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UF2tt86Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qy1sbgw4kkfrcwnnvoiv.jpg" alt="vibration not supported alert"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Issue nr.2 People can't find the hug making page from the view page 🔎
&lt;/h1&gt;

&lt;p&gt;I sent hugs to some of my friends, to test out if everything worked fine. Turns out, they couldn't figure out how to send a new hug, because there wasn't any indication of how to get to that page. &lt;br&gt;
This was of course all my mistake, but I fixed it by placing buttons on the view page.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bzGvp8a1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/r2lnokqiqjx0cu3c0ca6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bzGvp8a1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/r2lnokqiqjx0cu3c0ca6.jpg" alt="additional buttons added"&gt;&lt;/a&gt;&lt;br&gt;
And just like that, you can get to the maker from every page, so I hope the number of sent hugs will increase. 🤗&lt;/p&gt;

&lt;h1&gt;
  
  
  Aaand the end. Or is it? 🤔
&lt;/h1&gt;

&lt;p&gt;The application is available from &lt;a href="https://hugo-ptrq2.ondigitalocean.app/"&gt;here&lt;/a&gt; and I think even if I buy a domain for it, or change hosting, I will still keep this link active. &lt;/p&gt;

&lt;p&gt;As of what comes after this, I don't know. I want to see what the reaction of the public is, because I think this has potential. This is my first project that actually more people could use, so I'm really excited to see how this turns out.&lt;/p&gt;

&lt;h4&gt;
  
  
  If you like the idea, the execution, or you just want to help me get my first app out there, go on and send a hug!
&lt;/h4&gt;

&lt;h4&gt;
  
  
  It's free, it's cute, and your loved ones will surely love it! ❤
&lt;/h4&gt;

&lt;p&gt;P.S. As I did in my other posts, here is another hug, this time it's made with Hugo, and it never expires 💕&lt;br&gt;
&lt;a href="https://hugo-ptrq2.ondigitalocean.app/view?id=every1"&gt;https://hugo-ptrq2.ondigitalocean.app/view?id=every1&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dohackathon</category>
      <category>design</category>
      <category>ux</category>
      <category>ui</category>
    </item>
    <item>
      <title>Hugo - sending hugs you really feel - The backend</title>
      <dc:creator>Nagy Szabolcs</dc:creator>
      <pubDate>Fri, 08 Jan 2021 19:51:42 +0000</pubDate>
      <link>https://dev.to/szhabolcs/hugo-sending-hugs-you-really-feel-the-backend-1ne3</link>
      <guid>https://dev.to/szhabolcs/hugo-sending-hugs-you-really-feel-the-backend-1ne3</guid>
      <description>&lt;h1&gt;
  
  
  The API 🤖
&lt;/h1&gt;

&lt;p&gt;For the backend, I decided to go with a Node and Express combination.&lt;br&gt;
My idea is to have 3 endpoints&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Endpoint&lt;/th&gt;
&lt;th&gt;Behavior&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GET api/:id&lt;/td&gt;
&lt;td&gt;responds with the given hug's data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;POST api/?pattern={}&amp;amp;name=""&lt;/td&gt;
&lt;td&gt;adds a new hug to the database&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;POST api/:id&lt;/td&gt;
&lt;td&gt;increments the number of plays in the database&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;and to make calls from the HTML page to these.&lt;/p&gt;

&lt;p&gt;Coding the backend was pretty straightforward because I worked with this kind of environment before.&lt;br&gt;
The one issue I ran into multiple times tho was to do with CORS when connecting to the api from localhost. This time the api was on the DigitalOcean servers so I expected to encounter some issues.&lt;br&gt;
I fixed these by adding this regex rule in the DigitalOcean panel &lt;code&gt;.*&lt;/code&gt; which basically enables every source.&lt;/p&gt;

&lt;h1&gt;
  
  
  The database 🛢
&lt;/h1&gt;

&lt;p&gt;I initially wanted to use a NoSQL database, but since I was running out of time quickly, I decided to go with PostgreSQL because that was the only option on the app platform.&lt;/p&gt;

&lt;p&gt;I worked with SQL databases before, but one new thing I learned about was the JSONB Datatype. Turns out, you can conveniently store JSON data in traditional SQL databases. 😅&lt;br&gt;
At first, I actually tried using JSON instead, but since I saved my patterns in a JSON array it couldn't be done.&lt;/p&gt;

&lt;h1&gt;
  
  
  Final thoughts 💭
&lt;/h1&gt;

&lt;p&gt;Overall I managed to finish everything in a day or so!&lt;/p&gt;

&lt;p&gt;Oh and, I haven't told you about the JavaScript behind the websites. Honestly they are pretty boring, just getting states from buttons and API calls, nothing fancy.&lt;/p&gt;

&lt;p&gt;Anyways take care, and have a hug! 👻&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uuldtzWY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://media1.giphy.com/media/Yle9Yz9izeVRyiwavn/giphy.gif%3Fcid%3Decf05e478aitq87ozyk4924wybjyhimg713g31jxsa4tkq58%26rid%3Dgiphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uuldtzWY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://media1.giphy.com/media/Yle9Yz9izeVRyiwavn/giphy.gif%3Fcid%3Decf05e478aitq87ozyk4924wybjyhimg713g31jxsa4tkq58%26rid%3Dgiphy.gif" alt="hug gif"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dohackathon</category>
      <category>javascript</category>
      <category>node</category>
      <category>postgres</category>
    </item>
    <item>
      <title>Hugo - sending hugs you really feel - The frontend</title>
      <dc:creator>Nagy Szabolcs</dc:creator>
      <pubDate>Fri, 08 Jan 2021 19:51:17 +0000</pubDate>
      <link>https://dev.to/szhabolcs/hugo-sending-hugs-you-really-feel-the-frontend-o0a</link>
      <guid>https://dev.to/szhabolcs/hugo-sending-hugs-you-really-feel-the-frontend-o0a</guid>
      <description>&lt;h1&gt;
  
  
  The mockup ✏
&lt;/h1&gt;

&lt;p&gt;After writing down the initial ideas, I started making the mockups in Adobe XD.&lt;br&gt;
First I made my mood board using Dribbble, and looked at some fonts from &lt;a href="https://fontpair.co/" rel="noopener noreferrer"&gt;FontPair&lt;/a&gt;. I've also searched for some free graphics and found just the right ones on &lt;a href="https://storyset.com/" rel="noopener noreferrer"&gt;Storyset&lt;/a&gt;.&lt;br&gt;
Here are the final mockups&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxpiuvjuyhxift65cs4xh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxpiuvjuyhxift65cs4xh.jpg" alt="design mockups"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Making the page 💻
&lt;/h1&gt;

&lt;p&gt;First I set up Tailwind, following the instructions from the official documentation, and everything went smoothly!&lt;br&gt;
Then I set up my custom theme by following the tutorial mentioned in the last post.&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;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;extend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;:{&lt;/span&gt;
        &lt;span class="na"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#FF979E&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;primary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#162A40&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;secondary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#FFFFFF&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;fontFamily&lt;/span&gt;&lt;span class="p"&gt;:{&lt;/span&gt;
        &lt;span class="na"&gt;header&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;Pacifico&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;cursive&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="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Cabin&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;sans-serif&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And just like that I was ready to start making the webpage.&lt;/p&gt;

&lt;p&gt;At first things seemed a bit out of hand, having really long class names like&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;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;block rounded-full bg-primary text-secondary px-10 py-2 text-base&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But then I remembered I can compress it down to a single class using the &lt;code&gt;@apply&lt;/code&gt; directive just 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="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;btn&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;apply&lt;/span&gt; &lt;span class="nx"&gt;block&lt;/span&gt; &lt;span class="nx"&gt;rounded&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;full&lt;/span&gt; &lt;span class="nx"&gt;bg&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;primary&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;secondary&lt;/span&gt; &lt;span class="nx"&gt;px&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="nx"&gt;py&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;2&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;base&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;Neat!&lt;/p&gt;

&lt;p&gt;The layout is made using CSS grids, which I always found to be a bit complicated but Tailwind really made them simple with classes like &lt;code&gt;grid-cols-1&lt;/code&gt;.&lt;br&gt;
Making the whole page responsive was a breeze thanks to the responsive breakpoints, namely &lt;code&gt;sm: md: lg:&lt;/code&gt; and so on. &lt;br&gt;
So my responsiveness is driven solely by&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;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;grid grid-cols-1 md:grid-cols-2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;also very neat!&lt;/p&gt;

&lt;h1&gt;
  
  
  But there was one problem 🤯
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fr9jv7bnxpgfq9t4d0gyp.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fr9jv7bnxpgfq9t4d0gyp.jpg" alt="big file size"&gt;&lt;/a&gt;&lt;br&gt;
The Tailwind stylesheet was hugee!&lt;br&gt;
I knew I couldn't let this be that big in production, so I started searching again.&lt;/p&gt;

&lt;p&gt;It turns out, I haven't read the documentation well enough, and I missed a crucial step: &lt;a href="https://tailwindcss.com/docs/optimizing-for-production" rel="noopener noreferrer"&gt;optimizing for production&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I quickly set up &lt;a href="https://purgecss.com/" rel="noopener noreferrer"&gt;PurgeCSS&lt;/a&gt; as mentioned, making sure to include a safelist. This is to make sure my dynamically created classes get added to the final file as well. &lt;br&gt;
So my tailwind config file needed the following lines&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;purge&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;content&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="s1"&gt;./public/**/*.html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;safelist&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;grid-cols-3&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;animate-ping&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;One last command later, everything worked and I can finally call it a day! 🎉&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6prssgdzf2gpczpktexh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6prssgdzf2gpczpktexh.jpg" alt="small file size"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;P.S. Take care, here's another hug! 👻&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2FVhRU9RvKZWKujYXhlJ%2Fgiphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2FVhRU9RvKZWKujYXhlJ%2Fgiphy.gif" alt="hug gif"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dohackathon</category>
      <category>css</category>
      <category>html</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Hugo - sending hugs you really feel - First ideas</title>
      <dc:creator>Nagy Szabolcs</dc:creator>
      <pubDate>Fri, 08 Jan 2021 19:50:59 +0000</pubDate>
      <link>https://dev.to/szhabolcs/hugo-sending-hugs-you-really-feel-first-ideas-g92</link>
      <guid>https://dev.to/szhabolcs/hugo-sending-hugs-you-really-feel-first-ideas-g92</guid>
      <description>&lt;p&gt;If you ever wanted to send someone a hug online, you most likely have come across this gif. It's a cute and kind way of sending some love, but it lacks the &lt;em&gt;feel&lt;/em&gt; part of a hug.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FjJ8NnQ4.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FjJ8NnQ4.gif" alt="hug gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  This is where Hugo comes in place!
&lt;/h3&gt;

&lt;p&gt;The idea behind it, is sending a hug that you can &lt;em&gt;really feel&lt;/em&gt;.&lt;br&gt;
How? you may ask, well it's simple, &lt;strong&gt;haptic feedback&lt;/strong&gt; (more specifically vibration).&lt;br&gt;
You can record a hug, and send it to your loved ones, then all they have to do, is place their phones on their chest, and &lt;em&gt;feel&lt;/em&gt; your special hug! 😄&lt;/p&gt;

&lt;h1&gt;
  
  
  Well, let's get started! 🚀
&lt;/h1&gt;

&lt;p&gt;First of all, I started my project on paper, sketching and writing down ideas.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fz9w0e3nls3uncolr3yvh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fz9w0e3nls3uncolr3yvh.png" alt="sketch of the design"&gt;&lt;/a&gt;&lt;br&gt;
🧠 I came up with an editor that's made out of toggleable boxes, each representing a step. These can be either a pause &lt;code&gt;o&lt;/code&gt; or a vibration &lt;code&gt;~&lt;/code&gt;, and they also add up, meaning if you have the following pattern: &lt;br&gt;
&lt;code&gt;~ ~ o ~ ~ ~&lt;/code&gt; the phone will vibrate for 2 seconds, pause for 1 then vibrate for 3 more.&lt;/p&gt;

&lt;p&gt;🛠 I did not want to overcomplicate the layout, so it's really simple, being one column on mobile, and two on desktop.&lt;br&gt;
Also, I usually build websites using Bootstrap, but I thought it would be overkill for this project, so I started looking for alternatives.&lt;/p&gt;

&lt;p&gt;🌟 Somehow Tailwind popped up in my YouTube recommended, and I thought I'd give it a try. After watching &lt;a href="https://www.youtube.com/watch?v=bxmDnn7lrnk&amp;amp;list=PL4cUxeGkcC9gpXORlEHjc5bgnIi5HEGhw" rel="noopener noreferrer"&gt;this series&lt;/a&gt; by The Net Ninja I decided it would be fun to try it out! (I really encourage you to check out his videos if you're interested, they're great!)&lt;/p&gt;

&lt;h3&gt;
  
  
  Woho! you made it to the end!
&lt;/h3&gt;

&lt;p&gt;This is my first ever post in here, so any kind of feedback is appreciated, take care, here's a hug! 👻&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia1.tenor.com%2Fimages%2F4585dc5fe74383a2008d7e730d8b96d7%2Ftenor.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia1.tenor.com%2Fimages%2F4585dc5fe74383a2008d7e730d8b96d7%2Ftenor.gif" alt="hug gif"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dohackathon</category>
      <category>javascript</category>
      <category>css</category>
      <category>html</category>
    </item>
  </channel>
</rss>
