diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8e2da84..0000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: node_js -node_js: - - "10" -cache: npm - -notifications: - email: - recipients: - - ishacker.net@gmail.com # 设置通知邮件 - on_success: change - on_failure: always - -install: - - npm install -g gitbook-cli - - gitbook install - -script: - - cd docs # into /docs folder - - gitbook install # install plugins - - gitbook build - -after_script: - - cd _book - - git init - - git remote add origin https://${GH_REF} - - git add . - - git commit -m ":rocket:Updated By Travis-CI With Build $TRAVIS_BUILD_NUMBER For Github Pages" - - git push --force --quiet "https://${TF_STUDYNOTE_TOKEN}@${GH_REF}" master:gh-pages - -branches: - only: - - master - -env: - global: - - GH_REF: github.com/YUbuntu0109/awesome-tensorflow-tutorial.git # 设置 github 地址 \ No newline at end of file diff --git a/docs/CNAME b/CNAME similarity index 100% rename from docs/CNAME rename to CNAME diff --git a/README.md b/README.md deleted file mode 100644 index 019cf7a..0000000 --- a/README.md +++ /dev/null @@ -1,17 +0,0 @@ -
- - 知识共享许可协议 - - - - - - -
- -# Awesome Tensorflow Tutorial -📃 A curated list of awesome TensorFlow tutorial for beginner : *https://tensorflow.studynote.life* diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 2b99f8d..0000000 --- a/docs/README.md +++ /dev/null @@ -1,18 +0,0 @@ - - -- - 知识共享许可协议 - - - - - - -
- -- 📃 A curated list of awesome TensorFlow tutorial for beginner -
diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md deleted file mode 100644 index 3c61c30..0000000 --- a/docs/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# Summary - -* [简介](README.md) diff --git a/docs/book.json b/docs/book.json deleted file mode 100644 index 001a037..0000000 --- a/docs/book.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "plugins": [ - "theme-comscore", - "code", - "github", - "-highlight", - "prism", - "prism-themes", - "-lunr", - "-search", - "search-pro", - "edit-link", - "hide-element", - "splitter", - "insert-logo", - "chapter-fold", - "custom-favicon", - "pageview-count", - "tbfed-pagefooter", - "back-to-top-button", - "-sharing", "sharing-plus" - ], - "pluginsConfig": { - "favicon": "favicon.ico", - "github": { - "url": "https://github.com/YUbuntu0109/awesome-tensorflow-tutorial" - }, - "edit-link": { - "base": "//github.com/YUbuntu0109/awesome-tensorflow-tutorial/edit/master/docs", - "label": "edit" - }, - "hide-element": { - "elements": [".gitbook-link"] - }, - "insert-logo": { - "url": "https://tensorflow.studynote.life/tf_logo_social.png", - "style": "background: none; max-height: 45px; min-height: 30px" - }, - "tbfed-pagefooter": { - "copyright":"Copyright © GoogTech 2020", - "modify_label": "last updated time : ", - "modify_format": "YYYY-MM-DD HH:mm:ss" - }, - "prism": { - "css": [ - "prismjs/themes/prism-solarizedlight.css" - ] - }, - "sharing": { - "douban": false, - "facebook": false, - "google": false, - "hatenaBookmark": false, - "instapaper": false, - "line": false, - "linkedin": false, - "messenger": false, - "pocket": false, - "qzone": false, - "stumbleupon": false, - "twitter": false, - "viber": false, - "vk": false, - "whatsapp": false, - "weibo": false, - "qq": false, - "all": [ - "douban", "facebook", "google", "hatenaBookmark", - "instapaper", "linkedin","twitter", "weibo", - "messenger","qq", "qzone","viber","vk","weibo", - "pocket", "stumbleupon","whatsapp" - ] - } - - } -} diff --git a/gitbook/fonts/fontawesome/FontAwesome.otf b/gitbook/fonts/fontawesome/FontAwesome.otf new file mode 100644 index 0000000..d4de13e Binary files /dev/null and b/gitbook/fonts/fontawesome/FontAwesome.otf differ diff --git a/gitbook/fonts/fontawesome/fontawesome-webfont.eot b/gitbook/fonts/fontawesome/fontawesome-webfont.eot new file mode 100644 index 0000000..c7b00d2 Binary files /dev/null and b/gitbook/fonts/fontawesome/fontawesome-webfont.eot differ diff --git a/gitbook/fonts/fontawesome/fontawesome-webfont.svg b/gitbook/fonts/fontawesome/fontawesome-webfont.svg new file mode 100644 index 0000000..8b66187 --- /dev/null +++ b/gitbook/fonts/fontawesome/fontawesome-webfont.svg @@ -0,0 +1,685 @@ + + + \ No newline at end of file diff --git a/gitbook/fonts/fontawesome/fontawesome-webfont.ttf b/gitbook/fonts/fontawesome/fontawesome-webfont.ttf new file mode 100644 index 0000000..f221e50 Binary files /dev/null and b/gitbook/fonts/fontawesome/fontawesome-webfont.ttf differ diff --git a/gitbook/fonts/fontawesome/fontawesome-webfont.woff b/gitbook/fonts/fontawesome/fontawesome-webfont.woff new file mode 100644 index 0000000..6e7483c Binary files /dev/null and b/gitbook/fonts/fontawesome/fontawesome-webfont.woff differ diff --git a/gitbook/fonts/fontawesome/fontawesome-webfont.woff2 b/gitbook/fonts/fontawesome/fontawesome-webfont.woff2 new file mode 100644 index 0000000..7eb74fd Binary files /dev/null and b/gitbook/fonts/fontawesome/fontawesome-webfont.woff2 differ diff --git a/gitbook/gitbook-plugin-back-to-top-button/plugin.css b/gitbook/gitbook-plugin-back-to-top-button/plugin.css new file mode 100644 index 0000000..a418cbb --- /dev/null +++ b/gitbook/gitbook-plugin-back-to-top-button/plugin.css @@ -0,0 +1,55 @@ +.back-to-top { + position: fixed; + bottom: 25px; + right: 25px; + background: rgba(0, 0, 0, 0.5); + width: 50px; + height: 50px; + display: block; + text-decoration: none; + -webkit-border-radius: 35px; + -moz-border-radius: 35px; + border-radius: 35px; + display: none; +} +.back-to-top i { + color: #fff; + margin: 0; + position: relative; + left: 15px; + top: 14px; + font-size: 22px; +} +.back-to-top:hover { + background: rgba(0, 0, 0, 0.9); + cursor: pointer; +} +.book.color-theme-1 .back-to-top { + background: rgba(112, 66, 20, 0.5); +} +.book.color-theme-1 .back-to-top i { + color: #f3eacb; +} +.book.color-theme-1 .back-to-top:hover { + background: rgba(112, 66, 20, 0.9); +} +.book.color-theme-2 .back-to-top { + background: rgba(189, 202, 219, 0.5); +} +.book.color-theme-2 .back-to-top i { + color: #1C1F2B; +} +.book.color-theme-2 .back-to-top:hover { + background: rgba(189, 202, 219, 0.9); +} + +@media only screen + and (min-device-width: 320px) + and (max-device-width: 480px) + and (-webkit-min-device-pixel-ratio: 2) + and (orientation: portrait) { + .back-to-top { + bottom: 10px; + right: 10px; + } +} \ No newline at end of file diff --git a/gitbook/gitbook-plugin-back-to-top-button/plugin.js b/gitbook/gitbook-plugin-back-to-top-button/plugin.js new file mode 100644 index 0000000..abd3523 --- /dev/null +++ b/gitbook/gitbook-plugin-back-to-top-button/plugin.js @@ -0,0 +1,25 @@ +var gitbook = window.gitbook; + +gitbook.events.on('page.change', function() { + + var back_to_top_button = [''].join(""); + $(".book").append(back_to_top_button) + + $(".back-to-top").hide(); + + $('.book-body,.body-inner').on('scroll', function () { + if ($(this).scrollTop()> 100) { + $('.back-to-top').fadeIn(); + } else { + $('.back-to-top').fadeOut(); + } + }); + + $('.back-to-top').click(function () { + $('.book-body,.body-inner').animate({ + scrollTop: 0 + }, 800); + return false; + }); + +}); diff --git a/gitbook/gitbook-plugin-chapter-fold/chapter-fold.css b/gitbook/gitbook-plugin-chapter-fold/chapter-fold.css new file mode 100644 index 0000000..0b4275f --- /dev/null +++ b/gitbook/gitbook-plugin-chapter-fold/chapter-fold.css @@ -0,0 +1,29 @@ +.book .book-summary .chapter> .articles { + overflow: hidden; + max-height: 0px; +} + +.book .book-summary .chapter.expanded> .articles { + max-height: 9999px; +} + +.book .book-summary .exc-trigger { + position: absolute; + left: 12px; + top: 12px; +} + +.book .book-summary ul.summary li a, +.book .book-summary ul.summary li span { + padding-left: 30px; +} + +.book .book-summary .exc-trigger:before { + content: "\f105"; +} + +.book .book-summary .expanded> a .exc-trigger:before, +.book .book-summary .expanded> span .exc-trigger:before { + content: "\f107"; +} + diff --git a/gitbook/gitbook-plugin-chapter-fold/chapter-fold.js b/gitbook/gitbook-plugin-chapter-fold/chapter-fold.js new file mode 100644 index 0000000..a80a921 --- /dev/null +++ b/gitbook/gitbook-plugin-chapter-fold/chapter-fold.js @@ -0,0 +1,67 @@ +require(['gitbook', 'jQuery'], function(gitbook, $) { + var TOGGLE_CLASSNAME = 'expanded', + CHAPTER = '.chapter', + ARTICLES = '.articles', + TRIGGER_TEMPLATE = '', + LS_NAMESPACE = 'expChapters'; + var init = function () { + // adding the trigger element to each ARTICLES parent and binding the event + var chapterLink = $(ARTICLES).parent(CHAPTER).children('a'); + chapterLink.append($(TRIGGER_TEMPLATE)); + chapterLink.on('click', function (e) { + e.preventDefault(); + //e.stopPropagation(); + toggle($(e.target).closest(CHAPTER)); + }); + + expand(lsItem()); + //expand current selected chapter with it's parents + collapse($(CHAPTER)); + var activeChapter = $(CHAPTER + '.active'); + expand(activeChapter); + expand(activeChapter.parents(CHAPTER)); + } + //on page.change will happend the function. + + var toggle = function ($chapter) { + if ($chapter.hasClass('expanded')) { + collapse($chapter); + } else { + expand($chapter); + //$chapter.addClass('active').siblings().removeClass('active'); + } + } + var collapse = function ($chapter) { + if ($chapter.length && $chapter.hasClass(TOGGLE_CLASSNAME)) { + $chapter.removeClass(TOGGLE_CLASSNAME); + lsItem($chapter); + } + } + var expand = function ($chapter) { + if ($chapter.length && !$chapter.hasClass(TOGGLE_CLASSNAME)) { + $chapter.addClass(TOGGLE_CLASSNAME); + lsItem($chapter); + } + } + var lsItem = function () { + var map = JSON.parse(localStorage.getItem(LS_NAMESPACE)) || {} + if (arguments.length) { + var $chapters = arguments[0]; + $chapters.each(function (index, element) { + var level = $(this).data('level'); + var value = $(this).hasClass(TOGGLE_CLASSNAME); + map[level] = value; + }) + localStorage.setItem(LS_NAMESPACE, JSON.stringify(map)); + } else { + return $(CHAPTER).map(function(index, element){ + if (map[$(this).data('level')]) { + return this; + } + }) + } + } + gitbook.events.bind('page.change', function() { + init() + }); +}); diff --git a/gitbook/gitbook-plugin-code/plugin.css b/gitbook/gitbook-plugin-code/plugin.css new file mode 100644 index 0000000..a68fcdc --- /dev/null +++ b/gitbook/gitbook-plugin-code/plugin.css @@ -0,0 +1,37 @@ +#code-textarea { + height: 0; + position: fixed; + top: -1000px; + width: 0; +} + +.code-wrapper { + position: relative; +} + +.code-wrapper i { + color: #c1c7cd; + cursor: pointer; + font-size: 12px; + font-weight: bold; + position: absolute; + right: 1em; + top: 1em; +} + +.code-wrapper pre { + background: #f7f8f9; + border-radius: 3px; + counter-reset: line; + font-size: 15px; +} + +.code-wrapper pre> code> span.code-line:before { + counter-increment: line; + color: #c1c7cd; + content: counter(line); + display: inline-block; + font-size: 12px; + margin-right: 1.5em; + width: 1em; +} diff --git a/gitbook/gitbook-plugin-code/plugin.js b/gitbook/gitbook-plugin-code/plugin.js new file mode 100644 index 0000000..555d724 --- /dev/null +++ b/gitbook/gitbook-plugin-code/plugin.js @@ -0,0 +1,91 @@ +require(['gitbook', 'jQuery'], function(gitbook, $) { + + const TERMINAL_HOOK = '**[terminal]' + + var pluginConfig = {}; + var timeouts = {}; + + function addCopyButton(wrapper) { + wrapper.append( + $('') + .click(function() { + copyCommand($(this)); + }) + ); + } + + function addCopyTextarea() { + + /* Add also the text area that will allow to copy */ + $('body').append(''); + } + + function copyCommand(button) { + pre = button.parent(); + textarea = $('#code-textarea'); + textarea.val(pre.text()); + textarea.focus(); + textarea.select(); + document.execCommand('copy'); + pre.focus(); + updateCopyButton(button); + } + + function initializePlugin(config) { + pluginConfig = config.code; + } + + function format_code_block(block) { + /* + * Add line numbers for multiline blocks. + */ + code = block.children('code'); + lines = code.html().split('\n'); + + if (lines[lines.length - 1] == '') { + lines.splice(-1, 1); + } + + if (lines.length> 1) { + console.log(lines); + lines = lines.map(line => '' + line + ''); + console.log(lines); + code.html(lines.join('\n')); + } + + // Add wrapper to pre element + wrapper = block.wrap(''); + + if (pluginConfig.copyButtons) { + addCopyButton(wrapper); + } + } + + function updateCopyButton(button) { + id = button.attr('data-command'); + button.removeClass('fa-clone').addClass('fa-check'); + + // Clear timeout + if (id in timeouts) { + clearTimeout(timeouts[id]); + } + timeouts[id] = window.setTimeout(function() { + button.removeClass('fa-check').addClass('fa-clone'); + }, 1000); + } + + gitbook.events.bind('start', function(e, config) { + initializePlugin(config); + + if (pluginConfig.copyButtons) { + addCopyTextarea(); + } + }); + + gitbook.events.bind('page.change', function() { + $('pre').each(function() { + format_code_block($(this)); + }); + }); + +}); diff --git a/gitbook/gitbook-plugin-edit-link/plugin.js b/gitbook/gitbook-plugin-edit-link/plugin.js new file mode 100644 index 0000000..32f3494 --- /dev/null +++ b/gitbook/gitbook-plugin-edit-link/plugin.js @@ -0,0 +1,30 @@ +require(["gitbook", "jQuery"], function(gitbook, $) { + gitbook.events.bind('start', function (e, config) { + var conf = config['edit-link']; + var label = conf.label; + var base = conf.base; + var lang = gitbook.state.innerLanguage; + if (lang) { + // label can be a unique string for multi-languages site + if (typeof label === 'object') label = label[lang]; + + lang = lang + '/'; + } + + // Add slash at the end if not present + if (base.slice(-1) != "/") { + base = base + "/"; + } + + gitbook.toolbar.createButton({ + icon: 'fa fa-edit', + text: label, + onClick: function() { + var filepath = gitbook.state.filepath; + + window.open(base + lang + filepath); + } + }); + }); + +}); \ No newline at end of file diff --git a/gitbook/gitbook-plugin-fontsettings/fontsettings.js b/gitbook/gitbook-plugin-fontsettings/fontsettings.js new file mode 100644 index 0000000..ff7be71 --- /dev/null +++ b/gitbook/gitbook-plugin-fontsettings/fontsettings.js @@ -0,0 +1,240 @@ +require(['gitbook', 'jquery'], function(gitbook, $) { + // Configuration + var MAX_SIZE = 4, + MIN_SIZE = 0, + BUTTON_ID; + + // Current fontsettings state + var fontState; + + // Default themes + var THEMES = [ + { + config: 'white', + text: 'White', + id: 0 + }, + { + config: 'sepia', + text: 'Sepia', + id: 1 + }, + { + config: 'night', + text: 'Night', + id: 2 + } + ]; + + // Default font families + var FAMILIES = [ + { + config: 'serif', + text: 'Serif', + id: 0 + }, + { + config: 'sans', + text: 'Sans', + id: 1 + } + ]; + + // Return configured themes + function getThemes() { + return THEMES; + } + + // Modify configured themes + function setThemes(themes) { + THEMES = themes; + updateButtons(); + } + + // Return configured font families + function getFamilies() { + return FAMILIES; + } + + // Modify configured font families + function setFamilies(families) { + FAMILIES = families; + updateButtons(); + } + + // Save current font settings + function saveFontSettings() { + gitbook.storage.set('fontState', fontState); + update(); + } + + // Increase font size + function enlargeFontSize(e) { + e.preventDefault(); + if (fontState.size>= MAX_SIZE) return; + + fontState.size++; + saveFontSettings(); + } + + // Decrease font size + function reduceFontSize(e) { + e.preventDefault(); + if (fontState.size <= MIN_SIZE) return; + + fontState.size--; + saveFontSettings(); + } + + // Change font family + function changeFontFamily(configName, e) { + if (e && e instanceof Event) { + e.preventDefault(); + } + + var familyId = getFontFamilyId(configName); + fontState.family = familyId; + saveFontSettings(); + } + + // Change type of color theme + function changeColorTheme(configName, e) { + if (e && e instanceof Event) { + e.preventDefault(); + } + + var $book = gitbook.state.$book; + + // Remove currently applied color theme + if (fontState.theme !== 0) + $book.removeClass('color-theme-'+fontState.theme); + + // Set new color theme + var themeId = getThemeId(configName); + fontState.theme = themeId; + if (fontState.theme !== 0) + $book.addClass('color-theme-'+fontState.theme); + + saveFontSettings(); + } + + // Return the correct id for a font-family config key + // Default to first font-family + function getFontFamilyId(configName) { + // Search for plugin configured font family + var configFamily = $.grep(FAMILIES, function(family) { + return family.config == configName; + })[0]; + // Fallback to default font family + return (!!configFamily)? configFamily.id : 0; + } + + // Return the correct id for a theme config key + // Default to first theme + function getThemeId(configName) { + // Search for plugin configured theme + var configTheme = $.grep(THEMES, function(theme) { + return theme.config == configName; + })[0]; + // Fallback to default theme + return (!!configTheme)? configTheme.id : 0; + } + + function update() { + var $book = gitbook.state.$book; + + $('.font-settings .font-family-list li').removeClass('active'); + $('.font-settings .font-family-list li:nth-child('+(fontState.family+1)+')').addClass('active'); + + $book[0].className = $book[0].className.replace(/\bfont-\S+/g, ''); + $book.addClass('font-size-'+fontState.size); + $book.addClass('font-family-'+fontState.family); + + if(fontState.theme !== 0) { + $book[0].className = $book[0].className.replace(/\bcolor-theme-\S+/g, ''); + $book.addClass('color-theme-'+fontState.theme); + } + } + + function init(config) { + // Search for plugin configured font family + var configFamily = getFontFamilyId(config.family), + configTheme = getThemeId(config.theme); + + // Instantiate font state object + fontState = gitbook.storage.get('fontState', { + size: config.size || 2, + family: configFamily, + theme: configTheme + }); + + update(); + } + + function updateButtons() { + // Remove existing fontsettings buttons + if (!!BUTTON_ID) { + gitbook.toolbar.removeButton(BUTTON_ID); + } + + // Create buttons in toolbar + BUTTON_ID = gitbook.toolbar.createButton({ + icon: 'fa fa-font', + label: 'Font Settings', + className: 'font-settings', + dropdown: [ + [ + { + text: 'A', + className: 'font-reduce', + onClick: reduceFontSize + }, + { + text: 'A', + className: 'font-enlarge', + onClick: enlargeFontSize + } + ], + $.map(FAMILIES, function(family) { + family.onClick = function(e) { + return changeFontFamily(family.config, e); + }; + + return family; + }), + $.map(THEMES, function(theme) { + theme.onClick = function(e) { + return changeColorTheme(theme.config, e); + }; + + return theme; + }) + ] + }); + } + + // Init configuration at start + gitbook.events.bind('start', function(e, config) { + var opts = config.fontsettings; + + // Generate buttons at start + updateButtons(); + + // Init current settings + init(opts); + }); + + // Expose API + gitbook.fontsettings = { + enlargeFontSize: enlargeFontSize, + reduceFontSize: reduceFontSize, + setTheme: changeColorTheme, + setFamily: changeFontFamily, + getThemes: getThemes, + setThemes: setThemes, + getFamilies: getFamilies, + setFamilies: setFamilies + }; +}); + + diff --git a/gitbook/gitbook-plugin-fontsettings/website.css b/gitbook/gitbook-plugin-fontsettings/website.css new file mode 100644 index 0000000..26591fe --- /dev/null +++ b/gitbook/gitbook-plugin-fontsettings/website.css @@ -0,0 +1,291 @@ +/* + * Theme 1 + */ +.color-theme-1 .dropdown-menu { + background-color: #111111; + border-color: #7e888b; +} +.color-theme-1 .dropdown-menu .dropdown-caret .caret-inner { + border-bottom: 9px solid #111111; +} +.color-theme-1 .dropdown-menu .buttons { + border-color: #7e888b; +} +.color-theme-1 .dropdown-menu .button { + color: #afa790; +} +.color-theme-1 .dropdown-menu .button:hover { + color: #73553c; +} +/* + * Theme 2 + */ +.color-theme-2 .dropdown-menu { + background-color: #2d3143; + border-color: #272a3a; +} +.color-theme-2 .dropdown-menu .dropdown-caret .caret-inner { + border-bottom: 9px solid #2d3143; +} +.color-theme-2 .dropdown-menu .buttons { + border-color: #272a3a; +} +.color-theme-2 .dropdown-menu .button { + color: #62677f; +} +.color-theme-2 .dropdown-menu .button:hover { + color: #f4f4f5; +} +.book .book-header .font-settings .font-enlarge { + line-height: 30px; + font-size: 1.4em; +} +.book .book-header .font-settings .font-reduce { + line-height: 30px; + font-size: 1em; +} +.book.color-theme-1 .book-body { + color: #704214; + background: #f3eacb; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section { + background: #f3eacb; +} +.book.color-theme-2 .book-body { + color: #bdcadb; + background: #1c1f2b; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section { + background: #1c1f2b; +} +.book.font-size-0 .book-body .page-inner section { + font-size: 1.2rem; +} +.book.font-size-1 .book-body .page-inner section { + font-size: 1.4rem; +} +.book.font-size-2 .book-body .page-inner section { + font-size: 1.6rem; +} +.book.font-size-3 .book-body .page-inner section { + font-size: 2.2rem; +} +.book.font-size-4 .book-body .page-inner section { + font-size: 4rem; +} +.book.font-family-0 { + font-family: Georgia, serif; +} +.book.font-family-1 { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal { + color: #704214; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal a { + color: inherit; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h3, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h4, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h5, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 { + color: inherit; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2 { + border-color: inherit; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 { + color: inherit; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal hr { + background-color: inherit; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal blockquote { + border-color: inherit; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code { + background: #fdf6e3; + color: #657b83; + border-color: #f8df9c; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal .highlight { + background-color: inherit; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table th, +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table td { + border-color: #f5d06c; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr { + color: inherit; + background-color: #fdf6e3; + border-color: #444444; +} +.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) { + background-color: #fbeecb; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal { + color: #bdcadb; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal a { + color: #3eb1d0; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h3, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h4, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h5, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 { + color: #fffffa; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2 { + border-color: #373b4e; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 { + color: #373b4e; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal hr { + background-color: #373b4e; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal blockquote { + border-color: #373b4e; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code { + color: #9dbed8; + background: #2d3143; + border-color: #2d3143; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal .highlight { + background-color: #282a39; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table th, +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table td { + border-color: #3b3f54; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr { + color: #b6c2d2; + background-color: #2d3143; + border-color: #3b3f54; +} +.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) { + background-color: #35394b; +} +.book.color-theme-1 .book-header { + color: #afa790; + background: transparent; +} +.book.color-theme-1 .book-header .btn { + color: #afa790; +} +.book.color-theme-1 .book-header .btn:hover { + color: #73553c; + background: none; +} +.book.color-theme-1 .book-header h1 { + color: #704214; +} +.book.color-theme-2 .book-header { + color: #7e888b; + background: transparent; +} +.book.color-theme-2 .book-header .btn { + color: #3b3f54; +} +.book.color-theme-2 .book-header .btn:hover { + color: #fffff5; + background: none; +} +.book.color-theme-2 .book-header h1 { + color: #bdcadb; +} +.book.color-theme-1 .book-body .navigation { + color: #afa790; +} +.book.color-theme-1 .book-body .navigation:hover { + color: #73553c; +} +.book.color-theme-2 .book-body .navigation { + color: #383f52; +} +.book.color-theme-2 .book-body .navigation:hover { + color: #fffff5; +} +/* + * Theme 1 + */ +.book.color-theme-1 .book-summary { + color: #afa790; + background: #111111; + border-right: 1px solid rgba(0, 0, 0, 0.07); +} +.book.color-theme-1 .book-summary .book-search { + background: transparent; +} +.book.color-theme-1 .book-summary .book-search input, +.book.color-theme-1 .book-summary .book-search input:focus { + border: 1px solid transparent; +} +.book.color-theme-1 .book-summary ul.summary li.divider { + background: #7e888b; + box-shadow: none; +} +.book.color-theme-1 .book-summary ul.summary li i.fa-check { + color: #33cc33; +} +.book.color-theme-1 .book-summary ul.summary li.done> a { + color: #877f6a; +} +.book.color-theme-1 .book-summary ul.summary li a, +.book.color-theme-1 .book-summary ul.summary li span { + color: #877f6a; + background: transparent; + font-weight: normal; +} +.book.color-theme-1 .book-summary ul.summary li.active> a, +.book.color-theme-1 .book-summary ul.summary li a:hover { + color: #704214; + background: transparent; + font-weight: normal; +} +/* + * Theme 2 + */ +.book.color-theme-2 .book-summary { + color: #bcc1d2; + background: #2d3143; + border-right: none; +} +.book.color-theme-2 .book-summary .book-search { + background: transparent; +} +.book.color-theme-2 .book-summary .book-search input, +.book.color-theme-2 .book-summary .book-search input:focus { + border: 1px solid transparent; +} +.book.color-theme-2 .book-summary ul.summary li.divider { + background: #272a3a; + box-shadow: none; +} +.book.color-theme-2 .book-summary ul.summary li i.fa-check { + color: #33cc33; +} +.book.color-theme-2 .book-summary ul.summary li.done> a { + color: #62687f; +} +.book.color-theme-2 .book-summary ul.summary li a, +.book.color-theme-2 .book-summary ul.summary li span { + color: #c1c6d7; + background: transparent; + font-weight: 600; +} +.book.color-theme-2 .book-summary ul.summary li.active> a, +.book.color-theme-2 .book-summary ul.summary li a:hover { + color: #f4f4f5; + background: #252737; + font-weight: 600; +} diff --git a/gitbook/gitbook-plugin-github/plugin.js b/gitbook/gitbook-plugin-github/plugin.js new file mode 100644 index 0000000..14810ce --- /dev/null +++ b/gitbook/gitbook-plugin-github/plugin.js @@ -0,0 +1,14 @@ +require([ 'gitbook' ], function (gitbook) { + gitbook.events.bind('start', function (e, config) { + var githubURL = config.github.url; + + gitbook.toolbar.createButton({ + icon: 'fa fa-github', + label: 'GitHub', + position: 'right', + onClick: function() { + window.open(githubURL) + } + }); + }); +}); diff --git a/gitbook/gitbook-plugin-hide-element/plugin.js b/gitbook/gitbook-plugin-hide-element/plugin.js new file mode 100644 index 0000000..ffb0b20 --- /dev/null +++ b/gitbook/gitbook-plugin-hide-element/plugin.js @@ -0,0 +1,13 @@ +require(['gitbook', 'jquery'], function(gitbook, $) { + var opts; + + gitbook.events.bind('start', function(e, config) { + opts = config['hide-element'].elements; + }); + + gitbook.events.bind('page.change', function() { + $.map(opts, function(ele) { + $(ele).hide(); + }); + }); +}); diff --git a/gitbook/gitbook-plugin-insert-logo/plugin.css b/gitbook/gitbook-plugin-insert-logo/plugin.css new file mode 100644 index 0000000..625ec44 --- /dev/null +++ b/gitbook/gitbook-plugin-insert-logo/plugin.css @@ -0,0 +1,4 @@ +.book .book-summary .book-logo { + text-align: center; + padding: 20px; +} \ No newline at end of file diff --git a/gitbook/gitbook-plugin-insert-logo/plugin.js b/gitbook/gitbook-plugin-insert-logo/plugin.js new file mode 100644 index 0000000..6c8724a --- /dev/null +++ b/gitbook/gitbook-plugin-insert-logo/plugin.js @@ -0,0 +1,15 @@ +require(['gitbook', 'jQuery'], function (gitbook, $) { + var url = '' + var style = '' + var insertLogo = function (url, style) { + $('.book-summary').children().eq(0).before('') + } + gitbook.events.bind('start', function (e, config) { + url = config['insert-logo']['url'] + style = config['insert-logo']['style'] + }) + + gitbook.events.bind("page.change", function() { + insertLogo(url, style) + }) +}) diff --git a/gitbook/gitbook-plugin-pageview-count/plugin.css b/gitbook/gitbook-plugin-pageview-count/plugin.css new file mode 100644 index 0000000..b6c85c1 --- /dev/null +++ b/gitbook/gitbook-plugin-pageview-count/plugin.css @@ -0,0 +1,8 @@ +.page-view-wrapper .btn{ + display: inline-block; +} +.page-view-counter{ + margin-left: -14px; + font-size: 15px; + display:inline-block; +} \ No newline at end of file diff --git a/gitbook/gitbook-plugin-pageview-count/plugin.js b/gitbook/gitbook-plugin-pageview-count/plugin.js new file mode 100644 index 0000000..181f814 --- /dev/null +++ b/gitbook/gitbook-plugin-pageview-count/plugin.js @@ -0,0 +1,45 @@ +var gitbook = window.gitbook; + +/* + +visitor counter + +*/ + +var iconSVg = '' + +function requestCount(targetUrl) { + return $.ajax('https://hitcounter.pythonanywhere.com/count',{ + data:{url:encodeURIComponent(targetUrl)}, + }) +} + +require(["gitbook", "jQuery"], function (gitbook, $) { + + function resetViewCount() { + var bookHeader = $('.book-header') + var lastChild = bookHeader.children().last() + + var renderWrapper = $('