avatarAlfie Jane

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 Many More Kids Have to Die Before We Start Valuing Them Over Guns?

I’m sick of reading about mass shootings

Photo by David Levêque on Unsplash

I’m still not watching the news. I’ll occasionally watch something on YouTube, but unless someone’s written an article about it, I don’t know about it. And after what I read today, I think I’ll still unplug from the news.

I took a break from writing today and caught up on some reading. First, I saw the article by Brianna Bennett ✨.

And then I read this one by Rachael Hope.

Both these articles predicted what’s going to happen next. I agree with their predictions.

Next week, it’s going to be all over the news about the government having talks and debates about what to do about guns. Congressmen will have press conferences. Cheeto-Voldemort will deflect from the issue or use it as a distraction from his impeachment hearings.

Maybe there will be a vote this time? There was when Sandy Hook happened. But you know what came out of that? Not a god damn thing.

I’ll be shocked if anything comes out of this.

How many more kids have to die?

I was in fourth grade when Columbine happened. I have a vague memory of having an evacuation drill after that occured as a result.

Easy access to guns didn’t get blamed. Marlyn Manson did.

I was sitting in my dad’s bar when Sandy Hook happened. He and I watched in stunned silence while they showed ambulances racing to the school, saying little kids were lying dead.

Easy access to guns didn’t get blamed. It was a mental health issue.

Mass shootings after mass shootings and easy access to guns weren’t being blamed. One of the last things I remember getting accused was video games.

I wonder what’s going to get blamed this time to deflect from the fact it’s too easy for people to gain access to guns.

The scary part of all this is both times the shooting came up, the low body-count wasn’t too far behind. You know what Racheal’s article and the conversation I had had in common. This phrase.

This time, it wasn’t that bad.

It scares me that’s our reaction to two kids dying.

South Park was right

In the twenty-first season of South Park, there was an episode about school shootings. Every day, the kids had a shooting in their school. Stan’s dad was numb to it, but Stan’s mom freaked every time.

Until one day, her son got injured from a shooting. She should’ve been panicking at that point. If it were my child, I’d be scared shitless for their safety. By the time her child was injured, she became as numb as the rest of the town.

Before Stan’s mom let the numbness get to her, she kept saying over and over again, “This shouldn’t be normal!” They treated her like she was having a bad period instead of taking her seriously.

Every episode after that season began with another school shooting. The way we’re going, we’re slowly turning into another episode of South Park. And it’s not funny anymore.

Photo by annie bolin on Unsplash

I wish I knew the solution

I see both sides of the gun issue. I grew up in a part of the States where most people hunt. They were taught responsibility with guns. It’s common to go to someone’s house and see a rifle or two in the home. It’s no big deal in that part of the States.

But not every part of the States is my hometown. The older I get, the more I want to see done with gun control.

I want to see background checks before buying a gun. I want to see a psych evaluation before someone buys a gun. I want to see guns be harder to purchase than fucking birth control. I want to see people valuing their children more than a fucking gun.

Or, we could be like Switzerland and have the guns but not be allowed to carry ammo. The pro-gun people could still keep their guns, but they’d have to go to shooting ranges to shoot them.

I don’t know what the answer is to the gun problem. I wish I did. I wish I could go somewhere to give my solution, and then my solution works out.

But even if I did have the solution, would anything be done with it? I’d like to stay in my fantasy world and think so. I’m fucking tired of reading about another mass shooting and more tired of the fact the government would rather sit on their asses than do anything.

How many more kids have to die before we start valuing our children over guns?

Gun Violence
Politics
School Shootings
Life
Gun Control
Recommended from ReadMedium