提交 3b0f6de7 编写于 作者: F freesky-edward

Add theme init

上级 73d53d2c
Apache License Apache License
Version 2.0, January 2004 Version 2.0, January 2004
http://www.apache.org/licenses/ http://www.apache.org/licenses/
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
APPENDIX: How to apply the Apache License to your work. APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]" boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a comment syntax for the file format. We also recommend that a
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier same "printed page" as the copyright notice for easier
identification within third-party archives. identification within third-party archives.
Copyright [yyyy] [name of copyright owner] Copyright 2014 FriendCode Inc.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
......
# gitbook-theme-hugo # GitBook Hugo plugable Theme
#### Description This is a plugable theme for GitBook which is base on the Default theme since version `3.0.0`. It can be used as a template for theming books or can be extended.
This is custom gitbook theme for hugo template
#### Software Architecture
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
\ No newline at end of file
{
"LANGS_CHOOSE": "اختيار اللغة",
"GLOSSARY": "قاموس مصطلحات",
"GLOSSARY_INDEX": "مؤشر المصطلحات",
"GLOSSARY_OPEN": "قاموس مصطلحات",
"GITBOOK_LINK": "نشرت مع GitBook",
"SUMMARY": "جدول المحتويات",
"SUMMARY_INTRODUCTION": "مقدمة",
"SUMMARY_TOGGLE": "جدول المحتويات",
"SEARCH_TOGGLE": "بحث",
"SEARCH_PLACEHOLDER": "اكتب للبحث",
"FONTSETTINGS_TOGGLE": "إعدادات الخط",
"SHARE_TOGGLE": "حصة",
"SHARE_ON": "على {{platform}} حصة",
"FONTSETTINGS_WHITE": "أبيض",
"FONTSETTINGS_SEPIA": "بني داكن",
"FONTSETTINGS_NIGHT": "ليل",
"FONTSETTINGS_SANS": "بلا",
"FONTSETTINGS_SERIF": "الرقيق"
}
{
"LANGS_CHOOSE": "ভাষা নির্বাচন করুন",
"GLOSSARY": "গ্লোসারি",
"GLOSSARY_INDEX": "ইন্ডেক্স",
"GLOSSARY_OPEN": "গ্লোসারি",
"GITBOOK_LINK": "গিটবুকের মাধ্যমে প্রকাশিত",
"SUMMARY": "সূচিপত্র",
"SUMMARY_INTRODUCTION": "সূচনা",
"SUMMARY_TOGGLE": "সূচিপত্র",
"SEARCH_TOGGLE": "অনুসন্ধান",
"SEARCH_PLACEHOLDER": "অনুসন্ধান",
"FONTSETTINGS_TOGGLE": "ফন্ট সেটিংস",
"SHARE_TOGGLE": "শেয়ার",
"SHARE_ON": "{{platform}}-এ শেয়ার",
"FONTSETTINGS_WHITE": "সাদা",
"FONTSETTINGS_SEPIA": "সেপিয়া",
"FONTSETTINGS_NIGHT": "রাত",
"FONTSETTINGS_SANS": "স্যান্স",
"FONTSETTINGS_SERIF": "শেরিফ"
}
{
"LANGS_CHOOSE": "Selecciona un idioma",
"GLOSSARY": "Glossari",
"GLOSSARY_INDEX": "Índex",
"GLOSSARY_OPEN": "Glossari",
"GITBOOK_LINK": "Publicat amb GitBook",
"SUMMARY": "Taula de contingut",
"SUMMARY_INTRODUCTION": "Introducció",
"SUMMARY_TOGGLE": "Taula de contingut",
"SEARCH_TOGGLE": "Cercar",
"SEARCH_PLACEHOLDER": "Escriu per cercar",
"FONTSETTINGS_TOGGLE": "Configuració de font",
"SHARE_TOGGLE": "Compartir",
"SHARE_ON": "Compartir en {{platform}}",
"FONTSETTINGS_WHITE": "Clar",
"FONTSETTINGS_SEPIA": "Sèpia",
"FONTSETTINGS_NIGHT": "Nit",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
{
"LANGS_CHOOSE": "Zvolte jazyk",
"GLOSSARY": "Slovníček",
"GLOSSARY_INDEX": "Rejstřík",
"GLOSSARY_OPEN": "Slovníček",
"GITBOOK_LINK": "Publikováno pomocí GitBook",
"SUMMARY": "Obsah",
"SUMMARY_INTRODUCTION": "Úvod",
"SUMMARY_TOGGLE": "Obsah",
"SEARCH_TOGGLE": "Hledání",
"SEARCH_PLACEHOLDER": "Vyhledat",
"FONTSETTINGS_TOGGLE": "Nastavení písma",
"SHARE_TOGGLE": "Sdílet",
"SHARE_ON": "Sdílet na {{platform}}",
"FONTSETTINGS_WHITE": "Bílá",
"FONTSETTINGS_SEPIA": "Sépie",
"FONTSETTINGS_NIGHT": "Noc",
"FONTSETTINGS_SANS": "Bezpatkové",
"FONTSETTINGS_SERIF": "Patkové"
}
{
"LANGS_CHOOSE": "Sprache auswählen",
"GLOSSARY": "Glossar",
"GLOSSARY_INDEX": "Index",
"GLOSSARY_OPEN": "Glossar",
"GITBOOK_LINK": "Veröffentlicht mit GitBook",
"SUMMARY": "Inhaltsverzeichnis",
"SUMMARY_INTRODUCTION": "Einleitung",
"SUMMARY_TOGGLE": "Inhaltsverzeichnis",
"SEARCH_TOGGLE": "Suche",
"SEARCH_PLACEHOLDER": "Suchbegriff eingeben",
"FONTSETTINGS_TOGGLE": "Schrifteinstellungen",
"SHARE_TOGGLE": "Teilen",
"SHARE_ON": "Auf {{platform}} teilen",
"FONTSETTINGS_WHITE": "Hell",
"FONTSETTINGS_SEPIA": "Sepia",
"FONTSETTINGS_NIGHT": "Nacht",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
\ No newline at end of file
{
"LANGS_CHOOSE": "Επιλογή γλώσσας",
"GLOSSARY": "Γλωσσάρι",
"GLOSSARY_INDEX": "Ευρετήριο",
"GLOSSARY_OPEN": "Γλωσσάρι",
"GITBOOK_LINK": "Δημοσιεύτηκε με το GitBook",
"SUMMARY": "Πίνακας Περιεχομένων",
"SUMMARY_INTRODUCTION": "Εισαγωγή",
"SUMMARY_TOGGLE": "Πίνακας Περιεχομένων",
"SEARCH_TOGGLE": "Αναζήτηση",
"SEARCH_PLACEHOLDER": "Αναζήτηση για ...",
"FONTSETTINGS_TOGGLE": "Επιλογές γραμματοσειράς",
"SHARE_TOGGLE": "Κοινοποίηση",
"SHARE_ON": "Κοινοποίηση σε {{platform}}",
"FONTSETTINGS_WHITE": "Λευκό",
"FONTSETTINGS_SEPIA": "Καστανόχρους",
"FONTSETTINGS_NIGHT": "Βραδινό",
"FONTSETTINGS_SANS": "Χωρίς πατούρες",
"FONTSETTINGS_SERIF": "Με πατούρες"
}
{
"LANGS_CHOOSE": "Choose a language",
"GLOSSARY": "Glossary",
"GLOSSARY_INDEX": "Index",
"GLOSSARY_OPEN": "Glossary",
"GITBOOK_LINK": "Published with GitBook",
"SUMMARY": "Table of Contents",
"SUMMARY_INTRODUCTION": "Introduction",
"SUMMARY_TOGGLE": "Table of Contents",
"SEARCH_TOGGLE": "Search",
"SEARCH_PLACEHOLDER": "Type to search",
"SEARCH_RESULTS_TITLE": "<span class='search-results-count'></span> results matching \"<span class='search-query'></span>\"",
"SEARCH_NO_RESULTS_TITLE": "No results matching \"<span class='search-query'></span>\"",
"FONTSETTINGS_TOGGLE": "Font Settings",
"SHARE_TOGGLE": "Share",
"SHARE_ON": "Share on {{platform}}",
"FONTSETTINGS_WHITE": "White",
"FONTSETTINGS_SEPIA": "Sepia",
"FONTSETTINGS_NIGHT": "Night",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
{
"LANGS_CHOOSE": "Selecciona un idioma",
"GLOSSARY": "Glosario",
"GLOSSARY_INDEX": "Índice",
"GLOSSARY_OPEN": "Glosario",
"GITBOOK_LINK": "Publicado con GitBook",
"SUMMARY": "Tabla de contenido",
"SUMMARY_INTRODUCTION": "Introducción",
"SUMMARY_TOGGLE": "Tabla de contenido",
"SEARCH_TOGGLE": "Buscar",
"SEARCH_PLACEHOLDER": "Escribe para buscar",
"FONTSETTINGS_TOGGLE": "Configuración de fuente",
"SHARE_TOGGLE": "Compartir",
"SHARE_ON": "Compartir en {{platform}}",
"FONTSETTINGS_WHITE": "Claro",
"FONTSETTINGS_SEPIA": "Sépia",
"FONTSETTINGS_NIGHT": "Noche",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
{
"LANGS_CHOOSE": "انتخاب زبان",
"GLOSSARY": "واژه‌نامه",
"GLOSSARY_INDEX": "فهرست واژه‌ها",
"GLOSSARY_OPEN": "واژه‌نامه",
"GITBOOK_LINK": "انتشار یافته توسط GitBook",
"SUMMARY": "فهرست مطالب",
"SUMMARY_INTRODUCTION": "مقدمه",
"SUMMARY_TOGGLE": "فهرست مطالب",
"SEARCH_TOGGLE": "جستجو",
"SEARCH_PLACEHOLDER": "چیزی برای جستجو بنویسید",
"FONTSETTINGS_TOGGLE": "تنظیمات فونت",
"SHARE_TOGGLE": "اشتراک",
"SHARE_ON": "در {{platform}} به اشتراک بگذارید",
"FONTSETTINGS_WHITE": "سفید",
"FONTSETTINGS_SEPIA": "سپیا",
"FONTSETTINGS_NIGHT": "شب",
"FONTSETTINGS_SANS": "سنس",
"FONTSETTINGS_SERIF": "سریف"
}
{
"LANGS_CHOOSE": "Valitse kieli",
"GLOSSARY": "Sanasto",
"GLOSSARY_INDEX": "Hakemisto",
"GLOSSARY_OPEN": "Sanasto",
"GITBOOK_LINK": "Julkaistu GitBookilla",
"SUMMARY": "Sisällysluettelo",
"SUMMARY_INTRODUCTION": "Johdanto",
"SUMMARY_TOGGLE": "Sisällysluettelu",
"SEARCH_TOGGLE": "Etsi",
"SEARCH_PLACEHOLDER": "Kirjoita hakusana",
"FONTSETTINGS_TOGGLE": "Fonttivalinnat",
"SHARE_TOGGLE": "Jaa",
"SHARE_ON": "Jaa {{platform}}ssa",
"FONTSETTINGS_WHITE": "Valkoinen",
"FONTSETTINGS_SEPIA": "Seepia",
"FONTSETTINGS_NIGHT": "Yö",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
{
"LANGS_CHOOSE": "Choisissez une langue",
"GLOSSARY": "Glossaire",
"GLOSSARY_INDEX": "Index",
"GLOSSARY_OPEN": "Glossaire",
"GITBOOK_LINK": "Publié avec GitBook",
"SUMMARY": "Table des matières",
"SUMMARY_INTRODUCTION": "Introduction",
"SUMMARY_TOGGLE": "Table des matières",
"SEARCH_TOGGLE": "Recherche",
"SEARCH_PLACEHOLDER": "Tapez pour rechercher",
"FONTSETTINGS_TOGGLE": "Paramètres de Police",
"SHARE_TOGGLE": "Partage",
"SHARE_ON": "Partager sur {{platform}}",
"FONTSETTINGS_WHITE": "Clair",
"FONTSETTINGS_SEPIA": "Sépia",
"FONTSETTINGS_NIGHT": "Nuit",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
\ No newline at end of file
{
"LANGS_CHOOSE": "בחר שפה",
"GLOSSARY": "מונחים",
"GLOSSARY_INDEX": "מפתח",
"GLOSSARY_OPEN": "מונחים",
"GITBOOK_LINK": "הוצאה לאור באמצעות גיט-בוק GITBOOK",
"SUMMARY": "תוכן העניינים",
"SUMMARY_INTRODUCTION": "הוראות",
"SUMMARY_TOGGLE": "תקציר",
"SEARCH_TOGGLE": "חיפוש",
"SEARCH_PLACEHOLDER": "סוג החיפוש",
"FONTSETTINGS_TOGGLE": "הגדרת אותיות",
"SHARE_TOGGLE": "שתף",
"SHARE_ON": "{{platform}} שתף ב",
"FONTSETTINGS_WHITE": "בהיר",
"FONTSETTINGS_SEPIA": "חום כהה",
"FONTSETTINGS_NIGHT": "מצב לילה",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
{
"LANGS_CHOOSE": "Scegli una lingua",
"GLOSSARY": "Glossario",
"GLOSSARY_INDEX": "Indice",
"GLOSSARY_OPEN": "Glossario",
"GITBOOK_LINK": "Pubblicato con GitBook",
"SUMMARY": "Sommario",
"SUMMARY_INTRODUCTION": "Introduzione",
"SUMMARY_TOGGLE": "Sommario",
"SEARCH_TOGGLE": "Cerca",
"SEARCH_PLACEHOLDER": "Scrivi per cercare",
"FONTSETTINGS_TOGGLE": "Impostazioni dei caratteri",
"SHARE_TOGGLE": "Condividi",
"SHARE_ON": "Condividi su {{platform}}",
"FONTSETTINGS_WHITE": "Bianco",
"FONTSETTINGS_SEPIA": "Seppia",
"FONTSETTINGS_NIGHT": "Notte",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
\ No newline at end of file
{
"LANGS_CHOOSE": "言語を選択",
"GLOSSARY": "用語集",
"GLOSSARY_INDEX": "索引",
"GLOSSARY_OPEN": "用語集",
"GITBOOK_LINK": "GitBookで公開 ",
"SUMMARY": "目次",
"SUMMARY_INTRODUCTION": "はじめに",
"SUMMARY_TOGGLE": "目次",
"SEARCH_TOGGLE": "検索",
"SEARCH_PLACEHOLDER": "検索すると入力",
"FONTSETTINGS_TOGGLE": "フォント設定",
"SHARE_TOGGLE": "シェア",
"SHARE_ON": "{{platform}}でシェア",
"FONTSETTINGS_WHITE": "白",
"FONTSETTINGS_SEPIA": "セピア",
"FONTSETTINGS_NIGHT": "夜",
"FONTSETTINGS_SANS": "ゴシック体",
"FONTSETTINGS_SERIF": "明朝体"
}
{
"LANGS_CHOOSE": "언어를 선택하세요",
"GLOSSARY": "어휘",
"GLOSSARY_INDEX": "색인",
"GLOSSARY_OPEN": "어휘",
"GITBOOK_LINK": "GitBook에 게시",
"SUMMARY": "차례",
"SUMMARY_INTRODUCTION": "소개",
"SUMMARY_TOGGLE": "차례",
"SEARCH_TOGGLE": "검색",
"SEARCH_PLACEHOLDER": "검색어 입력",
"FONTSETTINGS_TOGGLE": "글꼴 설정",
"SHARE_TOGGLE": "공유",
"SHARE_ON": "{{platform}}에 공유",
"FONTSETTINGS_WHITE": "화이트",
"FONTSETTINGS_SEPIA": "세피아",
"FONTSETTINGS_NIGHT": "나이트",
"FONTSETTINGS_SANS": "고딕",
"FONTSETTINGS_SERIF": "명조"
}
{
"LANGS_CHOOSE": "Kies een taal",
"GLOSSARY": "Begrippenlijst",
"GLOSSARY_INDEX": "Index",
"GLOSSARY_OPEN": "Begrippenlijst",
"GITBOOK_LINK": "Gepubliceerd met GitBook",
"SUMMARY": "Inhoudsopgave",
"SUMMARY_INTRODUCTION": "Inleiding",
"SUMMARY_TOGGLE": "Inhoudsopgave",
"SEARCH_TOGGLE": "Zoeken",
"SEARCH_PLACEHOLDER": "Zoeken",
"FONTSETTINGS_TOGGLE": "Lettertype instellingen",
"SHARE_TOGGLE": "Delen",
"SHARE_ON": "Delen op {{platform}}",
"FONTSETTINGS_WHITE": "Wit",
"FONTSETTINGS_SEPIA": "Sepia",
"FONTSETTINGS_NIGHT": "Zwart",
"FONTSETTINGS_SANS": "Schreefloos",
"FONTSETTINGS_SERIF": "Schreef"
}
{
"LANGS_CHOOSE": "Velg språk",
"GLOSSARY": "Register",
"GLOSSARY_INDEX": "Indeks",
"GLOSSARY_OPEN": "Register",
"GITBOOK_LINK": "Publisert med GitBook",
"SUMMARY": "Innholdsfortegnelse",
"SUMMARY_INTRODUCTION": "Innledning",
"SUMMARY_TOGGLE": "Innholdsfortegnelse",
"SEARCH_TOGGLE": "Søk",
"SEARCH_PLACEHOLDER": "Skriv inn søkeord",
"FONTSETTINGS_TOGGLE": "Tekstinnstillinger",
"SHARE_TOGGLE": "Del",
"SHARE_ON": "Del på {{platform}}",
"FONTSETTINGS_WHITE": "Lys",
"FONTSETTINGS_SEPIA": "Sepia",
"FONTSETTINGS_NIGHT": "Mørk",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
{
"LANGS_CHOOSE": "Wybierz język",
"GLOSSARY": "Glosariusz",
"GLOSSARY_INDEX": "Indeks",
"GLOSSARY_OPEN": "Glosariusz",
"GITBOOK_LINK": "Opublikowano dzięki GitBook",
"SUMMARY": "Spis treści",
"SUMMARY_INTRODUCTION": "Wstęp",
"SUMMARY_TOGGLE": "Spis treści",
"SEARCH_TOGGLE": "Szukaj",
"SEARCH_PLACEHOLDER": "Wpisz szukaną frazę",
"FONTSETTINGS_TOGGLE": "Ustawienia czcionki",
"SHARE_TOGGLE": "Udostępnij",
"SHARE_ON": "Udostępnij na {{platform}}",
"FONTSETTINGS_WHITE": "Jasny",
"FONTSETTINGS_SEPIA": "Sepia",
"FONTSETTINGS_NIGHT": "Noc",
"FONTSETTINGS_SANS": "Bezszeryfowa",
"FONTSETTINGS_SERIF": "Szeryfowa"
}
{
"LANGS_CHOOSE": "Escolher sua língua",
"GLOSSARY": "Glossário",
"GLOSSARY_INDEX": "Índice",
"GLOSSARY_OPEN": "Glossário",
"GITBOOK_LINK": "Publicado com GitBook",
"SUMMARY": "Tabela de conteúdos",
"SUMMARY_INTRODUCTION": "Introdução",
"SUMMARY_TOGGLE": "Tabela de conteúdos",
"SEARCH_TOGGLE": "Pesquise",
"SEARCH_PLACEHOLDER": "Escreva para pesquisar",
"FONTSETTINGS_TOGGLE": "Configurações de fonte",
"SHARE_TOGGLE": "Compartilhar",
"SHARE_ON": "Compartilhar no {{platform}}",
"FONTSETTINGS_WHITE": "Claro",
"FONTSETTINGS_SEPIA": "Sépia",
"FONTSETTINGS_NIGHT": "Noite",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
{
"LANGS_CHOOSE": "Alege o limba",
"GLOSSARY": "Glosar",
"GLOSSARY_INDEX": "Index",
"GLOSSARY_OPEN": "Glosar",
"GITBOOK_LINK": "Publicata cu GitBook",
"SUMMARY": "Cuprins",
"SUMMARY_INTRODUCTION": "Introducere",
"SUMMARY_TOGGLE": "Cuprins",
"SEARCH_TOGGLE": "Cauta",
"SEARCH_PLACEHOLDER": "Ce cauti",
"FONTSETTINGS_TOGGLE": "Setari de font",
"SHARE_TOGGLE": "Distribuie",
"SHARE_ON": "Distribuie pe {{platform}}",
"FONTSETTINGS_WHITE": "Alb",
"FONTSETTINGS_SEPIA": "Sepia",
"FONTSETTINGS_NIGHT": "Noapte",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
{
"LANGS_CHOOSE": "Выберите язык",
"GLOSSARY": "Алфавитный указатель",
"GLOSSARY_INDEX": "Алфавитный указатель",
"GLOSSARY_OPEN": "Алфавитный указатель",
"GITBOOK_LINK": "Опубликовано с помощью GitBook",
"SUMMARY": "Содержание",
"SUMMARY_INTRODUCTION": "Введение",
"SUMMARY_TOGGLE": "Содержание",
"SEARCH_TOGGLE": "Поиск",
"SEARCH_PLACEHOLDER": "Введите условия поиска",
"FONTSETTINGS_TOGGLE": "Шрифт",
"SHARE_TOGGLE": "Поделиться",
"SHARE_ON": "Поделиться в {{platform}}",
"FONTSETTINGS_WHITE": "Светлый",
"FONTSETTINGS_SEPIA": "Сепия",
"FONTSETTINGS_NIGHT": "Тёмный",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
\ No newline at end of file
{
"LANGS_CHOOSE": "Välj språk",
"GLOSSARY": "Gloslista",
"GLOSSARY_INDEX": "Index",
"GLOSSARY_OPEN": "Gloslista",
"GITBOOK_LINK": "Publicera med GitBook",
"SUMMARY": "Innehållsförteckning",
"SUMMARY_INTRODUCTION": "Inledning",
"SUMMARY_TOGGLE": "Innehållsförteckning",
"SEARCH_TOGGLE": "Sök",
"SEARCH_PLACEHOLDER": "Skriv sökord",
"FONTSETTINGS_TOGGLE": "Textinställningar",
"SHARE_TOGGLE": "Dela",
"SHARE_ON": "Dela på {{platform}}",
"FONTSETTINGS_WHITE": "Ljus",
"FONTSETTINGS_SEPIA": "Sepia",
"FONTSETTINGS_NIGHT": "Mörk",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
{
"LANGS_CHOOSE": "Dil seçimi",
"GLOSSARY": "Sözlük",
"GLOSSARY_INDEX": "Dizin",
"GLOSSARY_OPEN": "Sözlük",
"GITBOOK_LINK": "GitBook ile yayınla",
"SUMMARY": "İçindekiler",
"SUMMARY_INTRODUCTION": "Giriş",
"SUMMARY_TOGGLE": "İçindekiler",
"SEARCH_TOGGLE": "Arama",
"SEARCH_PLACEHOLDER": "Aramak istediğiniz",
"FONTSETTINGS_TOGGLE": "Font Ayarları",
"SHARE_TOGGLE": "Paylaş",
"SHARE_ON": "{{platform}} ile paylaş",
"FONTSETTINGS_WHITE": "Beyaz",
"FONTSETTINGS_SEPIA": "Sepya",
"FONTSETTINGS_NIGHT": "Karanlık",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
{
"LANGS_CHOOSE": "Виберіть мову",
"GLOSSARY": "Алфавітний покажчик",
"GLOSSARY_INDEX": "Алфавітний покажчик",
"GLOSSARY_OPEN": "Алфавітний покажчик",
"GITBOOK_LINK": "Опубліковано за допомогою GitBook",
"SUMMARY": "Зміст",
"SUMMARY_INTRODUCTION": "Вступ",
"SUMMARY_TOGGLE": "Зміст",
"SEARCH_TOGGLE": "Пошук",
"SEARCH_PLACEHOLDER": "Введіть для пошуку",
"FONTSETTINGS_TOGGLE": "Шрифт",
"SHARE_TOGGLE": "Поділитися",
"SHARE_ON": "Поділитися в {{platform}}",
"FONTSETTINGS_WHITE": "Світлий",
"FONTSETTINGS_SEPIA": "Сепія",
"FONTSETTINGS_NIGHT": "Темний",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
\ No newline at end of file
{
"LANGS_CHOOSE": "Lựa chọn ngôn ngữ",
"GLOSSARY": "Chú giải",
"GLOSSARY_INDEX": "Chỉ mục",
"GLOSSARY_OPEN": "Chú giải",
"GITBOOK_LINK": "Xuất bản với GitBook",
"SUMMARY": "Mục Lục",
"SUMMARY_INTRODUCTION": "Giới thiệu",
"SUMMARY_TOGGLE": "Mục Lục",
"SEARCH_TOGGLE": "Tìm kiếm",
"SEARCH_PLACEHOLDER": "Nhập thông tin cần tìm",
"FONTSETTINGS_TOGGLE": "Tùy chỉnh phông chữ",
"SHARE_TOGGLE": "Chia sẻ",
"SHARE_ON": "Chia sẻ trên {{platform}}",
"FONTSETTINGS_WHITE": "Sáng",
"FONTSETTINGS_SEPIA": "Vàng nâu",
"FONTSETTINGS_NIGHT": "Tối",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
{
"LANGS_CHOOSE": "选择一种语言",
"GLOSSARY": "术语表",
"GLOSSARY_INDEX": "索引",
"GLOSSARY_OPEN": "术语表",
"GITBOOK_LINK": "本书使用 GitBook 发布",
"SUMMARY": "目录",
"SUMMARY_INTRODUCTION": "介绍",
"SUMMARY_TOGGLE": "目录",
"SEARCH_TOGGLE": "搜索",
"SEARCH_PLACEHOLDER": "输入并搜索",
"FONTSETTINGS_TOGGLE": "字体设置",
"SHARE_TOGGLE": "分享",
"SHARE_ON": "分享到 {{platform}}",
"FONTSETTINGS_WHITE": "白色",
"FONTSETTINGS_SEPIA": "棕褐色",
"FONTSETTINGS_NIGHT": "夜间",
"FONTSETTINGS_SANS": "无衬线体",
"FONTSETTINGS_SERIF": "衬线体"
}
{
"LANGS_CHOOSE": "選擇一種語言",
"GLOSSARY": "術語表",
"GLOSSARY_INDEX": "索引",
"GLOSSARY_OPEN": "術語表",
"GITBOOK_LINK": "本書使用 GitBook 釋出",
"SUMMARY": "目錄",
"SUMMARY_INTRODUCTION": "介紹",
"SUMMARY_TOGGLE": "目錄",
"SEARCH_TOGGLE": "搜尋",
"SEARCH_PLACEHOLDER": "輸入並搜尋",
"FONTSETTINGS_TOGGLE": "字型設定",
"SHARE_TOGGLE": "分享",
"SHARE_ON": "分享到 {{platform}}",
"FONTSETTINGS_WHITE": "白色",
"FONTSETTINGS_SEPIA": "棕褐色",
"FONTSETTINGS_NIGHT": "夜間",
"FONTSETTINGS_SANS": "無襯線體",
"FONTSETTINGS_SERIF": "襯線體"
}
{% extends "layout.html" %}
{% block title %}{{ page.title }}{% endblock %}
{% block description %}{{ page.description }}{% endblock %}
{% block style %}
{### Include theme css before plugins css ###}
{% if not fileExists(config.styles.print) %}
{% if options.format %}
<link rel="stylesheet" href="{{ (options.format + ".css")|resolveAsset }}">
{% else %}
<link rel="stylesheet" href="{{ "ebook.css"|resolveAsset }}">
{% endif %}
{% endif %}
{{ super() }}
{### Custom stylesheets for the book ###}
{% for type, style in config.styles %}
{% if fileExists(style) and (type == "ebook" or type == "print" or type == options.format) %}
<link rel="stylesheet" href="{{ style|resolveFile }}">
{% endif %}
{% endfor %}
{% endblock %}
{% block body %}
<div class="page">
{% block page %}
<h1 class="book-chapter book-chapter-{{ page.depth }}">{{ page.title }}</h1>
<div class="section">
{{ page.content|safe }}
</div>
{% endblock %}
</div>
{% endblock %}
{% extends "./page.html" %}
{% block body %}
<div class="pdf-footer">
<span>{{ page.section }}</span>
<span class="footer-pages-count">{{ page.num }}</span>
</div>
{% endblock %}
{% extends "./page.html" %}
{% block body %}
<div class="pdf-header">
<span>{{ page.title }}</span>
</div>
{% endblock %}
{% extends "./page.html" %}
{% block title %}{{ "SUMMARY"|t }}{% endblock %}
{% macro articles(_articles) %}
{% for article in _articles %}
<li>
<span class="inner">
{% if article.path or article.url %}
{% if article.path %}
<a href="{{ article.path|contentURL }}{{ article.anchor }}">{{ article.title }}</a>
{% else %}
<a target="_blank" href="{{ article.url }}">{{ article.title }}</a>
{% endif %}
{% else %}
<span>{{ article.title }}</span>
{% endif %}
{% if 1 %}
<span class="page">{{ article.level }}</span>
{% endif %}
</span>
{% if article.articles.length > 0 %}
<ol>
{{ articles(article.articles) }}
</ol>
{% endif %}
</li>
{% endfor %}
{% endmacro %}
{% block page %}
<div class="section toc">
<h1>{{ "SUMMARY"|t }}</h1>
<ol>
{% for part in summary.parts %}
{% if part.title %}
<li class="part-title">
<h2>{{ part.title }}</h2>
</li>
{% endif %}
{{ articles(part.articles) }}
{% if not loop.last %}
<li class="divider"></li>
{% endif %}
{% endfor %}
{% if glossary.path %}
<li>
<span class="inner">
<a href="{{ ('/' + glossary.path)|contentURL }}">{{ "GLOSSARY"|t }}</a>
</span>
</li>
{% endif %}
</ol>
</div>
{% endblock %}
<!DOCTYPE HTML>
<html lang="{{ config.language }}" {% if page.dir == "rtl" %}dir="rtl"{% endif %}>
<head>
<meta charset="UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>{% block title %}{{ config.title|d("GitBook", true) }}{% endblock %}</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="{% block description %}{% endblock %}">
<meta name="generator" content="GitBook {{ gitbook.version }}">
{% if config.author %}<meta name="author" content="{{ config.author }}">{% endif %}
{% if config.isbn %}<meta name="identifier" content="{{ config.isbn }}" scheme="ISBN">{% endif %}
{% block style %}
{% for resource in plugins.resources.css %}
{% if resource.url %}
<link rel="stylesheet" href="{{ resource.url }}">
{% else %}
<link rel="stylesheet" href="{{ resource.path|resolveAsset }}">
{% endif %}
{% endfor %}
{% endblock %}
{% block head %}{% endblock %}
</head>
<body>
{% block body %}{% endblock %}
{% block javascript %}{% endblock %}
</body>
</html>
{% extends "./layout_body.html" %}
{% block javascript %}
<script src="{{ "gitbook.js"|resolveAsset }}"></script>
<script src="{{ "theme.js"|resolveAsset }}"></script>
{% for resource in plugins.resources.js %}
{% if resource.url %}
<script src="{{ resource.url }}"></script>
{% else %}
<script src="{{ resource.path|resolveAsset }}"></script>
{% endif %}
{% endfor %}
{% endblock %}
{% block body %}
<div class="book">
<div class="book-summary">
{% block book_sidebar %}
{% block search_input %}{% endblock %}
{% block book_summary %}
<nav role="navigation">
{% include "website/summary.html" %}
</nav>
{% endblock %}
{% endblock %}
</div>
<div class="book-body">
{% block book_body %}
<div class="body-inner">
{% block book_inner %}
{% include "website/header.html" %}
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
{% block search_results %}
<section class="normal markdown-section">
{% block page %}
{{ page.content|safe }}
{% endblock %}
</section>
{% endblock %}
</div>
</div>
{% endblock %}
</div>
{% block book_navigation %}
{% if page.previous and page.previous.path %}
<a href="{{ page.previous.path|resolveFile }}{{ page.previous.anchor }}" class="navigation navigation-prev {% if not (page.next and page.next.path) %}navigation-unique{% endif %}" aria-label="Previous page: {{ page.previous.title }}">
<i class="fa fa-angle-left"></i>
</a>
{% endif %}
{% if page.next and page.next.path %}
<a href="{{ page.next.path|resolveFile }}{{ page.next.anchor }}" class="navigation navigation-next {% if not (page.previous and page.previous.path) %}navigation-unique{% endif %}" aria-label="Next page: {{ page.next.title }}">
<i class="fa fa-angle-right"></i>
</a>
{% endif %}
{% endblock %}
{% endblock %}
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({{ template.getJSContext()|dump|safe }});
});
</script>
</div>
{% endblock %}
{% block book_header %}
<div class="book-header" role="navigation">
{% if glossary.path %}
<a href="{{ ('/' + glossary.path)|resolveFile }}" class="btn pull-left" aria-label="{{ "GLOSSARY_OPEN"|t }}"><i class="fa fa-sort-alpha-asc"></i></a>
{% endif %}
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href="{{ "/"|resolveFile }}" >{{ page.title }}</a>
</h1>
</div>
{% endblock %}
{% extends "./layout.html" %}
{% block title %}{{ "LANGS_CHOOSE"|t }} · {{ super() }}{% endblock %}
{% block body %}
<div class="book-langs-index" role="navigation">
<div class="inner">
<h3>{{ "LANGS_CHOOSE"|t }}</h3>
<ul class="languages">
{% for lang in languages.list %}
<li>
<a href="{{ (lang.id + "/README.md")|contentURL }}">{{ lang.title }}</a>
</li>
{% endfor %}
</ul>
</div>
</div>
{% endblock %}
{% extends "layout.html" %}
{% block head %}
{{ super() }}
<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="{{ "images/apple-touch-icon-precomposed-152.png"|resolveAsset }}">
<link rel="shortcut icon" href="{{ "images/favicon.ico"|resolveAsset }}" type="image/x-icon">
{% endblock %}
{% block style %}
{### Include theme css before plugins css ###}
<link rel="stylesheet" href="{{ "style.css"|resolveAsset }}">
{{ super() }}
{### Custom stylesheets for the book ###}
{% for type, style in config.styles %}
{% if fileExists(style) and type == "website" %}
<link rel="stylesheet" href="{{ style|resolveFile }}">
{% endif %}
{% endfor %}
{% endblock %}
{% block body %}{% endblock %}
{% block body %}{% endblock %}
{% block javascript %}{% endblock %}
{% extends "./layout.html" %}
{% block title %}{{ page.title }} · {{ super() }}{% endblock %}
{% block description %}{{ page.description }}{% endblock %}
{% block head %}
{{ super() }}
{% if page.next and page.next.path %}
<link rel="next" href="{{ page.next.path|resolveFile }}" />
{% endif %}
{% if page.previous and page.previous.path %}
<link rel="prev" href="{{ page.previous.path|resolveFile }}" />
{% endif %}
{% endblock %}
{% block javascript %}
<script src="{{ "gitbook.js"|resolveAsset }}"></script>
<script src="{{ "theme.js"|resolveAsset }}"></script>
{% for resource in plugins.resources.js %}
{% if resource.url %}
<script src="{{ resource.url }}"></script>
{% else %}
<script src="{{ resource.path|resolveAsset }}"></script>
{% endif %}
{% endfor %}
{% endblock %}
{% block body %}
<div class="book">
<div class="book-summary">
{% block book_sidebar %}
{% block search_input %}{% endblock %}
{% block book_summary %}
<nav role="navigation">
{% include "website/summary.html" %}
</nav>
{% endblock %}
{% endblock %}
</div>
<div class="book-body">
{% block book_body %}
<div class="body-inner">
{% block book_inner %}
{% include "website/header.html" %}
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
{% block search_results %}
<section class="normal markdown-section">
{% block page %}
{{ page.content|safe }}
{% endblock %}
</section>
{% endblock %}
</div>
</div>
{% endblock %}
</div>
{% block book_navigation %}
{% if page.previous and page.previous.path %}
<a href="{{ page.previous.path|resolveFile }}{{ page.previous.anchor }}" class="navigation navigation-prev {% if not (page.next and page.next.path) %}navigation-unique{% endif %}" aria-label="Previous page: {{ page.previous.title }}">
<i class="fa fa-angle-left"></i>
</a>
{% endif %}
{% if page.next and page.next.path %}
<a href="{{ page.next.path|resolveFile }}{{ page.next.anchor }}" class="navigation navigation-next {% if not (page.previous and page.previous.path) %}navigation-unique{% endif %}" aria-label="Next page: {{ page.next.title }}">
<i class="fa fa-angle-right"></i>
</a>
{% endif %}
{% endblock %}
{% endblock %}
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({{ template.getJSContext()|dump|safe }});
});
</script>
</div>
{% endblock %}
{% macro articles(_articles) %}
{% for article in _articles %}
<li class="chapter {% if article.path == file.path and not article.anchor %}active{% endif %}" data-level="{{ article.level }}" {% if article.path %}data-path="{{ article.path|resolveFile }}"{% endif %}>
{% if article.path and getPageByPath(article.path) %}
<a href="{{ article.path|resolveFile }}{{ article.anchor }}">
{% elif article.url %}
<a target="_blank" href="{{ article.url }}">
{% else %}
<span>
{% endif %}
{% if article.level != "0" and config.pluginsConfig['theme-default'].showLevel %}
<b>{{ article.level }}.</b>
{% endif %}
{{ article.title }}
{% if article.path or article.url %}
</a>
{% else %}
</span>
{% endif %}
{% if article.articles.length > 0 %}
<ul class="articles">
{{ articles(article.articles, file, config) }}
</ul>
{% endif %}
</li>
{% endfor %}
{% endmacro %}
<ul class="summary">
{% set _divider = false %}
{% if config.links.sidebar %}
{% for linkTitle, link in config.links.sidebar %}
{% set _divider = true %}
<li>
<a href="{{ link }}" target="_blank" class="custom-link">{{ linkTitle }}</a>
</li>
{% endfor %}
{% endif %}
{% if _divider %}
<li class="divider"></li>
{% endif %}
{% for part in summary.parts %}
{% if part.title %}
<li class="header">{{ part.title }}</li>
{% elif not loop.first %}
<li class="divider"></li>
{% endif %}
{{ articles(part.articles, file, config) }}
{% endfor %}
<li class="divider"></li>
<li>
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
{{ "GITBOOK_LINK"|t }}
</a>
</li>
</ul>
module.exports = {
hooks: {
config: function(config) {
config.styles = config.styles || config.pluginsConfig['theme-hugo'].styles;
return config;
}
}
};
{
"name": "gitbook-plugin-theme-hugo",
"description": "The GitBook theme for hugo",
"main": "./index.js",
"version": "1.0.7",
"engines": {
"gitbook": ">=3.0.0"
},
"dependencies": {},
"devDependencies": {
"browserify": "13.1.0",
"eslint": "3.6.1",
"font-awesome": "4.6.3",
"preboot": "git+https://github.com/mdo/preboot.git#4aab4edd85f076d50609cbe28e4fe66cc0771701",
"gitbook-logos": "git+https://github.com/GitbookIO/logos.git#2.0.2",
"gitbook-markdown-css": "1.0.1",
"jquery": "3.1.1",
"less": "2.7.1",
"less-plugin-clean-css": "1.5.1",
"mousetrap": "1.6.0",
"uglify-js": "2.7.3"
},
"scripts": {
"prepublish": "./src/build.sh"
},
"repository": {
"type": "git",
"url": "https://gitee.com/openeuler/gitbook-theme-hugo.git"
},
"author": "freesky-edward <freesky.edward@gmail.com>",
"license": "Apache-2.0",
"bugs": {
"url": "https://gitee.com/openeuler/gitbook-theme-hugo/issues"
},
"contributors": [
{
"name": "Samy Pessé",
"email": "samy@gitbook.com"
},
{
"name": "Edward",
"email": "freesky.edward@gmail.com"
}
],
"gitbook": {
"properties": {
"styles": {
"type": "object",
"title": "Custom Stylesheets",
"properties": {
"website": {
"title": "Stylesheet for website output",
"default": "styles/website.css"
},
"pdf": {
"title": "Stylesheet for PDF output",
"default": "styles/pdf.css"
},
"epub": {
"title": "Stylesheet for ePub output",
"default": "styles/epub.css"
},
"mobi": {
"title": "Stylesheet for Mobi output",
"default": "styles/mobi.css"
},
"ebook": {
"title": "Stylesheet for ebook outputs (PDF, ePub, Mobi)",
"default": "styles/ebook.css"
},
"print": {
"title": "Stylesheet to replace default ebook css",
"default": "styles/print.css"
}
}
},
"showLevel": {
"type": "boolean",
"title": "Show level indicator in TOC",
"default": false
}
}
}
}
#! /bin/bash
# Cleanup folder
rm -rf _assets
# Recreate folder
mkdir -p _assets/website/
mkdir -p _assets/ebook/
# Compile JS
browserify src/js/core/index.js | uglifyjs -mc > _assets/website/gitbook.js
browserify src/js/theme/index.js | uglifyjs -mc > _assets/website/theme.js
# Compile Website CSS
lessc -clean-css src/less/website.less _assets/website/style.css
# Compile eBook CSS
lessc -clean-css src/less/ebook.less _assets/ebook/ebook.css
lessc -clean-css src/less/pdf.less _assets/ebook/pdf.css
lessc -clean-css src/less/mobi.less _assets/ebook/mobi.css
lessc -clean-css src/less/epub.less _assets/ebook/epub.css
# Copy fonts
mkdir -p _assets/website/fonts
cp -R node_modules/font-awesome/fonts/ _assets/website/fonts/fontawesome/
# Copy icons
mkdir -p _assets/website/images
cp node_modules/gitbook-logos/output/favicon.ico _assets/website/images/
cp node_modules/gitbook-logos/output/apple-touch-icon-152.png _assets/website/images/apple-touch-icon-precomposed-152.png
\ No newline at end of file
var $ = require('jquery');
module.exports = $({});
var $ = require('jquery');
var events = require('./events');
var storage = require('./storage');
var page = require('./page');
var isPageReady = false;
var onLoad = window.gitbook || [];
// Export APIs for plugins
var gitbook = {
events: events,
page: page,
// Deprecated
state: page.getState(),
// Read/Write the localstorage
storage: storage,
// Push a function to be called once gitbook is ready
push: function(fn) {
if (!isPageReady) onLoad.push(fn);
else fn();
}
};
// Modules mapping for plugins
var MODULES = {
'gitbook': gitbook,
'jquery': $
};
window.gitbook = gitbook;
window.$ = $;
window.jQuery = $;
window.require = function(mods, fn) {
mods = mods.map(function(mod) {
mod = mod.toLowerCase();
if (!MODULES[mod]) {
throw new Error('GitBook module '+mod+' doesn\'t exist');
}
return MODULES[mod];
});
fn.apply(null, mods);
};
$(document).ready(function() {
isPageReady = true;
// Call pile of function once GitBook is ready
$.each(onLoad, function(i, fn) {
fn();
});
});
var $ = require('jquery');
var url = require('url');
var path = require('path');
var events = require('./events');
var started = false;
var state = {};
/*
Signal that page has changed, this function must be called by
themes after page is loaded and when navigation changed
*/
function hasChanged(ctx) {
console.log('page has changed', ctx); // eslint-disable-line no-console
setState(ctx);
if (!started) {
// Notify that gitbook is ready
started = true;
events.trigger('start', ctx.config.pluginsConfig);
}
events.trigger('page.change');
}
/*
Update current state
data-level="{{ page.level }}"
data-chapter-title="{{ page.title }}"
data-filepath="{{ file.path }}"
data-basepath="{{ './'|resolveFile }}"
data-revision="{{ gitbook.time }}"
data-innerlanguage="{{ innerlanguage }}">
*/
function setState(newState) {
// API since GitBook v3
state.page = newState.page;
state.file = newState.file;
state.gitbook = newState.gitbook;
state.config = newState.config;
state.basePath = newState.basePath;
state.book = newState.book;
// Deprecated
state.$book = $('.book');
state.revision = state.gitbook.time;
state.level = state.page.level;
state.filepath = state.file.path;
state.chapterTitle = state.page.title;
state.innerLanguage = state.book.language || '';
// Absolute url to the root of the book (inner book)
state.root = url.resolve(
location.protocol+'//'+location.host,
path.dirname(path.resolve(location.pathname.replace(/\/$/, '/index.html'), state.basePath))
).replace(/\/?$/, '/');
// Absolute root to the language (for multilingual book)
state.bookRoot = state.innerLanguage? url.resolve(state.root, '..') : state.root;
}
/*
Return state of current page
*/
function getState() {
return state;
}
module.exports = {
hasChanged: hasChanged,
setState: setState,
getState: getState
};
var baseKey = '';
/*
* Simple module for storing data in the browser's local storage
*/
module.exports = {
setBaseKey: function(key) {
baseKey = key;
},
// Write something in localstorage
set: function(key, value) {
key = baseKey+':'+key;
try {
localStorage[key] = JSON.stringify(value);
} catch(e) {} // eslint-disable-line no-empty
},
// Read a value from localstorage
get: function(key, def) {
var value;
key = baseKey+':'+key;
// We need a try block here because window.localStorage is
// inaccessible when browser cookies are disabled.
try {
value = localStorage[key];
} catch(e) {} // eslint-disable-line no-empty
if (value === undefined) return def;
try {
var parsed = JSON.parse(value);
return parsed == null ? def : parsed;
} catch(err) {
return value || def;
}
},
// Remove a key from localstorage
remove: function(key) {
key = baseKey+':'+key;
try {
localStorage.removeItem(key);
} catch(e) {} // eslint-disable-line no-empty
}
};
var $ = require('jquery');
function toggleDropdown(e) {
var $dropdown = $(e.currentTarget).parent().find('.dropdown-menu');
$dropdown.toggleClass('open');
e.stopPropagation();
e.preventDefault();
}
function closeDropdown(e) {
$('.dropdown-menu').removeClass('open');
}
// Bind all dropdown
function init() {
$(document).on('click', '.toggle-dropdown', toggleDropdown);
$(document).on('click', '.dropdown-menu', function(e){ e.stopPropagation(); });
$(document).on('click', closeDropdown);
}
module.exports = {
init: init
};
var dropdown = require('./dropdown');
var keyboard = require('./keyboard');
var navigation = require('./navigation');
var sidebar = require('./sidebar');
var toolbar = require('./toolbar');
var gitbook = window.gitbook;
function init() {
// Init sidebar
sidebar.init();
// Init keyboard
keyboard.init();
// Bind dropdown
dropdown.init();
// Init navigation
navigation.init();
// Add action to toggle sidebar
toolbar.createButton({
index: 0,
icon: 'fa fa-align-justify',
onClick: function(e) {
e.preventDefault();
sidebar.toggle();
}
});
}
gitbook.events.on('start', init);
gitbook.keyboard = keyboard;
gitbook.navigation = navigation;
gitbook.sidebar = sidebar;
gitbook.toolbar = toolbar;
var Mousetrap = require('mousetrap');
var navigation = require('./navigation');
var sidebar = require('./sidebar');
// Bind a keyboard shortcuts
function bindShortcut(keys, fn) {
Mousetrap.bind(keys, function(e) {
fn();
return false;
});
}
// Bind keyboard shortcuts
function init() {
// Next
bindShortcut(['right'], function(e) {
navigation.goNext();
});
// Prev
bindShortcut(['left'], function(e) {
navigation.goPrev();
});
// Toggle Summary
bindShortcut(['s'], function(e) {
sidebar.toggle();
});
}
module.exports = {
init: init,
bind: bindShortcut
};
var gitbook = window.gitbook;
function showLoading(p) {
gitbook.state.$book.addClass('is-loading');
p.always(function() {
gitbook.state.$book.removeClass('is-loading');
});
return p;
}
module.exports = {
show: showLoading
};
var $ = require('jquery');
var url = require('url');
var loading = require('./loading');
var platform = require('./platform');
var gitbook = window.gitbook;
var usePushState = (typeof history.pushState !== 'undefined');
/*
Get current scroller element
*/
function getScroller() {
if (platform.isSmallScreen()) {
return $('.book-body');
} else {
return $('.body-inner');
}
}
/*
Scroll to a specific hash tag in the content
*/
function scrollToHash(hash) {
var $scroller = getScroller(),
dest = 0;
// Don't try to scroll if element doesn't exist
if (!pageHasElement(hash)) {
return;
}
if (hash) {
dest = getElementTopPosition(hash);
}
// Unbind scroll detection
$scroller.unbind('scroll');
$scroller.animate({
scrollTop: dest
}, 800, 'swing', function() {
// Reset scroll binding when finished
$scroller.scroll(handleScrolling);
});
// Directly set chapter as active
setChapterActive(null, hash);
}
/*
Return wether the element exists on the page
*/
function pageHasElement(id) {
var $scroller = getScroller(),
$el = $scroller.find(id);
return !!$el.length;
}
/*
Utility functions
*/
// Checks if a jQuery element is empty
function isEmpty(element) {
return element.length === 0;
}
// Any returns true if the predicate is true on any of the elements in the list
function any(arr, predicate) {
return arr.length > 0 && arr.filter(predicate).length > 0;
}
/*
Return the top position of an element
*/
function getElementTopPosition(id) {
// Get actual position of element if nested
var $scroller = getScroller(),
$container = $scroller.find('.page-inner'),
$el = $scroller.find(id),
$parent = $el.offsetParent(),
dest = 0;
// Exit early if we can't find any of those elements
if (any([$scroller, $container, $el, $parent], isEmpty)) {
return 0;
}
dest = $el.position().top;
// Note: this could be a while loop, but to avoid any chances of infinite loops
// we'll limit the max iterations to 10
var MAX_ITERATIONS = 10;
for (var i = 0; i < MAX_ITERATIONS; i++) {
// Stop when we find the element's ancestor just below $container
// or if we hit the top of the dom (parent's parent is itself)
if ($parent.is($container) || $parent.is($parent.offsetParent())) {
break;
}
// Go up the DOM tree, to the next parent
$el = $parent;
dest += $el.position().top;
$parent = $el.offsetParent();
}
// Return rounded value since
// jQuery scrollTop() returns an integer
return Math.floor(dest);
}
/*
Handle updating summary at scrolling
*/
var $chapters,
$activeChapter;
// Set a chapter as active in summary and update state
function setChapterActive($chapter, hash) {
// No chapter and no hash means first chapter
if (!$chapter && !hash) {
$chapter = $chapters.first();
}
// If hash is provided, set as active chapter
if (!!hash) {
// Multiple chapters for this file
if ($chapters.length > 1) {
$chapter = $chapters.filter(function() {
var titleId = getChapterHash($(this));
return titleId == hash;
}).first();
}
// Only one chapter, no need to search
else {
$chapter = $chapters.first();
}
}
// Don't update current chapter
if ($chapter.is($activeChapter)) {
return;
}
// Update current active chapter
$activeChapter = $chapter;
// Add class to selected chapter
$chapters.removeClass('active');
$chapter.addClass('active');
// Update history state if needed
hash = getChapterHash($chapter);
var oldUri = window.location.pathname + window.location.hash,
uri = window.location.pathname + hash;
if (uri != oldUri) {
history.replaceState({ path: uri }, null, uri);
}
}
// Return the hash of link for a chapter
function getChapterHash($chapter) {
var $link = $chapter.children('a'),
hash = $link.attr('href').split('#')[1];
if (hash) hash = '#'+hash;
return (!!hash)? hash : '';
}
// Handle user scrolling
function handleScrolling() {
// Get current page scroll
var $scroller = getScroller(),
scrollTop = $scroller.scrollTop(),
scrollHeight = $scroller.prop('scrollHeight'),
clientHeight = $scroller.prop('clientHeight'),
nbChapters = $chapters.length,
$chapter = null;
// Find each title position in reverse order
$($chapters.get().reverse()).each(function(index) {
var titleId = getChapterHash($(this)),
titleTop;
if (!!titleId && !$chapter) {
titleTop = getElementTopPosition(titleId);
// Set current chapter as active if scroller passed it
if (scrollTop >= titleTop) {
$chapter = $(this);
}
}
// If no active chapter when reaching first chapter, set it as active
if (index == (nbChapters - 1) && !$chapter) {
$chapter = $(this);
}
});
// ScrollTop is at 0, set first chapter anyway
if (!$chapter && !scrollTop) {
$chapter = $chapters.first();
}
// Set last chapter as active if scrolled to bottom of page
if (!!scrollTop && (scrollHeight - scrollTop == clientHeight)) {
$chapter = $chapters.last();
}
setChapterActive($chapter);
}
/*
Handle a change of url withotu refresh the whole page
*/
var prevUri = location.href;
function handleNavigation(relativeUrl, push) {
var prevUriParsed = url.parse(prevUri);
var uri = url.resolve(window.location.pathname, relativeUrl);
var uriParsed = url.parse(uri);
var hash = uriParsed.hash;
// Is it the same url (just hash changed?)
var pathHasChanged = (uriParsed.pathname !== prevUriParsed.pathname);
// Is it an absolute url
var isAbsolute = Boolean(uriParsed.hostname);
if (!usePushState || isAbsolute) {
// Refresh the page to the new URL if pushState not supported
location.href = relativeUrl;
return;
}
// Don't fetch same page
if (!pathHasChanged) {
if (push) history.pushState({ path: uri }, null, uri);
return scrollToHash(hash);
}
prevUri = uri;
var promise = $.Deferred(function(deferred) {
$.ajax({
type: 'GET',
url: uri,
cache: true,
headers:{
'Access-Control-Expose-Headers': 'X-Current-Location'
},
success: function(html, status, xhr) {
// For GitBook.com, we handle redirection signaled by the server
var responseURL = xhr.getResponseHeader('X-Current-Location') || uri;
// Replace html content
html = html.replace( /<(\/?)(html|head|body)([^>]*)>/ig, function(a,b,c,d){
return '<' + b + 'div' + ( b ? '' : ' data-element="' + c + '"' ) + d + '>';
});
var $page = $(html),
$pageBody = $page.find('.book'),
$pageHead;
// We only use history.pushState for pages generated with GitBook
if ($pageBody.length === 0) {
var err = new Error('Invalid gitbook page, redirecting...');
return deferred.reject(err);
}
// Push url to history
if (push) {
history.pushState({
path: responseURL
}, null, responseURL);
}
// Force reparsing HTML to prevent wrong URLs in Safari
$page = $(html);
$pageHead = $page.find('[data-element=head]');
$pageBody = $page.find('.book');
// Merge heads
// !! Warning !!: we only update necessary portions to avoid strange behavior (page flickering etc ...)
// Update title
document.title = $pageHead.find('title').text();
// Reference to $('head');
var $head = $('head');
// Update next & prev <link> tags
// Remove old
$head.find('link[rel=prev]').remove();
$head.find('link[rel=next]').remove();
// Add new next * prev <link> tags
$head.append($pageHead.find('link[rel=prev]'));
$head.append($pageHead.find('link[rel=next]'));
// Merge body
var bodyClass = $('.book').attr('class');
var scrollPosition = $('.book-summary').scrollTop();
$pageBody.toggleClass('with-summary', $('.book').hasClass('with-summary'));
$('.book').replaceWith($pageBody);
$('.book').attr('class', bodyClass);
$('.book-summary').scrollTop(scrollPosition);
// Update state
gitbook.state.$book = $('.book');
preparePage(!hash);
// Scroll to hashtag position
if (hash) {
scrollToHash(hash);
}
deferred.resolve();
}
});
}).promise();
return loading.show(
promise
.fail(function (e) {
console.log(e); // eslint-disable-line no-console
// location.href = relativeUrl;
})
);
}
function updateNavigationPosition() {
var bodyInnerWidth, pageWrapperWidth;
bodyInnerWidth = parseInt($('.body-inner').css('width'), 10);
pageWrapperWidth = parseInt($('.page-wrapper').css('width'), 10);
$('.navigation-next').css('margin-right', (bodyInnerWidth - pageWrapperWidth) + 'px');
// Reset scroll to get current scroller
var $scroller = getScroller();
// Unbind existing scroll event
$scroller.unbind('scroll');
$scroller.scroll(handleScrolling);
}
function preparePage(resetScroll) {
var $bookBody = $('.book-body');
var $bookInner = $bookBody.find('.body-inner');
var $pageWrapper = $bookInner.find('.page-wrapper');
// Update navigation position
updateNavigationPosition();
// Focus on content
$pageWrapper.focus();
// Get scroller
var $scroller = getScroller();
// Reset scroll
if (resetScroll !== false) {
$scroller.scrollTop(0);
}
// Get current page summary chapters
$chapters = $('.book-summary .summary .chapter')
.filter(function() {
var $link = $(this).children('a'),
href = null;
// Chapter doesn't have a link
if (!$link.length) {
return false;
}
else {
href = $link.attr('href').split('#')[0];
}
var resolvedRef = url.resolve(window.location.pathname, href);
return window.location.pathname == resolvedRef;
});
// Bind scrolling if summary contains more than one link to this page
if ($chapters.length > 1) {
$scroller.scroll(handleScrolling);
}
// Else, set only chapter in summary as active
else {
$activeChapter = $chapters.first();
}
}
function isLeftClickEvent(e) {
return e.button === 0;
}
function isModifiedEvent(e) {
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
}
/*
Handle click on a link
*/
function handleLinkClick(e) {
var $this = $(this);
var target = $this.attr('target');
if (isModifiedEvent(e) || !isLeftClickEvent(e) || target) {
return;
}
e.stopPropagation();
e.preventDefault();
var url = $this.attr('href');
if (url) handleNavigation(url, true);
}
function goNext() {
var url = $('.navigation-next').attr('href');
if (url) handleNavigation(url, true);
}
function goPrev() {
var url = $('.navigation-prev').attr('href');
if (url) handleNavigation(url, true);
}
function init() {
// Prevent cache so that using the back button works
// See: http://stackoverflow.com/a/15805399/983070
$.ajaxSetup({
cache: false
});
// Recreate first page when the page loads.
history.replaceState({ path: window.location.href }, '');
// Back Button Hijacking :(
window.onpopstate = function (event) {
if (event.state === null) {
return;
}
return handleNavigation(event.state.path, false);
};
$(document).on('click', '.navigation-prev', handleLinkClick);
$(document).on('click', '.navigation-next', handleLinkClick);
$(document).on('click', '.summary [data-path] a', handleLinkClick);
$(document).on('click', '.page-inner a', handleLinkClick);
$(window).resize(updateNavigationPosition);
// Prepare current page
preparePage(false);
}
module.exports = {
init: init,
goNext: goNext,
goPrev: goPrev
};
var $ = require('jquery');
module.exports = {
isMobile: function() {
return ($(document).width() <= 600);
},
// Breakpoint for navigation links position
isSmallScreen: function() {
return ($(document).width() <= 1240);
}
};
var $ = require('jquery');
var platform = require('./platform');
var gitbook = window.gitbook;
// Toggle sidebar with or withour animation
function toggleSidebar(_state, animation) {
if (gitbook.state != null && isOpen() == _state) return;
if (animation == null) animation = true;
gitbook.state.$book.toggleClass('without-animation', !animation);
gitbook.state.$book.toggleClass('with-summary', _state);
gitbook.storage.set('sidebar', isOpen());
}
// Return true if sidebar is open
function isOpen() {
return gitbook.state.$book.hasClass('with-summary');
}
// Prepare sidebar: state and toggle button
function init() {
// Init last state if not mobile
if (!platform.isMobile()) {
toggleSidebar(gitbook.storage.get('sidebar', true), false);
}
// Close sidebar after clicking a link on mobile
$(document).on('click', '.book-summary li.chapter a', function(e) {
if (platform.isMobile()) toggleSidebar(false, false);
});
}
// Filter summary with a list of path
function filterSummary(paths) {
var $summary = $('.book-summary');
$summary.find('li').each(function() {
var path = $(this).data('path');
var st = paths == null || paths.indexOf(path) !== -1;
$(this).toggle(st);
if (st) $(this).parents('li').show();
});
}
module.exports = {
init: init,
isOpen: isOpen,
toggle: toggleSidebar,
filter: filterSummary
};
var $ = require('jquery');
var gitbook = window.gitbook;
// List of created buttons
var buttons = [],
// Generated Id for buttons
BTN_ID = 0;
function generateId() {
return 'btn-'+(BTN_ID++);
}
// Insert a jquery element at a specific position
function insertAt(parent, selector, index, element) {
var lastIndex = parent.children(selector).length;
if (index < 0) {
index = Math.max(0, lastIndex + 1 + index);
}
parent.append(element);
if (index < lastIndex) {
parent.children(selector).eq(index).before(parent.children(selector).last());
}
}
// Default click handler
function defaultOnClick(e) {
e.preventDefault();
}
// Create a dropdown menu
function createDropdownMenu(dropdown) {
var $menu = $('<div>', {
'class': 'dropdown-menu',
'html': '<div class="dropdown-caret"><span class="caret-outer"></span><span class="caret-inner"></span></div>'
});
if (typeof dropdown == 'string') {
$menu.append(dropdown);
} else {
var groups = dropdown.map(function(group) {
if ($.isArray(group)) return group;
else return [group];
});
// Create buttons groups
groups.forEach(function(group) {
var $group = $('<div>', {
'class': 'buttons'
});
var sizeClass = 'size-'+group.length;
// Append buttons
group.forEach(function(btn) {
btn = $.extend({
text: '',
className: '',
onClick: defaultOnClick
}, btn || {});
var $btn = $('<button>', {
'class': 'button '+sizeClass+' '+btn.className,
'text': btn.text
});
$btn.click(btn.onClick);
$group.append($btn);
});
$menu.append($group);
});
}
return $menu;
}
// Create a new button in the toolbar
function createButton(opts) {
opts = $.extend({
// Aria label for the button
label: '',
// Icon to show
icon: '',
// Inner text
text: '',
// Right or left position
position: 'left',
// Other class name to add to the button
className: '',
// Triggered when user click on the button
onClick: defaultOnClick,
// Button is a dropdown
dropdown: null,
// Position in the toolbar
index: null,
// Button id for removal
id: generateId()
}, opts || {});
buttons.push(opts);
updateButton(opts);
return opts.id;
}
// Update a button
function updateButton(opts) {
var $result;
var $toolbar = $('.book-header');
var $title = $toolbar.find('h1');
// Build class name
var positionClass = 'pull-'+opts.position;
// Create button
var $btn = $('<a>', {
'class': 'btn',
'text': opts.text? ' ' + opts.text : '',
'aria-label': opts.label,
'href': '#'
});
// Bind click
$btn.click(opts.onClick);
// Prepend icon
if (opts.icon) {
$('<i>', {
'class': opts.icon
}).prependTo($btn);
}
// Prepare dropdown
if (opts.dropdown) {
var $container = $('<div>', {
'class': 'dropdown '+positionClass+' '+opts.className
});
// Add button to container
$btn.addClass('toggle-dropdown');
$container.append($btn);
// Create inner menu
var $menu = createDropdownMenu(opts.dropdown);
// Menu position
$menu.addClass('dropdown-'+(opts.position == 'right'? 'left' : 'right'));
$container.append($menu);
$result = $container;
} else {
$btn.addClass(positionClass);
$btn.addClass(opts.className);
$result = $btn;
}
$result.addClass('js-toolbar-action');
if ($.isNumeric(opts.index) && opts.index >= 0) {
insertAt($toolbar, '.btn, .dropdown, h1', opts.index, $result);
} else {
$result.insertBefore($title);
}
}
// Update all buttons
function updateAllButtons() {
$('.js-toolbar-action').remove();
buttons.forEach(updateButton);
}
// Remove a button provided its id
function removeButton(id) {
buttons = $.grep(buttons, function(button) {
return button.id != id;
});
updateAllButtons();
}
// Remove multiple buttons from an array of ids
function removeButtons(ids) {
buttons = $.grep(buttons, function(button) {
return ids.indexOf(button.id) == -1;
});
updateAllButtons();
}
// When page changed, reset buttons
gitbook.events.on('page.change', function() {
updateAllButtons();
});
module.exports = {
createButton: createButton,
removeButton: removeButton,
removeButtons: removeButtons
};
.alert {
padding: 15px;
margin-bottom: 20px;
color: #444;
background: #eee;
border-bottom: 5px solid #ddd;
}
.alert-success {
background: @state-success-bg;
border-color: @state-success-border;
color: @state-success-text;
}
.alert-info {
background: @state-info-bg;
border-color: @state-info-border;
color: @state-info-text;
}
.alert-danger {
background: @state-danger-bg;
border-color: @state-danger-border;
color: @state-danger-text;
}
.alert-warning {
background: @state-warning-bg;
border-color: @state-warning-border;
color: @state-warning-text;
}
@import "./normalize.less";
@import "./mixins.less";
@import "./alerts.less";
@import "./variables.less";
@import "../../../node_modules/gitbook-markdown-css/less/mixin.less";
.link-inherit {
color: inherit;
&:hover, &:focus {
color: inherit;
}
}
.transition-transform(@transition) {
-webkit-transition: -webkit-transform @transition;
-moz-transition: -moz-transform @transition;
-o-transition: -o-transform @transition;
transition: transform @transition;
}
.hidden {
display: none;
}
.box-sizing(@value) {
-moz-box-sizing: @value;
box-sizing: @value;
}
.text-adjust(@value) {
text-size-adjust: @value;
-ms-text-size-adjust: @value;
-webkit-text-size-adjust: @value;
}
/*! normalize.css v2.1.0 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
display: block;
}
/**
* Correct `inline-block` display not defined in IE 8/9.
*/
audio,
canvas,
video {
display: inline-block;
}
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Address styling not present in IE 8/9.
*/
[hidden] {
display: none;
}
/* ==========================================================================
Base
========================================================================== */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-family: sans-serif; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
-ms-text-size-adjust: 100%; /* 2 */
}
/**
* Remove default margin.
*/
body {
margin: 0;
}
/* ==========================================================================
Links
========================================================================== */
/**
* Address `outline` inconsistency between Chrome and other browsers.
*/
a:focus {
outline: thin dotted;
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0;
}
/* ==========================================================================
Typography
========================================================================== */
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari 5, and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Address styling not present in IE 8/9, Safari 5, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
*/
b,
strong {
font-weight: bold;
}
/**
* Address styling not present in Safari 5 and Chrome.
*/
dfn {
font-style: italic;
}
/**
* Address differences between Firefox and other browsers.
*/
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
/**
* Address styling not present in IE 8/9.
*/
mark {
background: #ff0;
color: #000;
}
/**
* Correct font family set oddly in Safari 5 and Chrome.
*/
code,
kbd,
pre,
samp {
font-family: monospace, serif;
font-size: 1em;
}
/**
* Improve readability of pre-formatted text in all browsers.
*/
pre {
white-space: pre-wrap;
}
/**
* Set consistent quote types.
*/
q {
quotes: "\201C" "\201D" "\2018" "\2019";
}
/**
* Address inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* ==========================================================================
Embedded content
========================================================================== */
/**
* Remove border when inside `a` element in IE 8/9.
*/
img {
border: 0;
}
/**
* Correct overflow displayed oddly in IE 9.
*/
svg:not(:root) {
overflow: hidden;
}
/* ==========================================================================
Figures
========================================================================== */
/**
* Address margin not present in IE 8/9 and Safari 5.
*/
figure {
margin: 0;
}
/* ==========================================================================
Forms
========================================================================== */
/**
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct `color` not being inherited in IE 8/9.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}
/**
* 1. Correct font family not being inherited in all browsers.
* 2. Correct font size not being inherited in all browsers.
* 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
*/
button,
input,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 2 */
margin: 0; /* 3 */
}
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
button,
input {
line-height: normal;
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
* Correct `select` style inheritance in Firefox 4+ and Opera.
*/
button,
select {
text-transform: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
}
/**
* Re-set default cursor for disabled elements.
*/
button[disabled],
html input[disabled] {
cursor: default;
}
/**
* 1. Address box sizing set to `content-box` in IE 8/9.
* 2. Remove excess padding in IE 8/9.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
/**
* Remove inner padding and search cancel button in Safari 5 and Chrome
* on OS X.
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Remove inner padding and border in Firefox 4+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* 1. Remove default vertical scrollbar in IE 8/9.
* 2. Improve readability and alignment in all browsers.
*/
textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
}
/* ==========================================================================
Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}
\ No newline at end of file
// States and alerts
@state-success-text: #3c763d;
@state-success-bg: #dff0d8;
@state-success-border: darken(spin(@state-success-bg, -10), 5%);
@state-info-text: #31708f;
@state-info-bg: #d9edf7;
@state-info-border: darken(spin(@state-info-bg, -10), 7%);
@state-warning-text: #8a6d3b;
@state-warning-bg: #fcf8e3;
@state-warning-border: darken(spin(@state-warning-bg, -10), 5%);
@state-danger-text: #a94442;
@state-danger-bg: #f2dede;
@state-danger-border: darken(spin(@state-danger-bg, -10), 5%);
@import "./ebook/base.less";
@import "../base/all.less";
@import "./variables.less";
@import "./summary.less";
body {
font-family: @font-family-base;
color: @text-color;
.text-adjust(100%);
}
.page {
// Section and first titles
.section {
.gitbook-markdown(@md-color: @text-color, @md-line-height: 1.6, @md-link-color: @link-color);
}
// Hide the title (only used to build PDF table of content)
.book-chapter {
display: none;
}
}
.page .section pre {
word-wrap: break-word;
}
.section.toc {
> h1 {
text-align: center;
}
> ol {
margin: 0px;
padding: 0px;
}
h2 {
}
li {
list-style: none;
.inner {
display: block;
border-bottom: 1px dotted #eee;
margin-bottom: 4px;
a, span {
padding-right: 5px;
border-bottom: 1px solid #fff;
margin-bottom: -1px;
}
.page {
float: right;
padding-left: 5px;
}
}
ol {
margin: 0px;
padding: 0px;
padding-left: 2em;
}
}
}
// For LTR, fix direction of table of content
.dir-rtl {
.section.toc {
li {
.inner {
.page {
float: left;
}
}
ol {
margin: 0px;
padding: 0px;
padding-right: 2em;
}
}
}
}
@font-size-base: 13px;
@font-family-base: sans-serif;
@text-color: #000;
@link-color: #4183c4;
@import "./ebook/base.less";
@font-family-base: serif;
@import "./ebook/base.less";
@font-family-base: serif;
@link-color: #000;
a {
color: #000;
text-decoration: underline !important;
}
.page-toc {
li {
list-style-type: lower-alpha;
.inner {
border: none;
span.page {
display: none;
}
}
}
}
@import "./ebook/base.less";
.pdf-footer {
margin-top: 20px;
padding-top: 10px;
border-top: 1px solid #eee;
color:#aaa;
.footer-pages-count {
float: right;
}
}
.pdf-header {
margin-top: 20px;
padding-bottom: 10px;
border-bottom: 1px solid #eee;
color: #aaa;
}
@import "base/all.less";
@import "../../node_modules/font-awesome/less/font-awesome.less";
@import "../../node_modules/preboot/less/preboot.less";
@import "website/variables.less";
@import "website/languages.less";
@import "website/header.less";
@import "website/dropdown.less";
@import "website/summary.less";
@import "website/body.less";
@import "website/page.less";
@import "website/buttons.less";
@import "website/markup.less";
@import "website/navigation.less";
@import "website/search.less";
* {
.box-sizing(border-box);
-webkit-overflow-scrolling: touch;
-webkit-tap-highlight-color: transparent;
-webkit-text-size-adjust: none;
-webkit-touch-callout: none;
-webkit-font-smoothing: antialiased;
}
a {
text-decoration: none;
}
html, body {
height: 100%;
}
html {
font-size: 62.5%;
}
body {
text-rendering: optimizeLegibility;
font-smoothing: antialiased;
font-family: @font-family-base;
font-size: @font-size-base;
letter-spacing: .2px;
.text-adjust(100%);
}
.book {
position: relative;
width: 100%;
height: 100%;
&.with-summary {
@media (min-width: @sidebar-breakpoint) {
.book-body {
left: @sidebar-width;
}
}
@media (max-width: @sidebar-breakpoint) {
overflow: hidden;
.book-body {
.translate(~"calc(100% - 60px)", 0px);
}
}
}
&.without-animation {
.book-body {
.transition(none) !important;
}
}
}
.book-body {
position: absolute;
top: 0px;
right: 0px;
left: 0px;
bottom: 0px;
overflow-y: auto;
color: @page-color;
background: @body-background;
.transition(left @sidebar-transition-duration ease);
.body-inner {
position: absolute;
top: 0px;
right: 0px;
left: 0px;
bottom: 0px;
overflow-y: auto;
}
@media (max-width: @mobileMaxWidth) {
.transition-transform(@sidebar-transition-duration ease);
padding-bottom: 20px;
.body-inner {
position: static;
min-height: calc(~"100% - 50px")
}
}
}
.buttons {
.clearfix();
}
.button {
border: 0;
background-color: transparent;
background: @button-background;
color: @button-color;
width: 100%;
text-align: center;
float: left;
line-height: @line-height-base;
padding: 8px 4px;
&:hover {
color: @button-hover-color;
}
&:focus, &:hover {
outline: none;
}
&.size-2 {
width: 50%;
}
&.size-3 {
width: 33%;
}
}
.dropdown {
position: relative;
}
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: @dropdown-zindex;
display: none; // none by default, but block on "open" of the menu
float: left;
min-width: 160px;
padding: 0;
margin: 2px 0 0; // override default ul
list-style: none;
font-size: @font-size-base;
background-color: @dropdown-background;
border: 1px solid @dropdown-border-color;
border-radius: @border-radius-base;
.box-shadow(0 6px 12px rgba(0,0,0,.175));
background-clip: padding-box;
&.open{
display:block;
}
&.dropdown-left {
left: auto;
right: 4%;
.dropdown-caret {
right: 14px;
left: auto;
}
}
.dropdown-caret{
position: absolute;
top: -8px;
left: 14px;
width: 18px;
height: 10px;
float: left;
overflow: hidden;
.caret-outer{
position: absolute;
border-left: 9px solid transparent;
border-right: 9px solid transparent;
border-bottom: 9px solid rgba(0,0,0,0.1);
height: auto;
left: 0;
top: 0;
width: auto;
display: inline-block;
margin-left: -1px;
}
.caret-inner{
position: absolute;
display: inline-block;
margin-top: -1px;
top: 0;
top: 1px;
border-left: 9px solid transparent;
border-right: 9px solid transparent;
border-bottom: 9px solid @dropdown-background;
}
}
.buttons {
.clearfix();
border-bottom: 1px solid @sidebar-divider-color;
&:last-child {
border-bottom: none;
}
.button {
border: 0;
background-color: transparent;
color: @dropdown-button-color;
width: 100%;
text-align: center;
float: left;
line-height: @line-height-base;
padding: 8px 4px;
&:hover {
color: @dropdown-button-hover-color;
}
&:focus, &:hover {
outline: none;
}
&.size-2 {
width: 50%;
}
&.size-3 {
width: 33%;
}
}
}
}
.book-header {
font-family: @font-family-sans;
overflow: visible;
height: @header-height;
padding: 0px 8px;
z-index: 2;
font-size: 0.85em;
color: @header-color;
background: @header-background;
.btn {
display: block;
height: @header-height;
padding: 0px 15px;
border-bottom: none;
color: @header-button-color;
text-transform: uppercase;
line-height: @header-height;
.box-shadow(none) !important;
position:relative;
font-size: @font-size-base;
&:hover {
position: relative;
text-decoration: none;
color: @header-button-hover-color;
background: @header-button-hover-background;
}
&:focus {
outline: none;
}
}
h1 {
margin: 0px;
font-size: 20px;
font-weight: 200;
text-align: center;
line-height: @header-height;
opacity: 0;
.transition(opacity ease 0.4s);
padding-left: 200px;
padding-right: 200px;
.transition(opacity 0.2s ease);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
a, a:hover {
color: inherit;
text-decoration: none;
}
@media (max-width: 1000px) {
display: none;
}
i {
display: none;
}
}
&:hover {
h1 {
opacity: 1;
}
}
}
.book {
&.is-loading {
.book-header h1 {
i {
display: inline-block;
}
a {
display: none;
}
}
}
}
.book-langs-index {
width: 100%;
height: 100%;
padding: 40px 0px;
margin: 0px;
overflow: auto;
@media (max-width: 600px) {
padding: 0px;
}
.inner {
max-width: 600px;
width: 100%;
margin: 0px auto;
padding: 30px;
background: #fff;
border-radius: 3px;
h3 {
margin: 0px;
}
.languages {
list-style: none;
padding: 20px 30px;
margin-top: 20px;
border-top: 1px solid #eee;
.clearfix();
li {
width: 50%;
float: left;
padding: 10px 5px;
font-size: 16px;
a {
}
@media (max-width: 600px) {
width: 100%;
max-width: 100%;
}
}
}
}
}
\ No newline at end of file
.markdown-section {
.gitbook-markdown(@md-color: @content-color, @md-line-height: @content-line-height);
.glossary-term {
cursor: help;
text-decoration: underline;
}
}
/*
Right/Left buttons to change page
*/
.navigation {
position: absolute;
top: @header-height;
bottom: 0px;
margin: 0;
max-width: 150px;
min-width: 90px;
display: flex;
justify-content: center;
align-content: center;
flex-direction: column;
font-size: 40px;
color: @navigation-color;
text-align: center;
.transition(all 350ms ease);
&:hover {
text-decoration: none;
color: @navigation-hover-color;
}
&.navigation-next {
right: 0px;
}
&.navigation-prev {
left: 0px;
}
}
@media (max-width: @mobileMaxWidth) {
.navigation {
position: static;
top: auto;
max-width: 50%;
width: 50%;
display: inline-block;
float: left;
&.navigation-unique {
max-width: 100%;
width: 100%;
}
}
}
.page-wrapper {
position: relative;
outline: none;
}
.page-inner {
position: relative;
max-width: 800px;
margin: 0px auto;
padding: 20px 15px 40px 15px;
.btn-group {
.btn {
border-radius: 0px;
background: #eee;
border: 0px;
}
}
}
/*
Search input and results, works in sync with the "search" plugin
*/
#book-search-input {
padding: 6px;
background: transparent;
transition: top 0.5s ease;
background: #fff;
border-bottom: 1px solid @header-border;
border-top: 1px solid @header-border;
margin-bottom: 10px;
// Move top to hide top border
margin-top: -1px;
input, input:focus, input:hover {
width: 100%;
background: transparent;
border: 1px solid transparent;
box-shadow: none;
outline: none;
line-height: 22px;
padding: 7px 7px;
color: inherit;
}
}
#book-search-results {
opacity: 1;
.search-results {
.search-results-title {
text-transform: uppercase;
text-align: center;
font-weight: 200;
margin-bottom: 35px;
opacity: 0.6;
}
.has-results {
.search-results-item {
.gitbook-markdown(@md-color: @content-color, @md-line-height: @content-line-height);
}
.search-results-item h3 {
margin-top: 0px;
margin-bottom: 0px;
}
}
.no-results {
padding: 40px 0px;
}
}
}
body.search-loading {
#book-search-results {
opacity: 0.3;
}
}
// When search is enabled, we hide the navigation left/right
body.with-search {
.navigation {
display: none;
}
}
.book-summary {
font-family: @font-family-sans;
position: absolute;
top: 0px;
left: -@sidebar-width;
bottom: 0px;
z-index: 1;
overflow-y: auto;
width: @sidebar-width;
color: @sidebar-color;
background: @sidebar-background;
border-right: @sidebar-border-right;
.transition(left @sidebar-transition-duration ease);
ul.summary {
list-style: none;
margin: 0px;
padding: 0px;
.transition(top 0.5s ease);
li {
list-style: none;
&.header {
padding: @sidebar-link-padding-v @sidebar-link-padding-h;
padding-top: 20px;
text-transform: uppercase;
color: @sidebar-header-color;
}
&.divider {
height: 1px;
margin: 7px 0;
overflow: hidden;
background: @sidebar-divider-color;
}
i.fa-check {
display: none;
position: absolute;
right: 9px;
top: 16px;
font-size: 9px;
color: @sidebar-icon-color;
}
&.done {
> a {
color: @sidebar-link-completed;
font-weight: @sidebar-link-completed-weight;
i {
display: inline;
}
}
}
a, span {
display: block;
padding: @sidebar-link-padding-v @sidebar-link-padding-h;
border-bottom: none;
color: @sidebar-link-color;
background: @sidebar-link-background;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
position: relative;
}
a:hover {
text-decoration: underline;
}
a:focus {
outline: none;
}
&.active > a {
color: @sidebar-link-hover-color;
background: @sidebar-link-hover-background;
text-decoration: none;
}
ul {
padding-left: @sidebar-nested-padding;
}
}
}
@media (max-width: @sidebar-breakpoint) {
width: calc(~"100% - 60px");
bottom: 0px;
left: -100%;
}
}
.book {
&.with-summary {
.book-summary {
left: 0px;
}
}
&.without-animation {
.book-summary {
.transition(none) !important;
}
}
}
@staticPath: ".";
// Font sizes
@font-size-base: 14px;
@font-size-large: ceil(@font-size-base * 1.25); // ~18px
@font-size-small: ceil(@font-size-base * 0.85); // ~12px
@line-height-base: 1.428571429; // 20/14
@line-height-computed: floor(@font-size-base * @line-height-base);
// Sizes
@mobileMaxWidth: 1240px;
// Header
@header-height: 50px;
@header-color: hsl(194, 5%, 52%);
@header-background: transparent;
@header-border: rgba(0, 0, 0, 0.07);
@header-button-color: #ccc;
@header-button-hover-color: #444;
@header-button-hover-background: none;
// Navigation
@navigation-color: @header-button-color;
@navigation-hover-color: @header-button-hover-color;
// Body
@body-background: white;
// Sidebar
@sidebar-transition-duration: 250ms;
@sidebar-width: 300px;
@sidebar-breakpoint: 600px;
@sidebar-color: hsl(207, 15%, 25%);
@sidebar-background: #fafafa;
@sidebar-border-right: 1px solid @header-border;
@sidebar-nested-padding: 20px;
@sidebar-divider-color: @header-border;
@sidebar-header-color: #939da3;
@sidebar-link-color: @sidebar-color;
@sidebar-link-background: transparent;
@sidebar-link-hover-color: hsl(207, 100%, 50%);
@sidebar-link-hover-background: transparent;
@sidebar-link-padding-v: 10px;
@sidebar-link-padding-h: 15px;
@sidebar-icon-color: hsl(120, 60%, 50%);
@sidebar-link-completed: @sidebar-link-color;
@sidebar-link-completed-weight: normal;
// Search
@search-padding-default: 1.5rem;
@search-results-opacity: 0.95;
@search-highlight-color: rgba(255, 220, 0, 0.4);
// Page
@page-color: black;
@page-background: @body-background;
// Content
@content-line-height: 1.7;
@content-color: #333333;
// Dropdown
@dropdown-zindex: 100;
@dropdown-divider-color: @sidebar-divider-color;
@dropdown-background: @sidebar-background;
@dropdown-button-color: darken(@header-button-color, 15%);
@dropdown-border-color: @sidebar-divider-color;
@dropdown-button-hover-color: @header-button-hover-color;
// Buttons
@button-background: #eee;
@button-color: #666;
@button-hover-color: #444;
// Border Radius
@border-radius-base: 1px;
@border-radius-large: 3px;
@border-radius-small: 1px;
// Fonts
@font-family-serif: Georgia, serif;
@font-family-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
@font-family-base: @font-family-sans;
@headings-font-family: inherit;
@FontPath: '@{staticPath}/fonts';
@fa-font-path: "@{FontPath}/fontawesome";
@s-font-size: 1.2rem;
@m-font-size: 1.4rem;
@l-font-size: 1.6rem;
@xl-font-size: 2.2rem;
@xxl-font-size: 4.0rem;
@default-font-size: @l-font-size;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册