|
47 | 47 | <link rel="icon" href="./c.svg" />
|
48 | 48 | <title>Linux 网络编程与加密</title>
|
49 | 49 | <link rel="stylesheet" href="./vue.css" />
|
50 |
| - <link rel="stylesheet" href="./fonts.googleapis.css" /> |
| 50 | + <!-- <link rel="stylesheet" href="./fonts.googleapis.css" /> --> |
51 | 51 | <!-- <link
|
52 | 52 | rel="stylesheet"
|
53 | 53 | href="//cdn.jsdelivr.net/npm/docsify/lib/themes/vue.css"
|
|
78 | 78 | <div id="app">加载中...</div>
|
79 | 79 | <script>
|
80 | 80 | window.$docsify = {
|
81 |
| - name: 'Linux 网络编程与加密', |
| 81 | + name: "Linux 网络编程与加密", |
82 | 82 | search: {
|
83 |
| - placeholder: '搜索...', |
| 83 | + placeholder: "搜索...", |
84 | 84 | },
|
85 | 85 | loadSidebar: true,
|
86 | 86 | auto2top: true,
|
87 |
| - logo: './c.png', |
| 87 | + logo: "./c.png", |
88 | 88 | topMargin: 90,
|
89 | 89 | notFoundPage: true,
|
90 | 90 | subMaxLevel: 4,
|
91 |
| - themeColor: 'rgb(85, 85, 85)', |
92 |
| - repo: 'https://github.com/ArchLinuxStudio/LinuxNetworkProgrammingAndEncryption', |
93 |
| - formatUpdated: '{YYYY}-{MM}-{DD}', |
| 91 | + themeColor: "rgb(85, 85, 85)", |
| 92 | + repo: "https://github.com/ArchLinuxStudio/LinuxNetworkProgrammingAndEncryption", |
| 93 | + formatUpdated: "{YYYY}-{MM}-{DD}", |
94 | 94 | pagination: {
|
95 |
| - previousText: '上一节', |
96 |
| - nextText: '下一节', |
| 95 | + previousText: "上一节", |
| 96 | + nextText: "下一节", |
97 | 97 | crossChapter: true,
|
98 | 98 | crossChapterText: true,
|
99 | 99 | },
|
100 | 100 | plugins: [
|
101 | 101 | function (hook, vm) {
|
102 | 102 | hook.beforeEach(function (html) {
|
103 | 103 | let edit_url =
|
104 |
| - 'https://github.com/ArchLinuxStudio/LinuxNetworkProgrammingAndEncryption/blob/master/docs/' + |
| 104 | + "https://github.com/ArchLinuxStudio/LinuxNetworkProgrammingAndEncryption/blob/master/docs/" + |
105 | 105 | vm.route.file;
|
106 |
| - let editHtml = '[📝 编辑本文](' + edit_url + ')\n'; |
| 106 | + let editHtml = "[📝 编辑本文](" + edit_url + ")\n"; |
107 | 107 |
|
108 |
| - let client_id = 'e1f0ea79ea66351131ae'; |
109 |
| - let client_secret = '7b8509854c085a1100c8cd0b2ae958264be658fc'; |
| 108 | + let client_id = "e1f0ea79ea66351131ae"; |
| 109 | + let client_secret = "7b8509854c085a1100c8cd0b2ae958264be658fc"; |
110 | 110 |
|
111 | 111 | let date_url =
|
112 |
| - 'https://api.github.com/repos/ArchLinuxStudio/LinuxNetworkProgrammingAndEncryption/commits?per_page=1&path=docs/' + |
| 112 | + "https://api.github.com/repos/ArchLinuxStudio/LinuxNetworkProgrammingAndEncryption/commits?per_page=1&path=docs/" + |
113 | 113 | vm.config.basePath +
|
114 | 114 | encodeURIComponent(vm.route.file);
|
115 | 115 |
|
|
122 | 122 | return response.json();
|
123 | 123 | })
|
124 | 124 | .then((commits) => {
|
125 |
| - let modified = commits[0]['commit']['committer'][ |
126 |
| - 'date' |
| 125 | + let modified = commits[0]["commit"]["committer"][ |
| 126 | + "date" |
127 | 127 | ].slice(0, 10);
|
128 |
| - document.getElementById('last-modified').textContent = |
129 |
| - '更新日期: ' + modified; |
| 128 | + document.getElementById("last-modified").textContent = |
| 129 | + "更新日期: " + modified; |
130 | 130 | });
|
131 | 131 |
|
132 | 132 | return (
|
133 | 133 | '<span id="last-modified">更新日期: 获取中</span>' +
|
134 |
| - '\n' + |
| 134 | + "\n" + |
135 | 135 | html +
|
136 |
| - '\n----\n' + |
| 136 | + "\n----\n" + |
137 | 137 | editHtml
|
138 | 138 | );
|
139 | 139 | });
|
140 | 140 |
|
141 | 141 | hook.mounted(function () {
|
142 | 142 | // 添加网站运行时间
|
143 | 143 | let dom = Docsify.dom;
|
144 |
| - let runTimeNode = dom.create('div'); |
145 |
| - runTimeNode.className = 'runtime'; |
| 144 | + let runTimeNode = dom.create("div"); |
| 145 | + runTimeNode.className = "runtime"; |
146 | 146 | runTimeNode.style =
|
147 |
| - 'color: #8590a6;max-width: 80%;margin: 0 auto 20px;padding: 0 15px 0 15px;'; |
148 |
| - dom.appendTo(dom.find('.content'), runTimeNode); |
| 147 | + "color: #8590a6;max-width: 80%;margin: 0 auto 20px;padding: 0 15px 0 15px;"; |
| 148 | + dom.appendTo(dom.find(".content"), runTimeNode); |
149 | 149 | });
|
150 | 150 | },
|
151 | 151 | ],
|
|
163 | 163 | <script>
|
164 | 164 | addBackToTop({
|
165 | 165 | diameter: 56,
|
166 |
| - backgroundColor: 'rgb(129, 127, 127)', |
167 |
| - textColor: '#fff', |
| 166 | + backgroundColor: "rgb(129, 127, 127)", |
| 167 | + textColor: "#fff", |
168 | 168 | });
|
169 | 169 | </script>
|
170 | 170 |
|
171 | 171 | <script>
|
172 |
| - let client_id = 'e1f0ea79ea66351131ae'; |
173 |
| - let client_secret = '7b8509854c085a1100c8cd0b2ae958264be658fc'; |
| 172 | + let client_id = "e1f0ea79ea66351131ae"; |
| 173 | + let client_secret = "7b8509854c085a1100c8cd0b2ae958264be658fc"; |
174 | 174 |
|
175 | 175 | let props = {
|
176 | 176 | clientID: client_id,
|
177 | 177 | clientSecret: client_secret,
|
178 |
| - repo: 'CProgrammingEssenceComments', |
179 |
| - owner: 'ArchLinuxStudio', |
180 |
| - admin: ['ryosukeeeeee'], |
| 178 | + repo: "CProgrammingEssenceComments", |
| 179 | + owner: "ArchLinuxStudio", |
| 180 | + admin: ["ryosukeeeeee"], |
181 | 181 | // facebook-like distraction free mode
|
182 | 182 | distractionFreeMode: false,
|
183 |
| - id: decodeURI(location.hash.split('?')[0]), |
| 183 | + id: decodeURI(location.hash.split("?")[0]), |
184 | 184 | proxy:
|
185 |
| - 'https://ifuckgfw.com:7788/https://github.com/login/oauth/access_token', |
| 185 | + "https://ifuckgfw.com:7788/https://github.com/login/oauth/access_token", |
186 | 186 | };
|
187 | 187 | let gitalk = new Gitalk(props);
|
188 | 188 | // 哈希路由切换时 重新加载Gitalk
|
189 |
| - window.addEventListener('hashchange', onHashChange); |
| 189 | + window.addEventListener("hashchange", onHashChange); |
190 | 190 | function onHashChange() {
|
191 |
| - props.id = decodeURI(location.hash.split('?')[0]); //如果不切分,在docsify里面的各个段落都会生成新的评论issue |
| 191 | + props.id = decodeURI(location.hash.split("?")[0]); //如果不切分,在docsify里面的各个段落都会生成新的评论issue |
192 | 192 | }
|
193 | 193 | </script>
|
194 | 194 | <script>
|
195 | 195 | function change_search_plugin_order() {
|
196 |
| - let search_plugin = document.getElementsByClassName('search')[0]; |
197 |
| - let app_name = document.getElementsByClassName('app-name')[0]; |
| 196 | + let search_plugin = document.getElementsByClassName("search")[0]; |
| 197 | + let app_name = document.getElementsByClassName("app-name")[0]; |
198 | 198 | search_plugin.parentNode.insertBefore(app_name, search_plugin);
|
199 | 199 | }
|
200 | 200 | setTimeout(change_search_plugin_order, 1);
|
|
235 | 235 | (diff - diffDays * days - diffHours * hours - diffMinutes * minutes) /
|
236 | 236 | seconds
|
237 | 237 | );
|
238 |
| - Docsify.dom.find('.runtime').innerHTML = |
239 |
| - 'Linux Network Programming and Encryption已运行 ' + |
| 238 | + Docsify.dom.find(".runtime").innerHTML = |
| 239 | + "Linux Network Programming and Encryption已运行 " + |
240 | 240 | diffDays +
|
241 |
| - ' 天 ' + |
| 241 | + " 天 " + |
242 | 242 | diffHours +
|
243 |
| - ' 小时 ' + |
| 243 | + " 小时 " + |
244 | 244 | diffMinutes +
|
245 |
| - ' 分 ' + |
| 245 | + " 分 " + |
246 | 246 | diffSeconds +
|
247 |
| - ' 秒'; |
| 247 | + " 秒"; |
248 | 248 | }
|
249 | 249 | // 先让网页加载完,否则 Docsify.dom.find('.runtime') == null
|
250 | 250 | setTimeout(siteTime, 500);
|
|
0 commit comments