This repository has been archived by the owner on May 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
readme.html
228 lines (209 loc) · 7.63 KB
/
readme.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="apple-touch-icon" sizes="180x180" href="img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="img/favicon-32x32.png">
<link rel="shortcut icon" href="img/favicon.ico">
<!-- The page supports both dark and light color schemes, and the page author prefers dark. -->
<meta name="color-scheme" content="light dark">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="./dist/bootstrap-dark.css">
<!-- Prism.js for syntax highlighting -->
<script>
if (window.matchMedia("(prefers-color-scheme: dark)").media === "not all") {
document.head.insertAdjacentHTML(
"beforeend",
"<link id=\"prism\" rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/themes/prism.min.css\">"
);
}
</script>
<link id="prism-dark" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/themes/prism-tomorrow.min.css" media="(prefers-color-scheme: dark)">
<link id="prism-light" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/themes/prism.min.css" media="(prefers-color-scheme: no-preference), (prefers-color-scheme: light)">
<style>
#content table {
width: unset;
}
#content h1, #content h2, #content h3, #content h4, #content h5, #content h6 {
padding-bottom: 1rem;
margin-top: 1rem;
margin-bottom: 1rem;
}
#content h1, #content h2 {
border-bottom: 1px solid rgba(127,172,127,.5);
margin-top: 2rem;
}
.anchorjs-link, .anchorjs-link:hover { text-decoration: none; }
.d-clipboard {
position: relative;
float: right;
}
.btn-clipboard {
position: absolute;
top: .25rem;
right: .25rem;
opacity: .25;
}
.btn-clipboard:hover,
.btn-clipboard:active {
opacity: 1;
}
.badge {
font-style: normal;
}
blockquote {
padding-left: 1rem;
border-left: 5px solid rgba(128, 128, 128, .5);
font-style: oblique;
}
footer {
opacity: .33;
transition: opacity .75s ease-in-out;
}
footer:hover {
opacity: 1;
}
</style>
<title>bootstrap-dark | README.md</title>
</head>
<body>
<header>
<nav class="navbar navbar-dark navbar-expand-lg navbar-light bg-primary">
<div class="container">
<a class="navbar-brand">bootstrap-dark</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto" id="nav-links"></ul>
</div>
</div>
</nav>
</header>
<main>
<div class="container mt-3 mb-3">
<div class="row">
<div class="col">
<span id="content">
<div class="d-flex justify-content-center">
<div class="spinner-border" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
</span>
</div>
</div>
</div>
</main>
<footer id="copyright" class="text-center">
<small class="text-muted">© 2020</small>
</footer>
<!-- Optional JavaScript --> <!-- ** needed for toggle -->
<!-- jQuery first, then Popper.js + Bootstrap JS bundle -->
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.bundle.min.js"></script>
<!-- Showdown.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.1/showdown.min.js"></script>
<!-- Anchor.js -->
<script src="https://cdn.jsdelivr.net/npm/anchor-js/anchor.min.js"></script>
<!-- Clipboard.js for copy code -->
<script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script>
<!-- Prism.js for syntax highlighting -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/components/prism-core.min.js" data-manual></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script>
$(document).ready(function(){
// only when jQuery is ready
// -----------------------------------------
const $anchors = new AnchorJS();
$anchors.options = {
placement: 'left',
};
// ------ Load the markdown ----------------
const $markdown = new showdown.Converter({
tables: true,
strikethrough: true,
ghCompatibleHeaderId: true,
tablesHeaderId: true,
ghCodeBlocks: true,
// ghMentions: true,
simpleLineBreaks: true,
});
$.ajax( {
url: './README.md',
type: 'get',
success: function(content) {
$html = $markdown.makeHtml(content);
$("#content").html( $html );
Prism.highlightAll();
$anchors.add();
$("table").addClass('table table-hover table-striped');
do_the_the_magic_on_the_code();
if ($hash = window.location.hash) { // single =, not ==
$('html, body').animate({
scrollTop: $($hash).offset().top
}, 0);
}
},
error: function(request, status, error) {
$("#content").html( "Error: "+request.responseText );
}
});
// ----- Clipboard ------------------------
function do_the_the_magic_on_the_code() {
$('pre').wrap(function() {
return "<div class=\"code\"></div>";
});
$('div.code').each(function () {
var btnHtml = '<div class="d-clipboard"><button type="button" class="btn btn-outline-info btn-sm btn-clipboard" title="Copy to clipboard">Copy</button></div>'
$(this).before(btnHtml)
$('.btn-clipboard')
.tooltip()
.on('mouseleave', function () {
$(this).tooltip('hide')
});
});
}
var clipboard = new ClipboardJS('.btn-clipboard', {
target: function (trigger) {
return trigger.parentNode.nextElementSibling
}
});
clipboard.on('success', function (e) {
$(e.trigger)
.attr('title', 'Copied!')
.tooltip('_fixTitle')
.tooltip('show')
.attr('title', 'Copy to clipboard')
.tooltip('_fixTitle')
e.clearSelection();
});
clipboard.on('error', function (e) {
var modifierKey = /mac/i.test(navigator.userAgent) ? '\u2318' : 'Ctrl-'
var fallbackMsg = 'Press ' + modifierKey + 'C to copy'
$(e.trigger)
.attr('title', fallbackMsg)
.tooltip('_fixTitle')
.tooltip('show')
.attr('title', 'Copy to clipboard')
.tooltip('_fixTitle');
});
// ----- Nav & Copyright ------------------
$.ajax( {
url: './navbar.htm', type: 'get',
success: function(content) {
$("#nav-links").html( content );
$("#nav-readme").addClass("active");
}
} );
$.ajax( {
url: './copyright.htm', type: 'get',
success: function(content) {
$("#copyright").html( content );
}
} );
});
</script>
</body>
</html>