new pages

This commit is contained in:
Jeremy Kidwell 2019-12-17 08:52:27 +00:00
commit 4a60cc6011
33 changed files with 2262 additions and 0 deletions

23
01-introduction.Rmd Normal file
View file

@ -0,0 +1,23 @@
# Introduction
So you want to run a conference online. Or maybe you're concerned that you aren't reaching the right audience and want to spice things up a bit? Or, like me, you're anxious about the carbon footprint of these kinds of activities and want to find a more sustainable way to run a conference.
This toolkit has been designed with all these things in mind. However, my abiding concern is to ensure that digital or digitally-enhanced conferences are *better* because of the use of technology and not merely cheaper to organise. So in the highly opinionated commentary below, you will find that the end result will be *more* and not *less* work. If you're looking to run a digital conference to save yourself some trouble, then this is absolutely not the guide for you. I am firmly convinced that doing this kind of enhancement does actually make things better, more sustainable, more accessible, but done poorly, digital conferences actually can either make a good conference pointless, or worse than it might have otherwise been. And if we're really going to advocate for low-carbon approaches to things, it is a rather important part of the overall evangelism for this cause to avoid pitching this as a concession.
If you're still with me, that's a good sign! Now, here's a sense of the structure of this toolkit. I'm aware than many readers may want to pick and choose, so this is deliberately segmented.
1. Prologue: finding your conference genre
Here I set up a series of queries to enable users to better specify their needs and identify possible areas where design work around the sensitive integration of technology might fit.
2. My (anti-)Platform approach
A summary of options, particularly tailored to the kinds of discernment generated from the previous excercise.
3. Engagement
How do you meaningfully engage with users? Should I use that cool digital tool I saw on facebook last week? We discuss here how to set up engagement that works.
4. Epilogue: how things might be?
In a bit of speculative wondering I ponder my perfect scenario and examine some not-yet-proven tools which may yet prove exciting.

40
02-prologue.Rmd Normal file
View file

@ -0,0 +1,40 @@
# Prologue: finding your conference genre
I'm going to provide a series of questions that everyone should answer, at least briefly, as part of a process of discerning what kind of conference is going to be run and how best to dovetail technology with the proceedings. You can copy this to a document and fill in with details which will be useful to have in hand
1. Are you planning to run a purely digital event or would you like to enhance a residential event with digital content?
Answer code: (a) all-digital or (b) hybrid
2. What sorts of goals do you have for the programming? (check all that apply) Is it:
a. to disseminate information? (one-way)
b. to disseminate information and process it afterwards with the speaker? (one-to-many)
b. to facilitate discussion and exchange views? (two-way)
c. to conduct deliberative processes, possibly resulting in a decision? (two-way-deliberation)
3. How many people need to be involved in each activity?
a. up to 10 (small group)
b. 10-50 (community)
c. more than 50 (meta-community)
4. What is the span of time zones that will be included?
a. only 1
b. 2-4 (with a maximum divergence of 4 hours across any two participants)
c. 5-8
d. 8 or more
5. How much time do you need for presentations? Discussion?
a. 8 hours or less combined
b. at least 2-3 days
c. a week or more
6. How extended can your proceedings be?
a. This needs to be planned across a very narrow window of time (e.g. exclusively across the time allocated for Q5 above)
b. I can expect participants to be engaged across a full week
c. I can expect participants to be engaged across a full month
d. I can expect participants to be engaged across a several months to a year

47
03-platforms.Rmd Normal file
View file

@ -0,0 +1,47 @@
# Platforms
This is often the first question, and as I've already suggested implicitly above, it shoudln't be. There are dozens of possible platforms and technologies you can use. Some are just plainly awful, but others are good at some tasks and not at others. Some are expensive, and some are free. Others can be self-hosted with adequate planning. There are a few things you need to know about videoconferencing which will set the stage for quite a lot of your thinking about best practices:
Ten facts about videoconferencing:
1. There are basically three ways to exchange audiovisual information with a large group. All of these approaches try and implement different ways to get around lag or delay in the av stream. Lag and delay are very bad, and as such should be prevented at all costs. In my view, if you aren't willing to make a good faith effort to avoid these things, you shouldn't be including videoconferencing in your event.
The most obvious way is by playing a *pre-recorded video*. There are a range of software applications that can be used to do this, and don't take for granted that production quality matters, but this is also the most straight forward approach. The primary advantage here is that viewers can digest at their own pace, stopping and starting so as to most fully understand the video. Also if there are technical problems on the receiving end, the viewer can always restart and try again (assuming you've given them enough time to do so). There are also less obvious advantages, particularly around accessibility of content. Pre-recorded sessions can have subtitles or translations added.
The second way is to use a live stream. Live streams can be: (a) one-way (so viewers aren't sending a stream of their own back with comments, etc.) or (b) two-way. And, perhaps the least appreciated underlying difference among various technologies lies in the way that data is sent to your computer. AV streams are always broken into manageable bits that can be sent out, but this data can be sent **directly** from a server, or they can be distributed in a **peer-to-peer** mesh. In a direct connection, two computers pass information directly - one to one. This is actually unusual as this places quite a heavy load on that main server. A peer-to-peer connection essentially disseminates the information to a few computers who then participate in the process of distribution with others. This distributes load and can create possibilties for ad hoc connections which don't require expensive direct internet connections. However, this also introduces new opportunities for error.
There are also two factors to internet connections which need to be considered: (1) latency and (2) bandwidth...
# Why platforms?
A lot of people are focussed on the choice of platform, and this can tend to obscure the range of options available. Why assume that you need to make use of a single platform to perform all the tasks involved in hosting a conference? At the very least, you've already used email to correspond with your delegates, and possibly to coordinate with co-hosts. I highly recommend that you fracture your approach by focussing on functions which need to performed, identify the risks associated with the use of technology to perform these tasks, and then choose the best option which addresses these risks well for your context. Some platforms will perform several functions well, but it is very rare that they will perform all of them exceptionally. It is also quite likely that some of these functions need to be performed live, or synchronously, whereas others do not need to be, particularly if you're running an all-digital conference.
# Thinking in terms of "functions"
(1) administrative/back-channel discussion
This relates to chats which are purely logistical in nature, individuals may need to be reminded when the session starts, or of the groundrules for discussion, or to troubleshoot issues, one individual might need to be reminded to mute their mic so they aren't distracting, another might need help getting access to audio or fielding questions about timing and procedure.
(2a) audio/video stream for speakers / facilitators
(2b) content hosting
This relates to the occasioal need to share files, if a speaker has powerpoint slides to share, or if a paper is going to be distributed in advance. You may want to restrict access to this content.
(2c) recording of presentations for re-viewing
(2d) recording of discussion or deliberations for re-viewing
(3) session Q&A
(4) audio/video stream from non-speakers
(5) decision making activities
(1) Video-streaming
Some highly opinionated suggestions based on the conference scenarios you outlined in the previous setion:
(1)

15
04-engagement.Rmd Normal file
View file

@ -0,0 +1,15 @@
# Rules of Engagement
If technology is going to *help* with access to a conference, it is crucially important to put together an engagement plan.
10 key questions:
(1) What modes of communication will delegates be using? Email? Audio? Twitter? Instagram? Facebook?
(2) (how) Can you use those channels for engagement that improves access and quality of engagement?
(3) Who will monitor channels and provide engagement? Can a person meaningfully engage with multiple streams concurrently?
(5) What are the ground-rules for participation? (e.g. should one person be allowed monopolise the discussion? do you want to have some mode of deference in place to particular participants? what kinds of behaviour might affect the experience of others and thus be discouraged? what kids of behaviour might help the experience of others and thus be encouraged? are there specific types of participation - on topic, off topic, etc. which have different priority in discussion?)
(4) Who will communicate and enforce the ground-rules for your session?

4
README.md Normal file
View file

@ -0,0 +1,4 @@
A brief toolkit outlining best practices for scholars & activists who want to run wholly-digital or digitally-enhanced conferences and workshops. Produced using [bookdown](https://bookdown.org/home/about.html)
All of the content of this repository is licensed
[CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/).

7
_bookdown.yml Normal file
View file

@ -0,0 +1,7 @@
book_filename: "bookdown-start"
chapter_name: "Chapter "
repo: https://github.com/kidwellj/oer_digital_conferences
output_dir: docs
rmd_files: ["index.Rmd", "01-Introduction.Rmd", "02-Diving-In.Rmd"]
clean: [packages.bib, bookdown.bbl]
new_session: yes

17
_output.yml Normal file
View file

@ -0,0 +1,17 @@
bookdown::gitbook:
css: style.css
split_by: chapter
config:
toc:
collapse: subsection
before: |
<li><a href="./">A brief toolkit outlining best practices for scholars & activists who want to run wholly-digital or digitally-enhanced conferences and workshops.</a></li>
after: |
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
bookdown::pdf_book:
includes:
in_header: preamble.tex
latex_engine: xelatex
citation_package: natbib
bookdown::epub_book:
stylesheet: style.css

10
book.bib Normal file
View file

@ -0,0 +1,10 @@
@Book{xie2015,
title = {Dynamic Documents with {R} and knitr},
author = {Yihui Xie},
publisher = {Chapman and Hall/CRC},
address = {Boca Raton, Florida},
year = {2015},
edition = {2nd},
note = {ISBN 978-1498716963},
url = {http://yihui.name/knitr/},
}

4
docs/01-Introduction.md Normal file
View file

@ -0,0 +1,4 @@
# Introduction
This is the first real chapter.

3
docs/02-Diving-In.md Normal file
View file

@ -0,0 +1,3 @@
# Diving In
Now let's talk details.

150
docs/diving-in.html Normal file
View file

@ -0,0 +1,150 @@
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>A Minimal Bookdown Book</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta name="description" content="Everything you need (and nothing more) to start a bookdown book.">
<meta name="generator" content="bookdown 0.1 and GitBook 2.6.7">
<meta property="og:title" content="A Minimal Bookdown Book" />
<meta property="og:type" content="book" />
<meta property="og:url" content="http://seankross.com/bookdown-start/" />
<meta property="og:description" content="Everything you need (and nothing more) to start a bookdown book." />
<meta name="github-repo" content="seankross/bookdown-start" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="A Minimal Bookdown Book" />
<meta name="twitter:description" content="Everything you need (and nothing more) to start a bookdown book." />
<meta name="author" content="Sean Kross">
<meta name="date" content="2016-12-09">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="prev" href="introduction.html">
<script src="libs/jquery-2.2.3/jquery.min.js"></script>
<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
<div class="book-summary">
<nav role="navigation">
<ul class="summary">
<li><a href="./">A Minimal Bookdown Book</a></li>
<li class="divider"></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i>Preface</a></li>
<li class="chapter" data-level="1" data-path="introduction.html"><a href="introduction.html"><i class="fa fa-check"></i><b>1</b> Introduction</a></li>
<li class="chapter" data-level="2" data-path="diving-in.html"><a href="diving-in.html"><i class="fa fa-check"></i><b>2</b> Diving In</a></li>
<li class="divider"></li>
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i><a href="./">A Minimal Bookdown Book</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<section class="normal" id="section-">
<div id="diving-in" class="section level1">
<h1><span class="header-section-number">Chapter 2</span> Diving In</h1>
<p>Now lets talk details.</p>
<div class="references">
</div>
</div>
</section>
</div>
</div>
</div>
<a href="introduction.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
<script src="libs/gitbook-2.6.7/js/lunr.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
<script>
require(["gitbook"], function(gitbook) {
gitbook.start({
"sharing": {
"facebook": true,
"twitter": true,
"google": false,
"weibo": false,
"instapper": false,
"vk": false,
"all": ["facebook", "google", "twitter", "weibo", "instapaper"]
},
"fontsettings": {
"theme": "white",
"family": "sans",
"size": 2
},
"edit": {
"link": null,
"text": null
},
"download": null,
"toc": {
"collapse": "subsection"
}
});
});
</script>
</body>
</html>

150
docs/index.html Normal file
View file

@ -0,0 +1,150 @@
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>A Minimal Bookdown Book</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta name="description" content="Everything you need (and nothing more) to start a bookdown book.">
<meta name="generator" content="bookdown 0.1 and GitBook 2.6.7">
<meta property="og:title" content="A Minimal Bookdown Book" />
<meta property="og:type" content="book" />
<meta property="og:url" content="http://seankross.com/bookdown-start/" />
<meta property="og:description" content="Everything you need (and nothing more) to start a bookdown book." />
<meta name="github-repo" content="seankross/bookdown-start" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="A Minimal Bookdown Book" />
<meta name="twitter:description" content="Everything you need (and nothing more) to start a bookdown book." />
<meta name="author" content="Sean Kross">
<meta name="date" content="2016-12-09">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="next" href="introduction.html">
<script src="libs/jquery-2.2.3/jquery.min.js"></script>
<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
<div class="book-summary">
<nav role="navigation">
<ul class="summary">
<li><a href="./">A Minimal Bookdown Book</a></li>
<li class="divider"></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i>Preface</a></li>
<li class="chapter" data-level="1" data-path="introduction.html"><a href="introduction.html"><i class="fa fa-check"></i><b>1</b> Introduction</a></li>
<li class="chapter" data-level="2" data-path="diving-in.html"><a href="diving-in.html"><i class="fa fa-check"></i><b>2</b> Diving In</a></li>
<li class="divider"></li>
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i><a href="./">A Minimal Bookdown Book</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<section class="normal" id="section-">
<div id="header">
<h1 class="title">A Minimal Bookdown Book</h1>
<h4 class="author"><em>Sean Kross</em></h4>
<h4 class="date"><em>2016-12-09</em></h4>
</div>
<div id="preface" class="section level1 unnumbered">
<h1>Preface</h1>
<p>This is the very first part of the book.</p>
</div>
</section>
</div>
</div>
</div>
<a href="introduction.html" class="navigation navigation-next navigation-unique" aria-label="Next page""><i class="fa fa-angle-right"></i></a>
<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
<script src="libs/gitbook-2.6.7/js/lunr.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
<script>
require(["gitbook"], function(gitbook) {
gitbook.start({
"sharing": {
"facebook": true,
"twitter": true,
"google": false,
"weibo": false,
"instapper": false,
"vk": false,
"all": ["facebook", "google", "twitter", "weibo", "instapaper"]
},
"fontsettings": {
"theme": "white",
"family": "sans",
"size": 2
},
"edit": {
"link": null,
"text": null
},
"download": null,
"toc": {
"collapse": "subsection"
}
});
});
</script>
</body>
</html>

17
docs/index.md Normal file
View file

@ -0,0 +1,17 @@
---
title: "A Minimal Bookdown Book"
author: "Sean Kross"
date: "2016-12-09"
site: bookdown::bookdown_site
documentclass: book
bibliography: [book.bib]
biblio-style: apalike
link-citations: yes
github-repo: seankross/bookdown-start
url: 'http\://seankross.com/bookdown-start/'
description: "Everything you need (and nothing more) to start a bookdown book."
---
# Preface {-}
This is the very first part of the book.

145
docs/introduction.html Normal file
View file

@ -0,0 +1,145 @@
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>A Minimal Bookdown Book</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta name="description" content="Everything you need (and nothing more) to start a bookdown book.">
<meta name="generator" content="bookdown 0.1 and GitBook 2.6.7">
<meta property="og:title" content="A Minimal Bookdown Book" />
<meta property="og:type" content="book" />
<meta property="og:url" content="http://seankross.com/bookdown-start/" />
<meta property="og:description" content="Everything you need (and nothing more) to start a bookdown book." />
<meta name="github-repo" content="seankross/bookdown-start" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="A Minimal Bookdown Book" />
<meta name="twitter:description" content="Everything you need (and nothing more) to start a bookdown book." />
<meta name="author" content="Sean Kross">
<meta name="date" content="2016-12-09">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="prev" href="index.html">
<link rel="next" href="diving-in.html">
<script src="libs/jquery-2.2.3/jquery.min.js"></script>
<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
<div class="book-summary">
<nav role="navigation">
<ul class="summary">
<li><a href="./">A Minimal Bookdown Book</a></li>
<li class="divider"></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i>Preface</a></li>
<li class="chapter" data-level="1" data-path="introduction.html"><a href="introduction.html"><i class="fa fa-check"></i><b>1</b> Introduction</a></li>
<li class="chapter" data-level="2" data-path="diving-in.html"><a href="diving-in.html"><i class="fa fa-check"></i><b>2</b> Diving In</a></li>
<li class="divider"></li>
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i><a href="./">A Minimal Bookdown Book</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<section class="normal" id="section-">
<div id="introduction" class="section level1">
<h1><span class="header-section-number">Chapter 1</span> Introduction</h1>
<p>This is the first real chapter.</p>
</div>
</section>
</div>
</div>
</div>
<a href="index.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
<a href="diving-in.html" class="navigation navigation-next " aria-label="Next page""><i class="fa fa-angle-right"></i></a>
<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
<script src="libs/gitbook-2.6.7/js/lunr.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
<script>
require(["gitbook"], function(gitbook) {
gitbook.start({
"sharing": {
"facebook": true,
"twitter": true,
"google": false,
"weibo": false,
"instapper": false,
"vk": false,
"all": ["facebook", "google", "twitter", "weibo", "instapaper"]
},
"fontsettings": {
"theme": "white",
"family": "sans",
"size": 2
},
"edit": {
"link": null,
"text": null
},
"download": null,
"toc": {
"collapse": "subsection"
}
});
});
</script>
</body>
</html>

View file

@ -0,0 +1,60 @@
.book .book-header h1 {
padding-left: 20px;
padding-right: 20px;
}
.book .book-header.fixed {
position: fixed;
right: 0;
top: 0;
left: 0;
border-bottom: 1px solid rgba(0,0,0,.07);
}
span.search-highlight {
background-color: #ffff88;
}
@media (min-width: 600px) {
.book.with-summary .book-header.fixed {
left: 300px;
}
}
@media (max-width: 1240px) {
.book .book-body.fixed {
top: 50px;
}
.book .book-body.fixed .body-inner {
top: auto;
}
}
@media (max-width: 600px) {
.book.with-summary .book-header.fixed {
left: calc(100% - 60px);
min-width: 300px;
}
.book.with-summary .book-body {
transform: none;
left: calc(100% - 60px);
min-width: 300px;
}
.book .book-body.fixed {
top: 0;
}
}
.book .book-body.fixed .body-inner {
top: 50px;
}
.book .book-body .page-wrapper .page-inner section.normal sub, .book .book-body .page-wrapper .page-inner section.normal sup {
font-size: 85%;
}
@media print {
.book .book-summary, .book .book-body .book-header, .fa {
display: none !important;
}
.book .book-body.fixed {
left: 0px;
}
.book .book-body,.book .book-body .body-inner, .book.with-summary {
overflow: visible !important;
}
}

View file

@ -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;
}

View file

@ -0,0 +1,426 @@
.book .book-body .page-wrapper .page-inner section.normal pre,
.book .book-body .page-wrapper .page-inner section.normal code {
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
/* Tomorrow Comment */
/* Tomorrow Red */
/* Tomorrow Orange */
/* Tomorrow Yellow */
/* Tomorrow Green */
/* Tomorrow Aqua */
/* Tomorrow Blue */
/* Tomorrow Purple */
}
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-comment,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-comment,
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-title,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-title {
color: #8e908c;
}
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-variable,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-variable,
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-attribute,
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-tag,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-tag,
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-regexp,
.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-constant,
.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-constant,
.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-tag .hljs-title,
.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-tag .hljs-title,
.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-pi,
.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-pi,
.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-doctype,
.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-doctype,
.book .book-body .page-wrapper .page-inner section.normal pre .html .hljs-doctype,
.book .book-body .page-wrapper .page-inner section.normal code .html .hljs-doctype,
.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-id,
.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-id,
.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-class,
.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-class,
.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo,
.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo {
color: #c82829;
}
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-number,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-number,
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor,
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-pragma,
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-built_in,
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-literal,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-literal,
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-params,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-params,
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-constant,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-constant {
color: #f5871f;
}
.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-class .hljs-title,
.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-class .hljs-title,
.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-rules .hljs-attribute,
.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-rules .hljs-attribute {
color: #eab700;
}
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-string,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-string,
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-value,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-value,
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-inheritance,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-inheritance,
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-header,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-header,
.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-symbol,
.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-symbol,
.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
color: #718c00;
}
.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-hexcolor,
.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-hexcolor {
color: #3e999f;
}
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-function,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-function,
.book .book-body .page-wrapper .page-inner section.normal pre .python .hljs-decorator,
.book .book-body .page-wrapper .page-inner section.normal code .python .hljs-decorator,
.book .book-body .page-wrapper .page-inner section.normal pre .python .hljs-title,
.book .book-body .page-wrapper .page-inner section.normal code .python .hljs-title,
.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-function .hljs-title,
.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-function .hljs-title,
.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-title .hljs-keyword,
.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-title .hljs-keyword,
.book .book-body .page-wrapper .page-inner section.normal pre .perl .hljs-sub,
.book .book-body .page-wrapper .page-inner section.normal code .perl .hljs-sub,
.book .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-title,
.book .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-title,
.book .book-body .page-wrapper .page-inner section.normal pre .coffeescript .hljs-title,
.book .book-body .page-wrapper .page-inner section.normal code .coffeescript .hljs-title {
color: #4271ae;
}
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword,
.book .book-body .page-wrapper .page-inner section.normal code .hljs-keyword,
.book .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-function,
.book .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-function {
color: #8959a8;
}
.book .book-body .page-wrapper .page-inner section.normal pre .hljs,
.book .book-body .page-wrapper .page-inner section.normal code .hljs {
display: block;
background: white;
color: #4d4d4c;
padding: 0.5em;
}
.book .book-body .page-wrapper .page-inner section.normal pre .coffeescript .javascript,
.book .book-body .page-wrapper .page-inner section.normal code .coffeescript .javascript,
.book .book-body .page-wrapper .page-inner section.normal pre .javascript .xml,
.book .book-body .page-wrapper .page-inner section.normal code .javascript .xml,
.book .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
.book .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula,
.book .book-body .page-wrapper .page-inner section.normal pre .xml .javascript,
.book .book-body .page-wrapper .page-inner section.normal code .xml .javascript,
.book .book-body .page-wrapper .page-inner section.normal pre .xml .vbscript,
.book .book-body .page-wrapper .page-inner section.normal code .xml .vbscript,
.book .book-body .page-wrapper .page-inner section.normal pre .xml .css,
.book .book-body .page-wrapper .page-inner section.normal code .xml .css,
.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
opacity: 0.5;
}
.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 {
/*
Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>
*/
/* Solarized Green */
/* Solarized Cyan */
/* Solarized Blue */
/* Solarized Yellow */
/* Solarized Orange */
/* Solarized Red */
/* Solarized Violet */
}
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs {
display: block;
padding: 0.5em;
background: #fdf6e3;
color: #657b83;
}
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-comment,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-comment,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-template_comment,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-template_comment,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .diff .hljs-header,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .diff .hljs-header,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-doctype,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-doctype,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-pi,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-pi,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .lisp .hljs-string,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .lisp .hljs-string,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-javadoc,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-javadoc {
color: #93a1a1;
}
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-keyword,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-winutils,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-winutils,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .method,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .method,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-addition,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-addition,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-tag,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-tag,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-request,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-request,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-status,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-status,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .nginx .hljs-title,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .nginx .hljs-title {
color: #859900;
}
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-number,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-number,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-command,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-command,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-string,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-string,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-tag .hljs-value,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-tag .hljs-value,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-rules .hljs-value,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-rules .hljs-value,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-phpdoc,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-phpdoc,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-regexp,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-hexcolor,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-hexcolor,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_url,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_url {
color: #2aa198;
}
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-title,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-title,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-localvars,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-localvars,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-chunk,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-chunk,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-decorator,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-decorator,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-built_in,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-identifier,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-identifier,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .vhdl .hljs-literal,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .vhdl .hljs-literal,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-id,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-id,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-function,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-function {
color: #268bd2;
}
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-attribute,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-variable,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-variable,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .lisp .hljs-body,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .lisp .hljs-body,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .smalltalk .hljs-number,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .smalltalk .hljs-number,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-constant,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-constant,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-class .hljs-title,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-class .hljs-title,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-parent,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-parent,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .haskell .hljs-type,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .haskell .hljs-type,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_reference,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_reference {
color: #b58900;
}
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor .hljs-keyword,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor .hljs-keyword,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-pragma,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-shebang,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-shebang,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-symbol,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-symbol,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-symbol .hljs-string,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-symbol .hljs-string,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .diff .hljs-change,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .diff .hljs-change,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-special,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-special,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-attr_selector,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-attr_selector,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-subst,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-subst,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-cdata,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-cdata,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .clojure .hljs-title,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .clojure .hljs-title,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-header,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-header {
color: #cb4b16;
}
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-deletion,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-deletion,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-important,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-important {
color: #dc322f;
}
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_label,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_label {
color: #6c71c4;
}
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula {
background: #eee8d5;
}
.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 {
/* Tomorrow Night Bright Theme */
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
/* Tomorrow Comment */
/* Tomorrow Red */
/* Tomorrow Orange */
/* Tomorrow Yellow */
/* Tomorrow Green */
/* Tomorrow Aqua */
/* Tomorrow Blue */
/* Tomorrow Purple */
}
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-comment,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-comment,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-title,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-title {
color: #969896;
}
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-variable,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-variable,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-attribute,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-tag,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-tag,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-regexp,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-constant,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-constant,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-tag .hljs-title,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-tag .hljs-title,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-pi,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-pi,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-doctype,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-doctype,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .html .hljs-doctype,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .html .hljs-doctype,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-id,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-id,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-class,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-class,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo {
color: #d54e53;
}
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-number,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-number,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-pragma,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-built_in,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-literal,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-literal,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-params,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-params,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-constant,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-constant {
color: #e78c45;
}
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-class .hljs-title,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-class .hljs-title,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-rules .hljs-attribute,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-rules .hljs-attribute {
color: #e7c547;
}
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-string,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-string,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-value,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-value,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-inheritance,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-inheritance,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-header,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-header,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-symbol,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-symbol,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
color: #b9ca4a;
}
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-hexcolor,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-hexcolor {
color: #70c0b1;
}
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-function,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-function,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .python .hljs-decorator,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .python .hljs-decorator,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .python .hljs-title,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .python .hljs-title,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-function .hljs-title,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-function .hljs-title,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-title .hljs-keyword,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-title .hljs-keyword,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .perl .hljs-sub,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .perl .hljs-sub,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-title,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-title,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .coffeescript .hljs-title,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .coffeescript .hljs-title {
color: #7aa6da;
}
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-keyword,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-function,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-function {
color: #c397d8;
}
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs {
display: block;
background: black;
color: #eaeaea;
padding: 0.5em;
}
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .coffeescript .javascript,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .coffeescript .javascript,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .xml,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .xml,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .javascript,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .javascript,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .vbscript,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .vbscript,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .css,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .css,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
opacity: 0.5;
}

View file

@ -0,0 +1,27 @@
.book .book-summary .book-search {
padding: 6px;
background: transparent;
position: absolute;
top: -50px;
left: 0px;
right: 0px;
transition: top 0.5s ease;
}
.book .book-summary .book-search input,
.book .book-summary .book-search input:focus,
.book .book-summary .book-search input:hover {
width: 100%;
background: transparent;
border: 1px solid transparent;
box-shadow: none;
outline: none;
line-height: 22px;
padding: 7px 4px;
color: inherit;
}
.book.with-search .book-summary .book-search {
top: 0px;
}
.book.with-search .book-summary ul.summary {
top: 50px;
}

File diff suppressed because one or more lines are too long

6
docs/libs/gitbook-2.6.7/js/app.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,84 @@
require(["jQuery"], function(jQuery) {
/*
* jQuery Highlight plugin
*
* Based on highlight v3 by Johann Burkard
* http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html
*
* Code a little bit refactored and cleaned (in my humble opinion).
* Most important changes:
* - has an option to highlight only entire words (wordsOnly - false by default),
* - has an option to be case sensitive (caseSensitive - false by default)
* - highlight element tag and class names can be specified in options
*
* Copyright (c) 2009 Bartek Szopka
*
* Licensed under MIT license.
*
*/
jQuery.extend({
highlight: function (node, re, nodeName, className) {
if (node.nodeType === 3) {
var match = node.data.match(re);
if (match) {
var highlight = document.createElement(nodeName || 'span');
highlight.className = className || 'highlight';
var wordNode = node.splitText(match.index);
wordNode.splitText(match[0].length);
var wordClone = wordNode.cloneNode(true);
highlight.appendChild(wordClone);
wordNode.parentNode.replaceChild(highlight, wordNode);
return 1; //skip added node in parent
}
} else if ((node.nodeType === 1 && node.childNodes) && // only element nodes that have children
!/(script|style)/i.test(node.tagName) && // ignore script and style nodes
!(node.tagName === nodeName.toUpperCase() && node.className === className)) { // skip if already highlighted
for (var i = 0; i < node.childNodes.length; i++) {
i += jQuery.highlight(node.childNodes[i], re, nodeName, className);
}
}
return 0;
}
});
jQuery.fn.unhighlight = function (options) {
var settings = { className: 'highlight', element: 'span' };
jQuery.extend(settings, options);
return this.find(settings.element + "." + settings.className).each(function () {
var parent = this.parentNode;
parent.replaceChild(this.firstChild, this);
parent.normalize();
}).end();
};
jQuery.fn.highlight = function (words, options) {
var settings = { className: 'highlight', element: 'span', caseSensitive: false, wordsOnly: false };
jQuery.extend(settings, options);
if (words.constructor === String) {
words = [words];
}
words = jQuery.grep(words, function(word, i){
return word !== '';
});
words = jQuery.map(words, function(word, i) {
return word.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
});
if (words.length === 0) { return this; }
var flag = settings.caseSensitive ? "" : "i";
var pattern = "(" + words.join("|") + ")";
if (settings.wordsOnly) {
pattern = "\\b" + pattern + "\\b";
}
var re = new RegExp(pattern, flag);
return this.each(function () {
jQuery.highlight(this, re, settings.element, settings.className);
});
};
});

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,208 @@
require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
var gs = gitbook.storage;
gitbook.events.bind("start", function(e, config) {
// add the Edit button (edit on Github)
var edit = config.edit;
if (edit && edit.link) gitbook.toolbar.createButton({
icon: 'fa fa-edit',
label: edit.text || 'Edit',
position: 'left',
onClick: function(e) {
e.preventDefault();
window.open(edit.link);
}
});
var down = config.download;
var normalizeDownload = function() {
if (!down || !(down instanceof Array) || down.length === 0) return;
if (down[0] instanceof Array) return down;
return $.map(down, function(file, i) {
return [[file, file.replace(/.*[.]/g, '').toUpperCase()]];
});
};
down = normalizeDownload(down);
if (down) if (down.length === 1 && /[.]pdf$/.test(down[0][0])) {
gitbook.toolbar.createButton({
icon: 'fa fa-file-pdf-o',
label: down[0][1],
position: 'left',
onClick: function(e) {
e.preventDefault();
window.open(down[0][0]);
}
});
} else {
gitbook.toolbar.createButton({
icon: 'fa fa-download',
label: 'Download',
position: 'left',
dropdown: $.map(down, function(item, i) {
return {
text: item[1],
onClick: function(e) {
e.preventDefault();
window.open(item[0]);
}
};
})
});
}
// highlight the current section in TOC
var href = window.location.pathname;
href = href.substr(href.lastIndexOf('/') + 1);
if (href === '') href = 'index.html';
var li = $('a[href^="' + href + location.hash + '"]').parent('li.chapter').first();
var summary = $('ul.summary'), chaps = summary.find('li.chapter');
if (li.length === 0) li = chaps.first();
li.addClass('active');
chaps.on('click', function(e) {
chaps.removeClass('active');
$(this).addClass('active');
gs.set('tocScrollTop', summary.scrollTop());
});
var toc = config.toc;
// collapse TOC items that are not for the current chapter
if (toc && toc.collapse) (function() {
var type = toc.collapse;
if (type === 'none') return;
if (type !== 'section' && type !== 'subsection') return;
// sections under chapters
var toc_sub = summary.children('li[data-level]').children('ul');
if (type === 'section') {
toc_sub.hide()
.parent().has(li).children('ul').show();
} else {
toc_sub.children('li').children('ul').hide()
.parent().has(li).children('ul').show();
}
li.children('ul').show();
var toc_sub2 = toc_sub.children('li');
if (type === 'section') toc_sub2.children('ul').hide();
summary.children('li[data-level]').find('a')
.on('click.bookdown', function(e) {
if (href === $(this).attr('href').replace(/#.*/, ''))
$(this).parent('li').children('ul').toggle();
});
})();
// add tooltips to the <a>'s that are truncated
$('a').each(function(i, el) {
if (el.offsetWidth >= el.scrollWidth) return;
if (typeof el.title === 'undefined') return;
el.title = el.text;
});
// restore TOC scroll position
var pos = gs.get('tocScrollTop');
if (typeof pos !== 'undefined') summary.scrollTop(pos);
// highlight the TOC item that has same text as the heading in view as scrolling
if (toc && toc.scroll_highlight !== false) (function() {
// scroll the current TOC item into viewport
var ht = $(window).height(), rect = li[0].getBoundingClientRect();
if (rect.top >= ht || rect.top <= 0 || rect.bottom <= 0) {
summary.scrollTop(li[0].offsetTop);
}
// current chapter TOC items
var items = $('a[href^="' + href + '"]').parent('li.chapter'),
m = items.length;
if (m === 0) {
items = summary.find('li.chapter');
m = items.length;
}
if (m === 0) return;
// all section titles on current page
var hs = bookInner.find('.page-inner').find('h1,h2,h3'), n = hs.length,
ts = hs.map(function(i, el) { return $(el).text(); });
if (n === 0) return;
var scrollHandler = function(e) {
var ht = $(window).height();
clearTimeout($.data(this, 'scrollTimer'));
$.data(this, 'scrollTimer', setTimeout(function() {
// find the first visible title in the viewport
for (var i = 0; i < n; i++) {
var rect = hs[i].getBoundingClientRect();
if (rect.top >= 0 && rect.bottom <= ht) break;
}
if (i === n) return;
items.removeClass('active');
for (var j = 0; j < m; j++) {
if (items.eq(j).children('a').first().text() === ts[i]) break;
}
if (j === m) j = 0; // highlight the chapter title
// search bottom-up for a visible TOC item to highlight; if an item is
// hidden, we check if its parent is visible, and so on
while (j > 0 && items.eq(j).is(':hidden')) j--;
items.eq(j).addClass('active');
}, 250));
};
bookInner.on('scroll.bookdown', scrollHandler);
bookBody.on('scroll.bookdown', scrollHandler);
})();
// do not refresh the page if the TOC item points to the current page
$('a[href="' + href + '"]').parent('li.chapter').children('a')
.on('click', function(e) {
bookInner.scrollTop(0);
bookBody.scrollTop(0);
return false;
});
var toolbar = config.toolbar;
if (!toolbar || toolbar.position !== 'static') {
var bookHeader = $('.book-header');
bookBody.addClass('fixed');
bookHeader.addClass('fixed')
.css('background-color', bookBody.css('background-color'))
.on('click.bookdown', function(e) {
// the theme may have changed after user clicks the theme button
bookHeader.css('background-color', bookBody.css('background-color'));
});
}
});
gitbook.events.bind("page.change", function(e) {
// store TOC scroll position
var summary = $('ul.summary');
gs.set('tocScrollTop', summary.scrollTop());
});
var bookBody = $('.book-body'), bookInner = bookBody.find('.body-inner');
var saveScrollPos = function(e) {
// save scroll position before page is reloaded
gs.set('bodyScrollTop', {
body: bookBody.scrollTop(),
inner: bookInner.scrollTop(),
title: bookInner.find('.page-inner').find('h1,h2').first().text()
});
};
$(document).on('servr:reload', saveScrollPos);
// check if the page is loaded in the RStudio preview window
var inRStudio = function() {
var inIframe = true;
try { inIframe = window.self !== window.top; } catch (e) {}
if (!inIframe) return false;
return /^\/rmd_output\/[0-9]+\/.*$/.test(window.location.pathname);
};
if (inRStudio()) $(window).on('blur', saveScrollPos);
if (inRStudio()) $(window).on('unload', saveScrollPos);
$(document).ready(function(e) {
var pos = gs.get('bodyScrollTop');
if (pos && pos.title === bookInner.find('.page-inner').find('h1,h2').first().text()) {
if (pos.body !== 0) bookBody.scrollTop(pos.body);
if (pos.inner !== 0) bookInner.scrollTop(pos.inner);
}
// clear book body scroll position
gs.remove('bodyScrollTop');
});
});

View file

@ -0,0 +1,151 @@
require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
var fontState;
var THEMES = {
"white": 0,
"sepia": 1,
"night": 2
};
var FAMILY = {
"serif": 0,
"sans": 1
};
// Save current font settings
function saveFontSettings() {
gitbook.storage.set("fontState", fontState);
update();
}
// Increase font size
function enlargeFontSize(e) {
e.preventDefault();
if (fontState.size >= 4) return;
fontState.size++;
saveFontSettings();
};
// Decrease font size
function reduceFontSize(e) {
e.preventDefault();
if (fontState.size <= 0) return;
fontState.size--;
saveFontSettings();
};
// Change font family
function changeFontFamily(index, e) {
e.preventDefault();
fontState.family = index;
saveFontSettings();
};
// Change type of color
function changeColorTheme(index, e) {
e.preventDefault();
var $book = $(".book");
if (fontState.theme !== 0)
$book.removeClass("color-theme-"+fontState.theme);
fontState.theme = index;
if (fontState.theme !== 0)
$book.addClass("color-theme-"+fontState.theme);
saveFontSettings();
};
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) {
var $bookBody, $book;
//Find DOM elements.
$book = gitbook.state.$book;
$bookBody = $book.find(".book-body");
// Instantiate font state object
fontState = gitbook.storage.get("fontState", {
size: config.size || 2,
family: FAMILY[config.family || "sans"],
theme: THEMES[config.theme || "white"]
});
update();
};
gitbook.events.bind("start", function(e, config) {
var opts = config.fontsettings;
// Create buttons in toolbar
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
}
],
[
{
text: 'Serif',
onClick: _.partial(changeFontFamily, 0)
},
{
text: 'Sans',
onClick: _.partial(changeFontFamily, 1)
}
],
[
{
text: 'White',
onClick: _.partial(changeColorTheme, 0)
},
{
text: 'Sepia',
onClick: _.partial(changeColorTheme, 1)
},
{
text: 'Night',
onClick: _.partial(changeColorTheme, 2)
}
]
]
});
// Init current settings
init(opts);
});
});

View file

@ -0,0 +1,212 @@
require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
var index = null;
var $searchInput, $searchForm;
var $highlighted, hi = 0, hiOpts = { className: 'search-highlight' };
var collapse = false;
// Use a specific index
function loadIndex(data) {
// [Yihui] In bookdown, I use a character matrix to store the chapter
// content, and the index is dynamically built on the client side.
// Gitbook prebuilds the index data instead: https://github.com/GitbookIO/plugin-search
// We can certainly do that via R packages V8 and jsonlite, but let's
// see how slow it really is before improving it. On the other hand,
// lunr cannot handle non-English text very well, e.g. the default
// tokenizer cannot deal with Chinese text, so we may want to replace
// lunr with a dumb simple text matching approach.
index = lunr(function () {
this.ref('url');
this.field('title', { boost: 10 });
this.field('body');
});
data.map(function(item) {
index.add({
url: item[0],
title: item[1],
body: item[2]
});
});
}
// Fetch the search index
function fetchIndex() {
return $.getJSON(gitbook.state.basePath+"/search_index.json")
.then(loadIndex); // [Yihui] we need to use this object later
}
// Search for a term and return results
function search(q) {
if (!index) return;
var results = _.chain(index.search(q))
.map(function(result) {
var parts = result.ref.split("#");
return {
path: parts[0],
hash: parts[1]
};
})
.value();
// [Yihui] Highlight the search keyword on current page
hi = 0;
$highlighted = results.length === 0 ? undefined : $('.page-inner')
.unhighlight(hiOpts).highlight(q, hiOpts).find('span.search-highlight');
scrollToHighlighted();
toggleTOC(results.length > 0);
return results;
}
// [Yihui] Scroll the chapter body to the i-th highlighted string
function scrollToHighlighted() {
if (!$highlighted) return;
var n = $highlighted.length;
if (n === 0) return;
var $p = $highlighted.eq(hi), p = $p[0], rect = p.getBoundingClientRect();
if (rect.top < 0 || rect.bottom > $(window).height()) {
($(window).width() >= 1240 ? $('.body-inner') : $('.book-body'))
.scrollTop(p.offsetTop - 100);
}
$highlighted.css('background-color', '');
// an orange background color on the current item and removed later
$p.css('background-color', 'orange');
setTimeout(function() {
$p.css('background-color', '');
}, 2000);
}
// [Yihui] Expand/collapse TOC
function toggleTOC(show) {
if (!collapse) return;
var toc_sub = $('ul.summary').children('li[data-level]').children('ul');
if (show) return toc_sub.show();
var href = window.location.pathname;
href = href.substr(href.lastIndexOf('/') + 1);
if (href === '') href = 'index.html';
var li = $('a[href^="' + href + location.hash + '"]').parent('li.chapter').first();
toc_sub.hide().parent().has(li).children('ul').show();
li.children('ul').show();
}
// Create search form
function createForm(value) {
if ($searchForm) $searchForm.remove();
if ($searchInput) $searchInput.remove();
$searchForm = $('<div>', {
'class': 'book-search',
'role': 'search'
});
$searchInput = $('<input>', {
'type': 'search',
'class': 'form-control',
'val': value,
'placeholder': 'Type to search'
});
$searchInput.appendTo($searchForm);
$searchForm.prependTo(gitbook.state.$book.find('.book-summary'));
}
// Return true if search is open
function isSearchOpen() {
return gitbook.state.$book.hasClass("with-search");
}
// Toggle the search
function toggleSearch(_state) {
if (isSearchOpen() === _state) return;
if (!$searchInput) return;
gitbook.state.$book.toggleClass("with-search", _state);
// If search bar is open: focus input
if (isSearchOpen()) {
gitbook.sidebar.toggle(true);
$searchInput.focus();
} else {
$searchInput.blur();
$searchInput.val("");
gitbook.storage.remove("keyword");
gitbook.sidebar.filter(null);
$('.page-inner').unhighlight(hiOpts);
toggleTOC(false);
}
}
// Recover current search when page changed
function recoverSearch() {
var keyword = gitbook.storage.get("keyword", "");
createForm(keyword);
if (keyword.length > 0) {
if(!isSearchOpen()) {
toggleSearch(true); // [Yihui] open the search box
}
gitbook.sidebar.filter(_.pluck(search(keyword), "path"));
}
}
gitbook.events.bind("start", function(e, config) {
// [Yihui] disable search
if (config.search === false) return;
collapse = !config.toc || config.toc.collapse === 'section' ||
config.toc.collapse === 'subsection';
// Pre-fetch search index and create the form
fetchIndex()
// [Yihui] recover search after the page is loaded
.then(recoverSearch);
// Type in search bar
$(document).on("keyup", ".book-search input", function(e) {
var key = (e.keyCode ? e.keyCode : e.which);
// [Yihui] Escape -> close search box; Up/Down: previous/next highlighted
if (key == 27) {
e.preventDefault();
toggleSearch(false);
} else if (key == 38) {
if (hi <= 0 && $highlighted) hi = $highlighted.length;
hi--;
scrollToHighlighted();
} else if (key == 40) {
hi++;
if ($highlighted && hi >= $highlighted.length) hi = 0;
scrollToHighlighted();
}
}).on("input", ".book-search input", function(e) {
var q = $(this).val();
if (q.length === 0) {
gitbook.sidebar.filter(null);
gitbook.storage.remove("keyword");
$('.page-inner').unhighlight(hiOpts);
toggleTOC(false);
} else {
var results = search(q);
gitbook.sidebar.filter(
_.pluck(results, "path")
);
gitbook.storage.set("keyword", q);
}
});
// Create the toggle search button
gitbook.toolbar.createButton({
icon: 'fa fa-search',
label: 'Search',
position: 'left',
onClick: toggleSearch
});
// Bind keyboard to toggle search
gitbook.keyboard.bind(['f'], toggleSearch);
});
// [Yihui] do not try to recover search; always start fresh
// gitbook.events.bind("page.change", recoverSearch);
});

View file

@ -0,0 +1,94 @@
require(["gitbook", "lodash"], function(gitbook, _) {
var SITES = {
'facebook': {
'label': 'Facebook',
'icon': 'fa fa-facebook',
'onClick': function(e) {
e.preventDefault();
window.open("http://www.facebook.com/sharer/sharer.php?s=100&p[url]="+encodeURIComponent(location.href));
}
},
'twitter': {
'label': 'Twitter',
'icon': 'fa fa-twitter',
'onClick': function(e) {
e.preventDefault();
window.open("http://twitter.com/home?status="+encodeURIComponent(document.title+" "+location.href));
}
},
'google': {
'label': 'Google+',
'icon': 'fa fa-google-plus',
'onClick': function(e) {
e.preventDefault();
window.open("https://plus.google.com/share?url="+encodeURIComponent(location.href));
}
},
'weibo': {
'label': 'Weibo',
'icon': 'fa fa-weibo',
'onClick': function(e) {
e.preventDefault();
window.open("http://service.weibo.com/share/share.php?content=utf-8&url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title));
}
},
'instapaper': {
'label': 'Instapaper',
'icon': 'fa fa-instapaper',
'onClick': function(e) {
e.preventDefault();
window.open("http://www.instapaper.com/text?u="+encodeURIComponent(location.href));
}
},
'vk': {
'label': 'VK',
'icon': 'fa fa-vk',
'onClick': function(e) {
e.preventDefault();
window.open("http://vkontakte.ru/share.php?url="+encodeURIComponent(location.href));
}
}
};
gitbook.events.bind("start", function(e, config) {
var opts = config.sharing;
if (!opts) return;
// Create dropdown menu
var menu = _.chain(opts.all)
.map(function(id) {
var site = SITES[id];
return {
text: site.label,
onClick: site.onClick
};
})
.compact()
.value();
// Create main button with dropdown
if (menu.length > 0) {
gitbook.toolbar.createButton({
icon: 'fa fa-share-alt',
label: 'Share',
position: 'right',
dropdown: [menu]
});
}
// Direct actions to share
_.each(SITES, function(site, sideId) {
if (!opts[sideId]) return;
gitbook.toolbar.createButton({
icon: site.icon,
label: site.text,
position: 'right',
onClick: site.onClick
});
});
});
});

4
docs/libs/jquery-2.2.3/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

5
docs/search_index.json Normal file
View file

@ -0,0 +1,5 @@
[
["index.html", "A Minimal Bookdown Book Preface", " A Minimal Bookdown Book Sean Kross 2016-12-09 Preface This is the very first part of the book. "],
["introduction.html", "Chapter 1 Introduction", " Chapter 1 Introduction This is the first real chapter. "],
["diving-in.html", "Chapter 2 Diving In", " Chapter 2 Diving In Now lets talk details. "]
]

14
docs/style.css Normal file
View file

@ -0,0 +1,14 @@
p.caption {
color: #777;
margin-top: 10px;
}
p code {
white-space: inherit;
}
pre {
word-break: normal;
word-wrap: normal;
}
pre code {
white-space: inherit;
}

17
index.Rmd Normal file
View file

@ -0,0 +1,17 @@
---
title: "A Minimal Bookdown Book"
author: "Sean Kross"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
documentclass: book
bibliography: [book.bib]
biblio-style: apalike
link-citations: yes
github-repo: seankross/bookdown-start
url: 'http\://seankross.com/bookdown-start/'
description: "Everything you need (and nothing more) to start a bookdown book."
---
# Preface {-}
This is the very first part of the book.

1
preamble.tex Normal file
View file

@ -0,0 +1 @@
\usepackage{booktabs}

14
style.css Normal file
View file

@ -0,0 +1,14 @@
p.caption {
color: #777;
margin-top: 10px;
}
p code {
white-space: inherit;
}
pre {
word-break: normal;
word-wrap: normal;
}
pre code {
white-space: inherit;
}