<?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>Forem: AdrianBudzynski</title>
    <description>The latest articles on Forem by AdrianBudzynski (@adrianbudzynski).</description>
    <link>https://forem.com/adrianbudzynski</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%2F321016%2Fc7df9511-69c8-40ed-819c-97b86c6c865d.jpeg</url>
      <title>Forem: AdrianBudzynski</title>
      <link>https://forem.com/adrianbudzynski</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/adrianbudzynski"/>
    <language>en</language>
    <item>
      <title>Payment integration is so simple... don't wait and monetize your business right now</title>
      <dc:creator>AdrianBudzynski</dc:creator>
      <pubDate>Mon, 09 Nov 2020 16:39:31 +0000</pubDate>
      <link>https://forem.com/adrianbudzynski/payment-integration-is-so-simple-don-t-wait-and-monetize-your-business-right-now-414</link>
      <guid>https://forem.com/adrianbudzynski/payment-integration-is-so-simple-don-t-wait-and-monetize-your-business-right-now-414</guid>
      <description>&lt;p&gt;Lately, we worked on the payment integration on our &lt;a href="https://owwly.com"&gt;https://owwly.com&lt;/a&gt; website using Stripe. It turned out to be so simple, so I regret we haven't done that much earlier. If you think about that now. Don't wait any longer. Do it right now to monetize your business as soon as possible to have the power 🚀 to make it better in the future! 💪&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Dark Theme for your Angular app</title>
      <dc:creator>AdrianBudzynski</dc:creator>
      <pubDate>Thu, 14 May 2020 16:51:56 +0000</pubDate>
      <link>https://forem.com/adrianbudzynski/dark-theme-for-your-angular-app-1664</link>
      <guid>https://forem.com/adrianbudzynski/dark-theme-for-your-angular-app-1664</guid>
      <description>&lt;p&gt;Hello everyone. I would like to share with you my experiences of how I implemented basic light/&lt;strong&gt;dark mode&lt;/strong&gt; for our &lt;strong&gt;Owwly Angular web application&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Background: The last trend for the dark theme option convinced us to introduce a similar approach to our website to fulfill all user's needs - especially mine 😎.&lt;/p&gt;

&lt;p&gt;You can also &lt;strong&gt;look at the real website&lt;/strong&gt;: &lt;a href="https://owwly.com" rel="noopener noreferrer"&gt;https://owwly.com&lt;/a&gt; to check the described implementation yourself in a real-world use case.&lt;/p&gt;

&lt;p&gt;Okay, let's begin.&lt;/p&gt;

&lt;p&gt;For start define default theme class, which is going to be your fallback CSS class and default setup for the theme:&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%2Fres.cloudinary.com%2Fowwlytest%2Fimage%2Fupload%2Fv1589470671%2Farticles%2Fdark-ui%2FPasted_Graphic_5_m75lmz.jpeg" 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%2Fres.cloudinary.com%2Fowwlytest%2Fimage%2Fupload%2Fv1589470671%2Farticles%2Fdark-ui%2FPasted_Graphic_5_m75lmz.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create the definitions for colors and put them to the one list which is going to be used later.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;_colors.scss&lt;/em&gt;&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%2Fres.cloudinary.com%2Fowwlytest%2Fimage%2Fupload%2Fv1589471042%2Farticles%2Fdark-ui%2FPasted_Graphic_4_hmmguw.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%2Fres.cloudinary.com%2Fowwlytest%2Fimage%2Fupload%2Fv1589471042%2Farticles%2Fdark-ui%2FPasted_Graphic_4_hmmguw.jpg" alt="TODO"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create an SCSS script to iterate through the colors you defined and generate the right CSS variables:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;_theme.scss&lt;/em&gt;&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%2Fres.cloudinary.com%2Fowwlytest%2Fimage%2Fupload%2Fv1589470675%2Farticles%2Fdark-ui%2FPasted_Graphic_6_euz2xv.jpeg" 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%2Fres.cloudinary.com%2Fowwlytest%2Fimage%2Fupload%2Fv1589470675%2Farticles%2Fdark-ui%2FPasted_Graphic_6_euz2xv.jpeg" alt="TODO"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To provide a smooth transition between both themes, add the CSS class for color and background transitions as below:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;_animations.scss&lt;/em&gt;&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%2Fres.cloudinary.com%2Fowwlytest%2Fimage%2Fupload%2Fv1589470678%2Farticles%2Fdark-ui%2FPasted_Graphic_7_teznwc.jpeg" 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%2Fres.cloudinary.com%2Fowwlytest%2Fimage%2Fupload%2Fv1589470678%2Farticles%2Fdark-ui%2FPasted_Graphic_7_teznwc.jpeg" alt="TODO"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, create the service responsible for themes toggling. &lt;em&gt;setTimeout&lt;/em&gt; is not a pretty solution here, but it does the job. Thanks to it we don’t see the transitions when the page is loaded and style is set to dark. On the other hand, we don’t see page to load light and immediately change to the dark mode. A win-win solution to the rescue. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;ui-style-toggle.service.ts&lt;/em&gt;&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%2Fres.cloudinary.com%2Fowwlytest%2Fimage%2Fupload%2Fv1589471079%2Farticles%2Fdark-ui%2FPasted_Graphic_8_wnuf5s.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%2Fres.cloudinary.com%2Fowwlytest%2Fimage%2Fupload%2Fv1589471079%2Farticles%2Fdark-ui%2FPasted_Graphic_8_wnuf5s.jpg" alt="TODO"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Initialize the theme toggle service when the app boots up to set previously selected by a user theme.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;ui.module.ts&lt;/em&gt;&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%2Fres.cloudinary.com%2Fowwlytest%2Fimage%2Fupload%2Fv1589470693%2Farticles%2Fdark-ui%2FPasted_Graphic_9_yu5nrb.jpeg" 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%2Fres.cloudinary.com%2Fowwlytest%2Fimage%2Fupload%2Fv1589470693%2Farticles%2Fdark-ui%2FPasted_Graphic_9_yu5nrb.jpeg" alt="TODO"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it, now you can use the defined values in your standard component styles as below:&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%2Fres.cloudinary.com%2Fowwlytest%2Fimage%2Fupload%2Fv1589470699%2Farticles%2Fdark-ui%2FPasted_Graphic_10_wieezj.jpeg" 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%2Fres.cloudinary.com%2Fowwlytest%2Fimage%2Fupload%2Fv1589470699%2Farticles%2Fdark-ui%2FPasted_Graphic_10_wieezj.jpeg" alt="TODO"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is a very basic implementation that works for us. I hope you will share your solutions on how you implemented light/dark mode in your angular websites. See ya!&lt;/p&gt;

</description>
      <category>angular</category>
      <category>darkui</category>
      <category>owwly</category>
      <category>design</category>
    </item>
  </channel>
</rss>
