-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
70 lines (66 loc) · 2.01 KB
/
index.html
File metadata and controls
70 lines (66 loc) · 2.01 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="A collection of pythonic idioms with definitions and examples. By SlimShadyIAm.">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple-dark.css">
<style>
.tag {
display: inline-block;
margin: 0 5px;
font-size: 14px;
background-color: var(--sidebar-name-color);
padding: 2px 10px;
border-radius: 5px;
line-height: 2em;
}
</style>
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
name: 'How To Zen Your Python',
repo: ''
}
</script>
<!-- Docsify v4 -->
<script>
window.$docsify = {
loadSidebar: true,
name: 'How To Zen Your Python',
subMaxLevel: 2,
plugins: [
function(hook, vm) {
hook.beforeEach(function(content) {
var firstLine = content.split('\n')[0]
var matches = [];
var pattern = /\[(.*?)\]/g;
var match;
while ((match = pattern.exec(firstLine)) != null) {
matches.push(match[1]);
}
if (matches.length == 0) {
return content
}
var originalText = `[${matches}]`
matches = matches[0].split(",")
var tagText = "\n Tags: "
matches.forEach(match => {
tagText += `<span class="tag">${match.trim()}</span>`
})
content = content.replace(originalText, tagText)
return content
});
}
]
}
</script>
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
<script src="//unpkg.com/prismjs/components/prism-java.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-python.min.js"></script>
</body>
</html>