<?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: Manuel Alférez Ruiz</title>
    <description>The latest articles on DEV Community by Manuel Alférez Ruiz (@manuelalferez).</description>
    <link>https://dev.to/manuelalferez</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%2F476059%2Faf6e376a-a169-4bc8-bf46-b337e251b9c0.jpeg</url>
      <title>DEV Community: Manuel Alférez Ruiz</title>
      <link>https://dev.to/manuelalferez</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/manuelalferez"/>
    <language>en</language>
    <item>
      <title>WRONGTYPE Operation against a key holding the wrong kind of value</title>
      <dc:creator>Manuel Alférez Ruiz</dc:creator>
      <pubDate>Tue, 14 Nov 2023 11:57:44 +0000</pubDate>
      <link>https://dev.to/manuelalferez/wrongtype-operation-against-a-key-holding-the-wrong-kind-of-value-2n60</link>
      <guid>https://dev.to/manuelalferez/wrongtype-operation-against-a-key-holding-the-wrong-kind-of-value-2n60</guid>
      <description>&lt;p&gt;The error arises when attempting a KV operation (set or get) in Vercel after creating an entry using a different data structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Replicating the error
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;await kv.set&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'userSession'&lt;/span&gt;, &lt;span class="s1"&gt;'123abc'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Subsequently, we opt to change the data structure.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;await kv.hset&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'userSession'&lt;/span&gt;, &lt;span class="o"&gt;{&lt;/span&gt; userId: 123, email: &lt;span class="s1"&gt;'ex@example.com'&lt;/span&gt; &lt;span class="o"&gt;})&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;UpstashError: WRONGTYPE Operation against a key holding the wrong kind of value, &lt;span class="nb"&gt;command &lt;/span&gt;was: &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"hset"&lt;/span&gt;,&lt;span class="s2"&gt;"userSession"&lt;/span&gt;, ...]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;Remove the key from Vercel before modifying the data structure.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to Vercel: &lt;a href="https://vercel.com/dashboard/stores/kv" rel="noopener noreferrer"&gt;https://vercel.com/dashboard/stores/kv&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Delete that key:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;DEL userSession
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

</description>
      <category>kv</category>
      <category>vercelkv</category>
      <category>vercel</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>Custom fonts in Fresh + Twind</title>
      <dc:creator>Manuel Alférez Ruiz</dc:creator>
      <pubDate>Thu, 19 Oct 2023 14:20:12 +0000</pubDate>
      <link>https://dev.to/manuelalferez/custom-fonts-in-fresh-twind-1pph</link>
      <guid>https://dev.to/manuelalferez/custom-fonts-in-fresh-twind-1pph</guid>
      <description>&lt;p&gt;To add fonts to your &lt;a href="https://fresh.deno.dev/" rel="noopener noreferrer"&gt;Fresh&lt;/a&gt; project, you don't need any extra dependencies:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1&lt;/strong&gt;- Go to &lt;a href="https://fonts.google.com/" rel="noopener noreferrer"&gt;Google Fonts&lt;/a&gt; and choose your preferred fonts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2&lt;/strong&gt;- Select the desired font styles and copy the link:&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;3&lt;/strong&gt;- Paste that link into your Fresh project's main index, under the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;   &lt;span class="c1"&gt;// routes/index.tsx&lt;/span&gt;
   &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Head&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
     ...
     &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;link&lt;/span&gt; &lt;span class="na"&gt;rel&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'shortcut icon'&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'/favicon.png'&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'image/png'&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
     &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;link&lt;/span&gt; &lt;span class="na"&gt;rel&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'preconnect'&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'https://fonts.googleapis.com'&lt;/span&gt; &lt;span class="na"&gt;crossOrigin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
     &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;link&lt;/span&gt; &lt;span class="na"&gt;rel&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'preconnect'&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'https://fonts.gstatic.com'&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
     &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;link&lt;/span&gt;
       &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'https://fonts.googleapis.com/css2?family=Inter:wght@100;300;400;600;800&amp;amp;display=swap'&lt;/span&gt;
       &lt;span class="na"&gt;rel&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'stylesheet'&lt;/span&gt;
     &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Head&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4&lt;/strong&gt;- Configure Twind to use the imported fonts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// utils/twind.ts&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;IS_BROWSER&lt;/span&gt; &lt;span class="p"&gt;}&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;$fresh/runtime.ts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Configuration&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setup&lt;/span&gt; &lt;span class="p"&gt;}&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;twind&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="o"&gt;*&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;twind&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Configuration&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;darkMode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;class&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;silent&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;theme&lt;/span&gt;&lt;span class="p"&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="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;sans&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;Inter&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;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;IS_BROWSER&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it! If you have any question, feel free to ask me.&lt;/p&gt;

</description>
      <category>deno</category>
      <category>fresh</category>
      <category>twind</category>
      <category>googlefonts</category>
    </item>
    <item>
      <title>ChatGPT-Powered Finance App</title>
      <dc:creator>Manuel Alférez Ruiz</dc:creator>
      <pubDate>Fri, 06 Oct 2023 09:31:21 +0000</pubDate>
      <link>https://dev.to/manuelalferez/exciting-news-introducing-my-new-financing-app-4h7h</link>
      <guid>https://dev.to/manuelalferez/exciting-news-introducing-my-new-financing-app-4h7h</guid>
      <description>&lt;p&gt;Hi everyone,&lt;/p&gt;

&lt;p&gt;I am thrilled to announce the official launch of &lt;a href="https://flowinance.vercel.app/" rel="noopener noreferrer"&gt;Flowinance&lt;/a&gt;, a cutting-edge Financing App that is revolutionizing the way you manage your finances! &lt;a href="https://flowinance.vercel.app/" rel="noopener noreferrer"&gt;Flowinance&lt;/a&gt; is designed to simplify and streamline your financial life, providing you with the tools and security you need to take control of your money.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Features
&lt;/h2&gt;

&lt;p&gt;🔐 Secure Authentication: Flowinance uses &lt;a href="https://supabase.com/" rel="noopener noreferrer"&gt;Supabase&lt;/a&gt; for authentication, ensuring that your data remains protected and confidential.&lt;/p&gt;

&lt;p&gt;📋 Automatic Transaction Categorization: Thanks to &lt;a href="https://openai.com/" rel="noopener noreferrer"&gt;ChatGPT&lt;/a&gt;, Flowinance automatically categorizes and cleans your transaction records, making it effortless to track your spending.&lt;/p&gt;

&lt;p&gt;🔒 Top-Notch Data Encryption: Your financial information is fully &lt;a href="https://www.npmjs.com/package/crypto-js" rel="noopener noreferrer"&gt;encrypted&lt;/a&gt;, and every transaction field is inaccessible to anyone but you.&lt;/p&gt;

&lt;p&gt;📈 Real-Time Spending Trends: Keep a close eye on your spending trends and make informed financial decisions in real-time.&lt;/p&gt;

&lt;h2&gt;
  
  
  User Interface:
&lt;/h2&gt;

&lt;p&gt;💼 Transactions: Visualize your transactions effortlessly with a clean and intuitive interface.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuoz6l7cqvm7eztd4di3i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuoz6l7cqvm7eztd4di3i.png" alt="Transaction page" width="800" height="507"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📊 Dashboard: Gain insights into your financial health through an organized dashboard.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa6muewfy0mtuc60if2i3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa6muewfy0mtuc60if2i3.png" alt="Dashboard page" width="800" height="506"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;⚙️ Settings Page: Customize your Flowinance experience with ease.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjm5l71b0kk4wtgf8k9pn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjm5l71b0kk4wtgf8k9pn.png" alt="Settings page" width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;✨ Easy Upload with ChatGPT: Simplify data entry with the assistance of ChatGPT.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnhsdyvqzc7mz7lj9wkl0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnhsdyvqzc7mz7lj9wkl0.png" alt="Upload files with ChatGPT" width="800" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Technologies Used
&lt;/h2&gt;

&lt;p&gt;💼 &lt;a href="https://supabase.com/" rel="noopener noreferrer"&gt;Supabase&lt;/a&gt;: Our secure authentication and data management are powered by Supabase, guaranteeing the utmost protection for your financial information.&lt;/p&gt;

&lt;p&gt;🖥️ &lt;a href="https://ui.shadcn.com/" rel="noopener noreferrer"&gt;RadixUI&lt;/a&gt;: We've incorporated RadixUI to create an intuitive and seamless user interface for Flowinance, ensuring a smooth and enjoyable experience.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://nextjs.org/" rel="noopener noreferrer"&gt;Next.js&lt;/a&gt;: Flowinance utilizes Next.js to provide a fast, responsive, and dynamic web application that adapts to your needs.&lt;/p&gt;

&lt;p&gt;🎨 &lt;a href="https://tailwindcss.com/" rel="noopener noreferrer"&gt;Tailwind CSS&lt;/a&gt;: Our design is built on the foundation of Tailwind CSS, giving Flowinance a sleek and modern appearance while maintaining exceptional performance.&lt;/p&gt;

&lt;p&gt;The best part? Flowinance is absolutely FREE! Your feedback is invaluable to us ❤️, so please don't hesitate to let us know what you think.&lt;/p&gt;

</description>
      <category>finance</category>
      <category>budget</category>
      <category>supabase</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>Adding Responsive Design to embedded YouTube videos with TailwindCSS</title>
      <dc:creator>Manuel Alférez Ruiz</dc:creator>
      <pubDate>Sat, 02 Apr 2022 09:36:56 +0000</pubDate>
      <link>https://dev.to/manuelalferez/adding-responsive-design-to-embedded-youtube-videos-with-tailwindcss-2ipc</link>
      <guid>https://dev.to/manuelalferez/adding-responsive-design-to-embedded-youtube-videos-with-tailwindcss-2ipc</guid>
      <description>&lt;p&gt;YouTube does not offer a way to automatically resize and scale. Here is a list of steps to achieve this with Tailwind:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1-&lt;/strong&gt; Install the plugin &lt;code&gt;@tailwindcss/aspect-ratio&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i @tailwindcss/aspect-ratio
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2-&lt;/strong&gt; Add the installed plugin to the Tailwind settings&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// tailwind.config.js 

plugins: [require("@tailwindcss/aspect-ratio")],
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3-&lt;/strong&gt; Add Responsive Design to your videos:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="aspect-w-16 aspect-h-9"&amp;gt;
  &amp;lt;iframe src="https://youtu.be/NX_NW6bt6_s" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen&amp;gt;&amp;lt;/iframe&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://youtu.be/NX_NW6bt6_s" rel="noopener noreferrer"&gt;Sizing Images and Videos with Aspect Ratios with Tailwind CSS&lt;/a&gt; (Link to YouTube)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.npmjs.com/package/@tailwindcss/aspect-ratio" rel="noopener noreferrer"&gt;@tailwindcss/aspect-ratio&lt;/a&gt; (Link to npm)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>tailwindcss</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>Custom fonts in Next.js + Tailwindcss</title>
      <dc:creator>Manuel Alférez Ruiz</dc:creator>
      <pubDate>Tue, 14 Dec 2021 18:14:50 +0000</pubDate>
      <link>https://dev.to/manuelalferez/custom-fonts-in-nextjs-tailwindcss-2iip</link>
      <guid>https://dev.to/manuelalferez/custom-fonts-in-nextjs-tailwindcss-2iip</guid>
      <description>&lt;p&gt;To add fonts to your Next.js project you do not need any extra dependency:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1&lt;/strong&gt;- Download your fonts and add them to the public/fonts directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2&lt;/strong&gt;- Tailwindcss tells us in their guide the fastest way to include Tailwind if we do not plan to write any custom CSS in our project is to import it directly into pages/_app.js:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// pages/_app.js

- import '../styles/globals.css'
+ import 'tailwindcss/tailwind.css'

function MyApp({ Component, pageProps }) {
   return &amp;lt;Component {...pageProps} /&amp;gt;
}

export default MyApp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, this is not our case and therefore we maintain &lt;code&gt;styles/globals.css&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// styles/globals.css

@tailwind base;
@tailwind components;
@tailwind utilities;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3&lt;/strong&gt;- Declare your fonts in &lt;code&gt;style/globals.css&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// styles/globals.css

@tailwind base;
@tailwind components;
@tailwind utilities;

@font-face {
  font-family: 'MyFont';
  font-style: normal;
  font-weight: 400;
  src: local(''), url('/fonts/MY-FONT.woff') format('woff');
}

@font-face {
  font-family: 'MyFont';
  font-style: bold;
  font-weight: 600;
  src: local(''), url('/fonts/MY-FONT-BOLD.woff') format('woff');
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4&lt;/strong&gt;- Configure Tailwindcss to add the fonts you have imported:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// tailwind.config.js 

module.exports = {
  mode: 'jit',
  purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
  darkMode: false, // or 'media' or 'class'

  theme: {
    extend: {
      fontFamily: {
        myfont: ['MyFont'],
        sans: ['MyFont', 'sans-serif'],
      },
    },
  },

  variants: {
    extend: {
      fontFamily: ['hover', 'focus'],
    },
  },

  plugins: [],
  corePlugins: {
    fontFamily: true,
  },
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5&lt;/strong&gt;- Use your font 😊&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// components/MyComponent.js

export default function MyComponent() {
  return (
    &amp;lt;div className="font-myfont"&amp;gt;
      Hello World
    &amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Any questions about the post? Feel free to ask me. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://manuelalferez.com/posts/custom-fonts-in-next-js-tailwindcss" rel="noopener noreferrer"&gt;Original post.&lt;/a&gt;&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>tailwindcss</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
