mirror of
https://gitlab.com/thelazyoxymoron/siddhartha-golu-website.git
synced 2025-07-27 17:17:58 +02:00
473 lines
27 KiB
HTML
473 lines
27 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en" dir="auto">
|
||
|
||
<head><meta charset="utf-8">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||
<meta name="robots" content="index, follow">
|
||
<title>What I Talk About When I Talk About Running by Haruki Murakami | Siddhartha Golu</title>
|
||
<meta name="keywords" content="audiobook, favourites, health">
|
||
<meta name="description" content="Check it out on Goodreads
|
||
Pain is inevitable, suffering is optional.
|
||
I have no affinity for running, even for short jogs, and much less for wanting to run long distances. Although this is not because I hate exercises - one of those rare things that I figured out early in life was my desire to remain healthy as long as possible and that of course means I need to keep myself fit - but probably my distaste for running stems from the monotonous nature of the activity.">
|
||
<meta name="author" content="Siddhartha Golu">
|
||
<link rel="canonical" href="https://www.siddharthagolu.com/posts/reading/running-murakami/">
|
||
<link crossorigin="anonymous" href="/assets/css/stylesheet.66857e85d743ed43ea67ff6c21de89acf86c4e0d759944d3eed3e3cc709b1266.css" integrity="sha256-ZoV+hddD7UPqZ/9sId6JrPhsTg11mUTT7tPjzHCbEmY=" rel="preload stylesheet" as="style">
|
||
<link rel="icon" href="https://www.siddharthagolu.com/favicon.ico">
|
||
<link rel="icon" type="image/png" sizes="16x16" href="https://www.siddharthagolu.com/favicon-16x16.png">
|
||
<link rel="icon" type="image/png" sizes="32x32" href="https://www.siddharthagolu.com/favicon-32x32.png">
|
||
<link rel="apple-touch-icon" href="https://www.siddharthagolu.com/apple-touch-icon.png">
|
||
<link rel="mask-icon" href="https://www.siddharthagolu.com/safari-pinned-tab.svg">
|
||
<meta name="theme-color" content="#2e2e33">
|
||
<meta name="msapplication-TileColor" content="#2e2e33">
|
||
<noscript>
|
||
<style>
|
||
#theme-toggle,
|
||
.top-link {
|
||
display: none;
|
||
}
|
||
|
||
</style>
|
||
<style>
|
||
@media (prefers-color-scheme: dark) {
|
||
:root {
|
||
--theme: rgb(29, 30, 32);
|
||
--entry: rgb(46, 46, 51);
|
||
--primary: rgb(218, 218, 219);
|
||
--secondary: rgb(155, 156, 157);
|
||
--tertiary: rgb(65, 66, 68);
|
||
--content: rgb(196, 196, 197);
|
||
--code-block-bg: rgb(46, 46, 51);
|
||
--code-bg: rgb(55, 56, 62);
|
||
--border: rgb(51, 51, 51);
|
||
}
|
||
|
||
.list {
|
||
background: var(--theme);
|
||
}
|
||
|
||
.list:not(.dark)::-webkit-scrollbar-track {
|
||
background: 0 0;
|
||
}
|
||
|
||
.list:not(.dark)::-webkit-scrollbar-thumb {
|
||
border-color: var(--theme);
|
||
}
|
||
}
|
||
|
||
</style>
|
||
</noscript><!-- isso -->
|
||
<script data-isso="https://comments.siddharthagolu.com/" src="https://comments.siddharthagolu.com/js/embed.min.js"></script>
|
||
<!-- end isso -->
|
||
<meta property="og:title" content="What I Talk About When I Talk About Running by Haruki Murakami" />
|
||
<meta property="og:description" content="Check it out on Goodreads
|
||
Pain is inevitable, suffering is optional.
|
||
I have no affinity for running, even for short jogs, and much less for wanting to run long distances. Although this is not because I hate exercises - one of those rare things that I figured out early in life was my desire to remain healthy as long as possible and that of course means I need to keep myself fit - but probably my distaste for running stems from the monotonous nature of the activity." />
|
||
<meta property="og:type" content="article" />
|
||
<meta property="og:url" content="https://www.siddharthagolu.com/posts/reading/running-murakami/" />
|
||
<meta property="og:image" content="https://www.siddharthagolu.com/posts/reading/running-murakami/images/running-murakami.jpg" /><meta property="article:section" content="posts" />
|
||
<meta property="article:published_time" content="2021-08-14T20:09:56+05:30" />
|
||
<meta property="article:modified_time" content="2023-06-23T00:36:16+05:30" /><meta property="og:site_name" content="Siddhartha Golu" />
|
||
|
||
<meta name="twitter:card" content="summary_large_image" />
|
||
<meta name="twitter:image" content="https://www.siddharthagolu.com/posts/reading/running-murakami/images/running-murakami.jpg" />
|
||
<meta name="twitter:title" content="What I Talk About When I Talk About Running by Haruki Murakami"/>
|
||
<meta name="twitter:description" content="Check it out on Goodreads
|
||
Pain is inevitable, suffering is optional.
|
||
I have no affinity for running, even for short jogs, and much less for wanting to run long distances. Although this is not because I hate exercises - one of those rare things that I figured out early in life was my desire to remain healthy as long as possible and that of course means I need to keep myself fit - but probably my distaste for running stems from the monotonous nature of the activity."/>
|
||
|
||
|
||
<script type="application/ld+json">
|
||
{
|
||
"@context": "https://schema.org",
|
||
"@type": "BreadcrumbList",
|
||
"itemListElement": [
|
||
{
|
||
"@type": "ListItem",
|
||
"position": 1 ,
|
||
"name": "Posts",
|
||
"item": "https://www.siddharthagolu.com/posts/"
|
||
},
|
||
{
|
||
"@type": "ListItem",
|
||
"position": 2 ,
|
||
"name": "What I Talk About When I Talk About Running by Haruki Murakami",
|
||
"item": "https://www.siddharthagolu.com/posts/reading/running-murakami/"
|
||
}
|
||
]
|
||
}
|
||
</script>
|
||
<script type="application/ld+json">
|
||
{
|
||
"@context": "https://schema.org",
|
||
"@type": "BlogPosting",
|
||
"headline": "What I Talk About When I Talk About Running by Haruki Murakami",
|
||
"name": "What I Talk About When I Talk About Running by Haruki Murakami",
|
||
"description": "Check it out on Goodreads\nPain is inevitable, suffering is optional.\nI have no affinity for running, even for short jogs, and much less for wanting to run long distances. Although this is not because I hate exercises - one of those rare things that I figured out early in life was my desire to remain healthy as long as possible and that of course means I need to keep myself fit - but probably my distaste for running stems from the monotonous nature of the activity.",
|
||
"keywords": [
|
||
"audiobook", "favourites", "health"
|
||
],
|
||
"articleBody": "Check it out on Goodreads\nPain is inevitable, suffering is optional.\nI have no affinity for running, even for short jogs, and much less for wanting to run long distances. Although this is not because I hate exercises - one of those rare things that I figured out early in life was my desire to remain healthy as long as possible and that of course means I need to keep myself fit - but probably my distaste for running stems from the monotonous nature of the activity. You keep pounding your legs with a short breath and no rest in sight, what is there to enjoy and look forward to?\nMy girlfriend on the other hand, loves running.\nIntrigued by her passion, I began to take a more compassionate look on the whole idea of running, shunning my former dismissive attitude. What is it that motivates people to run marathons, putting their body through excruciating pain for an uncertain reward? It cannot be as simple as just the competitive spirit. In fact, running is exactly opposite of a team sport, it’s as solitary an activity as thinking and dreaming. Can it be that the monotonicity itself is part of the charm?\nIn this book, Murakami tries to give an answer to this. Or more accurately, he dissects his own emotions and gives insights on how (long distance) running has been crucial to his writing. Both involve perseverance and intense emotional turmoil. While talking about the different ways in which artists produce creative works, he humbly says:\nWriters who are blessed with in-born talent can freely write novels no matter what they do, or don’t do. Like water from a natural spring, the sentences just well up and with little or no effort, these writers can complete a work. Occasionally, you’ll find someone like that, but unfortunately that category wouldn’t include me. I haven’t spotted any springs nearby. I have to pound the rock with a chisel and dig out a deep hole before I can locate the source of creativity. To write a novel, I have to drive myself hard physically and use a lot of time and effort. Every time I begin a new novel, I have to dredge out another new, deep hole.\nSeeing it through his eyes, it becomes clear that there are a lot of parallels between running long distances and sustaining a long writing career. He is also not shy about admitting that both of these processes involve sheer repetition of the same thing over and over again:\nI think certain types of processes don’t allow for any variation. If you have to be part of that process, all you can do is transform, or perhaps distort, yourself through that persistence repetition and make that process a part of your own personality.\nThis part-memoir, part-love-letter to running is filled with such simple yet important insights. Murakami has made a name for himself as one of the most original writers of the time and the humility with which he lays out himself in these pages is inspiring. In one of those beautiful passages, he talks about the turbulent times of adolescence and how we can cope up with the absurd reality of our imperfections:\nOnce when I was around sixteen and nobody else was home, I stripped naked, stood in front of a large mirror in our house, and checked out my body from top to bottom. As I did this, I made a mental list of all the deficiencies - or what, to me at least, appeared to be deficiencies. For instance (and these are just instances), my eyebrows were too thick, or my fingernails were shaped funny - that sort of thing. As I recall, when I got to twenty-seven items, I got sick of it and gave up. And this is what I thought: If there are this many visible parts of my body that are worse than normal people’s, then if I start considering other aspects - personality, brains, athleticism, things of this sort - the list will be endless.\nAs you get older though, through trial and error you learn to get what you need, and throw out what should be discarded. And you start to recognize (or be resigned to the fact) that since your faults and deficiencies are well nigh infinite, you’d best figure out your good points and learn to get by with what you have.\nThis book has piqued my interest to give running a try and if I ever manage, in future, to enjoy running long distances, Murakami would certainly have a large role to play.\n",
|
||
"wordCount" : "770",
|
||
"inLanguage": "en",
|
||
"image":"https://www.siddharthagolu.com/posts/reading/running-murakami/images/running-murakami.jpg","datePublished": "2021-08-14T20:09:56+05:30",
|
||
"dateModified": "2023-06-23T00:36:16+05:30",
|
||
"author":[{
|
||
"@type": "Person",
|
||
"name": "Siddhartha Golu"
|
||
}],
|
||
"mainEntityOfPage": {
|
||
"@type": "WebPage",
|
||
"@id": "https://www.siddharthagolu.com/posts/reading/running-murakami/"
|
||
},
|
||
"publisher": {
|
||
"@type": "Organization",
|
||
"name": "Siddhartha Golu",
|
||
"logo": {
|
||
"@type": "ImageObject",
|
||
"url": "https://www.siddharthagolu.com/favicon.ico"
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
</head>
|
||
|
||
<body class="" id="top">
|
||
<script>
|
||
if (localStorage.getItem("pref-theme") === "dark") {
|
||
document.body.classList.add('dark');
|
||
} else if (localStorage.getItem("pref-theme") === "light") {
|
||
document.body.classList.remove('dark')
|
||
} else if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||
document.body.classList.add('dark');
|
||
}
|
||
|
||
</script>
|
||
|
||
<header class="header">
|
||
<nav class="nav">
|
||
<div class="logo">
|
||
<a href="https://www.siddharthagolu.com/" accesskey="h" title="Siddhartha Golu (Alt + H)">
|
||
<img src="https://www.siddharthagolu.com/apple-touch-icon.png" alt="" aria-label="logo"
|
||
height="30">Siddhartha Golu</a>
|
||
<div class="logo-switches">
|
||
<button id="theme-toggle" accesskey="t" title="(Alt + T)">
|
||
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
|
||
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
||
stroke-linejoin="round">
|
||
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
|
||
</svg>
|
||
<svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
|
||
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
||
stroke-linejoin="round">
|
||
<circle cx="12" cy="12" r="5"></circle>
|
||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||
</svg>
|
||
</button>
|
||
</div>
|
||
</div>
|
||
<ul id="menu">
|
||
<li>
|
||
<a href="https://www.siddharthagolu.com/about" title="About">
|
||
<span>About</span>
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="https://www.siddharthagolu.com/archive" title="Archive">
|
||
<span>Archive</span>
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="https://www.siddharthagolu.com/categories" title="Categories">
|
||
<span>Categories</span>
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="https://www.siddharthagolu.com/tags/" title="Tags">
|
||
<span>Tags</span>
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="https://www.siddharthagolu.com/search/" title="Search (Alt + /)" accesskey=/>
|
||
<span>Search</span>
|
||
</a>
|
||
</li>
|
||
</ul>
|
||
</nav>
|
||
</header>
|
||
<main class="main">
|
||
|
||
<article class="post-single">
|
||
<header class="post-header">
|
||
<div class="breadcrumbs"><a href="https://www.siddharthagolu.com/">Home</a> » <a href="https://www.siddharthagolu.com/posts/">Posts</a></div>
|
||
<h1 class="post-title entry-hint-parent">
|
||
What I Talk About When I Talk About Running by Haruki Murakami
|
||
</h1>
|
||
<div class="post-meta"><span title='2021-08-14 20:09:56 +0530 IST'>🗓 August 14, 2021</span> · 4 min · 🔖 <a href="/tags/audiobook"> audiobook</a> · <a href="/tags/favourites"> favourites</a> · <a href="/tags/health"> health</a>
|
||
|
||
</div>
|
||
</header>
|
||
<div class="post-content"><p><a href="https://www.goodreads.com/review/show/4168404043">Check it out on Goodreads</a></p>
|
||
<hr>
|
||
<p><img loading="lazy" src="/images/running-murakami.jpg#center" alt="Running Cover" title="Running Cover" />
|
||
</p>
|
||
<p><em>Pain is inevitable, suffering is optional.</em></p>
|
||
<p>I have no affinity for running, even for short jogs, and much less for wanting to run long distances. Although this is not because I hate exercises - one of those rare things that I figured out early in life was my desire to remain healthy as long as possible and that of course means I need to keep myself fit - but probably my distaste for running stems from the monotonous nature of the activity. You keep pounding your legs with a short breath and no rest in sight, what is there to
|
||
enjoy and look forward to?</p>
|
||
<p>My girlfriend on the other hand, loves running.</p>
|
||
<p>Intrigued by her passion, I began to take a more compassionate look on the whole idea of running, shunning my former dismissive attitude. What is it that motivates people to run marathons, putting their body through excruciating pain for an uncertain reward? It cannot be as simple as just the competitive spirit. In fact, running is exactly opposite of a team sport, it’s as solitary an activity as thinking and dreaming. Can it be that the monotonicity itself is part of the charm?</p>
|
||
<p>In this book, Murakami tries to give an answer to this. Or more accurately, he dissects his own emotions and gives insights on how (long distance) running has been crucial to his writing. Both involve perseverance and intense emotional turmoil. While talking about the different ways in which artists produce creative works, he humbly says:</p>
|
||
<blockquote>
|
||
<p>Writers who are blessed with in-born talent can freely write novels no matter what they do, or don’t do. Like water from a natural spring, the sentences just well up and with little or no effort, these writers can complete a work. Occasionally, you’ll find someone like that, but unfortunately that category wouldn’t include me. I haven’t spotted any springs nearby. I have to pound the rock with a chisel and dig out a deep hole before I can locate the source of creativity. To write a novel, I have to drive myself hard physically and use a lot of time and effort. Every time I begin a new novel, I have to dredge out another new, deep hole.</p>
|
||
</blockquote>
|
||
<p>Seeing it through his eyes, it becomes clear that there are a lot of parallels between running long distances and sustaining a long writing career. He is also not shy about admitting that both of these processes involve sheer repetition of the same thing over and over again:</p>
|
||
<blockquote>
|
||
<p>I think certain types of processes don’t allow for any variation. If you have to be part of that process, all you can do is transform, or perhaps distort, yourself through that persistence repetition and make that process a part of your own personality.</p>
|
||
</blockquote>
|
||
<p>This part-memoir, part-love-letter to running is filled with such simple yet important insights. Murakami has made a name for himself as one of the most original writers of the time and the humility with which he lays out himself in these pages is inspiring. In one of those beautiful passages, he talks about the turbulent times of adolescence and how we can cope up with the absurd reality of our imperfections:</p>
|
||
<blockquote>
|
||
<p>Once when I was around sixteen and nobody else was home, I stripped naked, stood in front of a large mirror in our house, and checked out my body from top to bottom. As I did this, I made a mental list of all the deficiencies - or what, to me at least, appeared to be deficiencies. For instance (and these are just instances), my eyebrows were too thick, or my fingernails were shaped funny - that sort of thing. As I recall, when I got to twenty-seven items, I got sick of it and gave
|
||
up. And this is what I thought: If there are this many visible parts of my body that are worse than normal people’s, then if I start considering other aspects - personality, brains, athleticism, things of this sort - the list will be endless.</p>
|
||
</blockquote>
|
||
<blockquote>
|
||
<p>As you get older though, through trial and error you learn to get what you need, and throw out what should be discarded. And you start to recognize (or be resigned to the fact) that since your faults and deficiencies are well nigh infinite, you’d best figure out your good points and learn to get by with what you have.</p>
|
||
</blockquote>
|
||
<p>This book has piqued my interest to give running a try and if I ever manage, in future, to enjoy running long distances, Murakami would certainly have a large role to play.</p>
|
||
|
||
|
||
</div>
|
||
|
||
<footer class="post-footer">
|
||
<ul class="post-tags">
|
||
<li><a href="https://www.siddharthagolu.com/tags/audiobook/">audiobook</a></li>
|
||
<li><a href="https://www.siddharthagolu.com/tags/favourites/">favourites</a></li>
|
||
<li><a href="https://www.siddharthagolu.com/tags/health/">health</a></li>
|
||
</ul>
|
||
<nav class="paginav">
|
||
<a class="prev" href="https://www.siddharthagolu.com/posts/reading/shame-rushdie/">
|
||
<span class="title">« Prev</span>
|
||
<br>
|
||
<span>Shame by Salman Rushdie</span>
|
||
</a>
|
||
<a class="next" href="https://www.siddharthagolu.com/posts/reading/annihilation-of-caste/">
|
||
<span class="title">Next »</span>
|
||
<br>
|
||
<span>Annihilation of Caste(Annotated Edition) by Arundhati Roy</span>
|
||
</a>
|
||
</nav>
|
||
|
||
</footer>
|
||
|
||
<hr>
|
||
<section class="webring">
|
||
<h3 class="header">Articles from blogs I follow around the net</h3>
|
||
<section class="articles">
|
||
|
||
<div class="article">
|
||
<h4 class="title">
|
||
<a href="https://www.lilysthings.org/blog/discord-dialup/" target="_blank" rel="noopener">Dial-up over a Discord Call</a>
|
||
</h4>
|
||
<p class="summary">
|
||
|
||
Comments
|
||
</p>
|
||
<small class="source">
|
||
via <a href="https://lobste.rs/">Lobsters</a>
|
||
</small>
|
||
<small class="date">December 22, 2023</small>
|
||
</div>
|
||
|
||
<div class="article">
|
||
<h4 class="title">
|
||
<a href="https://www.benkuhn.net/newmgr/" target="_blank" rel="noopener">Some mistakes I made as a new manager</a>
|
||
</h4>
|
||
<p class="summary">the trough of zero dopamine • managing the wrong amount • procrastinating on hard questions • indefinitely deferring maintenance • angsting instead of asking</p>
|
||
<small class="source">
|
||
via <a href="https://www.benkuhn.net/">benkuhn.net</a>
|
||
</small>
|
||
<small class="date">April 23, 2023</small>
|
||
</div>
|
||
|
||
<div class="article">
|
||
<h4 class="title">
|
||
<a href="https://www.joelonsoftware.com/2022/12/19/progress-on-the-block-protocol/" target="_blank" rel="noopener">Progress on the Block Protocol</a>
|
||
</h4>
|
||
<p class="summary">Since the 1990s, the web has been a publishing place for human-readable documents. Documents published on the web are in HTML. HTML has a little bit of… Read more "Progress on the Block Protocol"</p>
|
||
<small class="source">
|
||
via <a href="https://www.joelonsoftware.com">Joel on Software</a>
|
||
</small>
|
||
<small class="date">December 19, 2022</small>
|
||
</div>
|
||
|
||
</section>
|
||
<p class="attribution">
|
||
Generated by
|
||
<a href="https://git.sr.ht/~sircmpwn/openring">openring</a>
|
||
</p>
|
||
</section>
|
||
<style>
|
||
.webring .header {
|
||
margin: 0 0 12px;
|
||
}
|
||
.webring .articles {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
margin: -0.5rem;
|
||
}
|
||
.webring .title {
|
||
margin: 4px 0 12px;
|
||
}
|
||
.webring .article {
|
||
flex: 1 1 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
margin: 0.5rem;
|
||
padding: 0.5rem;
|
||
background: var(--openring-bg);
|
||
min-width: 10rem;
|
||
}
|
||
.webring .summary {
|
||
font-size: 0.8rem;
|
||
flex: 1 1 0;
|
||
}
|
||
.webring .attribution {
|
||
text-align: right;
|
||
font-size: 0.8rem;
|
||
color: #555;
|
||
}
|
||
</style>
|
||
<!-- begin comments //-->
|
||
<section id = "isso-thread">
|
||
|
||
</section>
|
||
<!-- end comments //-->
|
||
|
||
</article>
|
||
</main>
|
||
|
||
<footer class="footer">
|
||
<span>© 2024 <a href="https://www.siddharthagolu.com/">Siddhartha Golu</a></span>
|
||
<span>
|
||
Powered by
|
||
<a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &
|
||
<a href="https://github.com/adityatelange/hugo-PaperMod/" rel="noopener" target="_blank">PaperMod</a>
|
||
</span>
|
||
</footer>
|
||
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g">
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
|
||
<path d="M12 6H0l6-6z" />
|
||
</svg>
|
||
</a>
|
||
|
||
<script>
|
||
let menu = document.getElementById('menu')
|
||
if (menu) {
|
||
menu.scrollLeft = localStorage.getItem("menu-scroll-position");
|
||
menu.onscroll = function () {
|
||
localStorage.setItem("menu-scroll-position", menu.scrollLeft);
|
||
}
|
||
}
|
||
|
||
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
||
anchor.addEventListener("click", function (e) {
|
||
e.preventDefault();
|
||
var id = this.getAttribute("href").substr(1);
|
||
if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
|
||
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({
|
||
behavior: "smooth"
|
||
});
|
||
} else {
|
||
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView();
|
||
}
|
||
if (id === "top") {
|
||
history.replaceState(null, null, " ");
|
||
} else {
|
||
history.pushState(null, null, `#${id}`);
|
||
}
|
||
});
|
||
});
|
||
|
||
</script>
|
||
<script>
|
||
var mybutton = document.getElementById("top-link");
|
||
window.onscroll = function () {
|
||
if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
|
||
mybutton.style.visibility = "visible";
|
||
mybutton.style.opacity = "1";
|
||
} else {
|
||
mybutton.style.visibility = "hidden";
|
||
mybutton.style.opacity = "0";
|
||
}
|
||
};
|
||
|
||
</script>
|
||
<script>
|
||
document.getElementById("theme-toggle").addEventListener("click", () => {
|
||
if (document.body.className.includes("dark")) {
|
||
document.body.classList.remove('dark');
|
||
localStorage.setItem("pref-theme", 'light');
|
||
} else {
|
||
document.body.classList.add('dark');
|
||
localStorage.setItem("pref-theme", 'dark');
|
||
}
|
||
})
|
||
|
||
</script>
|
||
<script>
|
||
document.querySelectorAll('pre > code').forEach((codeblock) => {
|
||
const container = codeblock.parentNode.parentNode;
|
||
|
||
const copybutton = document.createElement('button');
|
||
copybutton.classList.add('copy-code');
|
||
copybutton.innerHTML = 'copy';
|
||
|
||
function copyingDone() {
|
||
copybutton.innerHTML = 'copied!';
|
||
setTimeout(() => {
|
||
copybutton.innerHTML = 'copy';
|
||
}, 2000);
|
||
}
|
||
|
||
copybutton.addEventListener('click', (cb) => {
|
||
if ('clipboard' in navigator) {
|
||
navigator.clipboard.writeText(codeblock.textContent);
|
||
copyingDone();
|
||
return;
|
||
}
|
||
|
||
const range = document.createRange();
|
||
range.selectNodeContents(codeblock);
|
||
const selection = window.getSelection();
|
||
selection.removeAllRanges();
|
||
selection.addRange(range);
|
||
try {
|
||
document.execCommand('copy');
|
||
copyingDone();
|
||
} catch (e) { };
|
||
selection.removeRange(range);
|
||
});
|
||
|
||
if (container.classList.contains("highlight")) {
|
||
container.appendChild(copybutton);
|
||
} else if (container.parentNode.firstChild == container) {
|
||
|
||
} else if (codeblock.parentNode.parentNode.parentNode.parentNode.parentNode.nodeName == "TABLE") {
|
||
|
||
codeblock.parentNode.parentNode.parentNode.parentNode.parentNode.appendChild(copybutton);
|
||
} else {
|
||
|
||
codeblock.parentNode.appendChild(copybutton);
|
||
}
|
||
});
|
||
</script>
|
||
</body>
|
||
|
||
</html>
|