avatarSherry McGuinn

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>

A Pariah by Any Other Name…

…is still screwed.

Source: Flickr.Com

In February, I’ll have been writing on Medium for one year.

One year of struggling to create quality content, of clapping and highlighting and interacting and sharing. Damn. I’ve been busy!

So, why am I still making squat? Or, next to squat?

“It’s not about the money.” There. I got that out of the way. But, son of a bitch, sometimes it is. Sometimes, you want to be rewarded for your efforts.

I’ve noticed that the people who say “it’s not about the money,” are the very writers making the money. What’s up with this?

Admittedly, I’ve been lagging the last couple of weeks. Not publishing as frequently as I should, but dammit it all, life gets in the way. I may not be employed, but I have other commitments, like finishing a screenplay I’ve been working on for months. And, laundry.

I have over a thousand followers, which I’m very grateful for. Still, I’ve yet to receive one thousand claps for a story. While there is a plethora of great content on Medium that is deserving of all that glad-handing, I’ve seen an equal amount of shit receiving claps up the wazoo. Pun intended. Again, what’s up with this?

Source: Flickr.Com

After bitching about how I’ve never been curated, to this date, approximately five of my stories have been curated. “Thank you, Medium Gods! Watch as I humbly and thankfully bow from the ankles!”

Screw that. I deserved it. And, I deserve to make more money than I have been. That said, how do I get to the bottom of this conundrum?

I’ve looked over my stories, and yes, they run the gamut. Is there something wrong with this? I write whatever is on my mind at any particular time. My brain races with thoughts that run hither and yon and I have to make a concerted to yank them out before they disappear in the abyss.

Lots of stuff. That’s what I think about. All the freakin’ time. Should I pick a topic and stick to it? Like sex? Currently, that would be akin to writing about what it’s like to be a fighter pilot.

Or, if not sex, then weight? Let’s be honest: That particular topic seems to be the elephant in Medium’s room. Yes, it’s fascinating because so many people struggle with body confidence, but, when is it time to move on and spread one’s wings?

Should I be a one-trick pony? Maybe I’ll write, “The Skinny on Being Skinny.” Or, “Why Eat When I Can Drink?”

Am I too opinionated? Has speaking my mind turned me into a Medium pariah? So many questions.

Yes. I’m envious. But, not in a malicious way, because I love and admire the majority of my fellow writers. Rather, I feel like someone who has been repeatedly “dismissed” for months. First, from my job, then, from any efforts to find another job, next, from the very production companies who vow that they’re committed to making films “by and for, women,” and finally, I feel dismissed by Medium. Sort of, anyway.

Source: Flickr.Com

“Woe is me?” Fuck that. Honestly. I’m not down with that, so I hope this piece doesn’t convey self-pity. Instead, think of me as a curious bystander to my own life. Watching, one arm outstretched, as I float by on a sea of nothingness, bobbing like a weightless cork. Adrift, in open water, trying to find that anchor. You know the one: The anchor that will tell me who I am and who I should aspire to be. I thought I knew.

I guess that’s the point of this story: To connect with those of you who might be feeling as aimless as I am, right now. Aimless, and without purpose. If so, join me, my friends. We will raise a glass to “fuck all,” as the Brits say.

As I float by, the sun hot on my face, my dreams a mirage, I reach out…eagerly grasping at me…trying to save me. If I don’t, who will?

Sherry McGuinn is a longtime Chicago-area writer and award-winning screenwriter. Her work has appeared in The Chicago Tribune, Chicago Sun-Times and numerous other publications. Sherry’s manager is currently pitching her newest screenplay, a drama with dark, comedic overtones and inspired by a true story.

For more of me on Medium:

Medium
Medium Writers
Rogue
Writing Community
Making Money
Recommended from ReadMedium