avatarEd Noble

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>

The Transcendence of Conscience

We are at the mercy of a higher source of truth

Photo by Marc-Olivier Jodoin on Unsplash

Atheism, nihilism and existentialism tell us that fundamentally life is without meaning, and that morality is merely relative. Furthermore, they claim that only reason we even have morality is its utility in maintaining social order, and to regulate ourselves arbitrarily. However, I’d like to explore the possibility that morality may be real in a more fundamental sense beyond our comprehension.

It is noteworthy that one cannot command one’s own conscience. It is not possible to overrule the innate sense of right and wrong that seems embedded deep within each of us. It is not the case that you can choose to act how you wish all the time and not be confronted with a moral feeling. People have tried violating their own conscience and paying no regard to it, but it doesn’t seem to work- if it did then we would likely all become hedonists.

Where this transcendent force within us comes from is not easily explained through social narrative. As the West has turned its back on religion, its inhabitants have not been freed from the effects of conscience. This is what is meant by real; whatever we tell ourselves, we are at the mercy of a greater moral compass, and we know this from how we act. The atheist will still lie awake at 4am for a lie they are responsible for, no matter how hard they try to intellectually deconstruct the morality behind it. No one argues with suffering. Everyone acts as if it is real, rather than claiming it is meaningless. This is because of the profound effect it has on us, and likely why it is a central tenet to multiple religions (for example in Buddhism, one of the four Noble Truths is dukkha, that life is suffering).

And it is also interesting to note that conscience seems to point in a specific direction, as if to orient us towards a ‘real’ truth. It is not the case that we lie awake for having told the truth, but for telling a lie. Why is this?

This is a case to say that you don’t have to necessarily accept all the claims associated with a specific religion to understand that there might be a transcendent truth. Atheism’s rejection of the shallow claims of religion neglects to deal with a more fundamental narrative. In some sense the transcendent force within can be characterised as something like the Holy Spirit, or God, and that can hold as true even if shrouded in mystery.

Nietzsche’s famous proclamation of “God is dead, and we have killed Him” was not one of triumph, but of warning. There is the obvious warning that without God we are lost, and we have no foundation to properly orient ourselves from. But one could say there is a subtle warning, that what we have really destroyed is not morality itself, but our understanding of there being a real transcendent force we must contend with, even if not formulated as God.

Therefore, the utility of conscience, or a moral sense, goes far beyond social order. It points to a truth that we might not understand but still hold. We can run, but we cannot hide. When asked if he believed in God, the psychology professor Jordan Peterson said “I act as if God exists”. This to me seems to be a far more honest answer to the fundamentals of the question.

Writing
Blog
Philosophy
Morality
Ethics
Recommended from ReadMedium