|
45 | 45 | nav.app-nav li ul {
|
46 | 46 | min-width: 100px;
|
47 | 47 | }
|
48 |
| - |
| 48 | + </style> |
| 49 | + <style> |
49 | 50 | #carbonads {
|
50 | 51 | box-shadow: none !important;
|
51 | 52 | width: auto !important;
|
52 | 53 | }
|
53 | 54 | </style>
|
54 | 55 | </head>
|
55 |
| - |
56 | 56 | <body>
|
57 | 57 | <div id="app">Loading ...</div>
|
58 | 58 | <script>
|
59 | 59 | window.$docsify = {
|
60 |
| - alias: { |
61 |
| - '.*?/awesome': |
62 |
| - 'https://raw.githubusercontent.com/docsifyjs/awesome-docsify/master/README.md', |
63 |
| - '.*?/changelog': |
64 |
| - 'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG.md', |
65 |
| - '/.*/_navbar.md': '/_navbar.md', |
66 |
| - '/zh-cn/(.*)': |
67 |
| - 'https://raw.githubusercontent.com/docsifyjs/docs-zh/master/$1', |
68 |
| - '/de-de/(.*)': |
69 |
| - 'https://raw.githubusercontent.com/docsifyjs/docs-de/master/$1', |
70 |
| - '/ru-ru/(.*)': |
71 |
| - 'https://raw.githubusercontent.com/docsifyjs/docs-ru/master/$1', |
72 |
| - '/es/(.*)': |
73 |
| - 'https://raw.githubusercontent.com/docsifyjs/docs-es/master/$1', |
74 |
| - '/write-a-plugin': |
75 |
| - 'https://raw.githubusercontent.com/docsifyjs/docsify/master/docs/write-a-plugin.md', |
76 |
| - }, |
| 60 | + name: "docsify", |
| 61 | + // repo: 'docsifyjs/docsify', |
77 | 62 | auto2top: true,
|
78 | 63 | coverpage: true,
|
79 | 64 | executeScript: true,
|
80 |
| - loadSidebar: true, |
| 65 | + // Navigation |
| 66 | + alias: { |
| 67 | + ".*?/awesome": |
| 68 | + "https://raw.githubusercontent.com/docsifyjs/awesome-docsify/master/README.md", |
| 69 | + ".*?/changelog": |
| 70 | + "https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG.md", |
| 71 | + "/.*/_navbar.md": "/_navbar.md", |
| 72 | + "/zh-cn/(.*)": |
| 73 | + "https://raw.githubusercontent.com/docsifyjs/docs-zh/master/$1", |
| 74 | + "/de-de/(.*)": |
| 75 | + "https://raw.githubusercontent.com/docsifyjs/docs-de/master/$1", |
| 76 | + "/ru-ru/(.*)": |
| 77 | + "https://raw.githubusercontent.com/docsifyjs/docs-ru/master/$1", |
| 78 | + "/es/(.*)": |
| 79 | + "https://raw.githubusercontent.com/docsifyjs/docs-es/master/$1", |
| 80 | + "/write-a-plugin": |
| 81 | + "https://raw.githubusercontent.com/docsifyjs/docsify/master/docs/write-a-plugin.md" |
| 82 | + }, |
81 | 83 | loadNavbar: true,
|
82 |
| - mergeNavbar: true, |
| 84 | + loadSidebar: true, |
83 | 85 | maxLevel: 4,
|
| 86 | + mergeNavbar: true, |
84 | 87 | subMaxLevel: 2,
|
85 |
| - ga: 'UA-106147152-1', |
86 |
| - matomo: { |
87 |
| - host: '//matomo.thunderwave.de', |
88 |
| - id: 6, |
89 |
| - }, |
90 |
| - name: 'docsify', |
91 |
| - search: { |
92 |
| - noData: { |
93 |
| - '/de-de/': 'Keine Ergebnisse!', |
94 |
| - '/zh-cn/': '沑ζη»ζ!', |
95 |
| - '/': 'No results!', |
96 |
| - }, |
97 |
| - paths: 'auto', |
98 |
| - placeholder: { |
99 |
| - '/de-de/': 'Suche', |
100 |
| - '/zh-cn/': 'ζη΄’', |
101 |
| - '/': 'Search', |
102 |
| - }, |
103 |
| - }, |
| 88 | + // Vue |
| 89 | + |
104 | 90 | vueComponents: {
|
105 |
| - 'button-counter': { |
106 |
| - template: ` |
107 |
| - <button @click="count += 1"> |
108 |
| - You clicked me {{ count }} times |
109 |
| - </button> |
110 |
| - `, |
| 91 | + "button-counter": { |
| 92 | + template: |
| 93 | + '<button @click="count += 1">You clicked me {{ count }} times</button>', |
111 | 94 | data() {
|
112 | 95 | return {
|
113 |
| - count: 0, |
| 96 | + count: 0 |
114 | 97 | };
|
115 |
| - }, |
116 |
| - }, |
| 98 | + } |
| 99 | + } |
117 | 100 | },
|
118 | 101 | vueGlobalOptions: {
|
119 | 102 | data() {
|
120 | 103 | return {
|
121 | 104 | count: 0,
|
122 |
| - message: 'Hello, World!', |
| 105 | + message: "Hello, World!", |
123 | 106 | // Fake API response
|
124 | 107 | images: [
|
125 |
| - { title: 'Image 1', url: 'https://picsum.photos/150?random=1' }, |
126 |
| - { title: 'Image 2', url: 'https://picsum.photos/150?random=2' }, |
127 |
| - { title: 'Image 3', url: 'https://picsum.photos/150?random=3' }, |
128 |
| - ], |
| 108 | + { title: "Image 1", url: "https://picsum.photos/150?random=1" }, |
| 109 | + { title: "Image 2", url: "https://picsum.photos/150?random=2" }, |
| 110 | + { title: "Image 3", url: "https://picsum.photos/150?random=3" } |
| 111 | + ] |
129 | 112 | };
|
130 | 113 | },
|
131 | 114 | computed: {
|
|
134 | 117 | const hours = date.getHours();
|
135 | 118 |
|
136 | 119 | if (hours < 12) {
|
137 |
| - return 'morning'; |
| 120 | + return "morning"; |
138 | 121 | } else if (hours < 18) {
|
139 |
| - return 'afternoon'; |
| 122 | + return "afternoon"; |
140 | 123 | } else {
|
141 |
| - return 'evening'; |
| 124 | + return "evening"; |
142 | 125 | }
|
143 |
| - }, |
| 126 | + } |
144 | 127 | },
|
145 | 128 | methods: {
|
146 | 129 | hello: function() {
|
147 | 130 | alert(this.message);
|
148 |
| - }, |
149 |
| - }, |
| 131 | + } |
| 132 | + } |
150 | 133 | },
|
151 | 134 | vueMounts: {
|
152 |
| - '#counter': { |
| 135 | + "#counter": { |
153 | 136 | data() {
|
154 | 137 | return {
|
155 |
| - count: 0, |
| 138 | + count: 0 |
156 | 139 | };
|
157 |
| - }, |
| 140 | + } |
| 141 | + } |
| 142 | + }, |
| 143 | + |
| 144 | + // Plugins (docsify) |
| 145 | + ga: "UA-106147152-1", |
| 146 | + matomo: { |
| 147 | + host: "//matomo.thunderwave.de", |
| 148 | + id: 6 |
| 149 | + }, |
| 150 | + search: { |
| 151 | + noData: { |
| 152 | + "/de-de/": "Keine Ergebnisse!", |
| 153 | + "/zh-cn/": "沑ζη»ζ!", |
| 154 | + "/": "No results!" |
158 | 155 | },
|
| 156 | + paths: "auto", |
| 157 | + placeholder: { |
| 158 | + "/de-de/": "Suche", |
| 159 | + "/zh-cn/": "ζη΄’", |
| 160 | + "/": "Search" |
| 161 | + } |
159 | 162 | },
|
| 163 | + // Plugins (custom) |
160 | 164 | plugins: [
|
| 165 | + // Edit Document |
161 | 166 | function(hook, vm) {
|
162 | 167 | hook.beforeEach(function(html) {
|
| 168 | + var url = |
| 169 | + "https://github.com/docsifyjs/docsify/blob/master/docs/" + |
| 170 | + vm.route.file; |
| 171 | + |
163 | 172 | if (/githubusercontent\.com/.test(vm.route.file)) {
|
164 | 173 | url = vm.route.file
|
165 |
| - .replace('raw.githubusercontent.com', 'github.com') |
166 |
| - .replace(/\/master/, '/blob/master'); |
| 174 | + .replace("raw.githubusercontent.com", "github.com") |
| 175 | + .replace(/\/master/, "/blob/master"); |
167 | 176 | } else if (/jsdelivr\.net/.test(vm.route.file)) {
|
168 | 177 | url = vm.route.file
|
169 |
| - .replace('cdn.jsdelivr.net/gh', 'github.com') |
170 |
| - .replace('@master', '/blob/master'); |
171 |
| - } else { |
172 |
| - url = |
173 |
| - 'https://github.com/docsifyjs/docsify/blob/master/docs/' + |
174 |
| - vm.route.file; |
| 178 | + .replace("cdn.jsdelivr.net/gh", "github.com") |
| 179 | + .replace("@master", "/blob/master"); |
175 | 180 | }
|
176 |
| - var editHtml = '[:memo: Edit Document](' + url + ')\n'; |
177 |
| - return ( |
178 |
| - editHtml + |
179 |
| - html + |
180 |
| - '\n\n----\n\n' + |
181 |
| - '<a href="https://docsify.js.org" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Powered by docsify</a>' |
182 |
| - ); |
183 |
| - }), |
184 |
| - hook.afterEach(function(html) { |
185 |
| - if (vm.route.path === '/') { |
186 |
| - return html; |
187 |
| - } |
188 |
| - return `${html}<br/> <i>Vercel</i> has given us a Pro account <br/> <a href="https://vercel.com/?utm_source=docsifyjsdocs" target="_blank"><img src="_media/vercel_logo.svg" alt="Vercel" width="100" height="64"></a>`; |
189 |
| - }); |
190 |
| - }, |
191 |
| - ], |
| 181 | + |
| 182 | + return [ |
| 183 | + html, |
| 184 | + '<div style="text-align: right;">', |
| 185 | + "[:memo: Edit Document](" + url + ")", |
| 186 | + "</div>" |
| 187 | + ].join("\n\n"); |
| 188 | + }); |
| 189 | + } |
| 190 | + ] |
192 | 191 | };
|
193 | 192 | </script>
|
194 | 193 | <script src="//cdn.jsdelivr.net/npm/docsify@4/lib/docsify.min.js"></script>
|
195 | 194 | <script src="//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/search.min.js"></script>
|
| 195 | + <script src="//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/front-matter.js"></script> |
196 | 196 | <script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-bash.min.js"></script>
|
197 | 197 | <script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-markdown.min.js"></script>
|
198 | 198 | <script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-nginx.min.js"></script>
|
199 | 199 | <script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-php.min.js"></script>
|
| 200 | + <script src="//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/ga.min.js"></script> |
| 201 | + <script src="//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/matomo.min.js"></script> |
200 | 202 | <script src="//cdn.jsdelivr.net/npm/docsify-plugin-carbon@1/index.min.js"></script>
|
201 | 203 | <script>
|
202 |
| - (function() { |
203 |
| - function loadJS(src, attrs) { |
204 |
| - document.write( |
205 |
| - '<script src="' + src + '" ' + (attrs || '') + '><\/script>' |
206 |
| - ); |
207 |
| - } |
208 |
| - |
209 |
| - // Public site only |
210 |
| - if (/docsify/.test(location.host)) { |
211 |
| - ((window.gitter = {}).chat = {}).options = { |
212 |
| - room: 'docsifyjs/Lobby', |
213 |
| - }; |
214 |
| - |
215 |
| - loadJS('//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/ga.min.js'); |
216 |
| - loadJS('//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/matomo.min.js'); |
217 |
| - loadJS('//sidecar.gitter.im/dist/sidecar.v1.js', 'async defer'); |
218 |
| - } |
219 |
| - })(); |
| 204 | + ((window.gitter = {}).chat = {}).options = { |
| 205 | + room: "docsifyjs/Lobby" |
| 206 | + }; |
220 | 207 | </script>
|
| 208 | + <script src="//sidecar.gitter.im/dist/sidecar.v1.js" async defer></script> |
221 | 209 | <script src="//cdn.jsdelivr.net/npm/vue@2/dist/vue.min.js"></script>
|
222 |
| - <!-- <script src="//cdn.jsdelivr.net/npm/vue@3/dist/vue.global.prod.js"></script> --> |
223 | 210 | </body>
|
224 | 211 | </html>
|
0 commit comments