Skip to content

Commit cf4e954

Browse files
authored
Merge pull request #82 from de-soot/main
edited 2nd diff post
2 parents 4fc9fdb + adf2698 commit cf4e954

File tree

11 files changed

+351
-124
lines changed

11 files changed

+351
-124
lines changed

_posts/2025-12-10-2nd-diff.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ Again, because it goes from (d<sub>1</sub>)<sub>1</sub> to (d<sub>1</sub>)<sub>n
110110

111111
T<sub>n</sub> = a<sub>1</sub> + (n - 1)a<sub>2</sub> + ((1 + 2 + 3 + ... + (n - 3) + (n - 2) + (n - 1)) + (n - 1)(-1))d<sub>2</sub>.
112112

113-
Now the pattern is easier to see. It is the sum of integers to (n - 1):
113+
Now the pattern is easier to see. It is the sum of integers from 1 to (n - 1):
114114

115115
T<sub>n</sub> = a<sub>1</sub> + (n - 1)a<sub>2</sub> + (S<sub>n-1</sub> + (n - 1)(-1))d<sub>2</sub>
116116

117117
= a<sub>1</sub> + (n - 1)a<sub>2</sub> + (S<sub>n-1</sub> - (n - 1))d<sub>2</sub>.
118118

119-
Luckily for us, the great mathematician Gauss found a closed-form solution for finding the sum of integers to n when he was apparently 9 years-old or something (dubious):
119+
Luckily for us, the great mathematician Gauss had already found a closed-form solution for finding the sum of integers from 1 to n when he was apparently 9 years-old or something (dubious):
120120

121121
T<sub>n</sub> = a<sub>1</sub> + (n - 1)a<sub>2</sub> + (1/2(n - 1)((n - 1) + 1) - (n - 1))d<sub>2</sub>
122122

_site/404.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
<meta property="og:locale" content="en_US" />
1010
<meta name="description" content="Technical blog" />
1111
<meta property="og:description" content="Technical blog" />
12-
<link rel="canonical" href="http://localhost:4000/404.html" />
13-
<meta property="og:url" content="http://localhost:4000/404.html" />
12+
<link rel="canonical" href="https://de-soot.github.io/404.html" />
13+
<meta property="og:url" content="https://de-soot.github.io/404.html" />
1414
<meta property="og:site_name" content="de_soot" />
1515
<meta property="og:type" content="website" />
1616
<meta name="twitter:card" content="summary" />
1717
<meta property="twitter:title" content="de_soot" />
1818
<script type="application/ld+json">
19-
{"@context":"https://schema.org","@type":"WebPage","description":"Technical blog","headline":"de_soot","url":"http://localhost:4000/404.html"}</script>
19+
{"@context":"https://schema.org","@type":"WebPage","description":"Technical blog","headline":"de_soot","url":"https://de-soot.github.io/404.html"}</script>
2020
<!-- End Jekyll SEO tag -->
21-
<link rel="stylesheet" href="/assets/main.css"><link type="application/atom+xml" rel="alternate" href="http://localhost:4000/feed.xml" title="de_soot" /></head>
21+
<link rel="stylesheet" href="/assets/main.css"><link type="application/atom+xml" rel="alternate" href="https://de-soot.github.io/feed.xml" title="de_soot" /></head>
2222
<body><header class="site-header" role="banner">
2323

2424
<div class="wrapper"><a class="site-title" rel="author" href="/">de_soot</a><nav class="site-nav">

_site/about.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
<meta property="og:locale" content="en_US" />
1010
<meta name="description" content="Technical blog" />
1111
<meta property="og:description" content="Technical blog" />
12-
<link rel="canonical" href="http://localhost:4000/about" />
13-
<meta property="og:url" content="http://localhost:4000/about" />
12+
<link rel="canonical" href="https://de-soot.github.io/about" />
13+
<meta property="og:url" content="https://de-soot.github.io/about" />
1414
<meta property="og:site_name" content="de_soot" />
1515
<meta property="og:type" content="website" />
1616
<meta name="twitter:card" content="summary" />
1717
<meta property="twitter:title" content="About" />
1818
<script type="application/ld+json">
19-
{"@context":"https://schema.org","@type":"WebPage","description":"Technical blog","headline":"About","url":"http://localhost:4000/about"}</script>
19+
{"@context":"https://schema.org","@type":"WebPage","description":"Technical blog","headline":"About","url":"https://de-soot.github.io/about"}</script>
2020
<!-- End Jekyll SEO tag -->
21-
<link rel="stylesheet" href="/assets/main.css"><link type="application/atom+xml" rel="alternate" href="http://localhost:4000/feed.xml" title="de_soot" /></head>
21+
<link rel="stylesheet" href="/assets/main.css"><link type="application/atom+xml" rel="alternate" href="https://de-soot.github.io/feed.xml" title="de_soot" /></head>
2222
<body><header class="site-header" role="banner">
2323

2424
<div class="wrapper"><a class="site-title" rel="author" href="/">de_soot</a><nav class="site-nav">
@@ -43,7 +43,9 @@ <h1 class="post-title">About</h1>
4343
</header>
4444

4545
<div class="post-content">
46-
<p>Welcome to my website! <a href="/">This</a> is where I write about whatever I think is interesting or helpful. It is made with <a href="https://jekyllrb.com">Jekyll</a> using the <a href="https://github.com/jekyll/minima">Minima</a> theme and is hosted for free on <a href="https://pages.github.com">Github Pages</a>.</p>
46+
<p>Welcome to my website! Here is where I write blog posts on technical topics.</p>
47+
48+
<p>It is made with <a href="https://jekyllrb.com">Jekyll</a> using the <a href="https://github.com/jekyll/minima">Minima</a> theme and is hosted for free on <a href="https://pages.github.com">Github Pages</a>.</p>
4749

4850
<p>The <code class="language-plaintext highlighter-rouge">source code</code> for this website can be found on its <a href="https://github.com/de-soot/de-soot.github.io">Github repository</a>.</p>
4951

_site/dark-mode.html

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
<meta name="generator" content="Jekyll v3.10.0" />
88
<meta property="og:title" content="Dark Mode without Javascript" />
99
<meta property="og:locale" content="en_US" />
10-
<meta name="description" content="This guide explains why and how to easily make a dark theme for your website using CSS @media queries." />
11-
<meta property="og:description" content="This guide explains why and how to easily make a dark theme for your website using CSS @media queries." />
12-
<link rel="canonical" href="http://localhost:4000/dark-mode" />
13-
<meta property="og:url" content="http://localhost:4000/dark-mode" />
10+
<meta name="description" content="Alternative title: System default theme for webpages" />
11+
<meta property="og:description" content="Alternative title: System default theme for webpages" />
12+
<link rel="canonical" href="https://de-soot.github.io/dark-mode" />
13+
<meta property="og:url" content="https://de-soot.github.io/dark-mode" />
1414
<meta property="og:site_name" content="de_soot" />
1515
<meta property="og:type" content="article" />
1616
<meta property="article:published_time" content="2024-09-07T00:00:00+08:00" />
1717
<meta name="twitter:card" content="summary" />
1818
<meta property="twitter:title" content="Dark Mode without Javascript" />
1919
<script type="application/ld+json">
20-
{"@context":"https://schema.org","@type":"BlogPosting","dateModified":"2024-09-07T00:00:00+08:00","datePublished":"2024-09-07T00:00:00+08:00","description":"This guide explains why and how to easily make a dark theme for your website using CSS @media queries.","headline":"Dark Mode without Javascript","mainEntityOfPage":{"@type":"WebPage","@id":"http://localhost:4000/dark-mode"},"url":"http://localhost:4000/dark-mode"}</script>
20+
{"@context":"https://schema.org","@type":"BlogPosting","dateModified":"2024-09-07T00:00:00+08:00","datePublished":"2024-09-07T00:00:00+08:00","description":"Alternative title: System default theme for webpages","headline":"Dark Mode without Javascript","mainEntityOfPage":{"@type":"WebPage","@id":"https://de-soot.github.io/dark-mode"},"url":"https://de-soot.github.io/dark-mode"}</script>
2121
<!-- End Jekyll SEO tag -->
22-
<link rel="stylesheet" href="/assets/main.css"><link type="application/atom+xml" rel="alternate" href="http://localhost:4000/feed.xml" title="de_soot" /></head>
22+
<link rel="stylesheet" href="/assets/main.css"><link type="application/atom+xml" rel="alternate" href="https://de-soot.github.io/feed.xml" title="de_soot" /></head>
2323
<body><header class="site-header" role="banner">
2424

2525
<div class="wrapper"><a class="site-title" rel="author" href="/">de_soot</a><nav class="site-nav">
@@ -47,28 +47,26 @@ <h1 class="post-title p-name" itemprop="name headline">Dark Mode without Javascr
4747
</header>
4848

4949
<div class="post-content e-content" itemprop="articleBody">
50-
<p>This guide explains why and how to easily make a dark theme for your website using CSS <code class="language-plaintext highlighter-rouge">@media</code> queries.</p>
50+
<p>Alternative title: System default theme for webpages</p>
5151

52-
<p>Alternative title: System default theme for websites</p>
53-
54-
<h1 id="why-dark-mode">Why Dark Mode</h1>
52+
<h2 id="why-dark-mode">Why Dark Mode</h2>
5553

5654
<p>For users visiting a website in a dark room at night, it would be less straining for their eyes if the webpage was displayed in a darker colour to match the environment, which is what <a href="https://en.wikipedia.org/wiki/Light-on-dark_color_scheme">dark mode</a> does.</p>
5755

5856
<p><img src="https://zerowidthjoiner.net/uploads/2020/04-11/light-vs-dark.png" alt="Comparison image of light theme on the left and dark theme on the right." /></p>
5957

60-
<h1 id="how-to-do-it">How to do it</h1>
58+
<h2 id="how-to-do-it">How to do it</h2>
6159

6260
<p>From <a href="https://developer.mozilla.org/en-US">MDN Web Docs</a>:</p>
6361
<blockquote>
6462
<p>The @media <a href="https://developer.mozilla.org/en-US/docs/Web/CSS">CSS</a> <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule">at-rule</a> can be used to apply part of a <a href="https://en.wikipedia.org/wiki/Style_sheet_(web_development)">style sheet</a> based on the result of one or more media queries. With it, you specify a media query and a block of CSS to apply to the document if and only if the media query matches the device on which the content is being used.</p>
6563
</blockquote>
6664

67-
<h2 id="for-non-static-site-generator-websites">For Non-Static-Site-Generator Websites</h2>
65+
<h3 id="for-non-static-site-generator-websites">For Non-Static-Site-Generator Websites</h3>
6866

6967
<p>There is also a <a href="https://youtu.be/g85LQVp0hGM">video guide by Eric Murphy on Youtube</a> if you prefer to follow along with a video.</p>
7068

71-
<h3 id="external-style-sheet">External Style Sheet</h3>
69+
<h4 id="external-style-sheet">External Style Sheet</h4>
7270

7371
<p>To separate code between HTML and CSS, link an external CSS style sheet in the <code class="language-plaintext highlighter-rouge">&lt;head&gt;</code> tag in the HTML document. Like so:</p>
7472

@@ -95,7 +93,7 @@ <h3 id="external-style-sheet">External Style Sheet</h3>
9593
<span class="p">}</span>
9694
</code></pre></div></div>
9795

98-
<h3 id="with-the-style-html-tag">With the &lt;style&gt; HTML tag</h3>
96+
<h4 id="with-the-style-html-tag">With the &lt;style&gt; HTML tag</h4>
9997

10098
<p>You can also type out your CSS code in between <code class="language-plaintext highlighter-rouge">&lt;style&gt;</code> tags if you prefer everything to be contained in one HTML document:</p>
10199

@@ -119,7 +117,7 @@ <h3 id="with-the-style-html-tag">With the &lt;style&gt; HTML tag</h3>
119117
<span class="nt">&lt;/html&gt;</span>
120118
</code></pre></div></div>
121119

122-
<h2 id="for-static-site-generator-websites">For Static Site Generator Websites</h2>
120+
<h3 id="for-static-site-generator-websites">For Static Site Generator Websites</h3>
123121

124122
<p>It is a little bit less straightforward to do this with static site generators like Jekyll (which is what this website uses) or Hugo, as you have to override the theme’s CSS style sheet.</p>
125123

@@ -148,7 +146,7 @@ <h2 id="for-static-site-generator-websites">For Static Site Generator Websites</
148146

149147
<p>For other static site generator websites, you can refer to the official documentation found online for information on how to override your theme’s style-sheet.</p>
150148

151-
<h1 id="configure-giscus-theme">Configure Giscus Theme</h1>
149+
<h2 id="configure-giscus-theme">Configure Giscus Theme</h2>
152150

153151
<p>To set <code class="language-plaintext highlighter-rouge">giscus</code> comments to match the website if you have done the CSS <code class="language-plaintext highlighter-rouge">@media</code> trick shown above, simply set the <code class="language-plaintext highlighter-rouge">&lt;script&gt;</code>’s <code class="language-plaintext highlighter-rouge">data-theme</code> attribute value to <code class="language-plaintext highlighter-rouge">"preferred_color_scheme"</code> as shown below.</p>
154152

@@ -163,7 +161,7 @@ <h1 id="configure-giscus-theme">Configure Giscus Theme</h1>
163161
<span class="nt">&lt;/script&gt;</span>
164162
</code></pre></div></div>
165163

166-
<h1 id="conclusion">Conclusion</h1>
164+
<h2 id="conclusion">Conclusion</h2>
167165

168166
<p>If you found this blog post useful, leave a comment down below! Also check out how to add <code class="language-plaintext highlighter-rouge">giscus</code> comments to your own website on my <a href="/giscus-comments">previous guide for it</a>.</p>
169167

0 commit comments

Comments
 (0)