avatarKhadijah-Amani General

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

2236

Abstract

was an issue remaining. The document used dark theme and the content in the external page used white background.</p><p id="0afe"><b>Hack 2: </b>Use dark-reader to automatically generate css for your external page</p><p id="f222">You can use <a href="https://darkreader.org/">dark-reader</a> to automatically apply dark style to your page. There are two options. First is to use dark-reader in your project via npm and apply dark theme automatically. For my case, this was a bit overkill and I choose the second option. Second option is to generate and export css file corresponding to dark theme of your external page and then adding that style-sheet to our <code>iframe</code>.</p><p id="df41">First install the <a href="https://darkreader.org/">dark-reader</a> add-on/extension to your browser. I have done it on Firefox. Then open your external page in that browser and enable the dark-mode in dark-reader add-on.</p><figure id="54a0"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*akq4Mmrutw6XTVdZMY9VBQ.png"><figcaption>dark-reader add-on in Mozilla Firefox</figcaption></figure><p id="ded5">When you enable dark-mode, the dark-reader has generated and applied appropriate styling to make your page dark-themed. It works great. You can also tweak around and set brightness, and contrast as well as use developer tools to further customize the design. Once you are happy with the design, click on the dark-reader browser-action button to open the popup menu and click on settings.</p><figure id="af34"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*B_-rTeDGalYJ-Ci6nyyapg.png"><figcaption></figcaption></figure><p id="0ea2">This will open up the settings view as displayed below.</p><figure id="bac9"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*dqdeQaWkTj38obrpRLEoVg.png"><figcaption></figcaption></figure><p id="1b63">Click on Manage settings and then on <b>Export Dynamic Theme</b>.</p><figure id="504a"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*eoK7sNZcYxZF-xWQ3NjEIg.png"><figcaption></figcaption></figure><p id="2bb4">Great job! This will download a css file that you can add to your page to apply the styles for dark theme. Hmmm… So far so g

Options

ood. I believe most of you would do the rest of the stuff on your own, but for the sake of completeness let us add a few lines of code to the event-listeners that we created in Hack1.</p><p id="2a64">Save the css file that was downloaded by the dark-reader as <code>dark-theme.css </code>in the <code>/public</code> directory of your Next.js app. Now, add following lines inside the <code>"load"</code> event-listener.</p><div id="d14f"><pre>const link <span class="hljs-operator">=</span> doc.createElement(<span class="hljs-string">"link"</span>)<span class="hljs-comment">;</span></pre></div><div id="e451"><pre><span class="hljs-attr">link.rel</span> = <span class="hljs-string">"stylesheet"</span><span class="hljs-comment">;</span></pre></div><div id="d811"><pre><span class="hljs-attr">link.href</span> = <span class="hljs-string">"/dark-theme.css"</span><span class="hljs-comment">;</span></pre></div><div id="214b"><pre>doc.head.appendChild(link)<span class="hljs-comment">;</span></pre></div><p id="caa5">Next time when you do this, you will be able to add existing HTML files to your project with custom themes in much lesser time than the time you spent reading this document.</p><p id="3a9a">Wish you all the best and happy coding!</p><p id="ad6f">Interested in building career in web development? Checkout E-degree in JS Frameworks</p><div id="2976" class="link-block"> <a href="https://www.eduonix.com/javascript-frameworks-mini-edegree/UHJvZHVjdC00NDExNjgw"> <div> <div> <h2>JavaScript Mini E-Degree: Master JS Frameworks To The Core!</h2> <div><h3>A perfect mini-e-degree suitable for everyone who wants to master JavaScript effectively without wasting any time…</h3></div> <div><p>www.eduonix.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*OBLf0FHe3Jrk8Lbg)"></div> </div> </div> </a> </div><p id="79c1">Or my course on <a href="https://www.udemy.com/course/react-and-next-js-with-typescript/?referralCode=7202184A1E57C3DCA8B2">React + Next.js with TypeScript</a>.</p></article></body>

How I Became A Digital Marketing Expert In A Week And Why It Changed My Life

It wasn’t for me, but I’m still glad I did it

Photo by NeONBRAND on Unsplash

I’m an 18 year-old from the UK living in Thailand. Over the past 3 months, I’ve become a digital nomad, freelancing and starting basic business ventures to fund my travels alongside my attempts to keep up with my university studies.

Everything was going great, until it wasn’t. I was running out of money and I wasn’t making any. I didn’t have the right skills or experience for what I wanted to do and nobody wanted to take a chance on an 18 year old with no degree.

One month ago, I became so desperate for money that I had a breakdown. I had no money, no real skills, and no work visa. I thought of just packing up all my things and running back home to my mummy.

This Is Tip Number 1:

To get what you want, you need to be desperate.

Desperation makes you do things that logic doesn’t. Desperate to make money, desperate to quit your job, desperate to travel, or desperate to work for yourself. It doesn’t matter where your desperation comes from, use it to your advantage.

As freelancers and entrepreneurs, it is so important to use common sense, think logically, and to not let emotions influence your decision-making. However — and that is a big however, you need to take risks.

….

So, I took a risk. A big risk. I had signed up for a credit card a couple of months after I turned 18. I held down a full time job for around 2 months and wanted to apply before I quit.

Here I was — an 18 year old in Thailand, 6,000 miles away from home with exactly £2.16 in my bank account and a Capital One credit card. What did I do? I spent $500 on a digital marketing course, duh.

Now, I know what you’re thinking: “That’s a pretty big risk. You’re gonna get yourself in a lot of debt little one”.

Well, actually, you’re wrong. To my disbelief, I got a job interview within 36 hours of starting my course and made over £100 freelancing within a week. Of course, I’m still worried about making enough money to pay off my course, but the knowledge that I’ve gained has been invaluable, and honestly? I wish I did it sooner.

This is Tip Number 2:

No matter how much you think you know, you don’t know enough.

When I first read Robert Kiyosaki’s ‘Rich Dad, Poor Dad’, I didn’t take his advice to take a course literally. I thought: I don’t need to take any courses. I’m good at everything. And if I don’t know something, I’ll learn it on Youtube.

I was wrong. I had gone to media school at 16 and recorded radio advertisements, produced documentaries, designed all types of artwork, and worked with major companies on campaigns. I thought I had all of the answers, but in reality, I didn’t even know how to develop a hashtag strategy for social media. No wonder I wasn’t getting any job offers.

My advice? Unlearn everything you think you know and start again.

….

My course allowed me to receive first hand practical work experience from a digital marketing hiring manager and provided me with intel into how the industry works and exactly what companies are looking for in their dream candidates.

But while learning all of this, applying for jobs became tiring. I started copying and pasting my cover letters, and job descriptions became less and less attractive to me.

This is Tip Number 3:

Know what you want.

If you don’t know what you want, how is anyone else going to figure it out?

Having a goal is an incentive to keep going and chase your dreams. It ensures your life never gets stagnant or monotonous; it ensures that you’re always reaching for the next level and that you never stop working for what you want.

Sitting down and thinking about the things that make you happy in life is the best way to find success. Success in life is found in happiness — not the fancy things you own, or how much money you make. Your number 1 goal in life should always be happiness. Everything else will come.

After receiving my certificate, I was left in a lot of debt. And although it should worry me, it doesn’t. I’ve learned invaluable skills — you can’t put a price on this. My life has changed at 18 years old. I’ve decided that for the rest of my life, I’m going to take educated risks.

4 weeks since starting my course, I have now made $50 as a freelancer on Fiverr alone. A lot of hard work and determination over those weeks and my investment has paid off. My new skill in digital marketing allowed me to start a profitable side hustle. And I know that in just a couple of months time, I will have made all the money from my course back.

I can’t wait to see all of the exciting things in store for me as time goes on. I want to learn more skills, and start more side hustles.

I want to grow forever.

Take risks and prosper. ✌🏽

🌷Learn more about the author here

🍄Sign up to read my stories here

Marketing
Life Lessons
Digital Nomad Lifestyle
Digital Marketing
Self Improvement
Recommended from ReadMedium