Skip to content

Commit

Permalink
Deploy ThunderNetworkRaD/blog to ThunderNetworkRaD/blog:gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions committed Oct 3, 2024
0 parents commit 13872e6
Show file tree
Hide file tree
Showing 64 changed files with 4,880 additions and 0 deletions.
Empty file added .nojekyll
Empty file.
Binary file added 404.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
348 changes: 348 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,348 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" >
<head>
<!-- 2024-10-03 Thu 16:10 -->
<meta charset="UTF-8" />
<meta name="description" content="Thunder Network blog." />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#7b98e0" />
<title>Thunder Network</title>
<link rel="canonical" href="&#x2F;" /><link rel="icon" type="image/png" href="https://blog.thundernetwork.org/favicon.png" />

<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="https://blog.thundernetwork.org/apple-touch-icon.png" />

<link rel="alternate" type="application/rss+xml" title="Thunder Network" href="https://blog.thundernetwork.org/rss.xml" />
<link rel="alternate" type="application/atom+xml" title="Thunder Network" href="https://blog.thundernetwork.org/atom.xml" /><style type="text/css">
:root {--accent-color: #7b98e0;--contrast-color: #fff;}</style>

<link type="text/css" rel="stylesheet" href="https://blog.thundernetwork.org/style.css" />

<script type="text/javascript">
function debounce(func, wait) {
var timeout;

return function () {
var context = this;
var args = arguments;
clearTimeout(timeout);

timeout = setTimeout(function () {
timeout = null;
func.apply(context, args);
}, wait);
};
}

// Taken from mdbook
// The strategy is as follows:
// First, assign a value to each word in the document:
// Words that correspond to search terms (stemmer aware): 40
// Normal words: 2
// First word in a sentence: 8
// Then use a sliding window with a constant number of words and count the
// sum of the values of the words within the window. Then use the window that got the
// maximum sum. If there are multiple maximas, then get the last one.
// Enclose the terms in <b>.
function makeTeaser(body, terms) {
var TERM_WEIGHT = 40;
var NORMAL_WORD_WEIGHT = 2;
var FIRST_WORD_WEIGHT = 8;
var TEASER_MAX_WORDS = 30;

var stemmedTerms = terms.map(function (w) {
return elasticlunr.stemmer(w.toLowerCase());
});
var termFound = false;
var index = 0;
var weighted = []; // contains elements of ["word", weight, index_in_document]

// split in sentences, then words
var sentences = body.toLowerCase().split(". ");

for (var i in sentences) {
var words = sentences[i].split(" ");
var value = FIRST_WORD_WEIGHT;

for (var j in words) {
var word = words[j];

if (word.length > 0) {
for (var k in stemmedTerms) {
if (elasticlunr.stemmer(word).startsWith(stemmedTerms[k])) {
value = TERM_WEIGHT;
termFound = true;
}
}
weighted.push([word, value, index]);
value = NORMAL_WORD_WEIGHT;
}

index += word.length;
index += 1; // ' ' or '.' if last word in sentence
}

index += 1; // because we split at a two-char boundary '. '
}

if (weighted.length === 0) {
return body;
}

var windowWeights = [];
var windowSize = Math.min(weighted.length, TEASER_MAX_WORDS);
// We add a window with all the weights first
var curSum = 0;
for (var i = 0; i < windowSize; i++) {
curSum += weighted[i][1];
}
windowWeights.push(curSum);

for (var i = 0; i < weighted.length - windowSize; i++) {
curSum -= weighted[i][1];
curSum += weighted[i + windowSize][1];
windowWeights.push(curSum);
}

// If we didn't find the term, just pick the first window
var maxSumIndex = 0;
if (termFound) {
var maxFound = 0;
// backwards
for (var i = windowWeights.length - 1; i >= 0; i--) {
if (windowWeights[i] > maxFound) {
maxFound = windowWeights[i];
maxSumIndex = i;
}
}
}

var teaser = [];
var startIndex = weighted[maxSumIndex][2];
for (var i = maxSumIndex; i < maxSumIndex + windowSize; i++) {
var word = weighted[i];
if (startIndex < word[2]) {
// missing text from index to start of `word`
teaser.push(body.substring(startIndex, word[2]));
startIndex = word[2];
}

// add <strong> around search terms
if (word[1] === TERM_WEIGHT) {
teaser.push("<strong>");
}
startIndex = word[2] + word[0].length;
teaser.push(body.substring(word[2], startIndex));

if (word[1] === TERM_WEIGHT) {
teaser.push("</strong>");
}
}
teaser.push("…");
return teaser.join("");
}

function formatSearchResultItem(item, terms) {
return '<div class="item">'
+ `<a href="${item.ref}">${item.doc.title}</a>`
+ `<span>${makeTeaser(item.doc.body, terms)}</span>`
+ '</div>';
}

function initSearch() {
var $searchInput = document.getElementById("search-bar");
var $searchResults = document.getElementById("search-results");
var MAX_ITEMS = 10;

var options = {
bool: "AND",
fields: {
title: { boost: 2 },
body: { boost: 1 },
}
};
var currentTerm = "";
var index;

var initIndex = async function () {
if (index === undefined) {
index = fetch("https://blog.thundernetwork.org/search_index.en.json")
.then(
async function (response) {
return await elasticlunr.Index.load(await response.json());
}
);
}
let res = await index;
return res;
}

$searchInput.addEventListener("keyup", debounce(async function () {
var term = $searchInput.value.trim();
if (term === currentTerm) {
return;
}
$searchResults.style.display = term === "" ? "none" : "flex";
$searchResults.innerHTML = "";
currentTerm = term;
if (term === "") {
return;
}

var results = (await initIndex()).search(term, options);
if (results.length === 0) {
$searchResults.style.display = "none";
return;
}

for (var i = 0; i < Math.min(results.length, MAX_ITEMS); i++) {
$searchResults.innerHTML += formatSearchResultItem(results[i], term.split(" "));
}
}, 150));

window.addEventListener('click', function (e) {
if ($searchResults.style.display == "flex" && !$searchResults.contains(e.target)) {
$searchResults.style.display = "none";
}
});
}

function toggleSearch() {
var searchContainer = document.getElementById("search-container");
var searchBar = document.getElementById("search-bar");
searchContainer.classList.toggle("active");
searchBar.toggleAttribute("disabled");
}

if (document.readyState === "complete" ||
(document.readyState !== "loading" && !document.documentElement.doScroll)
) {
initSearch();
} else {
document.addEventListener("DOMContentLoaded", initSearch);
}
</script>

<script type="text/javascript" src="https://blog.thundernetwork.org/elasticlunr.min.js"></script>
<script type="text/javascript" src="https://blog.thundernetwork.org/theme-switcher.js"></script>
<script type="text/javascript" src="https://blog.thundernetwork.org/details.js"></script>

<meta property="og:site_name" content="Thunder Network" />
<meta property="og:title" content="Thunder Network" />
<meta property="og:url" content="&#x2F;" />
<meta property="og:description" content="Thunder Network blog." />
<meta property="og:image" content="https://blog.thundernetwork.org/card.png" />
<meta property="og:locale" content="en_US" />
</head>

<body>

<header id="site-nav">
<nav>
<a href="#main" id="main-content" tabindex="0">
Skip to Main Content
</a>
<ul>
<li id="home">
<a href="https://blog.thundernetwork.org">
<i class="icon"></i>Thunder Network</a>
</li>
<div class="divider"></div>
<li>
<a href="https://blog.thundernetwork.org/blog/">Blog</a>
</li>
<li id="search">
<button class="circle" onclick="toggleSearch()" title="Search">
<i class="icon"></i>
</button>
</li>
<li id="theme-switcher">
<details>
<summary class="circle" title="Theme">
<i class="icon"></i>
</summary>
<ul>
<li>
<button class="circle" id="theme-light" onclick="switchTheme('light')" title="Switch to Light Theme">
<i class="icon"></i>
</button>
</li>
<li>
<button class="circle" id="theme-dark" onclick="switchTheme('dark')" title="Switch to Dark Theme">
<i class="icon"></i>
</button>
</li>
<li>
<button class="circle" id="theme-system" onclick="switchTheme('system')" title="Use System Theme">
<i class="icon"></i>
</button>
</li>
</ul>
</details>
</li><li id="feed">
<details>
<summary class="circle" title="Feed">
<i class="icon"></i>
</summary>
<ul>
<li>
<a href="https://blog.thundernetwork.org/rss.xml" rel="">RSS</a>
</li>
<li>
<a href="https://blog.thundernetwork.org/atom.xml" rel="">Atom</a>
</li></ul>
</details>
</li>
</ul>
</nav>
<div id="search-container">
<label for="search-bar" class="hidden">Search</label>
<input id="search-bar" placeholder="Search for…" autocomplete="off" type="search" disabled>
<div id="search-results-container">
<div id="search-results"></div>
</div>
</div>
</header>

<div id="main" class="container">

<picture>
<source srcset="https://blog.thundernetwork.org/404.png" media="(prefers-reduced-motion: reduce)"></source>
<img id="not-found" class="pixels transparent no-hover" alt="404"src="https://blog.thundernetwork.org/404.gif">
</picture>

<h1>Page Not Found</h1>

<p>The requested page could not be found.</p>

<div class="dialog-buttons">
<button class="inline-button" onclick="window.history.go(-1)">Go Back</button>
</div>

</div>
<footer id="site-footer">
<nav>
<ul>
<li>
<a href="https://blog.thundernetwork.org/blog/">Blog</a>
</li>
</ul>
</nav>
<p>&copy; Thunder Network, 2024</p>
<p>
<small>
Powered by <a class="link external" href="https://www.getzola.org" rel="">Zola</a> and <a class="link external" href="https://duckquill.daudix.one" rel="">Duckquill</a>
</small>
</p>
<ul id="socials">
<li>
<a href="https://github.com/ThunderNetworkRaD" rel=" me" title="GitHub">
<i class="icon" style='--icon: url("data:image/svg+xml,%3Csvg role=&#x27;img&#x27; viewBox=&#x27;0 0 24 24&#x27; xmlns=&#x27;http:&#x2F;&#x2F;www.w3.org&#x2F;2000&#x2F;svg&#x27;%3E%3Ctitle%3EGitHub%3C&#x2F;title%3E%3Cpath d=&#x27;M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12&#x27;&#x2F;%3E%3C&#x2F;svg%3E")'></i>
<span>GitHub</span>
</a>
</li>
</ul>
</footer>


</body>
</html>
Binary file added 404.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blog.thundernetwork.org
Binary file added apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions atom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<title>Thunder Network</title>
<subtitle>Thunder Network blog.</subtitle>
<link rel="self" type="application/atom+xml" href="https://blog.thundernetwork.org/atom.xml"/>
<link rel="alternate" type="text/html" href="https://blog.thundernetwork.org"/>
<generator uri="https://www.getzola.org/">Zola</generator>
<updated>2024-10-02T00:00:00+00:00</updated>
<id>https://blog.thundernetwork.org/atom.xml</id>
<entry xml:lang="en">
<title>Welcome</title>
<published>2024-10-02T00:00:00+00:00</published>
<updated>2024-10-02T00:00:00+00:00</updated>

<author>
<name>

ThunderNetworkRaD

</name>
</author>

<link rel="alternate" type="text/html" href="https://blog.thundernetwork.org/blog/welcome-1/"/>
<id>https://blog.thundernetwork.org/blog/welcome-1/</id>

<content type="html" xml:base="https://blog.thundernetwork.org/blog/welcome-1/">&lt;p&gt;Welcome to the &lt;strong&gt;Thunder Network Blog&lt;&#x2F;strong&gt;! Here, you’ll find all the latest updates, insights, and announcements about our innovative digital ecosystem. Whether you’re curious about &lt;strong&gt;Internet Avatar&lt;&#x2F;strong&gt;, &lt;strong&gt;Livetar&lt;&#x2F;strong&gt;, &lt;strong&gt;Bolty&lt;&#x2F;strong&gt;, &lt;strong&gt;Matrix OS&lt;&#x2F;strong&gt;, or &lt;strong&gt;Matrix browser&lt;&#x2F;strong&gt;, this is the place to stay informed. Our blog will also feature behind-the-scenes looks at our &lt;strong&gt;Community&lt;&#x2F;strong&gt;, &lt;strong&gt;Research and Development (RaD)&lt;&#x2F;strong&gt;, and &lt;strong&gt;Studios&lt;&#x2F;strong&gt;, giving you a deeper understanding of how we’re pushing the boundaries of technology. Stay tuned for exciting content and join us on this journey!&lt;&#x2F;p&gt;
</content>

</entry>
</feed>
1 change: 1 addition & 0 deletions auto-render.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 13872e6

Please sign in to comment.