avatarVeritas Civis

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>

Have We Reached THE END?

Yes, several people are depressed and have been writing, world-holocaust-to-come stories. Is true or speculation?

Time to Prognosticate? Attribution here

The subjects on which people are working themselves up about are all the usual subjects everybody has schemas on and writes about. Should we play The Door’s song, “This is the End?”

“This is the end Beautiful friend This is the end My only friend, the end Of our elaborate plans, the end Of everything that stands, the end No safety or surprise, the end I’ll never look into your eyes again ….”

Attribution — “The Doors”

My speculation is that most of it may come from drinking too much out of the same bath water. All of it could be a mirage in the horizon. Before that happens, it may be from people we don’t know or a bug that “gets us,” before the “real end” comes. But is this END, the fear for humanity? Or fear for self? Fear for the country or fear for the world? I am not sure what there is to lose from any of it. As it reads, it sounds personal to each of the writers.

On The “New War” read here

There are professionals to handle that. We have a great record for starting them, a very poor record finishing them. The press will do as much as they can about it to get political mileage from viewers.

None of it will be like Vietnam, where all the men were draftees and nobody knew why their son’s were getting killed. It was a “government” war, not the peoples war.

The big sad part is that, none of the professional soldiers will die for the flag because everybody burns it today. They won’t die for the Nation because this one is split and many in it want to move out. The Constitution? The one that Congress abuses every time they write a Bill like “The Patriot Act?” (an oxymoron) The one that surveils anyone of us as they wish without us knowing about it, takes us to secret court and try us without a jury of our peers and puts us in secret jails? And we thought we had a Constitution? The LAW government is supposed to follow to the letter? Nah.

Supply Chain Shortages

“Today we have empty shelve problems, partly because of that, partly because of regulations the government has that has the transportation system looking for boot straps that work in an emergency like this. Regulations that were created with false assumptions (we will never shutdown the economy). Boats at ALL ports cannot be unloaded fast enough for logistics to make distributions (truck traffic and unloading limitations and more). Prices have to be re-established, based on lacks and needs of that product or other products. Prices are higher but people will spend based on their need.”

read the whole story here.

The Climate Change!

The USA has one of the lowest carbon footprints in the world. Why is not everybody throwing rocks at China? They have the worst carbon footprint in the world. And, like everything else the do, they do it with impunity. Nobody in China is going to throw rocks at THEIR government. People have no rights in China. This issue is not in our hands only.

If Humanity ceases to exist because of that, why blame anything? How does climate change over millennia? I have not investigated this. However, I know there is no clear answer. All we can do is hope for the best.

God grant me the serenity to accept the things I cannot change; courage to change the things I can; and wisdom to know the difference.

Living one day at a time; enjoying one moment at a time; accepting hardships as the pathway to peace;

The Government “System” is not working and it hasn’t in 100 years

If we study a bit of history and go back to the federal papers written by our founders, we will find out that they design a locked tight Government System using the Moral Basis of the Declaration of Independence. Why is it a Moral Basis? Otherwise, why did we fight? We fought because our judgment of right and wrong was different from the English of those days. However, by the time we fought, they had already brought us the plague that was slavery. We created a government largely created by the well-thought-out ideas in the Federal Papers. The government has a “System” we called the Constitution. In it, it is spelled out how the government needs to work. Thus, the Constitution is the LAW that RULES our Government. However, we would not know it because one of the inventors of Progressivism, President Woodrow Wilson, installed a bug in the system called, the “Administrative Government.” This has dislocated the entire government. If you want to read summaries of all of this you read it here, here, and others there.

We need to take OWNERSHIP of the Government. This is what our Founders had in mind. Ownership requires each and one of us to drive for the results we get. If anyone is saying “There has never been a functional democracy/republic/government,” that “citizen” does not know he owns it and he is getting what HE wants (the vote dictates that).

Blaming the rest of the world for what we see is childish. It is not knowing what the root cause of the problems is. It is giving up OUR responsibility as the OWNERS of what we have been allowing to happen for the last 100 years. Why does it have to be an ideological vote? why can it not be a vote for someone who may get to work on MAKING the GOVERNMENT work as DESIGNED?

For the one finger we use to point to “others”. There are three fingers pointing back at us.

IT IS HIGH TIME WE TAKE OWNERSHIP OF HOW THE USA GOVERNMENT IS BEING RUN.

Politics
Humanity First
History
Leadership
Philosophy
Recommended from ReadMedium