diff --git a/book.json b/book.json index 62681ca..5933ab4 100644 --- a/book.json +++ b/book.json @@ -1,91 +1,91 @@ { - "author": "Translated by Peng Hailin, laxers@gmail.com", - "description": "这是一本 CCNA 教程", - "generator": "xfoss.com 网站", - "links": { - "sharing": { - "weibo": null - }, - "sidebar": { - "60天通过CCNA考试": "https://ccna60d.xfoss.com/" - } + "author": "Translated by Peng Hailin, laxers@gmail.com", + "description": "这是一本 CCNA 教程", + "generator": "xfoss.com 网站", + "links": { + "sharing": { + "weibo": null }, - "pdf": { - "fontSize": 12, - "margin": { - "bottom": 12, - "left": 16, - "right": 12, - "top": 18 - }, - "paperSize": "a4" - }, - "plugins" : [ - "highlight-code", - "fontsettings", - "theme-comscore", - "include-codeblock@^3.0.2", - "tbfed-pagefooter@^0.0.1", - "sectionx@^3.1.0", - "sitemap", - "code", - "-lunr", - "-search", - "-sharing", - "-fontsettings", - "cuav-chapters", - "heading-anchors", - "splitter", - "theme-door", - "search-pro-fixed" - ], - "variables": { - "doorTheme": { - "nav": [ - { - "url": "https://rust-lang.xfoss.com", - "target": "_blank", - "name": "学习 Rust 编程语言 · ⚙️" - }, - { - "url": "https://java-lang.xfoss.com", - "target": "_blank", - "name": "学习 Java 编程语言 · ☕" - }, - { - "url": "https://ts-lang.xfoss.com", - "target": "_blank", - "name": "学习 TypeScript 语言 · 🖹" - }, - { - "url": "https://xfoss.com", - "target": "_blank", - "name": "捐助,donation · 💰" - } - ] - } - }, - "pluginsConfig": { - "doorTheme": { - "search-placeholder": "请输入关键字搜索", - "logo": "./images/computer-network-services.png", - "favicon": "./images/network-svgrepo-com.ico" - }, - "include-codeblock": { - "template": "ace", - "unindent": true, - "edit": true - }, - "tbfed-pagefooter": { - "copyright": "Copyleft @ ccna.xfoss.com 2022", - "modify_label": "该文件修订时间:", - "modify_format": "YYYY-MM-DD HH:mm:ss" - }, - "sectionx": { - "tag": "b" - }, - "sitemap": { - "hostname": "https://ccna.xfoss.com/" - } + "sidebar": { + "60天通过CCNA考试": "https://ccna60d.xfoss.com/" } + }, + "pdf": { + "fontSize": 12, + "margin": { + "bottom": 12, + "left": 16, + "right": 12, + "top": 18 + }, + "paperSize": "a4" + }, + "plugins": [ + "highlight-code", + "include-codeblock@^3.0.2", + "tbfed-pagefooter@^0.0.1", + "sectionx@^3.1.0", + "sitemap", + "code", + "page-toc-button", + "-lunr", + "-search", + "-sharing", + "cuav-chapters", + "add-js-css", + "heading-anchors", + "navigation", + "splitter", + "search-pro2" + ], + "pluginsConfig": { + "page-toc-button": { + "maxTocDepth": 2, + "minTocSize": 2 + }, + "fontsettings": { + "theme": "white", + "family": "sans", + "size": 2 + }, + "include-codeblock": { + "template": "ace", + "unindent": true, + "edit": false + }, + "tbfed-pagefooter": { + "copyright": "Copyleft @ ccna.xfoss.com 2022 - now", + "modify_label": "该文件修订时间:", + "modify_format": "YYYY-MM-DD HH:mm:ss" + }, + "sectionx": { + "tag": "b" + }, + "add-js-css": { + "css": [ "./custom-style.css" ] + }, + "navigation": { + "navigatorList": [ + { + "url": "https://rust-lang.xfoss.com", + "name": "学习 Rust 编程语言 · ⚙️" + }, + { + "url": "https://java-lang.xfoss.com", + "name": "学习 Java 编程语言 · ☕" + }, + { + "url": "https://ts-lang.xfoss.com", + "name": "学习 TypeScript 语言 · 🖹" + }, + { + "url": "https://xfoss.com", + "name": "捐助,donation · 💰" + } + ] + }, + "sitemap": { + "hostname": "https://ccna.xfoss.com/" + } + } } diff --git a/custom-style.css b/custom-style.css new file mode 100644 index 0000000..63b3b00 --- /dev/null +++ b/custom-style.css @@ -0,0 +1,53 @@ +div.book-header { + position: fixed; +} + +::-webkit-scrollbar { + width: 5px; +} + +::-webkit-scrollbar-track { + background-color: #e4e4e4; + border-radius: 100px; +} + +::-webkit-scrollbar-thumb { + box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); +} + +li.nav-item>a { + text-decoration: none; +} + +i.fa { + font-weight: bold; + color: #5f5f5f; +} + +.page-toc-menu { + background-color: #555555 !important; + color: #cccccc !important; + border-radius: 10px; +} + +@media only screen and (min-width: 1024px) { + div.book-header { + top: 30px; + } + .nav-list .nav-item a { + font-size: small !important; + } + .nav-list .nav-item a:hover { + color: #f59542 !important; + } +} + +@media only screen and (max-width: 1024px) { + ul.nav-list { + display: none; + } + + div.book-headr { + top: 5px; + } +} diff --git a/package-lock.json b/package-lock.json index cde185f..efa9633 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,20 +12,24 @@ "gitbook-plugin-ace": "^0.3.2", "gitbook-plugin-code": "^0.1.0", "gitbook-plugin-include-codeblock": "^3.2.3", - "gitbook-plugin-search-pro-fixed": "^1.0.1", "gitbook-plugin-sectionx": "^3.1.0", "gitbook-plugin-sitemap": "^1.2.0", "gitbook-plugin-splitter": "^0.0.8", - "gitbook-plugin-tbfed-pagefooter": "^0.0.1", - "gitbook-plugin-theme-door": "^1.0.2" + "gitbook-plugin-tbfed-pagefooter": "^0.0.1" }, "devDependencies": { + "gitbook-plugin-add-js-css": "^0.0.1", "gitbook-plugin-back-to-top-button": "^0.1.4", "gitbook-plugin-cuav-chapters": "^1.0.3", "gitbook-plugin-fontsettings": "^2.0.0", "gitbook-plugin-heading-anchors": "^1.0.3", "gitbook-plugin-highlight-code": "^1.0.0", + "gitbook-plugin-navigation": "^0.1.1", + "gitbook-plugin-page-toc-button": "^0.1.1", + "gitbook-plugin-search-pro2": "^1.0.2", + "gitbook-plugin-sharing": "^1.0.2", "gitbook-plugin-theme-comscore": "^0.0.3", + "gitbook-plugin-yh-changyan": "^1.0.0", "honkit": "^4.0.4" } }, @@ -1140,6 +1144,25 @@ "gitbook": ">=3.x.x" } }, + "node_modules/gitbook-plugin-add-js-css": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/gitbook-plugin-add-js-css/-/gitbook-plugin-add-js-css-0.0.1.tgz", + "integrity": "sha512-luUm9rYKF9KI6Wqh/jX+C1Aqo+e1XniE6IqKVoePY69qqKSudvN/CV5741r7yhsioM3hKCtvCDOeoemtBBRudg==", + "dev": true, + "dependencies": { + "lodash": "4.17.4", + "tmp": "0.0.28" + }, + "engines": { + "gitbook": ">2.x.x" + } + }, + "node_modules/gitbook-plugin-add-js-css/node_modules/lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha512-6X37Sq9KCpLSXEh8uM12AKYlviHPNNk4RxiGBn4cmKGJinbXBneWIV7iE/nXkM928O7ytHcHb6+X6Svl0f4hXg==", + "dev": true + }, "node_modules/gitbook-plugin-back-to-top-button": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/gitbook-plugin-back-to-top-button/-/gitbook-plugin-back-to-top-button-0.1.4.tgz", @@ -1246,6 +1269,24 @@ "gitbook": ">=3.0.0-pre.0" } }, + "node_modules/gitbook-plugin-navigation": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/gitbook-plugin-navigation/-/gitbook-plugin-navigation-0.1.1.tgz", + "integrity": "sha512-HrwZu24nOFbeFbz12FAZDFYkBhF14LsAmjHDcsKQhsr/kqfarzzGn0LuaoPeFyCWnvOUTuOvW5sNYyG0+LjsWg==", + "dev": true, + "engines": { + "gitbook": ">=2.4.3" + } + }, + "node_modules/gitbook-plugin-page-toc-button": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/gitbook-plugin-page-toc-button/-/gitbook-plugin-page-toc-button-0.1.1.tgz", + "integrity": "sha512-htlxoEWhPkKze4W8xaWJ6KmC95e706dEVH06dKQSmgMEXzfovtxW67PxDwy78f0JB4z1B/3ZkaEoFmbWazAMow==", + "dev": true, + "engines": { + "gitbook": ">=3.1.1" + } + }, "node_modules/gitbook-plugin-search": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/gitbook-plugin-search/-/gitbook-plugin-search-2.2.1.tgz", @@ -1255,10 +1296,11 @@ "gitbook": ">=3.0.0-pre.0" } }, - "node_modules/gitbook-plugin-search-pro-fixed": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gitbook-plugin-search-pro-fixed/-/gitbook-plugin-search-pro-fixed-1.0.1.tgz", - "integrity": "sha512-X6pBgfN54D3Ij+iF4cw44PZCdOvjnqboEoi0bsolEYPzcJOXFiiemxYt+rit95T8UbSaML38o8SCPzl9grM/zA==", + "node_modules/gitbook-plugin-search-pro2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/gitbook-plugin-search-pro2/-/gitbook-plugin-search-pro2-1.0.2.tgz", + "integrity": "sha512-1eeqVIToQnbjXxIpDPfd86vaZLWP43WKZCKzxqzWGaAQCgNb8obn7VX6Kw1xM3tdaHsOoe9m5+UeorxH60lpOA==", + "dev": true, "dependencies": { "html-entities": "1.2.0" }, @@ -1277,6 +1319,24 @@ "gitbook": ">=3.x.x" } }, + "node_modules/gitbook-plugin-sharing": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/gitbook-plugin-sharing/-/gitbook-plugin-sharing-1.0.2.tgz", + "integrity": "sha512-PdBmQdZWSgUYwpdqU/DpnfCcwHn8uhFT4aU0Tu+vipJxUDPW21KdXq+TOR36qlw/rz5NSVTYEzUnamW9G+q7aQ==", + "dev": true, + "dependencies": { + "lodash": "^3.10.1" + }, + "engines": { + "gitbook": ">=2.4.0" + } + }, + "node_modules/gitbook-plugin-sharing/node_modules/lodash": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha512-9mDDwqVIma6OZX79ZlDACZl8sBm0TEnkf99zV3iMA4GzkIT/9hiqP5mY0HoT1iNLCrKc/R1HByV+yJfRWVJryQ==", + "dev": true + }, "node_modules/gitbook-plugin-sitemap": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gitbook-plugin-sitemap/-/gitbook-plugin-sitemap-1.2.0.tgz", @@ -1316,12 +1376,13 @@ "gitbook": "*" } }, - "node_modules/gitbook-plugin-theme-door": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/gitbook-plugin-theme-door/-/gitbook-plugin-theme-door-1.0.2.tgz", - "integrity": "sha512-8UjmoogIV6vRQZrs2RnJHV1222nyiS1ck0WtLCNSFi65Xv0FnT4C4FAe55QjG0qdAak6HnXAiGTny2L1ecC13Q==", + "node_modules/gitbook-plugin-yh-changyan": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gitbook-plugin-yh-changyan/-/gitbook-plugin-yh-changyan-1.0.0.tgz", + "integrity": "sha512-tq1YdYKwVsXv3HQYi7ImAJwaRL6g/ERhkH1fScUbdLOKY5IL7wq6ljAd/e8SErrW6EDlTxJFbdNSiejRxLh+MQ==", + "dev": true, "engines": { - "gitbook": ">=3.2.3" + "gitbook": "*" } }, "node_modules/github-slugid": { @@ -1516,6 +1577,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.0.tgz", "integrity": "sha512-0md7tlUUyb0BEQGsZzbqty1CgV6RESOoxdivt94AScqhBhYsPCCQCOaGvur/RospMjYpPJ7iFe3zw4Bu4SVA8g==", + "dev": true, "engines": [ "node >= 0.4.0" ] @@ -4348,6 +4410,24 @@ "html-escape": "^1.0.2" } }, + "gitbook-plugin-add-js-css": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/gitbook-plugin-add-js-css/-/gitbook-plugin-add-js-css-0.0.1.tgz", + "integrity": "sha512-luUm9rYKF9KI6Wqh/jX+C1Aqo+e1XniE6IqKVoePY69qqKSudvN/CV5741r7yhsioM3hKCtvCDOeoemtBBRudg==", + "dev": true, + "requires": { + "lodash": "4.17.4", + "tmp": "0.0.28" + }, + "dependencies": { + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha512-6X37Sq9KCpLSXEh8uM12AKYlviHPNNk4RxiGBn4cmKGJinbXBneWIV7iE/nXkM928O7ytHcHb6+X6Svl0f4hXg==", + "dev": true + } + } + }, "gitbook-plugin-back-to-top-button": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/gitbook-plugin-back-to-top-button/-/gitbook-plugin-back-to-top-button-0.1.4.tgz", @@ -4422,16 +4502,29 @@ "lunr": "0.5.12" } }, + "gitbook-plugin-navigation": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/gitbook-plugin-navigation/-/gitbook-plugin-navigation-0.1.1.tgz", + "integrity": "sha512-HrwZu24nOFbeFbz12FAZDFYkBhF14LsAmjHDcsKQhsr/kqfarzzGn0LuaoPeFyCWnvOUTuOvW5sNYyG0+LjsWg==", + "dev": true + }, + "gitbook-plugin-page-toc-button": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/gitbook-plugin-page-toc-button/-/gitbook-plugin-page-toc-button-0.1.1.tgz", + "integrity": "sha512-htlxoEWhPkKze4W8xaWJ6KmC95e706dEVH06dKQSmgMEXzfovtxW67PxDwy78f0JB4z1B/3ZkaEoFmbWazAMow==", + "dev": true + }, "gitbook-plugin-search": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/gitbook-plugin-search/-/gitbook-plugin-search-2.2.1.tgz", "integrity": "sha512-oP9jhaKFUVPo756G9ywuuI43YdkZClSjfpFzNKe/a/Rcn3oVsrAM/PjdQ+dt65KfZVo3iW1LY4WdiZnNqzRP8g==", "dev": true }, - "gitbook-plugin-search-pro-fixed": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gitbook-plugin-search-pro-fixed/-/gitbook-plugin-search-pro-fixed-1.0.1.tgz", - "integrity": "sha512-X6pBgfN54D3Ij+iF4cw44PZCdOvjnqboEoi0bsolEYPzcJOXFiiemxYt+rit95T8UbSaML38o8SCPzl9grM/zA==", + "gitbook-plugin-search-pro2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/gitbook-plugin-search-pro2/-/gitbook-plugin-search-pro2-1.0.2.tgz", + "integrity": "sha512-1eeqVIToQnbjXxIpDPfd86vaZLWP43WKZCKzxqzWGaAQCgNb8obn7VX6Kw1xM3tdaHsOoe9m5+UeorxH60lpOA==", + "dev": true, "requires": { "html-entities": "1.2.0" } @@ -4444,6 +4537,23 @@ "cheerio": "*" } }, + "gitbook-plugin-sharing": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/gitbook-plugin-sharing/-/gitbook-plugin-sharing-1.0.2.tgz", + "integrity": "sha512-PdBmQdZWSgUYwpdqU/DpnfCcwHn8uhFT4aU0Tu+vipJxUDPW21KdXq+TOR36qlw/rz5NSVTYEzUnamW9G+q7aQ==", + "dev": true, + "requires": { + "lodash": "^3.10.1" + }, + "dependencies": { + "lodash": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha512-9mDDwqVIma6OZX79ZlDACZl8sBm0TEnkf99zV3iMA4GzkIT/9hiqP5mY0HoT1iNLCrKc/R1HByV+yJfRWVJryQ==", + "dev": true + } + } + }, "gitbook-plugin-sitemap": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gitbook-plugin-sitemap/-/gitbook-plugin-sitemap-1.2.0.tgz", @@ -4471,10 +4581,11 @@ "integrity": "sha512-GNxYW3n10Pa6EAGx+7+dDVcyf7VambzyO6Mt5Y3x62fntyIOQWtqX46RgMZuhHbOtIeN/BR6T0DKlwoeUhmY0w==", "dev": true }, - "gitbook-plugin-theme-door": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/gitbook-plugin-theme-door/-/gitbook-plugin-theme-door-1.0.2.tgz", - "integrity": "sha512-8UjmoogIV6vRQZrs2RnJHV1222nyiS1ck0WtLCNSFi65Xv0FnT4C4FAe55QjG0qdAak6HnXAiGTny2L1ecC13Q==" + "gitbook-plugin-yh-changyan": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gitbook-plugin-yh-changyan/-/gitbook-plugin-yh-changyan-1.0.0.tgz", + "integrity": "sha512-tq1YdYKwVsXv3HQYi7ImAJwaRL6g/ERhkH1fScUbdLOKY5IL7wq6ljAd/e8SErrW6EDlTxJFbdNSiejRxLh+MQ==", + "dev": true }, "github-slugid": { "version": "1.0.1", @@ -4637,7 +4748,8 @@ "html-entities": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.0.tgz", - "integrity": "sha512-0md7tlUUyb0BEQGsZzbqty1CgV6RESOoxdivt94AScqhBhYsPCCQCOaGvur/RospMjYpPJ7iFe3zw4Bu4SVA8g==" + "integrity": "sha512-0md7tlUUyb0BEQGsZzbqty1CgV6RESOoxdivt94AScqhBhYsPCCQCOaGvur/RospMjYpPJ7iFe3zw4Bu4SVA8g==", + "dev": true }, "html-escape": { "version": "1.0.2", diff --git a/package.json b/package.json index 6d5a75f..82a1cd2 100644 --- a/package.json +++ b/package.json @@ -26,23 +26,27 @@ }, "homepage": "https://github.com/gnu4cn/ccna60d#readme", "devDependencies": { + "gitbook-plugin-add-js-css": "^0.0.1", "gitbook-plugin-back-to-top-button": "^0.1.4", "gitbook-plugin-cuav-chapters": "^1.0.3", "gitbook-plugin-fontsettings": "^2.0.0", "gitbook-plugin-heading-anchors": "^1.0.3", "gitbook-plugin-highlight-code": "^1.0.0", + "gitbook-plugin-navigation": "^0.1.1", + "gitbook-plugin-page-toc-button": "^0.1.1", + "gitbook-plugin-search-pro2": "^1.0.2", + "gitbook-plugin-sharing": "^1.0.2", "gitbook-plugin-theme-comscore": "^0.0.3", + "gitbook-plugin-yh-changyan": "^1.0.0", "honkit": "^4.0.4" }, "dependencies": { "gitbook-plugin-ace": "^0.3.2", "gitbook-plugin-code": "^0.1.0", "gitbook-plugin-include-codeblock": "^3.2.3", - "gitbook-plugin-search-pro-fixed": "^1.0.1", "gitbook-plugin-sectionx": "^3.1.0", "gitbook-plugin-sitemap": "^1.2.0", "gitbook-plugin-splitter": "^0.0.8", - "gitbook-plugin-tbfed-pagefooter": "^0.0.1", - "gitbook-plugin-theme-door": "^1.0.2" + "gitbook-plugin-tbfed-pagefooter": "^0.0.1" } }