Skip to content

Commit d8d19d3

Browse files
committed
[docs]: add docs using mdbook
1 parent a286de1 commit d8d19d3

File tree

8 files changed

+264
-0
lines changed

8 files changed

+264
-0
lines changed

docs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
book

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Introduction

docs/book.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[book]
2+
authors = ["woxjro"]
3+
language = "en"
4+
multilingual = false
5+
src = "src"
6+
title = "lazy-etherscan"

docs/index.html

Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
<!DOCTYPE HTML>
2+
<html lang="en" class="light" dir="ltr">
3+
<head>
4+
<!-- Book generated using mdBook -->
5+
<meta charset="UTF-8">
6+
<title>Introduction - lazy-etherscan</title>
7+
8+
9+
<!-- Custom HTML head -->
10+
11+
<meta name="description" content="">
12+
<meta name="viewport" content="width=device-width, initial-scale=1">
13+
<meta name="theme-color" content="#ffffff">
14+
15+
<link rel="icon" href="favicon.svg">
16+
<link rel="shortcut icon" href="favicon.png">
17+
<link rel="stylesheet" href="css/variables.css">
18+
<link rel="stylesheet" href="css/general.css">
19+
<link rel="stylesheet" href="css/chrome.css">
20+
<link rel="stylesheet" href="css/print.css" media="print">
21+
22+
<!-- Fonts -->
23+
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
24+
<link rel="stylesheet" href="fonts/fonts.css">
25+
26+
<!-- Highlight.js Stylesheets -->
27+
<link rel="stylesheet" href="highlight.css">
28+
<link rel="stylesheet" href="tomorrow-night.css">
29+
<link rel="stylesheet" href="ayu-highlight.css">
30+
31+
<!-- Custom theme stylesheets -->
32+
33+
</head>
34+
<body class="sidebar-visible no-js">
35+
<div id="body-container">
36+
<!-- Provide site root to javascript -->
37+
<script>
38+
var path_to_root = "";
39+
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
40+
</script>
41+
42+
<!-- Work around some values being stored in localStorage wrapped in quotes -->
43+
<script>
44+
try {
45+
var theme = localStorage.getItem('mdbook-theme');
46+
var sidebar = localStorage.getItem('mdbook-sidebar');
47+
48+
if (theme.startsWith('"') && theme.endsWith('"')) {
49+
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
50+
}
51+
52+
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
53+
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
54+
}
55+
} catch (e) { }
56+
</script>
57+
58+
<!-- Set the theme before any content is loaded, prevents flash -->
59+
<script>
60+
var theme;
61+
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
62+
if (theme === null || theme === undefined) { theme = default_theme; }
63+
var html = document.querySelector('html');
64+
html.classList.remove('light')
65+
html.classList.add(theme);
66+
var body = document.querySelector('body');
67+
body.classList.remove('no-js')
68+
body.classList.add('js');
69+
</script>
70+
71+
<input type="checkbox" id="sidebar-toggle-anchor" class="hidden">
72+
73+
<!-- Hide / unhide sidebar before it is displayed -->
74+
<script>
75+
var body = document.querySelector('body');
76+
var sidebar = null;
77+
var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
78+
if (document.body.clientWidth >= 1080) {
79+
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
80+
sidebar = sidebar || 'visible';
81+
} else {
82+
sidebar = 'hidden';
83+
}
84+
sidebar_toggle.checked = sidebar === 'visible';
85+
body.classList.remove('sidebar-visible');
86+
body.classList.add("sidebar-" + sidebar);
87+
</script>
88+
89+
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
90+
<div class="sidebar-scrollbox">
91+
<ol class="chapter"><li class="chapter-item expanded affix "><a href="../index.html" class="active">Introduction</a></li><li class="chapter-item expanded affix "><li class="part-title">User Guide</li><li class="chapter-item expanded "><a href="guide/installation.html"><strong aria-hidden="true">1.</strong> Installation</a></li><li class="spacer"></li><li class="chapter-item expanded affix "><a href="misc/contributors.html">Contributors</a></li></ol>
92+
</div>
93+
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
94+
</nav>
95+
96+
<!-- Track and set sidebar scroll position -->
97+
<script>
98+
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
99+
sidebarScrollbox.addEventListener('click', function(e) {
100+
if (e.target.tagName === 'A') {
101+
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
102+
}
103+
}, { passive: true });
104+
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
105+
sessionStorage.removeItem('sidebar-scroll');
106+
if (sidebarScrollTop) {
107+
// preserve sidebar scroll position when navigating via links within sidebar
108+
sidebarScrollbox.scrollTop = sidebarScrollTop;
109+
} else {
110+
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
111+
var activeSection = document.querySelector('#sidebar .active');
112+
if (activeSection) {
113+
activeSection.scrollIntoView({ block: 'center' });
114+
}
115+
}
116+
</script>
117+
118+
<div id="page-wrapper" class="page-wrapper">
119+
120+
<div class="page">
121+
<div id="menu-bar-hover-placeholder"></div>
122+
<div id="menu-bar" class="menu-bar sticky">
123+
<div class="left-buttons">
124+
<label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
125+
<i class="fa fa-bars"></i>
126+
</label>
127+
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
128+
<i class="fa fa-paint-brush"></i>
129+
</button>
130+
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
131+
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
132+
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
133+
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
134+
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
135+
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
136+
</ul>
137+
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
138+
<i class="fa fa-search"></i>
139+
</button>
140+
</div>
141+
142+
<h1 class="menu-title">lazy-etherscan</h1>
143+
144+
<div class="right-buttons">
145+
<a href="print.html" title="Print this book" aria-label="Print this book">
146+
<i id="print-button" class="fa fa-print"></i>
147+
</a>
148+
149+
</div>
150+
</div>
151+
152+
<div id="search-wrapper" class="hidden">
153+
<form id="searchbar-outer" class="searchbar-outer">
154+
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
155+
</form>
156+
<div id="searchresults-outer" class="searchresults-outer hidden">
157+
<div id="searchresults-header" class="searchresults-header"></div>
158+
<ul id="searchresults">
159+
</ul>
160+
</div>
161+
</div>
162+
163+
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
164+
<script>
165+
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
166+
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
167+
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
168+
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
169+
});
170+
</script>
171+
172+
<div id="content" class="content">
173+
<main>
174+
<h1 id="introduction"><a class="header" href="#introduction">Introduction</a></h1>
175+
176+
</main>
177+
178+
<nav class="nav-wrapper" aria-label="Page navigation">
179+
<!-- Mobile navigation buttons -->
180+
181+
<a rel="next prefetch" href="guide/installation.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
182+
<i class="fa fa-angle-right"></i>
183+
</a>
184+
185+
<div style="clear: both"></div>
186+
</nav>
187+
</div>
188+
</div>
189+
190+
<nav class="nav-wide-wrapper" aria-label="Page navigation">
191+
192+
<a rel="next prefetch" href="guide/installation.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
193+
<i class="fa fa-angle-right"></i>
194+
</a>
195+
</nav>
196+
197+
</div>
198+
199+
<!-- Livereload script (if served using the cli tool) -->
200+
<script>
201+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
202+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
203+
const socket = new WebSocket(wsAddress);
204+
socket.onmessage = function (event) {
205+
if (event.data === "reload") {
206+
socket.close();
207+
location.reload();
208+
}
209+
};
210+
211+
window.onbeforeunload = function() {
212+
socket.close();
213+
}
214+
</script>
215+
216+
217+
218+
<script>
219+
window.playground_copyable = true;
220+
</script>
221+
222+
223+
<script src="elasticlunr.min.js"></script>
224+
<script src="mark.min.js"></script>
225+
<script src="searcher.js"></script>
226+
227+
<script src="clipboard.min.js"></script>
228+
<script src="highlight.js"></script>
229+
<script src="book.js"></script>
230+
231+
<!-- Custom JS scripts -->
232+
233+
234+
</div>
235+
</body>
236+
</html>

docs/src/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Introduction
2+
TODO

docs/src/SUMMARY.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Summary
2+
3+
[Introduction](README.md)
4+
5+
# User Guide
6+
7+
- [Installation](guide/installation.md)
8+
9+
10+
-----------
11+
12+
[Contributors](misc/contributors.md)

docs/src/guide/installation.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Installation
2+
3+
## Build from source using Rust
4+
TODO

docs/src/misc/contributors.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Contributors
2+
TODO

0 commit comments

Comments
 (0)