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
/
index.html
173 lines (149 loc) · 9.22 KB
/
index.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
<!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">
<meta name="color-scheme" content="light dark">
<link rel="stylesheet" href="./dist/bootstrap-dark.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/fontawesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/solid.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/brands.min.css">
<title>vinorodrigues/bootstrap-dark</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-5 mb-5">
<div class="row"><div class="col-md-6">
<h2>README First</h2>
<ul>
<li>Go ahead, read the <a href="readme.html">README.md</a> first</li>
<li>Then read the code at Github<br>
<iframe src="https://ghbtns.com/github-btn.html?user=vinorodrigues&repo=bootstrap-dark&type=fork&count=false" frameborder="0" scrolling="0" width="53px" height="20px"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=vinorodrigues&repo=bootstrap-dark&type=star&count=true" frameborder="0" scrolling="0" width="110px" height="20px"></iframe>
</li>
</ul>
<hr>
</div><div class="col-md-6">
<h2>About your browser</h2>
<span id="the-dark-side">Oops, JavaScript and/or jQuery not working.</span>
<hr>
</div></div><div class="row"><div class="col-md-6">
<h2>Test the variants</h2>
<table class="table table-hover table-striped">
<tr><td><a href="test-night.html">Bootstrap-Night</a></td>
<td>Toggle between two CSS files<br>
<i class="fa fa-moon text-success" aria-hidden="true" title="Browser Dark Mode Support" data-toggle="tooltip"></i>
<i class="fa fa-toggle-on text-success" aria-hidden="true" title="User Toggle Switch" data-toggle="tooltip"></i>
<i class="fa fa-user-slash text-warning" aria-hidden="true" title="No persistance layer" data-toggle="tooltip"></i></td></tr>
<tr><td><a href="test-nightfall.html">Bootstrap-Nightfall</a></td>
<td>Toggle dark mode on & off using a Δ CSS<br>
<i class="fa fa-moon text-success" aria-hidden="true" title="Browser Dark Mode Support" data-toggle="tooltip"></i>
<i class="fa fa-toggle-on text-success" aria-hidden="true" title="User Toggle Switch" data-toggle="tooltip"></i>
<i class="fa fa-user-slash text-warning" aria-hidden="true" title="No persistance layer" data-toggle="tooltip"></i>
<i class="fa fa-sun text-danger" aria-hidden="true" title="Has FOUC-like (Flash of Unstyled Content) issues" data-toggle="tooltip"></i></td></tr>
<tr><td><a href="test-nightshade.html">Bootstrap-Nightshade</a></td>
<td>Dark mode toggle & store using a <code><html></code> tag class<br>
<i class="fa fa-moon text-warning" aria-hidden="true" title="Only Initial Browser Dark Mode Support" data-toggle="tooltip"></i>
<i class="fa fa-toggle-on text-success" aria-hidden="true" title="User Toggle Switch" data-toggle="tooltip"></i>
<i class="fa fa-database text-success" aria-hidden="true" title="Stores User Selection" data-toggle="tooltip"></i>
<i class="fa fa-sun text-danger" aria-hidden="true" title="Has FOUC-like (Flash of Unstyled Content) issues" data-toggle="tooltip"></i></td></tr>
<tr><td><a href="test-dark.html">Bootstrap-Dark</a></td>
<td>Automated by browser only<br>
<i class="fa fa-moon text-success" aria-hidden="true" title="Browser Dark Mode Support" data-toggle="tooltip"></i></td></tr>
</table>
<p><small>Also try <a href="test-unlit.html">Bootstrap-Unlit</a> <i>(Same as <b>Bootstrap-Dark</b> ... but with dark scheme as default/fallback)</i>.</small></p>
<hr>
</div><div class="col-md-6">
<h2>Test the theme</h2>
<p class="text-muted">Try a few popular kitchen-sink pages with the Night theme.</p>
<ul>
<li><a href="test-1.html">Test 1</a> - <i class="text-muted">from</i> <a href="https://github.com/thomaspark/bootswatch" class="text-info"><i class="fab fa-github"></i> thomaspark/bootswatch</a> (<i class="fa fa-toggle-on" aria-hidden="true"></i>)</li>
<li><a href="test-2.html">Test 2</a> - <i class="text-muted">from</i> <a href="https://github.com/HackerThemes/theme-kit" class="text-info"><i class="fab fa-github"></i> HackerThemes/theme-kit</a></li>
<li><a href="test-3.html">Test 3</a> - <i class="text-muted">from</i> <a href="https://github.com/juzraai/bootstrap4-test-page" class="text-info"><i class="fab fa-github"></i> juzraai/bootstrap4-test-page</a></li>
<li><a href="test-4.html">Test 4</a> - <i class="text-muted">from</i> <a href="https://github.com/csbarker/bootstrap-4-kitchen-sink" class="text-info"><i class="fab fa-github"></i> csbarker/bootstrap-4-kitchen-sink</a></li>
<li><a href="test-5.html">Test 5</a> - <i class="text-muted">from</i> <a href="https://codepen.io/ycohio/pen/pXRLrO" class="text-info"><i class="fab fa-codepen"></i> ycohio/pen/pXRLrO</a></li>
<li><a href="test-6.html">Test 6</a> - <i class="text-muted">from</i> <a href="https://codepen.io/JacobLett/pen/KaMoEm" class="text-info"><i class="fab fa-codepen"></i> JacobLett/pen/KaMoEm</a></li>
</ul>
<hr>
<h2>Learn some more..</h2>
<ul>
<li><a href="test-images.html">..about dark mode images</a></li>
</ul>
<hr>
</div></div>
</div>
</main>
<footer id="copyright" class="text-center">
<small class="text-muted">© 2020</small>
</footer>
<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>
<script>
$(document).ready(function() {
// only works if jQuery loaded
$('[data-toggle="tooltip"]').tooltip();
// ----------------------------------------
function injectBrowserSupportsInfo() {
// Show information on `prefers-color-scheme` media query
var supports = [];
if (!window.matchMedia) {
supports.push( "does not support the <code>matchMedia</code> function" );
} else {
supports.push( "supports the <code>matchMedia</code> function" );
if (window.matchMedia("(prefers-color-scheme: no-preference)").matches)
supports.push( "and prefers a <i class=\"fa fa-poop\"></i> <b>no-preference</b> color scheme" );
if (window.matchMedia("(prefers-color-scheme: light)").matches)
supports.push( "and prefers a <i class=\"fa fa-sun\"></i> <b>light</b> color scheme" );
if (window.matchMedia("(prefers-color-scheme: dark)").matches)
supports.push( "and prefers a <i class=\"fa fa-moon\"></i> <b>dark</b> color scheme" );
if (supports.length <= 1) {
supports.push( "but does not set the <code>prefers-color-scheme</code> media query" );
supports.push( "so will <b><i><u>not</u></i></b> support dark-mode" );
} else {
supports.push( "so will support dark-mode" );
}
}
if (supports.length > 0) {
var htmltext = "<ul>";
supports.forEach(function(entry) { htmltext += "<li>" + entry + "</li>"; });
htmltext += "</ul>";
// console.log( htmltext );
$("#the-dark-side").html( htmltext );
}
}
injectBrowserSupportsInfo(); // Update on first load.
if (window.matchMedia) window.matchMedia("(prefers-color-scheme: dark)").addListener( injectBrowserSupportsInfo ); // and every time it changes
// ----- Nav & Copyright ------------------
$.ajax( {
url: './navbar.htm', type: 'get',
success: function(content) {
$("#nav-links").html( content );
$("#nav-home").addClass("active");
}
} );
$.ajax( {
url: './copyright.htm', type: 'get',
success: function(content) {
$("#copyright").html( content );
}
} );
});
</script>
</body>
</html>