diff --git a/Makefile b/Makefile
index 8ed05cb..df79f1f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,3 @@
index.html: index.md style.css
- # ./bin/gh-md-toc --insert index.md
+ ./bin/gh-md-toc --insert index.md
./bin/mmark-linux-amd64 -head head.html -html index.md > index.html
\ No newline at end of file
diff --git a/head.html b/head.html
index a23d90d..6886d61 100644
--- a/head.html
+++ b/head.html
@@ -11,16 +11,49 @@
}
}
+ function toggleClass(el, className) {
+ if (el.classList) {
+ el.classList.toggle(className);
+ } else {
+ var classes = el.className.split(' ');
+ var existingIndex = classes.indexOf(className);
+
+ if (existingIndex >= 0)
+ classes.splice(existingIndex, 1);
+ else
+ classes.push(className);
+
+ el.className = classes.join(' ');
+ }
+ }
+
ready(function() {
- tocbot.init({
- // Where to render the table of contents.
- tocSelector: '#toc',
- // Where to grab the headings to build the table of contents.
+ var options = {
+ tocSelector: '.toc',
contentSelector: '#content',
- // Which headings to grab inside of the contentSelector element.
headingSelector: 'h2, h3, h4, h5, h6',
collapseDepth: 3,
- positionFixedSelector: "#toc",
+ positionFixedSelector: ".toc",
+ };
+
+ tocbot.init(options);
+
+ document.querySelector('.toc-menu').addEventListener("click", function() {
+ toggleClass(document.querySelector('.toc'), "open");
});
+
+
+ // need this part to fix toc offset height if content above toc changes height
+ var resizeTimer;
+ window.addEventListener('resize', function(e) {
+ clearTimeout(resizeTimer);
+ resizeTimer = setTimeout(function() {
+ o = options;
+ o.fixedSidebarOffset = "auto";
+ tocbot.refresh(o);
+ }, 250);
+ });
+
+
})
\ No newline at end of file
diff --git a/index.html b/index.html
index b9a9ac2..437faa6 100644
--- a/index.html
+++ b/index.html
@@ -17,21 +17,56 @@
}
}
+ function toggleClass(el, className) {
+ if (el.classList) {
+ el.classList.toggle(className);
+ } else {
+ var classes = el.className.split(' ');
+ var existingIndex = classes.indexOf(className);
+
+ if (existingIndex >= 0)
+ classes.splice(existingIndex, 1);
+ else
+ classes.push(className);
+
+ el.className = classes.join(' ');
+ }
+ }
+
ready(function() {
- tocbot.init({
- // Where to render the table of contents.
- tocSelector: '#toc',
- // Where to grab the headings to build the table of contents.
+ var options = {
+ tocSelector: '.toc',
contentSelector: '#content',
- // Which headings to grab inside of the contentSelector element.
headingSelector: 'h2, h3, h4, h5, h6',
collapseDepth: 3,
- positionFixedSelector: "#toc",
+ positionFixedSelector: ".toc",
+ };
+
+ tocbot.init(options);
+
+ document.querySelector('.toc-menu').addEventListener("click", function() {
+ toggleClass(document.querySelector('.toc'), "open");
});
+
+
+ // need this part to fix toc offset height if content above toc changes height
+ var resizeTimer;
+ window.addEventListener('resize', function(e) {
+ clearTimeout(resizeTimer);
+ resizeTimer = setTimeout(function() {
+ o = options;
+ o.fixedSidebarOffset = "auto";
+ tocbot.refresh(o);
+ }, 250);
+ });
+
+
})
+
+
LBRY: A Decentralized Digital Content Marketplace
-
+
Menu
+
+
+
Introduction
LBRY is a protocol for accessing and publishing digital content in a global, decentralized marketplace. Clients can use LBRY to publish, host, find, download, and pay for content — books, movies, music, or anything else. Anyone can participate and no permission is required, nor can anyone be blocked from participating. The system is distributed, so no single entity has unilateral control, nor will the removal of any single entity prevent the system from functioning.
To enable claim operations, three new opcodes were added to the blockchain scripting language: OP_CLAIM_NAME, OP_SUPPORT_CLAIM, and OP_UPDATE_CLAIM (in Bitcoin they are respectively OP_NOP6, OP_NOP7, and OP_NOP8). Each op code will push a zero on to the execution stack, and will trigger the claimtrie to perform calculations necessary for each operation. Below are the three supported transactions scripts using these opcodes.
An update transaction must spend the [[outpoint]] of the original claim that it is updating.
+
Addresses
The address version byte is set to 0x55 for standard (pay-to-public-key-hash) addresses and 0x7a for multisig (pay-to-script-hash) addresses. P2PKH addresses start with the letter b, and P2SH addresses start with r.
@@ -1049,7 +1179,7 @@ specification fairly closely, with some modifications.