mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-16 14:23:31 -06:00
Compare commits
382 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
4ca741b1ce | ||
|
e6896e1997 | ||
|
492471b15f | ||
|
efe5918871 | ||
|
56e8119665 | ||
|
8dbe7209b9 | ||
|
72741e9498 | ||
|
5391eb0a13 | ||
|
20c7b97b3e | ||
|
1476259d9b | ||
|
00c96ac2de | ||
|
f2ce1b33c1 | ||
|
afbb385042 | ||
|
35da800e88 | ||
|
54d9738dd1 | ||
|
c5e53d90c9 | ||
|
01a3c35c98 | ||
|
b49829c784 | ||
|
95bdc51a0a | ||
|
1cca7a8e88 | ||
|
2c73d71c1b | ||
|
722717a0d1 | ||
|
41187ed9b6 | ||
|
3ae06cd59b | ||
|
7804642c50 | ||
|
b44ebe6cb3 | ||
|
423b8c9f46 | ||
|
a7285b9e30 | ||
|
119a0b241e | ||
|
ff106641b0 | ||
|
900639b02c | ||
|
dbac62127a | ||
|
850a8fe256 | ||
|
44d689b994 | ||
|
9616dcf761 | ||
|
1564ca4511 | ||
|
e124e10914 | ||
|
757be1631c | ||
|
3b42ec2762 | ||
|
a98bba778c | ||
|
3ecdb59b48 | ||
|
843233c6b2 | ||
|
d3cbc83285 | ||
|
f960695bb7 | ||
|
34eaf8b16d | ||
|
ea9affe25f | ||
|
d3f6e5907b | ||
|
3d0240ff0b | ||
|
1aee233e1f | ||
|
47b7991805 | ||
|
7220197a1f | ||
|
4e65041849 | ||
|
50cdf076b4 | ||
|
ed492bf40e | ||
|
690d0b5e8a | ||
|
5b74b44230 | ||
|
8a1e09ec5a | ||
|
cfbc7f41df | ||
|
5e72b7db67 | ||
|
3af59176f4 | ||
|
13ef185010 | ||
|
7382a9a379 | ||
|
209ac7be7d | ||
|
89f79138c3 | ||
|
5d58a66301 | ||
|
c282e4b0a7 | ||
|
8ac545a5eb | ||
|
91760ee8c9 | ||
|
132cecfea3 | ||
|
0cfc0f0357 | ||
|
6a46a4797e | ||
|
89a331ee85 | ||
|
d4b79e2eac | ||
|
fdf4726320 | ||
|
de37d60720 | ||
|
418cf1d640 | ||
|
13427409aa | ||
|
26c16ce57e | ||
|
d01f0e29db | ||
|
dfc5d112e5 | ||
|
c5cb03d0ca | ||
|
61a5a3b334 | ||
|
2b3da2f75c | ||
|
e17ae1fc54 | ||
|
d37387d408 | ||
|
8726625133 | ||
|
03a89b761a | ||
|
f6a3126543 | ||
|
f4bd41a27d | ||
|
2db3f97395 | ||
|
385e26a2d0 | ||
|
5ad439b53c | ||
|
c4586e1725 | ||
|
15172af270 | ||
|
f2cec110ff | ||
|
1a2636350f | ||
|
225604723a | ||
|
fe41e18994 | ||
|
3eadd49ee7 | ||
|
b1072a3fca | ||
|
c227db4406 | ||
|
4a574a2ec2 | ||
|
8e5b0f23e6 | ||
|
5867dc078f | ||
|
e370654237 | ||
|
d0325e948e | ||
|
2b2ebf6033 | ||
|
7fa6307640 | ||
|
9e45626337 | ||
|
15f1faae8a | ||
|
8d60dda67e | ||
|
da9c187acc | ||
|
8dbe56fe1f | ||
|
1bf2ed0cde | ||
|
30590fd6c9 | ||
|
15a9b310b3 | ||
|
4f5930dbbe | ||
|
3ad99afb02 | ||
|
efbc5c2a19 | ||
|
14a3ff5fc8 | ||
|
529c789739 | ||
|
b89b683f90 | ||
|
aa0d8f1d40 | ||
|
b6bfd436b9 | ||
|
07982f681a | ||
|
2d1babc452 | ||
|
eabe7b2585 | ||
|
0108a9b254 | ||
|
9682368eaf | ||
|
761245d487 | ||
|
4821abeec4 | ||
|
c8a8ce3314 | ||
|
044281db38 | ||
|
008809e00b | ||
|
96653f6d36 | ||
|
9495640378 | ||
|
447ba4f20c | ||
|
48a4a37977 | ||
|
6f225b0d28 | ||
|
e64a6aa239 | ||
|
e9f016ac0f | ||
|
8c603aac1e | ||
|
0142d2874b | ||
|
94f2aaf964 | ||
|
03e2345833 | ||
|
f4ee29d0c3 | ||
|
b3f52fedad | ||
|
721484a26e | ||
|
3d01578c7d | ||
|
9663d4cba3 | ||
|
552bf46bc9 | ||
|
6c5d550fa5 | ||
|
0f2de675b6 | ||
|
38521bd845 | ||
|
a4da666d2a | ||
|
f1dcbec0a9 | ||
|
e6f6001960 | ||
|
501bd0169c | ||
|
f06cf593ff | ||
|
460e9ae236 | ||
|
4d3375a834 | ||
|
3a3c4a83fa | ||
|
0254d9961a | ||
|
d2b3d57eb9 | ||
|
32401d05a3 | ||
|
9a076b48ac | ||
|
2c789d408c | ||
|
4fb036ebac | ||
|
f255c07c7f | ||
|
ce2d213dbe | ||
|
95b76010c2 | ||
|
ca0af1795a | ||
|
f9e03e1248 | ||
|
c83bdf853e | ||
|
af77e527d0 | ||
|
151691eb09 | ||
|
4de1bdaf65 | ||
|
afaa3ab225 | ||
|
e356659dbe | ||
|
9fb4bcfdc2 | ||
|
0ec44bd474 | ||
|
839cf91428 | ||
|
2328407405 | ||
|
b82b1a86d3 | ||
|
c520591234 | ||
|
0b0b2e8555 | ||
|
26766a5984 | ||
|
eec213daa1 | ||
|
c796485d92 | ||
|
5291de45c5 | ||
|
92fb6d1908 | ||
|
8597aa4cac | ||
|
0bfd125087 | ||
|
25b6455ed7 | ||
|
b44efbf1da | ||
|
8aa5982cd5 | ||
|
20f21217ca | ||
|
96c053bb63 | ||
|
d9a5bd0a19 | ||
|
0ac8ec23bf | ||
|
c40eec1c2f | ||
|
de98c2b51b | ||
|
c70f012eee | ||
|
aee6d1fb8c | ||
|
f5d6cf6222 | ||
|
f3fc9d9dd3 | ||
|
a8c282ae5a | ||
|
e12408d07b | ||
|
a44d3a8652 | ||
|
ad867e37c0 | ||
|
01b500b1b3 | ||
|
84f8f003ac | ||
|
ab20833d17 | ||
|
b77d22cf2e | ||
|
35d7864874 | ||
|
c9e4284754 | ||
|
da0762007d | ||
|
5b8ff78bb6 | ||
|
04e81c7158 | ||
|
b7913ec5a5 | ||
|
25250db5e0 | ||
|
75f0ef57e2 | ||
|
eaafeee675 | ||
|
10c0f95b40 | ||
|
8da9b82d66 | ||
|
b0e1c64a5a | ||
|
e1d226f192 | ||
|
2de780bb4b | ||
|
60c82cb518 | ||
|
9a4ea76957 | ||
|
793ea356c3 | ||
|
71ba32e131 | ||
|
37d54f5bf2 | ||
|
ce947ae543 | ||
|
2218e6e565 | ||
|
ae5bcfe361 | ||
|
ff49d02f83 | ||
|
d7b1adb8c7 | ||
|
b3fb5ebd87 | ||
|
79a8cda356 | ||
|
ae3f570370 | ||
|
f17700afe3 | ||
|
269271a8d7 | ||
|
09cc61c25f | ||
|
06c8acc06b | ||
|
a3ae6ad74e | ||
|
f264034999 | ||
|
2b0ff701fa | ||
|
4a9b4fd5b1 | ||
|
d5d1ddbd92 | ||
|
39828f0775 | ||
|
954e8941bb | ||
|
20970ca9e6 | ||
|
eaf1247911 | ||
|
eb0a6c328f | ||
|
ed33ab18ac | ||
|
555dfae410 | ||
|
309b238400 | ||
|
2caefa4e9e | ||
|
e4dd35083a | ||
|
80bbdb7be8 | ||
|
c5a9be9298 | ||
|
5b9cde1dc4 | ||
|
1064d50f8c | ||
|
b35b697dc2 | ||
|
f6003ec47d | ||
|
dc47cec4aa | ||
|
6b213c2da0 | ||
|
860207d13c | ||
|
21990474d0 | ||
|
cd55ce0089 | ||
|
c20129c32c | ||
|
dac6e45451 | ||
|
3ecef3be5c | ||
|
74b468058a | ||
|
960d347f68 | ||
|
3573db5d34 | ||
|
dc29db592f | ||
|
805eadb4bb | ||
|
f0bb38e1b8 | ||
|
b52f66a2ee | ||
|
100b7277b3 | ||
|
28bafabd72 | ||
|
559e210503 | ||
|
4814fbce64 | ||
|
2568b05fe7 | ||
|
7c24af0745 | ||
|
410085dd28 | ||
|
bfce0f57d3 | ||
|
379a976387 | ||
|
6540493df2 | ||
|
6ecde7eeec | ||
|
8f6f4b761a | ||
|
fa40528acd | ||
|
0a5edea9d8 | ||
|
32b708cb58 | ||
|
b98cac8620 | ||
|
c6ca6f61ab | ||
|
e41c1701a5 | ||
|
d11e332dc6 | ||
|
45eea0efb6 | ||
|
3730de18ea | ||
|
4b8e051303 | ||
|
3418332411 | ||
|
bde21167f4 | ||
|
5ac39f75a1 | ||
|
1ef94683df | ||
|
35c98605d7 | ||
|
11a4269d1c | ||
|
2f7d0f18a5 | ||
|
8968860b4b | ||
|
aa5a4e529c | ||
|
a0251b32d1 | ||
|
8d144f1530 | ||
|
af3e9f07c7 | ||
|
aa4ec995cd | ||
|
657ce6b750 | ||
|
ee4759c772 | ||
|
3acf927eb7 | ||
|
b7db5e73a3 | ||
|
9c70c7f081 | ||
|
d5ef35c5a4 | ||
|
aa9a68b1be | ||
|
94d640b80e | ||
|
f92fd09a12 | ||
|
d8a90f70c1 | ||
|
11ee5e7762 | ||
|
74693a0b2a | ||
|
6400e79e02 | ||
|
6a6efba27a | ||
|
d554236ba3 | ||
|
6d14c454f1 | ||
|
9d51b4601c | ||
|
62fc067441 | ||
|
ea61589b12 | ||
|
89f9c5f38c | ||
|
caf5311feb | ||
|
3a32d20f18 | ||
|
651ed922b0 | ||
|
64ed5ef369 | ||
|
82e1873460 | ||
|
46782d9352 | ||
|
d558234885 | ||
|
b6ed3643f1 | ||
|
6ebfb5c77e | ||
|
86402106e7 | ||
|
53b093474f | ||
|
c8a93a9a3c | ||
|
8bffcd06cd | ||
|
dc0d4a0c84 | ||
|
886654d86d | ||
|
4177f965df | ||
|
f97f504284 | ||
|
45abf03b48 | ||
|
debc7d3310 | ||
|
ea23134560 | ||
|
2ad43933cf | ||
|
1afc26cc33 | ||
|
b64368873c | ||
|
89a3e86ebf | ||
|
952a016807 | ||
|
6c05ef8b9d | ||
|
3752c58af2 | ||
|
6e534b63c2 | ||
|
ced66a0056 | ||
|
ce3fd856dd | ||
|
4df5736ca4 | ||
|
aa9e2ab8e3 | ||
|
b38f9863cd | ||
|
ca06df3776 | ||
|
e9943f90c9 | ||
|
3d4e1de008 | ||
|
bdfdf1bb42 | ||
|
bf0d7eaa5f | ||
|
1b715049eb | ||
|
049d1f50d7 | ||
|
3af81c7f36 | ||
|
97743c1c18 | ||
|
7d4ce89e9b | ||
|
778e142411 | ||
|
c45297c5cb | ||
|
c1cacf277c |
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: bug
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Desktop (please complete the following information):**
|
||||||
|
- OS: [e.g. iOS]
|
||||||
|
- Browser [e.g. chrome, safari]
|
||||||
|
- Version [e.g. 22]
|
||||||
|
|
||||||
|
**Smartphone (please complete the following information):**
|
||||||
|
- Device: [e.g. iPhone6]
|
||||||
|
- OS: [e.g. iOS8.1]
|
||||||
|
- Browser [e.g. stock browser, safari]
|
||||||
|
- Version [e.g. 22]
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: ''
|
||||||
|
labels: enhancement
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
35
.github/workflows/ci.yml
vendored
Normal file
35
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
on: [push]
|
||||||
|
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
jekyll:
|
||||||
|
name: Build Jekyll site
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Build the site in the jekyll/builder container
|
||||||
|
run: |
|
||||||
|
docker run --rm \
|
||||||
|
--volume="${{ github.workspace }}:/srv/jekyll" \
|
||||||
|
jekyll/builder:3.8.5 /bin/bash -c "chmod 777 /srv/jekyll && jekyll build"
|
||||||
|
|
||||||
|
css:
|
||||||
|
name: Stylelint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Use Node.js 10.x
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
version: 10.x
|
||||||
|
|
||||||
|
- name: npm install, build, and test
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npm test
|
39
.github/workflows/publish.yml
vendored
Normal file
39
.github/workflows/publish.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
name: Publish Gem
|
||||||
|
|
||||||
|
on: [release]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build + Publish
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- name: Set up Ruby 2.6
|
||||||
|
uses: actions/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
version: 2.6.x
|
||||||
|
|
||||||
|
- name: Publish to GPR
|
||||||
|
run: |
|
||||||
|
mkdir -p $HOME/.gem
|
||||||
|
touch $HOME/.gem/credentials
|
||||||
|
chmod 0600 $HOME/.gem/credentials
|
||||||
|
printf -- "---\n:github: Bearer ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
||||||
|
gem build just-the-docs.gemspec
|
||||||
|
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
|
||||||
|
env:
|
||||||
|
GEM_HOST_API_KEY: ${{secrets.GPR_AUTH_TOKEN}}
|
||||||
|
OWNER: pmarsceill
|
||||||
|
|
||||||
|
- name: Publish to RubyGems
|
||||||
|
run: |
|
||||||
|
mkdir -p $HOME/.gem
|
||||||
|
touch $HOME/.gem/credentials
|
||||||
|
chmod 0600 $HOME/.gem/credentials
|
||||||
|
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
||||||
|
gem build just-the-docs.gemspec
|
||||||
|
gem push *.gem
|
||||||
|
env:
|
||||||
|
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@
|
|||||||
.sass-cache
|
.sass-cache
|
||||||
_site
|
_site
|
||||||
Gemfile.lock
|
Gemfile.lock
|
||||||
|
node_modules
|
||||||
|
@@ -1,4 +1,9 @@
|
|||||||
{
|
{
|
||||||
|
"ignoreFiles" : [
|
||||||
|
"assets/css/just-the-docs.scss",
|
||||||
|
"assets/css/dark-mode-preview.scss",
|
||||||
|
"_sass/vendor/**/*.scss"
|
||||||
|
],
|
||||||
"extends": [
|
"extends": [
|
||||||
"stylelint-config-primer"
|
"stylelint-config-primer"
|
||||||
]
|
]
|
||||||
|
11
404.html
Normal file
11
404.html
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
layout: default
|
||||||
|
title: Page not found
|
||||||
|
permalink: /404
|
||||||
|
nav_exclude: true
|
||||||
|
search_exclude: true
|
||||||
|
---
|
||||||
|
|
||||||
|
<h1>Page not found</h1>
|
||||||
|
|
||||||
|
<p>The page you requested could not be found. Try using the navigation {% if site.search_enabled %}or search {% endif %}to find what you're looking for or go to this <a href="{{ site.url }}{{ site.baseurl }}">site's home page</a>.</p>
|
41
README.md
41
README.md
@@ -1,8 +1,15 @@
|
|||||||
# Just the Docs
|
<p align="right">
|
||||||
|
<a href="https://badge.fury.io/rb/just-the-docs"><img src="https://badge.fury.io/rb/just-the-docs.svg" alt="Gem version"></a> <a href="https://github.com/pmarsceill/just-the-docs/actions"><img src="https://github.com/pmarsceill/just-the-docs/workflows/CI/badge.svg" alt="Build status"></a>
|
||||||
|
</p>
|
||||||
|
<br><br>
|
||||||
|
<p align="center">
|
||||||
|
<h1 align="center">Just the Docs</h1>
|
||||||
|
<p align="center">A modern, highly customizable, and responsive Jekyll theme for documentation with built-in search.<br>Easily hosted on GitHub Pages with few dependencies.</p>
|
||||||
|
<p align="center"><strong><a href="https://pmarsceill.github.io/just-the-docs/">See it in action!</a></strong></p>
|
||||||
|
<br><br><br>
|
||||||
|
</p>
|
||||||
|
|
||||||
A nice looking, high customizable, responsive Jekyll theme for documention with built-in search. Easily hosted on GitHub pages.
|

|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@@ -34,24 +41,28 @@ Or install it yourself as:
|
|||||||
|
|
||||||
Bug reports and pull requests are welcome on GitHub at https://github.com/pmarsceill/just-the-docs. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
Bug reports and pull requests are welcome on GitHub at https://github.com/pmarsceill/just-the-docs. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
||||||
|
|
||||||
|
### Submitting code changes:
|
||||||
|
|
||||||
|
- Open a [Pull Request](https://github.com/pmarsceill/just-the-docs/pulls)
|
||||||
|
- Ensure all CI tests pass
|
||||||
|
- Await code review
|
||||||
|
- Bump the version number in `just-the-docs.gemspec` and `package.json` according to [semantic versioning](https://semver.org/).
|
||||||
|
|
||||||
|
### Design and development principles of this theme:
|
||||||
|
|
||||||
|
1. As few dependencies as possible
|
||||||
|
2. No build script needed
|
||||||
|
3. First class mobile experience
|
||||||
|
4. Make the content shine
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
To set up your environment to develop this theme, run `bundle install`.
|
To set up your environment to develop this theme, run `bundle install`.
|
||||||
|
|
||||||
Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
|
Your theme is set up just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
|
||||||
|
|
||||||
When the theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released.
|
When the theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released.
|
||||||
|
|
||||||
|
|
||||||
### When your changes are ready:
|
|
||||||
|
|
||||||
- Open a [Pull Request](https://github.com/pmarsceill/just-the-docs/pulls)
|
|
||||||
- Await code review
|
|
||||||
- Bump the version number in `just-the-docs.gemspec`
|
|
||||||
- Run `script/build` to package the gem
|
|
||||||
- Run `gem push just-the-docs-<version>.gem` to publish the gem to Rubygems.org
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
The theme is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
The theme is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
||||||
|
|
||||||
|
42
_config.yml
42
_config.yml
@@ -16,17 +16,45 @@
|
|||||||
title: Just the Docs
|
title: Just the Docs
|
||||||
description: A Jekyll theme for documentation
|
description: A Jekyll theme for documentation
|
||||||
baseurl: "/just-the-docs" # the subpath of your site, e.g. /blog
|
baseurl: "/just-the-docs" # the subpath of your site, e.g. /blog
|
||||||
# url: "" # the base hostname & protocol for your site, e.g. http://example.com
|
url: "https://pmarsceill.github.io" # the base hostname & protocol for your site, e.g. http://example.com
|
||||||
|
|
||||||
sass:
|
|
||||||
# Load dependancies
|
|
||||||
load_paths:
|
|
||||||
- node_modules/
|
|
||||||
|
|
||||||
permalink: pretty
|
permalink: pretty
|
||||||
exclude: ["node_modules/", "*.gemspec", "*.gem", "Gemfile", "Gemfile.lock", "package.json", "script/", "LICENSE.txt", "lib/", "bin/", "README.md", "Rakefile"]
|
exclude: ["node_modules/", "*.gemspec", "*.gem", "Gemfile", "Gemfile.lock", "package.json", "package-lock.json", "script/", "LICENSE.txt", "lib/", "bin/", "README.md", "Rakefile"]
|
||||||
|
|
||||||
|
# Set a path/url to a logo that will be displayed instead of the title
|
||||||
|
#logo: "/assets/images/just-the-docs.png"
|
||||||
|
|
||||||
|
# Enable or disable the site search
|
||||||
|
search_enabled: true
|
||||||
|
|
||||||
|
# Set the search token separator for hyphenated-word search:
|
||||||
|
search_tokenizer_separator: /[\s/]+/
|
||||||
|
|
||||||
|
# Enable or disable heading anchors
|
||||||
|
heading_anchors: true
|
||||||
|
|
||||||
# Aux links for the upper right navigation
|
# Aux links for the upper right navigation
|
||||||
aux_links:
|
aux_links:
|
||||||
"Just the Docs on GitHub":
|
"Just the Docs on GitHub":
|
||||||
- "//github.com/pmarsceill/just-the-docs"
|
- "//github.com/pmarsceill/just-the-docs"
|
||||||
|
|
||||||
|
# Footer content appears at the bottom of every page's main content
|
||||||
|
footer_content: "Copyright © 2017-2019 Patrick Marsceill. Distributed by an <a href=\"https://github.com/pmarsceill/just-the-docs/tree/master/LICENSE.txt\">MIT license.</a>"
|
||||||
|
|
||||||
|
# Color scheme currently only supports "dark" or nil (default)
|
||||||
|
color_scheme: nil
|
||||||
|
|
||||||
|
# Google Analytics Tracking (optional)
|
||||||
|
# e.g, UA-1234567-89
|
||||||
|
ga_tracking: UA-2709176-10
|
||||||
|
|
||||||
|
plugins:
|
||||||
|
- jekyll-seo-tag
|
||||||
|
|
||||||
|
compress_html:
|
||||||
|
clippings: all
|
||||||
|
comments: all
|
||||||
|
endings: all
|
||||||
|
startings: []
|
||||||
|
blanklines: false
|
||||||
|
profile: false
|
||||||
|
@@ -2,10 +2,39 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||||
|
|
||||||
<title>{{ page.title }} - {{ site.title }}</title>
|
{% if site.plugins.jekyll-seo == nil %}
|
||||||
<link rel="stylesheet" href="{{ "/assets/css/just-the-docs.css" | absolute_url }}">
|
<title>{{ page.title }} - {{ site.title }}</title>
|
||||||
<script type="text/javascript" src="{{ "/assets/js/vendor/lunr.min.js" | absolute_url }}"></script>
|
|
||||||
<script type="text/javascript" src="{{ "/assets/js/just-the-docs.js" | absolute_url }}"></script>
|
{% if page.description %}
|
||||||
|
<meta name="Description" content="{{ page.description }}">
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<link rel="shortcut icon" href="{{ 'favicon.ico' | absolute_url }}" type="image/x-icon">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs.css' | absolute_url }}">
|
||||||
|
|
||||||
|
{% if site.ga_tracking != nil %}
|
||||||
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.ga_tracking }}"></script>
|
||||||
|
<script>
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag(){dataLayer.push(arguments);}
|
||||||
|
gtag('js', new Date());
|
||||||
|
|
||||||
|
gtag('config', "{{ site.ga_tracking }}");
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if site.search_enabled != false %}
|
||||||
|
<script type="text/javascript" src="{{ '/assets/js/vendor/lunr.min.js' | absolute_url }}"></script>
|
||||||
|
{% endif %}
|
||||||
|
<script type="text/javascript" src="{{ '/assets/js/just-the-docs.js' | absolute_url }}"></script>
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
|
{% seo %}
|
||||||
|
|
||||||
|
{% include head_custom.html %}
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
@@ -1,24 +1,40 @@
|
|||||||
<nav>
|
<nav role="navigation" aria-label="Main navigation">
|
||||||
<ul class="navigation-list">
|
<ul class="navigation-list">
|
||||||
{% assign pages_list = site.html_pages | sort:"nav_order" %}
|
{%- assign pages_list = site.html_pages | sort:"nav_order" -%}
|
||||||
{% for node in pages_list %}
|
{%- for node in pages_list -%}
|
||||||
<li class="navigation-list-item{% if page.url == node.url %} active{% endif %} js-side-nav-item">
|
{%- unless node.nav_exclude -%}
|
||||||
{% if node.parent == nil or node.has_children == true %}
|
{%- if node.parent == nil -%}
|
||||||
<a href="{{ node.url | absolute_url }}" class="navigation-list-link{% if page.url == node.url or (page.parent != nil and page.parent == node.parent) %} active{% endif %}">{{ node.title }}</a>
|
<li class="navigation-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}">
|
||||||
{% if (node.has_children == true and node.parent == page.parent) %}
|
{%- if page.parent == node.title or page.grand_parent == node.title -%}
|
||||||
{% assign children_list = site.html_pages | sort:"nav_order" %}
|
{%- assign first_level_url = node.url | absolute_url -%}
|
||||||
<ul class="navigation-list-child-list">
|
{%- endif -%}
|
||||||
{% for child in children_list %}
|
<a href="{{ node.url | absolute_url }}" class="navigation-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
|
||||||
{% if child.parent == node.parent and child.title != node.title %}
|
{%- if node.has_children -%}
|
||||||
<li class="navigation-list-item {% if page.url == child.url %} active{% endif %}">
|
{%- assign children_list = site.html_pages | where: "parent", node.title | sort:"nav_order" -%}
|
||||||
<a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
|
<ul class="navigation-list-child-list ">
|
||||||
</li>
|
{%- for child in children_list -%}
|
||||||
{% endif %}
|
<li class="navigation-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}">
|
||||||
{% endfor %}
|
{%- if page.url == child.url or page.parent == child.title -%}
|
||||||
</ul>
|
{%- assign second_level_url = child.url | absolute_url -%}
|
||||||
{% endif %}
|
{%- endif -%}
|
||||||
{% endif %}
|
<a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
|
||||||
</li>
|
{%- if child.has_children -%}
|
||||||
{% endfor %}
|
{%- assign grand_children_list = site.html_pages | where: "parent", child.title | sort:"nav_order" -%}
|
||||||
|
<ul class="navigation-list-child-list">
|
||||||
|
{%- for grand_child in grand_children_list -%}
|
||||||
|
<li class="navigation-list-item {% if page.url == grand_child.url %} active{% endif %}">
|
||||||
|
<a href="{{ grand_child.url | absolute_url }}" class="navigation-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a>
|
||||||
|
</li>
|
||||||
|
{%- endfor -%}
|
||||||
|
</ul>
|
||||||
|
{%- endif -%}
|
||||||
|
</li>
|
||||||
|
{%- endfor -%}
|
||||||
|
</ul>
|
||||||
|
{%- endif -%}
|
||||||
|
</li>
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endunless -%}
|
||||||
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
5
_includes/title.html
Normal file
5
_includes/title.html
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{% if site.logo %}
|
||||||
|
<div class="site-logo"></div>
|
||||||
|
{% else %}
|
||||||
|
{{ site.title }}
|
||||||
|
{% endif %}
|
100
_includes/vendor/anchor_headings.html
vendored
Executable file
100
_includes/vendor/anchor_headings.html
vendored
Executable file
@@ -0,0 +1,100 @@
|
|||||||
|
{% capture headingsWorkspace %}
|
||||||
|
{% comment %}
|
||||||
|
Version 1.0.3
|
||||||
|
https://github.com/allejo/jekyll-anchor-headings
|
||||||
|
|
||||||
|
"Be the pull request you wish to see in the world." ~Ben Balter
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
{% include anchor_headings.html html=content %}
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
* html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
|
||||||
|
|
||||||
|
Optional Parameters:
|
||||||
|
* beforeHeading (bool) : false - Set to true if the anchor should be placed _before_ the heading's content
|
||||||
|
* anchorBody (string) : '' - The content that will be placed inside the anchor; the `%heading%` placeholder is available
|
||||||
|
* anchorClass (string) : '' - The class(es) that will be used for each anchor. Separate multiple classes with a space
|
||||||
|
* anchorTitle (string) : '' - The `title` attribute that will be used for anchors
|
||||||
|
* h_min (int) : 1 - The minimum header level to build an anchor for; any header lower than this value will be ignored
|
||||||
|
* h_max (int) : 6 - The maximum header level to build an anchor for; any header greater than this value will be ignored
|
||||||
|
* bodyPrefix (string) : '' - Anything that should be inserted inside of the heading tag _before_ its anchor and content
|
||||||
|
* bodySuffix (string) : '' - Anything that should be inserted inside of the heading tag _after_ its anchor and content
|
||||||
|
|
||||||
|
Output:
|
||||||
|
The original HTML with the addition of anchors inside of all of the h1-h6 headings.
|
||||||
|
{% endcomment %}
|
||||||
|
|
||||||
|
{% assign minHeader = include.h_min | default: 1 %}
|
||||||
|
{% assign maxHeader = include.h_max | default: 6 %}
|
||||||
|
{% assign beforeHeading = include.beforeHeading %}
|
||||||
|
{% assign nodes = include.html | split: '<h' %}
|
||||||
|
|
||||||
|
{% capture edited_headings %}{% endcapture %}
|
||||||
|
|
||||||
|
{% for _node in nodes %}
|
||||||
|
{% capture node %}{{ _node | strip }}{% endcapture %}
|
||||||
|
|
||||||
|
{% if node == "" %}
|
||||||
|
{% continue %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% assign nextChar = node | replace: '"', '' | strip | slice: 0, 1 %}
|
||||||
|
{% assign headerLevel = nextChar | times: 1 %}
|
||||||
|
|
||||||
|
<!-- If the level is cast to 0, it means it's not a h1-h6 tag, so let's try to fix it -->
|
||||||
|
{% if headerLevel == 0 %}
|
||||||
|
{% if nextChar != '<' and nextChar != '' %}
|
||||||
|
{% capture node %}<h{{ node }}{% endcapture %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% capture edited_headings %}{{ edited_headings }}{{ node }}{% endcapture %}
|
||||||
|
{% continue %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% assign _workspace = node | split: '</h' %}
|
||||||
|
{% assign _idWorkspace = _workspace[0] | split: 'id="' %}
|
||||||
|
{% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
|
||||||
|
{% assign html_id = _idWorkspace[0] %}
|
||||||
|
|
||||||
|
{% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
|
||||||
|
{% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
|
||||||
|
|
||||||
|
<!-- Build the anchor to inject for our heading -->
|
||||||
|
{% capture anchor %}{% endcapture %}
|
||||||
|
|
||||||
|
{% if html_id and headerLevel >= minHeader and headerLevel <= maxHeader %}
|
||||||
|
{% capture anchor %}href="#{{ html_id}}"{% endcapture %}
|
||||||
|
|
||||||
|
{% if include.anchorClass %}
|
||||||
|
{% capture anchor %}{{ anchor }} class="{{ include.anchorClass }}"{% endcapture %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if include.anchorTitle %}
|
||||||
|
{% capture anchor %}{{ anchor }} title="{{ include.anchorTitle | replace: '%heading%', header }}"{% endcapture %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% capture anchor %}<a {{ anchor }}>{{ include.anchorBody | replace: '%heading%', header | default: '' }}</a>{% endcapture %}
|
||||||
|
|
||||||
|
<!-- In order to prevent adding extra space after a heading, we'll let the 'anchor' value contain it -->
|
||||||
|
{% if beforeHeading %}
|
||||||
|
{% capture anchor %}{{ anchor }} {% endcapture %}
|
||||||
|
{% else %}
|
||||||
|
{% capture anchor %} {{ anchor }}{% endcapture %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% capture new_heading %}
|
||||||
|
<h{{ _hAttrToStrip }}
|
||||||
|
{{ include.bodyPrefix }}
|
||||||
|
{% if beforeHeading %}
|
||||||
|
{{ anchor }}{{ header }}
|
||||||
|
{% else %}
|
||||||
|
{{ header }}{{ anchor }}
|
||||||
|
{% endif %}
|
||||||
|
{{ include.bodySuffix }}
|
||||||
|
</h{{ _workspace | last }}
|
||||||
|
{% endcapture %}
|
||||||
|
{% capture edited_headings %}{{ edited_headings }}{{ new_heading }}{% endcapture %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endcapture %}{% assign headingsWorkspace = '' %}{{ edited_headings | strip }}
|
5
_layouts/about.html
Normal file
5
_layouts/about.html
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
layout: default
|
||||||
|
---
|
||||||
|
|
||||||
|
{{ content }}
|
@@ -1,68 +1,102 @@
|
|||||||
|
---
|
||||||
|
layout: table_wrappers
|
||||||
|
---
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html lang="en-us">
|
<html lang="{{ site.lang | default: "en-US" }}">
|
||||||
{% include head.html %}
|
{% include head.html %}
|
||||||
|
<body>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||||
|
<symbol id="link" viewBox="0 0 16 16">
|
||||||
|
<title>Link</title>
|
||||||
|
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
|
||||||
<div class="page-wrap">
|
<div class="page-wrap">
|
||||||
<div class="side-bar">
|
<div class="side-bar">
|
||||||
<a href="{{ site.baseurl }}/" class="site-title fs-6 text-grey-dk-300 lh-tight">{{ site.title }}</a>
|
<div class="site-header">
|
||||||
<span class="fs-3"><button class="js-main-nav-trigger navigation-list-toggle btn btn-outline" type="button" data-text-toggle="Hide">Menu</button></span>
|
<a href="{{ site.url }}{{ site.baseurl }}" class="site-title lh-tight">{% include title.html %}</a>
|
||||||
|
<button class="menu-button fs-3 js-main-nav-trigger" data-text-toggle="Hide" type="button">Menu</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="navigation main-nav js-main-nav">
|
<div class="navigation main-nav js-main-nav">
|
||||||
{% include nav.html %}
|
{% include nav.html %}
|
||||||
</div>
|
</div>
|
||||||
<footer role="contentinfo" class="site-footer">
|
<footer class="site-footer">
|
||||||
<p class="text-small text-grey-dk-000 mb-0">This site uses <a href="https://github.com/pmarsceill/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.</p>
|
<p class="text-small text-grey-dk-000 mb-4">This site uses <a href="https://github.com/pmarsceill/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.</p>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
<div class="main-content-wrap">
|
<div class="main-content-wrap js-main-content" tabindex="0">
|
||||||
<div class="page-header">
|
<div class="main-content">
|
||||||
<div class="main-content pb-0">
|
<div class="page-header js-page-header">
|
||||||
<div class="search js-search">
|
{% if site.search_enabled != false %}
|
||||||
|
<div class="search">
|
||||||
<div class="search-input-wrap">
|
<div class="search-input-wrap">
|
||||||
<input type="text" class="js-search-input search-input fs-2" placeholder="Search {{ site.title }}" aria-label="Search {{ site.title }}" autocomplete="off">
|
<input type="text" class="js-search-input search-input" tabindex="0" placeholder="Search {{ site.title }}" aria-label="Search {{ site.title }}" autocomplete="off">
|
||||||
<svg width="14" height="14" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" class="search-icon"><title>Search</title><g fill-rule="nonzero"><path d="M17.332 20.735c-5.537 0-10-4.6-10-10.247 0-5.646 4.463-10.247 10-10.247 5.536 0 10 4.601 10 10.247s-4.464 10.247-10 10.247zm0-4c3.3 0 6-2.783 6-6.247 0-3.463-2.7-6.247-6-6.247s-6 2.784-6 6.247c0 3.464 2.7 6.247 6 6.247z"/><path d="M11.672 13.791L.192 25.271 3.02 28.1 14.5 16.62z"/></g></svg>
|
<svg width="14" height="14" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" class="search-icon"><title>Search</title><g fill-rule="nonzero"><path d="M17.332 20.735c-5.537 0-10-4.6-10-10.247 0-5.646 4.463-10.247 10-10.247 5.536 0 10 4.601 10 10.247s-4.464 10.247-10 10.247zm0-4c3.3 0 6-2.783 6-6.247 0-3.463-2.7-6.247-6-6.247s-6 2.784-6 6.247c0 3.464 2.7 6.247 6 6.247z"/><path d="M11.672 13.791L.192 25.271 3.02 28.1 14.5 16.62z"/></g></svg>
|
||||||
</div>
|
</div>
|
||||||
<div class="js-search-results search-results-wrap"></div>
|
<div class="js-search-results search-results-wrap"></div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% if site.aux_links != nil %}
|
{% if site.aux_links != nil %}
|
||||||
<ul class="list-style-none text-small mt-md-2 pb-4 pb-md-0 js-aux-nav aux-nav">
|
<ul class="list-style-none text-small aux-nav">
|
||||||
{% for link in site.aux_links %}
|
{% for link in site.aux_links %}
|
||||||
<li class="d-inline-block my-0{% unless forloop.last %} mr-2{% endunless %}"><a href="{{ link.last }}">{{ link.first }}</a></li>
|
<li class="d-inline-block my-0{% unless forloop.last %} mr-2{% endunless %}"><a href="{{ link.last }}">{{ link.first }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="page">
|
||||||
<div class="main-content">
|
{% unless page.url == "/" %}
|
||||||
{% unless page.url == "/" %}
|
{% if page.parent %}
|
||||||
{% if page.parent != nil and page.parent != page.title %}
|
<nav class="breadcrumb-nav">
|
||||||
<nav class="breadcrumb-nav">
|
<ol class="breadcrumb-nav-list">
|
||||||
<ol class="breadcrumb-nav-list">
|
{% if page.grand_parent %}
|
||||||
<li class="breadcrumb-nav-list-item"><a href="{{ site.url | absolute_url }}/{{ page.parent | slugify }}">{{ page.parent }}</a></li>
|
<li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.grand_parent }}</a></li>
|
||||||
<li class="breadcrumb-nav-list-item"><span>{{ page.title }}</span></li>
|
<li class="breadcrumb-nav-list-item"><a href="{{ second_level_url }}">{{ page.parent }}</a></li>
|
||||||
</ol>
|
{% else %}
|
||||||
</nav>
|
<li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.parent }}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endunless %}
|
<li class="breadcrumb-nav-list-item"><span>{{ page.title }}</span></li>
|
||||||
<div class="page-content">
|
</ol>
|
||||||
{{ content }}
|
</nav>
|
||||||
|
{% endif %}
|
||||||
|
{% endunless %}
|
||||||
|
<div id="main-content" class="page-content" role="main">
|
||||||
|
{% if site.heading_anchors != false %}
|
||||||
|
{% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><use xlink:href=\"#link\"></use></svg>" anchorClass="anchor-heading" %}
|
||||||
|
{% else %}
|
||||||
|
{{ content }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if page.has_children == true %}
|
{% if page.has_children == true and page.has_toc != false %}
|
||||||
<hr>
|
<hr>
|
||||||
<h2 class="text-delta">Table of contents</h2>
|
<h2 class="text-delta">Table of contents</h2>
|
||||||
{% assign children_list = site.pages | sort:"nav_order" %}
|
{% assign children_list = site.pages | sort:"nav_order" %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for child in children_list %}
|
{% for child in children_list %}
|
||||||
{% if child.parent == page.title and child.title != page.title %}
|
{% if child.parent == page.title and child.title != page.title %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ child.url | absolute_url }}">{{ child.title }}</a>
|
<a href="{{ child.url | absolute_url }}">{{ child.title }}</a>{% if child.summary %} - {{ child.summary }}{% endif %}
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if site.footer_content != nil %}
|
||||||
|
<hr>
|
||||||
|
<footer role="contentinfo">
|
||||||
|
<p class="text-small text-grey-dk-000 mb-0">{{ site.footer_content }}</p>
|
||||||
|
</footer>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
5
_layouts/home.html
Normal file
5
_layouts/home.html
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
layout: default
|
||||||
|
---
|
||||||
|
|
||||||
|
{{ content }}
|
5
_layouts/page.html
Normal file
5
_layouts/page.html
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
layout: default
|
||||||
|
---
|
||||||
|
|
||||||
|
{{ content }}
|
7
_layouts/table_wrappers.html
Normal file
7
_layouts/table_wrappers.html
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
layout: vendor/compress
|
||||||
|
---
|
||||||
|
|
||||||
|
{% assign content_ = content | replace: '<table', '<div class="table-wrapper"><table' %}
|
||||||
|
{% assign content_ = content_ | replace: '</table>', '</table></div>' %}
|
||||||
|
{{ content_ }}
|
10
_layouts/vendor/compress.html
vendored
Normal file
10
_layouts/vendor/compress.html
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
# Jekyll layout that compresses HTML
|
||||||
|
# v3.1.0
|
||||||
|
# http://jch.penibelst.de/
|
||||||
|
# © 2014–2015 Anatol Broder
|
||||||
|
# MIT License
|
||||||
|
---
|
||||||
|
|
||||||
|
{% capture _LINE_FEED %}
|
||||||
|
{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment or site.compress_html.ignore.envs == "all" %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}
|
@@ -1,12 +1,17 @@
|
|||||||
//
|
//
|
||||||
// Base element style overrides
|
// Base element style overrides
|
||||||
//
|
//
|
||||||
// stylelint-disable selector-no-type
|
// stylelint-disable selector-no-type, selector-max-type
|
||||||
|
|
||||||
* {
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::selection {
|
||||||
|
color: $white;
|
||||||
|
background: $link-color;
|
||||||
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
@include fs-4;
|
@include fs-4;
|
||||||
}
|
}
|
||||||
@@ -16,6 +21,7 @@ body {
|
|||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
line-height: $body-line-height;
|
line-height: $body-line-height;
|
||||||
color: $body-text-color;
|
color: $body-text-color;
|
||||||
|
background-color: $body-background-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
p,
|
p,
|
||||||
@@ -64,7 +70,7 @@ a {
|
|||||||
|
|
||||||
a:not([class]) {
|
a:not([class]) {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
background-image: linear-gradient($grey-lt-100 0%, $grey-lt-100 100%);
|
background-image: linear-gradient($border-color 0%, $border-color 100%);
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
background-position: 0 100%;
|
background-position: 0 100%;
|
||||||
background-size: 1px 1px;
|
background-size: 1px 1px;
|
||||||
@@ -82,7 +88,8 @@ code {
|
|||||||
line-height: $body-line-height;
|
line-height: $body-line-height;
|
||||||
}
|
}
|
||||||
|
|
||||||
figure {
|
figure,
|
||||||
|
pre {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,6 +106,6 @@ hr {
|
|||||||
height: 1px;
|
height: 1px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: $sp-6 0;
|
margin: $sp-6 0;
|
||||||
background-color: $grey-lt-100;
|
background-color: $border-color;
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
@@ -15,13 +15,13 @@
|
|||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
color: $purple-200;
|
color: $link-color;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-color: #f7f7f7;
|
background-color: $base-button-color;
|
||||||
border-width: 0;
|
border-width: 0;
|
||||||
border-radius: 3px;
|
border-radius: $border-radius;
|
||||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
|
||||||
appearance: none;
|
appearance: none;
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&.zeroclipboard-is-hover {
|
&.zeroclipboard-is-hover {
|
||||||
color: $purple-300;
|
color: darken($link-color, 2%);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
@@ -46,13 +46,13 @@
|
|||||||
&.zeroclipboard-is-hover,
|
&.zeroclipboard-is-hover,
|
||||||
&.zeroclipboard-is-active {
|
&.zeroclipboard-is-active {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
background-color: #f4f4f4;
|
background-color: darken($base-button-color, 1%);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:active,
|
&:active,
|
||||||
&.selected,
|
&.selected,
|
||||||
&.zeroclipboard-is-active {
|
&.zeroclipboard-is-active {
|
||||||
background-color: #ededed;
|
background-color: darken($base-button-color, 3%);
|
||||||
background-image: none;
|
background-image: none;
|
||||||
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
|
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
|
||||||
}
|
}
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn-outline {
|
.btn-outline {
|
||||||
color: $blue-100;
|
color: $link-color;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
box-shadow: inset 0 0 0 2px $grey-lt-300;
|
box-shadow: inset 0 0 0 2px $grey-lt-300;
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
&:active,
|
&:active,
|
||||||
&.zeroclipboard-is-hover,
|
&.zeroclipboard-is-hover,
|
||||||
&.zeroclipboard-is-active {
|
&.zeroclipboard-is-active {
|
||||||
color: $grey-dk-100;
|
color: darken($link-color, 4%);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
box-shadow: inset 0 0 0 3px $grey-lt-300;
|
box-shadow: inset 0 0 0 3px $grey-lt-300;
|
||||||
@@ -101,6 +101,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
@include btn-color($white, $btn-primary-color);
|
||||||
|
}
|
||||||
|
|
||||||
.btn-purple {
|
.btn-purple {
|
||||||
@include btn-color($white, $purple-100);
|
@include btn-color($white, $purple-100);
|
||||||
}
|
}
|
||||||
|
@@ -1,20 +1,22 @@
|
|||||||
//
|
//
|
||||||
// Code and syntax highlighting
|
// Code and syntax highlighting
|
||||||
//
|
//
|
||||||
// stylelint-disable selector-no-qualifying-type, declaration-block-semicolon-newline-after,declaration-block-single-line-max-declarations, selector-no-type
|
// stylelint-disable selector-no-qualifying-type, declaration-block-semicolon-newline-after,declaration-block-single-line-max-declarations, selector-no-type, selector-max-type
|
||||||
|
|
||||||
code {
|
code {
|
||||||
padding: 0.2em 0.15em;
|
padding: 0.2em 0.15em;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
background-color: $grey-lt-000;
|
background-color: $code-background-color;
|
||||||
border: $border $border-color;
|
border: $border $border-color;
|
||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlight {
|
pre.highlight,
|
||||||
|
figure.highlight {
|
||||||
padding: $sp-3;
|
padding: $sp-3;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
background-color: $grey-lt-000;
|
-webkit-overflow-scrolling: touch;
|
||||||
|
background-color: $code-background-color;
|
||||||
|
|
||||||
code {
|
code {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -60,7 +62,7 @@ code {
|
|||||||
.highlight .ld { color: #93a1a1; } // literal.date //
|
.highlight .ld { color: #93a1a1; } // literal.date //
|
||||||
.highlight .m { color: #2aa198; } // literal.number //
|
.highlight .m { color: #2aa198; } // literal.number //
|
||||||
.highlight .s { color: #2aa198; } // literal.string //
|
.highlight .s { color: #2aa198; } // literal.string //
|
||||||
.highlight .na { color: #93a1a1; } // name.attribute //
|
.highlight .na { color: #555; } // name.attribute //
|
||||||
.highlight .nb { color: #b58900; } // name.builtin //
|
.highlight .nb { color: #b58900; } // name.builtin //
|
||||||
.highlight .nc { color: #268bd2; } // name.class //
|
.highlight .nc { color: #268bd2; } // name.class //
|
||||||
.highlight .no { color: #cb4b16; } // name.constant //
|
.highlight .no { color: #cb4b16; } // name.constant //
|
||||||
@@ -68,7 +70,7 @@ code {
|
|||||||
.highlight .ni { color: #cb4b16; } // name.entity //
|
.highlight .ni { color: #cb4b16; } // name.entity //
|
||||||
.highlight .ne { color: #cb4b16; } // name.exception //
|
.highlight .ne { color: #cb4b16; } // name.exception //
|
||||||
.highlight .nf { color: #268bd2; } // name.function //
|
.highlight .nf { color: #268bd2; } // name.function //
|
||||||
.highlight .nl { color: #93a1a1; } // name.label //
|
.highlight .nl { color: #555; } // name.label //
|
||||||
.highlight .nn { color: #93a1a1; } // name.namespace //
|
.highlight .nn { color: #93a1a1; } // name.namespace //
|
||||||
.highlight .nx { color: #555; } // name.other //
|
.highlight .nx { color: #555; } // name.other //
|
||||||
.highlight .py { color: #93a1a1; } // name.property //
|
.highlight .py { color: #93a1a1; } // name.property //
|
||||||
@@ -104,7 +106,7 @@ code {
|
|||||||
.code-example {
|
.code-example {
|
||||||
padding: $sp-3;
|
padding: $sp-3;
|
||||||
margin-bottom: $sp-3;
|
margin-bottom: $sp-3;
|
||||||
overflow: scroll;
|
overflow: auto;
|
||||||
border: 1px solid $border-color;
|
border: 1px solid $border-color;
|
||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
|
|
||||||
|
17
_sass/color_schemes/dark.scss
Normal file
17
_sass/color_schemes/dark.scss
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
$body-background-color: $grey-dk-300;
|
||||||
|
$sidebar-color: $grey-dk-300;
|
||||||
|
$border-color: $grey-dk-200;
|
||||||
|
|
||||||
|
$body-text-color: $grey-lt-300;
|
||||||
|
$body-heading-color: $grey-lt-000;
|
||||||
|
$nav-child-link-color: $grey-dk-000;
|
||||||
|
$search-result-preview-color: $grey-dk-000;
|
||||||
|
|
||||||
|
$link-color: $blue-000;
|
||||||
|
$btn-primary-color: $blue-200;
|
||||||
|
$base-button-color: $grey-dk-250;
|
||||||
|
|
||||||
|
$code-background-color: $grey-dk-250;
|
||||||
|
$search-background-color: $grey-dk-250;
|
||||||
|
$table-background-color: $grey-dk-250;
|
@@ -1,12 +1,21 @@
|
|||||||
|
@charset "UTF-8";
|
||||||
|
|
||||||
//
|
//
|
||||||
// Styles for rendered markdown in the .main-content container
|
// Styles for rendered markdown in the .main-content container
|
||||||
//
|
//
|
||||||
// stylelint-disable selector-no-type, max-nesting-depth, selector-max-compound-selectors
|
// stylelint-disable selector-no-type, max-nesting-depth, selector-max-compound-selectors, selector-max-type
|
||||||
|
|
||||||
.page-content {
|
.page-content {
|
||||||
|
line-height: $content-line-height;
|
||||||
|
|
||||||
|
a {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
ul,
|
ul,
|
||||||
ol,
|
ol {
|
||||||
dl {
|
|
||||||
padding-left: 1.5em;
|
padding-left: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -14,13 +23,13 @@
|
|||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
counter-reset: step-counter;
|
counter-reset: step-counter;
|
||||||
|
|
||||||
li {
|
> li {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0.2em;
|
top: 0.2em;
|
||||||
left: -1.5em;
|
left: -1.6em;
|
||||||
color: $grey-dk-000;
|
color: $grey-dk-000;
|
||||||
content: counter(step-counter);
|
content: counter(step-counter);
|
||||||
counter-increment: step-counter;
|
counter-increment: step-counter;
|
||||||
@@ -47,16 +56,33 @@
|
|||||||
ul {
|
ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
|
||||||
li {
|
> li {
|
||||||
&::before {
|
&::before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
margin-left: -1.5em;
|
margin-left: -1.4em;
|
||||||
color: $grey-dk-000;
|
color: $grey-dk-000;
|
||||||
content: "•";
|
content: "•";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.task-list {
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-list-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-list-item-checkbox {
|
||||||
|
margin-right: 0.6em;
|
||||||
|
}
|
||||||
|
|
||||||
hr + * {
|
hr + * {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
@@ -64,4 +90,71 @@
|
|||||||
h1:first-of-type {
|
h1:first-of-type {
|
||||||
margin-top: 0.5em;
|
margin-top: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dl {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: max-content 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
dt,
|
||||||
|
dd {
|
||||||
|
margin: 0.25em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
dt {
|
||||||
|
text-align: right;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: ":";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dd {
|
||||||
|
margin-left: 1em;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.anchor-heading {
|
||||||
|
position: absolute;
|
||||||
|
right: -$sp-4;
|
||||||
|
width: $sp-5;
|
||||||
|
height: 100%;
|
||||||
|
padding-right: $sp-1;
|
||||||
|
padding-left: $sp-1;
|
||||||
|
overflow: visible;
|
||||||
|
|
||||||
|
@include mq(md) {
|
||||||
|
right: auto;
|
||||||
|
left: -$sp-5;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
fill: $link-color;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.anchor-heading:hover,
|
||||||
|
h1:hover > .anchor-heading,
|
||||||
|
h2:hover > .anchor-heading,
|
||||||
|
h3:hover > .anchor-heading,
|
||||||
|
h4:hover > .anchor-heading,
|
||||||
|
h5:hover > .anchor-heading,
|
||||||
|
h6:hover > .anchor-heading {
|
||||||
|
svg {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6 {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,112 +1,129 @@
|
|||||||
// //
|
////
|
||||||
// // Typography
|
//// Typography
|
||||||
// //
|
////
|
||||||
//
|
|
||||||
// $body-font-family: -apple-system, BlinkMacSystemFont, "helvetica neue", helvetica, roboto, noto, "segoe ui", arial, sans-serif;
|
//$body-font-family: -apple-system, BlinkMacSystemFont, "helvetica neue", helvetica, roboto, noto, "segoe ui", arial, sans-serif;
|
||||||
// $mono-font-family: "SFMono-Regular", Menlo, Consolas, Monospace;
|
//$mono-font-family: "SFMono-Regular", Menlo, Consolas, Monospace;
|
||||||
// $root-font-size: 16px; // Base font-size for rems
|
//$root-font-size: 16px; // Base font-size for rems
|
||||||
// $body-line-height: 1.4;
|
//$body-line-height: 1.4;
|
||||||
// $body-heading-line-height: 1.15;
|
//$content-line-height: 1.5;
|
||||||
//
|
//$body-heading-line-height: 1.15;
|
||||||
// //
|
|
||||||
// // Colors
|
////
|
||||||
// //
|
//// Colors
|
||||||
//
|
////
|
||||||
// $white: #fff;
|
|
||||||
//
|
//$white: #fff;
|
||||||
// $grey-dk-000: #959396;
|
|
||||||
// $grey-dk-100: #5c5962;
|
//$grey-dk-000: #959396;
|
||||||
// $grey-dk-200: #44434d;
|
//$grey-dk-100: #5c5962;
|
||||||
// $grey-dk-300: #27262b;
|
//$grey-dk-200: #44434d;
|
||||||
//
|
//$grey-dk-250: #302d36;
|
||||||
// $grey-lt-000: #f5f6fa;
|
//$grey-dk-300: #27262b;
|
||||||
// $grey-lt-100: #eeebee;
|
|
||||||
// $grey-lt-200: #ecebed;
|
//$grey-lt-000: #f5f6fa;
|
||||||
// $grey-lt-300: #e6e1e8;
|
//$grey-lt-100: #eeebee;
|
||||||
//
|
//$grey-lt-200: #ecebed;
|
||||||
// $purple-000: #7253ed;
|
//$grey-lt-300: #e6e1e8;
|
||||||
// $purple-100: #5e41d0;
|
|
||||||
// $purple-200: #4e26af;
|
//$purple-000: #7253ed;
|
||||||
// $purple-300: #381885;
|
//$purple-100: #5e41d0;
|
||||||
//
|
//$purple-200: #4e26af;
|
||||||
// $blue-000: #2c84fa;
|
//$purple-300: #381885;
|
||||||
// $blue-100: #2869e6;
|
|
||||||
// $blue-200: #264caf;
|
//$blue-000: #2c84fa;
|
||||||
// $blue-300: #183385;
|
//$blue-100: #2869e6;
|
||||||
//
|
//$blue-200: #264caf;
|
||||||
// $green-000: #41d693;
|
//$blue-300: #183385;
|
||||||
// $green-100: #11b584;
|
|
||||||
// $green-200: #009c7b;
|
//$green-000: #41d693;
|
||||||
// $green-300: #026e57;
|
//$green-100: #11b584;
|
||||||
//
|
//$green-200: #009c7b;
|
||||||
// $body-text-color: $grey-dk-100;
|
//$green-300: #026e57;
|
||||||
// $body-heading-color: $grey-dk-300;
|
|
||||||
// $link-color: $purple-000;
|
//$yellow-000: #ffeb82;
|
||||||
//
|
//$yellow-100: #fadf50;
|
||||||
// //
|
//$yellow-200: #f7d12e;
|
||||||
// // Media queries in pixels
|
//$yellow-300: #e7af06;
|
||||||
// //
|
|
||||||
//
|
//$red-000: #f77e7e;
|
||||||
// $media-queries: (
|
//$red-100: #f96e65;
|
||||||
// xs: 320px,
|
//$red-200: #e94c4c;
|
||||||
// sm: 500px,
|
//$red-300: #dd2e2e;
|
||||||
// md: 740px,
|
|
||||||
// lg: 1120px,
|
//$body-background-color: $white;
|
||||||
// xl: 1400px
|
//$sidebar-color: $grey-lt-000;
|
||||||
// );
|
//$search-background-color: $white;
|
||||||
//
|
//$table-background-color: $white;
|
||||||
// //
|
//$code-background-color: $grey-lt-000;
|
||||||
// // Spacing
|
|
||||||
// //
|
//$body-text-color: $grey-dk-100;
|
||||||
//
|
//$body-heading-color: $grey-dk-300;
|
||||||
// $spacing-unit: 1rem; // 1rem == 16px
|
//$search-result-preview-color: $grey-dk-000;
|
||||||
//
|
//$nav-child-link-color: $grey-dk-100;
|
||||||
// $spacers: (
|
//$link-color: $purple-000;
|
||||||
// sp-0: 0,
|
//$btn-primary-color: $purple-100;
|
||||||
// sp-1: $spacing-unit * 0.25,
|
//$base-button-color: #f7f7f7;
|
||||||
// sp-2: $spacing-unit * 0.5,
|
|
||||||
// sp-3: $spacing-unit * 0.75,
|
////
|
||||||
// sp-4: $spacing-unit,
|
//// Spacing
|
||||||
// sp-5: $spacing-unit * 1.5,
|
////
|
||||||
// sp-6: $spacing-unit * 2,
|
|
||||||
// sp-7: $spacing-unit * 2.5,
|
//$spacing-unit: 1rem; // 1rem == 16px
|
||||||
// sp-8: $spacing-unit * 3,
|
|
||||||
// sp-9: $spacing-unit * 3.5,
|
//$spacers: (
|
||||||
// sp-10: $spacing-unit * 4
|
//sp-0: 0,
|
||||||
// );
|
//sp-1: $spacing-unit * 0.25,
|
||||||
//
|
//sp-2: $spacing-unit * 0.5,
|
||||||
// $sp-1: map-get($spacers, sp-1); // 0.25 rem == 4px
|
//sp-3: $spacing-unit * 0.75,
|
||||||
// $sp-2: map-get($spacers, sp-2); // 0.5 rem == 8px
|
//sp-4: $spacing-unit,
|
||||||
// $sp-3: map-get($spacers, sp-3); // 0.75 rem == 12px
|
//sp-5: $spacing-unit * 1.5,
|
||||||
// $sp-4: map-get($spacers, sp-4); // 1 rem == 16px
|
//sp-6: $spacing-unit * 2,
|
||||||
// $sp-5: map-get($spacers, sp-5); // 1.5 rem == 24px
|
//sp-7: $spacing-unit * 2.5,
|
||||||
// $sp-6: map-get($spacers, sp-6); // 2 rem == 32px
|
//sp-8: $spacing-unit * 3,
|
||||||
// $sp-7: map-get($spacers, sp-7); // 2.5 rem == 40px
|
//sp-9: $spacing-unit * 3.5,
|
||||||
// $sp-8: map-get($spacers, sp-8); // 3 rem == 48px
|
//sp-10: $spacing-unit * 4
|
||||||
// $sp-9: map-get($spacers, sp-9); // 4 rem == 48px
|
//);
|
||||||
// $sp-10: map-get($spacers, sp-10); // 4.5 rem == 48px
|
|
||||||
//
|
//$sp-1: map-get($spacers, sp-1); // 0.25 rem == 4px
|
||||||
// //
|
//$sp-2: map-get($spacers, sp-2); // 0.5 rem == 8px
|
||||||
// // Borders
|
//$sp-3: map-get($spacers, sp-3); // 0.75 rem == 12px
|
||||||
// //
|
//$sp-4: map-get($spacers, sp-4); // 1 rem == 16px
|
||||||
//
|
//$sp-5: map-get($spacers, sp-5); // 1.5 rem == 24px
|
||||||
// $border: 1px solid;
|
//$sp-6: map-get($spacers, sp-6); // 2 rem == 32px
|
||||||
// $border-radius: 4px;
|
//$sp-7: map-get($spacers, sp-7); // 2.5 rem == 40px
|
||||||
// $border-color: $grey-lt-100;
|
//$sp-8: map-get($spacers, sp-8); // 3 rem == 48px
|
||||||
//
|
//$sp-9: map-get($spacers, sp-9); // 4 rem == 48px
|
||||||
// //
|
//$sp-10: map-get($spacers, sp-10); // 4.5 rem == 48px
|
||||||
// // Grid system
|
|
||||||
// //
|
////
|
||||||
//
|
//// Borders
|
||||||
// $gutter-spacing: $sp-6;
|
////
|
||||||
// $gutter-spacing-sm: $sp-4;
|
|
||||||
// $nav-width: 232px;
|
//$border: 1px solid;
|
||||||
// $content-width: 800px;
|
//$border-radius: 4px;
|
||||||
//
|
//$border-color: $grey-lt-100;
|
||||||
// $media-queries: (
|
|
||||||
// xs: 320px,
|
////
|
||||||
// sm: 500px,
|
//// Grid system
|
||||||
// md: 740px,
|
////
|
||||||
// lg: 800px,
|
|
||||||
// xl: 1316px
|
//$gutter-spacing: $sp-6;
|
||||||
// );
|
//$gutter-spacing-sm: $sp-4;
|
||||||
|
//$nav-width: 264px;
|
||||||
|
//$nav-width-md: 248px;
|
||||||
|
//$content-width: 800px;
|
||||||
|
//$header-height: 60px;
|
||||||
|
//$search-results-width: 500px;
|
||||||
|
|
||||||
|
////
|
||||||
|
//// Media queries in pixels
|
||||||
|
////
|
||||||
|
|
||||||
|
//$media-queries: (
|
||||||
|
//xs: 320px,
|
||||||
|
//sm: 500px,
|
||||||
|
//md: $content-width,
|
||||||
|
//lg: $content-width + $nav-width,
|
||||||
|
//xl: 1400px
|
||||||
|
//);
|
||||||
|
@@ -12,9 +12,9 @@
|
|||||||
margin-right: $sp-1;
|
margin-right: $sp-1;
|
||||||
margin-left: $sp-1;
|
margin-left: $sp-1;
|
||||||
color: $white;
|
color: $white;
|
||||||
|
text-transform: uppercase;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
background-color: $blue-100;
|
background-color: $blue-100;
|
||||||
text-transform: uppercase;
|
|
||||||
@include fs-2;
|
@include fs-2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -17,17 +17,15 @@
|
|||||||
|
|
||||||
.side-bar {
|
.side-bar {
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
padding-top: $gutter-spacing-sm;
|
display: flex;
|
||||||
padding-bottom: $gutter-spacing-sm;
|
flex-wrap: wrap;
|
||||||
background-color: $grey-lt-000;
|
background-color: $sidebar-color;
|
||||||
|
|
||||||
@include mq(md) {
|
@include mq(md) {
|
||||||
|
flex-wrap: nowrap;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: flex;
|
width: $nav-width-md;
|
||||||
width: $nav-width + 16px;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding-top: $gutter-spacing * 2;
|
|
||||||
padding-bottom: 0;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
border-right: $border $border-color;
|
border-right: $border $border-color;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
@@ -46,7 +44,6 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 600px;
|
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
@@ -54,67 +51,137 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.main-content {
|
.main-content {
|
||||||
padding-top: $gutter-spacing-sm;
|
|
||||||
@include container;
|
|
||||||
|
|
||||||
@include mq(md) {
|
@include mq(md) {
|
||||||
position: relative;
|
position: relative;
|
||||||
max-width: $content-width;
|
max-width: $content-width;
|
||||||
padding-top: $gutter-spacing;
|
margin-left: $nav-width-md;
|
||||||
padding-bottom: $gutter-spacing;
|
|
||||||
padding-left: $gutter-spacing * 1.5;
|
|
||||||
margin-left: $nav-width;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq(lg) {
|
@include mq(lg) {
|
||||||
padding-left: $gutter-spacing;
|
|
||||||
margin-left: calc((100% - #{$nav-width + $content-width}) / 2 + #{$nav-width});
|
margin-left: calc((100% - #{$nav-width + $content-width}) / 2 + #{$nav-width});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-header {
|
.js-main-content:focus {
|
||||||
background-color: $grey-lt-000;
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page {
|
||||||
|
@include container;
|
||||||
|
padding-top: $gutter-spacing-sm;
|
||||||
|
padding-bottom: $gutter-spacing-sm;
|
||||||
|
|
||||||
@include mq(md) {
|
@include mq(md) {
|
||||||
background-color: $white;
|
padding-top: $gutter-spacing;
|
||||||
border-bottom: $border $border-color;
|
padding-bottom: $gutter-spacing;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-header {
|
||||||
|
@include container;
|
||||||
|
display: none;
|
||||||
|
padding-top: $gutter-spacing-sm;
|
||||||
|
padding-bottom: $gutter-spacing-sm;
|
||||||
|
background-color: $sidebar-color;
|
||||||
|
|
||||||
|
@include mq(md) {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
height: $header-height;
|
||||||
|
background-color: $body-background-color;
|
||||||
|
border-bottom: $border $border-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content {
|
&.nav-open {
|
||||||
padding-top: 0;
|
display: block;
|
||||||
|
|
||||||
@include mq(md) {
|
@include mq(md) {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
|
||||||
padding-top: $sp-4;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.navigation,
|
.navigation,
|
||||||
.site-title,
|
.site-header,
|
||||||
.site-footer {
|
.site-footer {
|
||||||
|
|
||||||
@include container;
|
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
@include mq(lg) {
|
@include mq(lg) {
|
||||||
width: $nav-width + 32px;
|
width: $nav-width;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.navigation {
|
.navigation {
|
||||||
|
@include container;
|
||||||
|
|
||||||
@include mq(md) {
|
@include mq(md) {
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
height: 100%;
|
|
||||||
padding-top: $sp-8;
|
padding-top: $sp-8;
|
||||||
|
padding-bottom: $gutter-spacing-sm;
|
||||||
|
overflow-y: auto;
|
||||||
|
flex: 1 1 auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.site-header {
|
||||||
|
display: flex;
|
||||||
|
min-height: $header-height;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
@include mq(md) {
|
||||||
|
z-index: 101;
|
||||||
|
height: $header-height;
|
||||||
|
max-height: $header-height;
|
||||||
|
border-bottom: $border $border-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-title {
|
||||||
|
@include container;
|
||||||
|
flex-grow: 1;
|
||||||
|
display: flex;
|
||||||
|
height: 100%;
|
||||||
|
align-items: center;
|
||||||
|
padding-top: $sp-3;
|
||||||
|
padding-bottom: $sp-3;
|
||||||
|
color: $body-heading-color;
|
||||||
|
@include fs-6;
|
||||||
|
|
||||||
|
@include mq(md) {
|
||||||
|
padding-top: $sp-2;
|
||||||
|
padding-bottom: $sp-2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@if variable-exists(logo) {
|
||||||
|
.site-logo {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-image: url($logo);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: left center;
|
||||||
|
background-size: contain;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-button {
|
||||||
|
appearance: none;
|
||||||
|
display: flex;
|
||||||
|
height: 100%;
|
||||||
|
padding: $gutter-spacing-sm;
|
||||||
|
align-items: center;
|
||||||
|
color: $link-color;
|
||||||
|
text-transform: uppercase;
|
||||||
|
background: transparent;
|
||||||
|
border: 0;
|
||||||
|
|
||||||
|
@include mq(md) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// stylelint-disable selector-max-type
|
||||||
|
|
||||||
body {
|
body {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-bottom: $sp-10;
|
padding-bottom: $sp-10;
|
||||||
@@ -125,11 +192,18 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// stylelint-enable selector-max-type
|
||||||
|
|
||||||
.site-footer {
|
.site-footer {
|
||||||
|
@include container;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: $sp-3;
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
padding-top: $sp-4;
|
||||||
|
padding-bottom: $sp-4;
|
||||||
|
|
||||||
@include mq(md) {
|
@include mq(md) {
|
||||||
right: 0;
|
position: static;
|
||||||
|
justify-self: end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,31 +1,11 @@
|
|||||||
//
|
//
|
||||||
// Main nav, breadcrumb, etc...
|
// Main nav, breadcrumb, etc...
|
||||||
//
|
//
|
||||||
|
|
||||||
.site-title {
|
|
||||||
display: block;
|
|
||||||
flex-grow: 1;
|
|
||||||
flex-shrink: 1;
|
|
||||||
flex-basis: auto;
|
|
||||||
background-color: $grey-lt-000;
|
|
||||||
|
|
||||||
@include mq(md) {
|
|
||||||
position: absolute;
|
|
||||||
top: $gutter-spacing;
|
|
||||||
right: 0;
|
|
||||||
z-index: 101;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.navigation-list {
|
.navigation-list {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-top: $sp-4;
|
margin-top: 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
|
||||||
@include mq(md) {
|
|
||||||
margin-top: $sp-10;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.navigation-list-child-list {
|
.navigation-list-child-list {
|
||||||
@@ -33,21 +13,23 @@
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
|
|
||||||
.navigation-list-link {
|
.navigation-list-link {
|
||||||
color: $grey-dk-100;
|
color: $nav-child-link-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navigation-list-item {
|
.navigation-list-item {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
margin-top: 0.3em;
|
margin-top: 0.3em;
|
||||||
margin-left: -0.8em;
|
margin-left: -0.8em;
|
||||||
color: $grey-dk-000;
|
color: rgba($body-text-color, 0.3);
|
||||||
content: "- ";
|
content: "- ";
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
&::before {
|
&::before {
|
||||||
color: $grey-dk-100;
|
color: $body-text-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -60,6 +42,16 @@
|
|||||||
@include mq(md) {
|
@include mq(md) {
|
||||||
@include fs-3;
|
@include fs-3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.navigation-list-child-list {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
.navigation-list-child-list {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.navigation-list-link {
|
.navigation-list-link {
|
||||||
@@ -69,15 +61,14 @@
|
|||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: $grey-dk-200;
|
color: $body-heading-color;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Small screen nav
|
// Small screen nav
|
||||||
|
|
||||||
.main-nav,
|
.main-nav {
|
||||||
.aux-nav {
|
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
&.nav-open {
|
&.nav-open {
|
||||||
@@ -88,26 +79,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.side-bar {
|
.aux-nav {
|
||||||
display: flex;
|
align-self: center;
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
@include mq(md) {
|
|
||||||
display: block;
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.navigation-list-toggle {
|
|
||||||
position: absolute;
|
|
||||||
right: $sp-4;
|
|
||||||
|
|
||||||
@include mq(md) {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Breadcrumb nav
|
// Breadcrumb nav
|
||||||
|
.breadcrumb-nav {
|
||||||
|
@include mq(md) {
|
||||||
|
margin-top: -$sp-4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.breadcrumb-nav-list {
|
.breadcrumb-nav-list {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
|
3
_sass/overrides.scss
Normal file
3
_sass/overrides.scss
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
//
|
||||||
|
// Custom overrides from a user.
|
||||||
|
//
|
@@ -5,66 +5,60 @@
|
|||||||
.search {
|
.search {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
display: none;
|
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
padding-bottom: $gutter-spacing / 2;
|
height: 100%;
|
||||||
background-color: $white;
|
|
||||||
padding: $sp-2;
|
|
||||||
margin-bottom: $sp-3;
|
margin-bottom: $sp-3;
|
||||||
|
|
||||||
@include mq(md) {
|
@include mq(md) {
|
||||||
display: block;
|
|
||||||
padding-top: $sp-1;
|
|
||||||
padding-right: 0;
|
|
||||||
padding-bottom: $sp-4;
|
|
||||||
padding-left: 0;
|
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.nav-open {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-results-wrap {
|
|
||||||
display: none;
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
position: absolute;
|
|
||||||
top: $sp-1;
|
|
||||||
z-index: 100;
|
|
||||||
display: block;
|
|
||||||
width: 300px;
|
|
||||||
margin-top: $gutter-spacing;
|
|
||||||
background: $white;
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 4px 14px rgba(0, 0, 0, 0.05);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-input-wrap {
|
.search-input-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
background-color: $white;
|
height: 100%;
|
||||||
|
padding: $sp-2;
|
||||||
|
background-color: $search-background-color;
|
||||||
|
border-radius: $border-radius;
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
|
||||||
|
|
||||||
|
@include mq(md) {
|
||||||
|
padding-top: 0;
|
||||||
|
padding-right: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
|
padding-left: 0;
|
||||||
|
background-color: $body-background-color;
|
||||||
|
border-radius: 0;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-input {
|
.search-input {
|
||||||
|
align-self: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-top: $sp-1;
|
padding-top: $sp-1;
|
||||||
padding-bottom: $sp-1;
|
padding-bottom: $sp-1;
|
||||||
|
background-color: $search-background-color;
|
||||||
border-top: 0;
|
border-top: 0;
|
||||||
border-right: 0;
|
border-right: 0;
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
border-left: 0;
|
border-left: 0;
|
||||||
order: 2;
|
order: 2;
|
||||||
|
@include fs-4;
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
outline: 0;
|
outline: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
|
||||||
+ .search-icon {
|
+ .search-icon {
|
||||||
fill: $purple-000;
|
fill: $link-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@include mq(md) {
|
||||||
|
background-color: $body-background-color;
|
||||||
|
@include fs-3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-icon {
|
.search-icon {
|
||||||
@@ -74,12 +68,34 @@
|
|||||||
order: 1;
|
order: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search-results-wrap {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 100;
|
||||||
|
display: none;
|
||||||
|
width: 100%;
|
||||||
|
background: $search-background-color;
|
||||||
|
border-radius: $border-radius;
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
@include mq(md) {
|
||||||
|
width: $search-results-width;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.search-results-list {
|
.search-results-list {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
margin-top: $sp-1;
|
margin-top: $sp-1;
|
||||||
margin-bottom: $sp-1;
|
margin-bottom: $sp-1;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
@include fs-3;
|
@include fs-4;
|
||||||
|
|
||||||
|
@include mq(md) {
|
||||||
|
@include fs-3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-results-list-item {
|
.search-results-list-item {
|
||||||
@@ -87,14 +103,65 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-results-link {
|
.search-result {
|
||||||
display: block;
|
display: block;
|
||||||
padding-top: $sp-1;
|
padding-top: $sp-1;
|
||||||
padding-right: $sp-3;
|
padding-right: $sp-3;
|
||||||
padding-bottom: $sp-1;
|
padding-bottom: $sp-1;
|
||||||
padding-left: $sp-3;
|
padding-left: $sp-3;
|
||||||
|
|
||||||
&:hover {
|
&:hover,
|
||||||
background-color: $grey-lt-000;
|
&.active {
|
||||||
|
background-color: $sidebar-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
@include mq(md) {
|
||||||
|
padding-right: $sp-4;
|
||||||
|
padding-left: $sp-4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search-result-title {
|
||||||
|
display: block;
|
||||||
|
padding-top: $sp-2;
|
||||||
|
padding-right: $sp-4;
|
||||||
|
padding-bottom: $sp-2;
|
||||||
|
|
||||||
|
@include mq(sm) {
|
||||||
|
display: inline-block;
|
||||||
|
width: 40%;
|
||||||
|
word-wrap: break-word;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-result-rel-url {
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
color: $search-result-preview-color;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
@include fs-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-result-preview {
|
||||||
|
display: block;
|
||||||
|
padding-top: $sp-2;
|
||||||
|
padding-bottom: $sp-2;
|
||||||
|
padding-left: $sp-4;
|
||||||
|
color: $search-result-preview-color;
|
||||||
|
border-left: $border;
|
||||||
|
border-left-color: $border-color;
|
||||||
|
@include fs-2;
|
||||||
|
|
||||||
|
@include mq(sm) {
|
||||||
|
display: inline-block;
|
||||||
|
width: 60%;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-result-highlight {
|
||||||
|
font-weight: bold;
|
||||||
|
color: $link-color;
|
||||||
|
}
|
||||||
|
@@ -6,6 +6,7 @@ $body-font-family: -apple-system, BlinkMacSystemFont, "helvetica neue", helvetic
|
|||||||
$mono-font-family: "SFMono-Regular", Menlo, Consolas, Monospace !default;
|
$mono-font-family: "SFMono-Regular", Menlo, Consolas, Monospace !default;
|
||||||
$root-font-size: 16px !default; // Base font-size for rems
|
$root-font-size: 16px !default; // Base font-size for rems
|
||||||
$body-line-height: 1.4 !default;
|
$body-line-height: 1.4 !default;
|
||||||
|
$content-line-height: 1.5 !default;
|
||||||
$body-heading-line-height: 1.15 !default !default;
|
$body-heading-line-height: 1.15 !default !default;
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -17,6 +18,7 @@ $white: #fff !default;
|
|||||||
$grey-dk-000: #959396 !default;
|
$grey-dk-000: #959396 !default;
|
||||||
$grey-dk-100: #5c5962 !default;
|
$grey-dk-100: #5c5962 !default;
|
||||||
$grey-dk-200: #44434d !default;
|
$grey-dk-200: #44434d !default;
|
||||||
|
$grey-dk-250: #302d36 !default;
|
||||||
$grey-dk-300: #27262b !default;
|
$grey-dk-300: #27262b !default;
|
||||||
|
|
||||||
$grey-lt-000: #f5f6fa !default;
|
$grey-lt-000: #f5f6fa !default;
|
||||||
@@ -49,21 +51,19 @@ $red-100: #f96e65 !default;
|
|||||||
$red-200: #e94c4c !default;
|
$red-200: #e94c4c !default;
|
||||||
$red-300: #dd2e2e !default;
|
$red-300: #dd2e2e !default;
|
||||||
|
|
||||||
|
$body-background-color: $white !default;
|
||||||
|
$sidebar-color: $grey-lt-000 !default;
|
||||||
|
$search-background-color: $white !default;
|
||||||
|
$table-background-color: $white !default;
|
||||||
|
$code-background-color: $grey-lt-000 !default;
|
||||||
|
|
||||||
$body-text-color: $grey-dk-100 !default;
|
$body-text-color: $grey-dk-100 !default;
|
||||||
$body-heading-color: $grey-dk-300 !default;
|
$body-heading-color: $grey-dk-300 !default;
|
||||||
|
$search-result-preview-color: $grey-dk-000 !default;
|
||||||
|
$nav-child-link-color: $grey-dk-100 !default;
|
||||||
$link-color: $purple-000 !default;
|
$link-color: $purple-000 !default;
|
||||||
|
$btn-primary-color: $purple-100 !default;
|
||||||
//
|
$base-button-color: #f7f7f7 !default;
|
||||||
// Media queries in pixels
|
|
||||||
//
|
|
||||||
|
|
||||||
$media-queries: (
|
|
||||||
xs: 320px,
|
|
||||||
sm: 500px,
|
|
||||||
md: 740px,
|
|
||||||
lg: 1120px,
|
|
||||||
xl: 1400px
|
|
||||||
) !default;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Spacing
|
// Spacing
|
||||||
@@ -110,13 +110,20 @@ $border-color: $grey-lt-100 !default;
|
|||||||
|
|
||||||
$gutter-spacing: $sp-6 !default;
|
$gutter-spacing: $sp-6 !default;
|
||||||
$gutter-spacing-sm: $sp-4 !default;
|
$gutter-spacing-sm: $sp-4 !default;
|
||||||
$nav-width: 232px !default;
|
$nav-width: 264px !default;
|
||||||
|
$nav-width-md: 248px !default;
|
||||||
$content-width: 800px !default;
|
$content-width: 800px !default;
|
||||||
|
$header-height: 60px !default;
|
||||||
|
$search-results-width: 500px !default;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Media queries in pixels
|
||||||
|
//
|
||||||
|
|
||||||
$media-queries: (
|
$media-queries: (
|
||||||
xs: 320px,
|
xs: 320px,
|
||||||
sm: 500px,
|
sm: 500px,
|
||||||
md: 740px,
|
md: $content-width,
|
||||||
lg: 800px,
|
lg: $content-width + $nav-width,
|
||||||
xl: 1316px
|
xl: 1400px
|
||||||
) !default;
|
) !default;
|
||||||
|
@@ -2,12 +2,14 @@
|
|||||||
|
|
||||||
@mixin btn-color($fg, $bg) {
|
@mixin btn-color($fg, $bg) {
|
||||||
color: $fg;
|
color: $fg;
|
||||||
|
background-color: darken($bg, 2%);
|
||||||
background-image: linear-gradient(lighten($bg, 5%), darken($bg, 2%));
|
background-image: linear-gradient(lighten($bg, 5%), darken($bg, 2%));
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), 0 4px 10px rgba(0, 0, 0, 0.12);
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), 0 4px 10px rgba(0, 0, 0, 0.12);
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&.zeroclipboard-is-hover {
|
&.zeroclipboard-is-hover {
|
||||||
color: $fg;
|
color: $fg;
|
||||||
|
background-color: darken($bg, 4%);
|
||||||
background-image: linear-gradient((lighten($bg, 2%), darken($bg, 4%)));
|
background-image: linear-gradient((lighten($bg, 2%), darken($bg, 4%)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,20 +15,22 @@
|
|||||||
@media (min-width: rem($value)) {
|
@media (min-width: rem($value)) {
|
||||||
@content;
|
@content;
|
||||||
}
|
}
|
||||||
} @else {
|
}
|
||||||
|
|
||||||
|
@else {
|
||||||
@warn "No value could be retrieved from `#{$media-query}`. "
|
@warn "No value could be retrieved from `#{$media-query}`. "
|
||||||
+ "Please make sure it is defined in `$media-queries` map.";
|
+ "Please make sure it is defined in `$media-queries` map.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Responsive container
|
// Responsive container
|
||||||
|
|
||||||
@mixin container {
|
@mixin container {
|
||||||
padding-left: $gutter-spacing-sm;
|
|
||||||
padding-right: $gutter-spacing-sm;
|
padding-right: $gutter-spacing-sm;
|
||||||
|
padding-left: $gutter-spacing-sm;
|
||||||
|
|
||||||
@include mq(md) {
|
@include mq(md) {
|
||||||
padding-left: $gutter-spacing;
|
|
||||||
padding-right: $gutter-spacing;
|
padding-right: $gutter-spacing;
|
||||||
|
padding-left: $gutter-spacing;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,20 +1,22 @@
|
|||||||
//
|
//
|
||||||
// Tables
|
// Tables
|
||||||
//
|
//
|
||||||
// stylelint-disable max-nesting-depth, selector-no-type
|
// stylelint-disable max-nesting-depth, selector-no-type, selector-max-type
|
||||||
|
|
||||||
table {
|
.table-wrapper {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
margin-bottom: $sp-5;
|
margin-bottom: $sp-5;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
border-collapse: separate;
|
border-radius: $border-radius;
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 4px 14px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
@include mq(sm) {
|
table {
|
||||||
display: table;
|
display: table;
|
||||||
}
|
min-width: 100%;
|
||||||
|
border-collapse: separate;
|
||||||
}
|
}
|
||||||
|
|
||||||
th,
|
th,
|
||||||
@@ -25,7 +27,8 @@ td {
|
|||||||
padding-right: $sp-3;
|
padding-right: $sp-3;
|
||||||
padding-bottom: $sp-2;
|
padding-bottom: $sp-2;
|
||||||
padding-left: $sp-3;
|
padding-left: $sp-3;
|
||||||
border-bottom: $border $grey-lt-000;
|
background-color: $table-background-color;
|
||||||
|
border-bottom: $border rgba($border-color, 0.5);
|
||||||
border-left: $border $border-color;
|
border-left: $border $border-color;
|
||||||
|
|
||||||
&:first-of-type {
|
&:first-of-type {
|
||||||
@@ -33,38 +36,16 @@ td {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
thead,
|
|
||||||
tbody:first-child {
|
|
||||||
tr {
|
|
||||||
&:first-of-type {
|
|
||||||
th,
|
|
||||||
td {
|
|
||||||
&:first-of-type {
|
|
||||||
border-top-left-radius: $border-radius;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:last-of-type {
|
|
||||||
border-top-right-radius: $border-radius;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tbody {
|
tbody {
|
||||||
tr {
|
tr {
|
||||||
&:last-of-type {
|
&:last-of-type {
|
||||||
th,
|
th,
|
||||||
td {
|
td {
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
&:first-of-type {
|
td {
|
||||||
border-bottom-left-radius: $border-radius;
|
padding-bottom: $sp-3;
|
||||||
}
|
|
||||||
|
|
||||||
&:last-of-type {
|
|
||||||
border-bottom-right-radius: $border-radius;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -72,6 +53,6 @@ tbody {
|
|||||||
|
|
||||||
thead {
|
thead {
|
||||||
th {
|
th {
|
||||||
border-bottom: 1px solid $border-color;
|
border-bottom: $border $border-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Typography
|
// Typography
|
||||||
//
|
//
|
||||||
// stylelint-disable primer/selector-no-utility, selector-no-type
|
// stylelint-disable primer/selector-no-utility, primer/no-override, selector-no-type, selector-max-type
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
.text-alpha {
|
.text-alpha {
|
||||||
|
@@ -16,6 +16,10 @@
|
|||||||
color: $grey-dk-200 !important;
|
color: $grey-dk-200 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text-grey-dk-250 {
|
||||||
|
color: $grey-dk-250 !important;
|
||||||
|
}
|
||||||
|
|
||||||
.text-grey-dk-300 {
|
.text-grey-dk-300 {
|
||||||
color: $grey-dk-300 !important;
|
color: $grey-dk-300 !important;
|
||||||
}
|
}
|
||||||
@@ -130,6 +134,10 @@
|
|||||||
background-color: $grey-dk-200 !important;
|
background-color: $grey-dk-200 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bg-grey-dk-250 {
|
||||||
|
background-color: $grey-dk-250 !important;
|
||||||
|
}
|
||||||
|
|
||||||
.bg-grey-dk-300 {
|
.bg-grey-dk-300 {
|
||||||
background-color: $grey-dk-300 !important;
|
background-color: $grey-dk-300 !important;
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// stylelint-disable primer/selector-no-utility
|
// stylelint-disable primer/selector-no-utility, primer/no-override
|
||||||
//
|
//
|
||||||
// Utility classes for layout
|
// Utility classes for layout
|
||||||
//
|
//
|
||||||
|
@@ -2,10 +2,16 @@
|
|||||||
// Utility classes for lists
|
// Utility classes for lists
|
||||||
//
|
//
|
||||||
|
|
||||||
// stylelint-disable primer/selector-no-utility
|
// stylelint-disable primer/selector-no-utility, primer/no-override, selector-max-type
|
||||||
|
|
||||||
.list-style-none {
|
.list-style-none {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
list-style: none !important;
|
list-style: none !important;
|
||||||
|
|
||||||
|
li {
|
||||||
|
&::before {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
// scss-lint:disable SpaceAfterPropertyName
|
// scss-lint:disable SpaceAfterPropertyName
|
||||||
// stylelint-disable block-opening-brace-space-after, block-opening-brace-space-before, primer/selector-no-utility
|
// stylelint-disable block-opening-brace-space-after, block-opening-brace-space-before, primer/selector-no-utility, primer/no-override
|
||||||
|
|
||||||
// Margin spacer utilities
|
// Margin spacer utilities
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
// Utility classes for typography
|
// Utility classes for typography
|
||||||
//
|
//
|
||||||
|
|
||||||
// stylelint-disable primer/selector-no-utility
|
// stylelint-disable primer/selector-no-utility, primer/no-override
|
||||||
|
|
||||||
.fs-1 {
|
.fs-1 {
|
||||||
@include fs-1;
|
@include fs-1;
|
||||||
|
45
assets/css/dark-mode-preview.scss
Normal file
45
assets/css/dark-mode-preview.scss
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
---
|
||||||
|
# this ensures Jekyll reads the file to be transformed into CSS later
|
||||||
|
# only Main files contain this front matter, not partials.
|
||||||
|
---
|
||||||
|
|
||||||
|
{% if site.logo %}
|
||||||
|
$logo: "{{ site.logo | absolute_url }}";
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Import external dependencies
|
||||||
|
//
|
||||||
|
|
||||||
|
@import "./vendor/normalize.scss/normalize.scss";
|
||||||
|
|
||||||
|
//
|
||||||
|
// Import Just the Docs scss
|
||||||
|
//
|
||||||
|
|
||||||
|
// Support
|
||||||
|
@import "./support/support";
|
||||||
|
|
||||||
|
//
|
||||||
|
// Import custom color scheme scss
|
||||||
|
//
|
||||||
|
|
||||||
|
@import "./color_schemes/dark.scss";
|
||||||
|
|
||||||
|
// Modules
|
||||||
|
@import "./base";
|
||||||
|
@import "./layout";
|
||||||
|
@import "./content";
|
||||||
|
@import "./navigation";
|
||||||
|
@import "./typography";
|
||||||
|
@import "./labels";
|
||||||
|
@import "./buttons";
|
||||||
|
@import "./search";
|
||||||
|
@import "./tables";
|
||||||
|
@import "./code";
|
||||||
|
@import "./utilities/utilities";
|
||||||
|
|
||||||
|
//
|
||||||
|
// Import custom overrides
|
||||||
|
//
|
||||||
|
@import "./custom/custom";
|
@@ -3,22 +3,37 @@
|
|||||||
# only Main files contain this front matter, not partials.
|
# only Main files contain this front matter, not partials.
|
||||||
---
|
---
|
||||||
|
|
||||||
//
|
{% if site.logo %}
|
||||||
// Import dependancies
|
$logo: "{{ site.logo | absolute_url }}";
|
||||||
//
|
{% endif %}
|
||||||
|
|
||||||
@import "./normalize.scss/normalize.scss";
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Import Just the docs scss
|
// Import external dependencies
|
||||||
|
//
|
||||||
|
|
||||||
|
@import "./vendor/normalize.scss/normalize.scss";
|
||||||
|
|
||||||
|
//
|
||||||
|
// Import Just the Docs scss
|
||||||
//
|
//
|
||||||
|
|
||||||
// Support
|
// Support
|
||||||
@import "./support/support";
|
@import "./support/support";
|
||||||
|
|
||||||
// Custom overrides
|
//
|
||||||
|
// Import custom overrides
|
||||||
|
//
|
||||||
|
|
||||||
@import "./custom/custom";
|
@import "./custom/custom";
|
||||||
|
|
||||||
|
//
|
||||||
|
// Import custom color scheme scss
|
||||||
|
//
|
||||||
|
|
||||||
|
{% if site.color_scheme == "dark" %}
|
||||||
|
@import "./color_schemes/dark.scss";
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
// Modules
|
// Modules
|
||||||
@import "./base";
|
@import "./base";
|
||||||
@import "./layout";
|
@import "./layout";
|
||||||
@@ -31,3 +46,4 @@
|
|||||||
@import "./tables";
|
@import "./tables";
|
||||||
@import "./code";
|
@import "./code";
|
||||||
@import "./utilities/utilities";
|
@import "./utilities/utilities";
|
||||||
|
@import "./overrides";
|
||||||
|
23
assets/js/dark-mode-preview.js
Normal file
23
assets/js/dark-mode-preview.js
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
document.addEventListener("DOMContentLoaded", function(){
|
||||||
|
|
||||||
|
const toggleDarkMode = document.querySelector('.js-toggle-dark-mode')
|
||||||
|
const cssFile = document.querySelector('[rel="stylesheet"]')
|
||||||
|
const originalCssRef = cssFile.getAttribute('href')
|
||||||
|
const darkModeCssRef = originalCssRef.replace('just-the-docs.css', 'dark-mode-preview.css')
|
||||||
|
const buttonCopy = ['Return to the light side', 'Preview dark color scheme']
|
||||||
|
const updateButtonText = function(toggleDarkMode) {
|
||||||
|
toggleDarkMode.textContent === buttonCopy[0] ?
|
||||||
|
toggleDarkMode.textContent = buttonCopy[1] :
|
||||||
|
toggleDarkMode.textContent = buttonCopy[0]
|
||||||
|
}
|
||||||
|
|
||||||
|
jtd.addEvent(toggleDarkMode, 'click', function(){
|
||||||
|
if (cssFile.getAttribute('href') === originalCssRef) {
|
||||||
|
cssFile.setAttribute('href', darkModeCssRef)
|
||||||
|
updateButtonText(toggleDarkMode)
|
||||||
|
} else {
|
||||||
|
cssFile.setAttribute('href', originalCssRef)
|
||||||
|
updateButtonText(toggleDarkMode)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
@@ -1,28 +1,41 @@
|
|||||||
|
---
|
||||||
|
---
|
||||||
|
(function (jtd, undefined) {
|
||||||
|
|
||||||
// Event handling
|
// Event handling
|
||||||
|
|
||||||
function addEvent(el, type, handler) {
|
jtd.addEvent = function(el, type, handler) {
|
||||||
if (el.attachEvent) el.attachEvent('on'+type, handler); else el.addEventListener(type, handler);
|
if (el.attachEvent) el.attachEvent('on'+type, handler); else el.addEventListener(type, handler);
|
||||||
}
|
}
|
||||||
function removeEvent(el, type, handler) {
|
jtd.removeEvent = function(el, type, handler) {
|
||||||
if (el.detachEvent) el.detachEvent('on'+type, handler); else el.removeEventListener(type, handler);
|
if (el.detachEvent) el.detachEvent('on'+type, handler); else el.removeEventListener(type, handler);
|
||||||
|
}
|
||||||
|
jtd.onReady = function(ready) {
|
||||||
|
// in case the document is already rendered
|
||||||
|
if (document.readyState!='loading') ready();
|
||||||
|
// modern browsers
|
||||||
|
else if (document.addEventListener) document.addEventListener('DOMContentLoaded', ready);
|
||||||
|
// IE <= 8
|
||||||
|
else document.attachEvent('onreadystatechange', function(){
|
||||||
|
if (document.readyState=='complete') ready();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show/hide mobile menu
|
// Show/hide mobile menu
|
||||||
|
|
||||||
function toggleNav(){
|
function initNav() {
|
||||||
const nav = document.querySelector('.js-main-nav');
|
const mainNav = document.querySelector('.js-main-nav');
|
||||||
const auxNav = document.querySelector('.js-aux-nav');
|
const pageHeader = document.querySelector('.js-page-header');
|
||||||
const navTrigger = document.querySelector('.js-main-nav-trigger');
|
const navTrigger = document.querySelector('.js-main-nav-trigger');
|
||||||
const search = document.querySelector('.js-search');
|
|
||||||
|
|
||||||
addEvent(navTrigger, 'click', function(){
|
jtd.addEvent(navTrigger, 'click', function(e){
|
||||||
|
e.preventDefault();
|
||||||
var text = navTrigger.innerText;
|
var text = navTrigger.innerText;
|
||||||
var textToggle = navTrigger.getAttribute('data-text-toggle');
|
var textToggle = navTrigger.getAttribute('data-text-toggle');
|
||||||
|
|
||||||
nav.classList.toggle('nav-open');
|
mainNav.classList.toggle('nav-open');
|
||||||
auxNav.classList.toggle('nav-open');
|
pageHeader.classList.toggle('nav-open');
|
||||||
navTrigger.classList.toggle('nav-open');
|
navTrigger.classList.toggle('nav-open');
|
||||||
search.classList.toggle('nav-open');
|
|
||||||
navTrigger.innerText = textToggle;
|
navTrigger.innerText = textToggle;
|
||||||
navTrigger.setAttribute('data-text-toggle', text);
|
navTrigger.setAttribute('data-text-toggle', text);
|
||||||
textToggle = text;
|
textToggle = text;
|
||||||
@@ -32,137 +45,255 @@ function toggleNav(){
|
|||||||
// Site search
|
// Site search
|
||||||
|
|
||||||
function initSearch() {
|
function initSearch() {
|
||||||
var index = lunr(function () {
|
|
||||||
this.ref('id');
|
|
||||||
this.field('title', { boost: 20 });
|
|
||||||
this.field('content', { boost: 10 });
|
|
||||||
this.field('url');
|
|
||||||
});
|
|
||||||
|
|
||||||
// Get the generated search_data.json file so lunr.js can search it locally.
|
|
||||||
|
|
||||||
sc = document.getElementsByTagName("script");
|
|
||||||
source = '';
|
|
||||||
|
|
||||||
for(idx = 0; idx < sc.length; idx++)
|
|
||||||
{
|
|
||||||
s = sc.item(idx);
|
|
||||||
|
|
||||||
if(s.src && s.src.match(/just-the-docs\.js$/))
|
|
||||||
{ source = s.src; }
|
|
||||||
}
|
|
||||||
|
|
||||||
jsPath = source.replace('just-the-docs.js', '');
|
|
||||||
|
|
||||||
jsonPath = jsPath + '/search-data.json';
|
|
||||||
|
|
||||||
var request = new XMLHttpRequest();
|
var request = new XMLHttpRequest();
|
||||||
request.open('GET', jsonPath, true);
|
request.open('GET', '{{ "assets/js/search-data.json" | absolute_url }}', true);
|
||||||
|
|
||||||
request.onload = function() {
|
request.onload = function(){
|
||||||
if (request.status >= 200 && request.status < 400) {
|
if (request.status >= 200 && request.status < 400) {
|
||||||
// Success!
|
// Success!
|
||||||
var data = JSON.parse(request.responseText);
|
var data = JSON.parse(request.responseText);
|
||||||
var keys = Object.keys(data);
|
|
||||||
|
{% if site.search_tokenizer_separator != nil %}
|
||||||
|
lunr.tokenizer.separator = {{ site.search_tokenizer_separator }}
|
||||||
|
{% else %}
|
||||||
|
lunr.tokenizer.separator = /[\s\-/]+/
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
var index = lunr(function () {
|
||||||
|
this.ref('id');
|
||||||
|
this.field('title', { boost: 200 });
|
||||||
|
this.field('content', { boost: 2 });
|
||||||
|
this.field('url');
|
||||||
|
this.metadataWhitelist = ['position']
|
||||||
|
|
||||||
for(var i in data) {
|
for (var i in data) {
|
||||||
index.add({
|
this.add({
|
||||||
id: data[i].id,
|
id: i,
|
||||||
title: data[i].title,
|
title: data[i].title,
|
||||||
content: data[i].content,
|
content: data[i].content,
|
||||||
url: data[i].url
|
url: data[i].url
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
searchResults(data);
|
});
|
||||||
|
|
||||||
|
searchResults(index, data);
|
||||||
} else {
|
} else {
|
||||||
// We reached our target server, but it returned an error
|
// We reached our target server, but it returned an error
|
||||||
console.log('Error loading ajax request. Request status:' + request.status);
|
console.log('Error loading ajax request. Request status:' + request.status);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
request.onerror = function() {
|
request.onerror = function(){
|
||||||
// There was a connection error of some sort
|
// There was a connection error of some sort
|
||||||
console.log('There was a connection error');
|
console.log('There was a connection error');
|
||||||
};
|
};
|
||||||
|
|
||||||
request.send();
|
request.send();
|
||||||
|
|
||||||
function searchResults(dataStore) {
|
function searchResults(index, data) {
|
||||||
|
var index = index;
|
||||||
|
var docs = data;
|
||||||
var searchInput = document.querySelector('.js-search-input');
|
var searchInput = document.querySelector('.js-search-input');
|
||||||
var searchResults = document.querySelector('.js-search-results');
|
var searchResults = document.querySelector('.js-search-results');
|
||||||
var store = dataStore;
|
|
||||||
|
|
||||||
function hideResults() {
|
function hideResults() {
|
||||||
searchResults.innerHTML = '';
|
searchResults.innerHTML = '';
|
||||||
searchResults.classList.remove('active');
|
searchResults.classList.remove('active');
|
||||||
}
|
}
|
||||||
|
|
||||||
addEvent(searchInput, 'keyup', function(e){
|
jtd.addEvent(searchInput, 'keydown', function(e){
|
||||||
var query = this.value;
|
switch (e.keyCode) {
|
||||||
|
case 38: // arrow up
|
||||||
searchResults.innerHTML = '';
|
e.preventDefault();
|
||||||
searchResults.classList.remove('active');
|
var active = document.querySelector('.search-result.active');
|
||||||
|
if (active) {
|
||||||
if (query === '') {
|
active.classList.remove('active');
|
||||||
hideResults();
|
if (active.parentElement.previousSibling) {
|
||||||
} else {
|
var previous = active.parentElement.previousSibling.querySelector('.search-result');
|
||||||
var results = index.search(query);
|
previous.classList.add('active');
|
||||||
|
}
|
||||||
if (results.length > 1) {
|
|
||||||
searchResults.classList.add('active');
|
|
||||||
var resultsList = document.createElement('ul');
|
|
||||||
searchResults.appendChild(resultsList);
|
|
||||||
|
|
||||||
for (var i in results) {
|
|
||||||
var resultsListItem = document.createElement('li');
|
|
||||||
var resultsLink = document.createElement('a');
|
|
||||||
var resultsUrlDesc = document.createElement('span');
|
|
||||||
var resultsUrl = store[results[i].ref].url;
|
|
||||||
var resultsRelUrl = store[results[i].ref].relUrl;
|
|
||||||
var resultsTitle = store[results[i].ref].title;
|
|
||||||
|
|
||||||
resultsLink.setAttribute('href', resultsUrl);
|
|
||||||
resultsLink.innerText = resultsTitle;
|
|
||||||
resultsUrlDesc.innerText = resultsRelUrl;
|
|
||||||
|
|
||||||
resultsList.classList.add('search-results-list');
|
|
||||||
resultsListItem.classList.add('search-results-list-item');
|
|
||||||
resultsLink.classList.add('search-results-link');
|
|
||||||
resultsUrlDesc.classList.add('fs-2','text-grey-dk-000','d-block');
|
|
||||||
|
|
||||||
resultsList.appendChild(resultsListItem);
|
|
||||||
resultsListItem.appendChild(resultsLink);
|
|
||||||
resultsLink.appendChild(resultsUrlDesc);
|
|
||||||
}
|
}
|
||||||
}
|
return;
|
||||||
|
case 40: // arrow down
|
||||||
|
e.preventDefault();
|
||||||
|
var active = document.querySelector('.search-result.active');
|
||||||
|
if (active) {
|
||||||
|
if (active.parentElement.nextSibling) {
|
||||||
|
var next = active.parentElement.nextSibling.querySelector('.search-result');
|
||||||
|
active.classList.remove('active');
|
||||||
|
next.classList.add('active');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
var next = document.querySelector('.search-result');
|
||||||
|
if (next) {
|
||||||
|
next.classList.add('active');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
case 13: // enter
|
||||||
|
e.preventDefault();
|
||||||
|
var active = document.querySelector('.search-result.active');
|
||||||
|
if (active) {
|
||||||
|
active.click();
|
||||||
|
} else {
|
||||||
|
var first = document.querySelector('.search-result');
|
||||||
|
if (first) {
|
||||||
|
first.click();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// When esc key is pressed, hide the results and clear the field
|
jtd.addEvent(searchInput, 'keyup', function(e){
|
||||||
if (e.keyCode == 27) {
|
switch (e.keyCode) {
|
||||||
|
case 27: // When esc key is pressed, hide the results and clear the field
|
||||||
hideResults();
|
hideResults();
|
||||||
searchInput.value = '';
|
searchInput.value = '';
|
||||||
|
return;
|
||||||
|
case 38: // arrow up
|
||||||
|
case 40: // arrow down
|
||||||
|
case 13: // enter
|
||||||
|
e.preventDefault();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
hideResults();
|
||||||
|
|
||||||
|
var input = this.value;
|
||||||
|
if (input === '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var results = index.query(function (query) {
|
||||||
|
var tokens = lunr.tokenizer(input)
|
||||||
|
query.term(tokens, {
|
||||||
|
boost: 10
|
||||||
|
});
|
||||||
|
query.term(tokens, {
|
||||||
|
wildcard: lunr.Query.wildcard.TRAILING
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
if (results.length > 0) {
|
||||||
|
searchResults.classList.add('active');
|
||||||
|
var resultsList = document.createElement('ul');
|
||||||
|
resultsList.classList.add('search-results-list');
|
||||||
|
searchResults.appendChild(resultsList);
|
||||||
|
|
||||||
|
for (var i in results) {
|
||||||
|
var result = results[i];
|
||||||
|
var doc = docs[result.ref];
|
||||||
|
|
||||||
|
var resultsListItem = document.createElement('li');
|
||||||
|
resultsListItem.classList.add('search-results-list-item');
|
||||||
|
resultsList.appendChild(resultsListItem);
|
||||||
|
|
||||||
|
var resultLink = document.createElement('a');
|
||||||
|
resultLink.classList.add('search-result');
|
||||||
|
resultLink.setAttribute('href', doc.url);
|
||||||
|
resultsListItem.appendChild(resultLink);
|
||||||
|
|
||||||
|
var resultTitle = document.createElement('div');
|
||||||
|
resultTitle.classList.add('search-result-title');
|
||||||
|
resultTitle.innerText = doc.title;
|
||||||
|
resultLink.appendChild(resultTitle);
|
||||||
|
|
||||||
|
var resultRelUrl = document.createElement('span');
|
||||||
|
resultRelUrl.classList.add('search-result-rel-url');
|
||||||
|
resultRelUrl.innerText = doc.relUrl;
|
||||||
|
resultTitle.appendChild(resultRelUrl);
|
||||||
|
|
||||||
|
var metadata = result.matchData.metadata;
|
||||||
|
var contentFound = false;
|
||||||
|
for (var j in metadata) {
|
||||||
|
if (metadata[j].title) {
|
||||||
|
var position = metadata[j].title.position[0];
|
||||||
|
var start = position[0];
|
||||||
|
var end = position[0] + position[1];
|
||||||
|
resultTitle.innerHTML = doc.title.substring(0, start) + '<span class="search-result-highlight">' + doc.title.substring(start, end) + '</span>' + doc.title.substring(end, doc.title.length)+'<span class="search-result-rel-url">'+doc.relUrl+'</span>';
|
||||||
|
|
||||||
|
} else if (metadata[j].content && !contentFound) {
|
||||||
|
contentFound = true;
|
||||||
|
|
||||||
|
var position = metadata[j].content.position[0];
|
||||||
|
var start = position[0];
|
||||||
|
var end = position[0] + position[1];
|
||||||
|
var previewStart = start;
|
||||||
|
var previewEnd = end;
|
||||||
|
var ellipsesBefore = true;
|
||||||
|
var ellipsesAfter = true;
|
||||||
|
for (var k = 0; k < 3; k++) {
|
||||||
|
var nextSpace = doc.content.lastIndexOf(' ', previewStart - 2);
|
||||||
|
var nextDot = doc.content.lastIndexOf('.', previewStart - 2);
|
||||||
|
if ((nextDot > 0) && (nextDot > nextSpace)) {
|
||||||
|
previewStart = nextDot + 1;
|
||||||
|
ellipsesBefore = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (nextSpace < 0) {
|
||||||
|
previewStart = 0;
|
||||||
|
ellipsesBefore = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
previewStart = nextSpace + 1;
|
||||||
|
}
|
||||||
|
for (var k = 0; k < 10; k++) {
|
||||||
|
var nextSpace = doc.content.indexOf(' ', previewEnd + 1);
|
||||||
|
var nextDot = doc.content.indexOf('.', previewEnd + 1);
|
||||||
|
if ((nextDot > 0) && (nextDot < nextSpace)) {
|
||||||
|
previewEnd = nextDot;
|
||||||
|
ellipsesAfter = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (nextSpace < 0) {
|
||||||
|
previewEnd = doc.content.length;
|
||||||
|
ellipsesAfter = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
previewEnd = nextSpace;
|
||||||
|
}
|
||||||
|
var preview = doc.content.substring(previewStart, start);
|
||||||
|
if (ellipsesBefore) {
|
||||||
|
preview = '... ' + preview;
|
||||||
|
}
|
||||||
|
preview += '<span class="search-result-highlight">' + doc.content.substring(start, end) + '</span>';
|
||||||
|
preview += doc.content.substring(end, previewEnd);
|
||||||
|
if (ellipsesAfter) {
|
||||||
|
preview += ' ...';
|
||||||
|
}
|
||||||
|
|
||||||
|
var resultPreview = document.createElement('div');
|
||||||
|
resultPreview.classList.add('search-result-preview');
|
||||||
|
resultPreview.innerHTML = preview;
|
||||||
|
resultLink.appendChild(resultPreview);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
addEvent(searchInput, 'blur', function(){
|
jtd.addEvent(searchInput, 'blur', function(){
|
||||||
setTimeout(function(){ hideResults() }, 300);
|
setTimeout(function(){ hideResults() }, 300);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function pageFocus() {
|
||||||
|
var mainContent = document.querySelector('.js-main-content');
|
||||||
|
mainContent.focus();
|
||||||
|
}
|
||||||
|
|
||||||
// Document ready
|
// Document ready
|
||||||
|
|
||||||
function ready(){
|
jtd.onReady(function(){
|
||||||
toggleNav();
|
initNav();
|
||||||
initSearch();
|
pageFocus();
|
||||||
}
|
if (typeof lunr !== 'undefined') {
|
||||||
|
initSearch();
|
||||||
// in case the document is already rendered
|
}
|
||||||
if (document.readyState!='loading') ready();
|
|
||||||
// modern browsers
|
|
||||||
else if (document.addEventListener) document.addEventListener('DOMContentLoaded', ready);
|
|
||||||
// IE <= 8
|
|
||||||
else document.attachEvent('onreadystatechange', function(){
|
|
||||||
if (document.readyState=='complete') ready();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
})(window.jtd = window.jtd || {});
|
||||||
|
|
||||||
|
{% include js/custom.js %}
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
---
|
---
|
||||||
{
|
{
|
||||||
{% for page in site.html_pages %}"{{ forloop.index0 }}": {
|
{% assign comma = false %}
|
||||||
"id": "{{ forloop.index0 }}",
|
{% for page in site.html_pages %}{% if page.search_exclude != true %}{% if comma == true%},{% endif %}"{{ forloop.index0 }}": {
|
||||||
"title": "{{ page.title | xml_escape }}",
|
"title": "{{ page.title | replace: '&', '&' }}",
|
||||||
"content": "{{ page.content | markdownify | strip_html | xml_escape | remove: 'Table of contents' | strip_newlines | replace: '\', ' ' }}",
|
"content": "{{ page.content | markdownify | replace: '</h', ' . </h' | replace: '<hr', ' . <hr' | replace: '</p', ' . </p' | replace: '</ul', ' . </ul' | replace: '</tr', ' . </tr' | replace: '</li', ' | </li' | replace: '</td', ' | </td' | strip_html | escape_once | remove: 'Table of contents' | remove: '```' | remove: '---' | replace: '\', ' ' | replace: ' . . . ', ' . ' | replace: ' . . ', ' . ' | normalize_whitespace }}",
|
||||||
"url": "{{ page.url | absolute_url | xml_escape }}",
|
"url": "{{ page.url | absolute_url }}",
|
||||||
"relUrl": "{{ page.url | xml_escape }}"
|
"relUrl": "{{ page.url }}"
|
||||||
}{% if forloop.last %}{% else %},
|
}{% assign comma = true %}
|
||||||
{% endif %}{% endfor %}
|
{% endif %}{% endfor %}
|
||||||
}
|
}
|
6
assets/js/vendor/lunr.min.js
vendored
6
assets/js/vendor/lunr.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
gem_dir = File.expand_path("..",File.dirname(__FILE__))
|
gem_dir = File.expand_path("..",File.dirname(__FILE__))
|
||||||
$LOAD_PATH.unshift gem_dir# Look in gem directory for resources first.
|
$LOAD_PATH.unshift gem_dir # Look in gem directory for resources first.
|
||||||
exec_type = ARGV[0]
|
exec_type = ARGV[0]
|
||||||
|
|
||||||
if exec_type == 'rake' then
|
if exec_type == 'rake' then
|
||||||
|
88
docs/configuration.md
Normal file
88
docs/configuration.md
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
---
|
||||||
|
layout: default
|
||||||
|
title: Configuration
|
||||||
|
nav_order: 2
|
||||||
|
---
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
{: .no_toc }
|
||||||
|
|
||||||
|
|
||||||
|
Just the Docs has some specific configuration parameters that can be defined in your Jekyll site's _config.yml file.
|
||||||
|
{: .fs-6 .fw-300 }
|
||||||
|
|
||||||
|
## Table of contents
|
||||||
|
{: .no_toc .text-delta }
|
||||||
|
|
||||||
|
1. TOC
|
||||||
|
{:toc}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
View this site's [_config.yml](https://github.com/pmarsceill/just-the-docs/tree/master/_config.yml) file as an example.
|
||||||
|
|
||||||
|
## Site logo
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Set a path/url to a logo that will be displayed instead of the title
|
||||||
|
logo: "/assets/images/just-the-docs.png"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Search
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Enable or disable the site search
|
||||||
|
# Supports true (default) or false
|
||||||
|
search_enabled: true
|
||||||
|
|
||||||
|
# Enable support for hyphenated search words:
|
||||||
|
search_tokenizer_separator: /[\s/]+/
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## Aux links
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Aux links for the upper right navigation
|
||||||
|
aux_links:
|
||||||
|
"Just the Docs on GitHub":
|
||||||
|
- "//github.com/pmarsceill/just-the-docs"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Heading anchor links
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Heading anchor links appear on hover over h1-h6 tags in page content
|
||||||
|
# allowing users to deep link to a particular heading on a page.
|
||||||
|
#
|
||||||
|
# Supports true (default) or false/nil
|
||||||
|
heading_anchors: true
|
||||||
|
```
|
||||||
|
|
||||||
|
## Footer content
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Footer content appears at the bottom of every page's main content
|
||||||
|
footer_content: "Copyright © 2017-2019 Patrick Marsceill. Distributed by an <a href=\"https://github.com/pmarsceill/just-the-docs/tree/master/LICENSE.txt\">MIT license.</a>"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Color scheme
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Color scheme currently only supports "dark" or nil (default)
|
||||||
|
color_scheme: "dark"
|
||||||
|
```
|
||||||
|
<button class="btn js-toggle-dark-mode">Preview dark color scheme</button>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="{{ "/assets/js/dark-mode-preview.js" | absolute_url }}"></script>
|
||||||
|
|
||||||
|
See [Customization]({{ site.baseurl }}{% link docs/customization.md %}) for more information.
|
||||||
|
|
||||||
|
## Google Analytics
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Google Analytics Tracking (optional)
|
||||||
|
# e.g, UA-1234567-89
|
||||||
|
ga_tracking: UA-5555555-55
|
||||||
|
```
|
@@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: default
|
||||||
title: Customization
|
title: Customization
|
||||||
nav_order: 5
|
nav_order: 6
|
||||||
---
|
---
|
||||||
|
|
||||||
# Customization
|
# Customization
|
||||||
{:.no_toc}
|
{: .no_toc }
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
{: .no_toc .text-delta }
|
{: .no_toc .text-delta }
|
||||||
@@ -15,11 +15,35 @@ nav_order: 5
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Visual customization
|
## Color schemes
|
||||||
|
{: .d-inline-block }
|
||||||
|
|
||||||
To customize your site’s aesthetic, open `_sass/custom/custom.scss` in your editor to see if there is a variable that you can override. Most styles like fonts, colors, spacing, etc.. are derived from these variables. To override a specific variable, uncomment out it’s line and change it’s value.
|
New
|
||||||
|
{: .label .label-green }
|
||||||
|
|
||||||
For example, to change the link color from the purple default to blue, open `_sass/custom/custom.css` and find the link color variable on line `44`. Uncomment it out, and change it's value to our `$blue-000` variable, or another shade of your choosing.
|
Just the Docs supports two color schemes: light (default), and dark.
|
||||||
|
|
||||||
|
To enable a color scheme, set the `color_scheme` parameter in your site's `_config.yml` file:
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
{: .no_toc }
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Color scheme currently only supports "dark" or nil (default)
|
||||||
|
color_scheme: "dark"
|
||||||
|
```
|
||||||
|
<button class="btn js-toggle-dark-mode">Preview dark color scheme</button>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="{{ "/assets/js/dark-mode-preview.js" | absolute_url }}"></script>
|
||||||
|
|
||||||
|
## Specific visual customization
|
||||||
|
|
||||||
|
To customize your site’s aesthetic, open `_sass/custom/custom.scss` in your editor to see if there is a variable that you can override. Most styles like fonts, colors, spacing, etc. are derived from these variables. To override a specific variable, uncomment its line and change its value.
|
||||||
|
|
||||||
|
For example, to change the link color from the purple default to blue, open `_sass/custom/custom.css` and find the `$link-color` variable on line `50`. Uncomment it, and change its value to our `$blue-000` variable, or another shade of your choosing.
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
{: .no_toc }
|
||||||
|
|
||||||
```scss
|
```scss
|
||||||
// ...
|
// ...
|
||||||
@@ -31,14 +55,21 @@ $link-color: $blue-000;
|
|||||||
// ...
|
// ...
|
||||||
```
|
```
|
||||||
|
|
||||||
_Note:_ Editing the variables directly in `_sass/support/variables.scss` is not recommended and can cause other dependancies to fail.
|
_Note:_ Editing the variables directly in `_sass/support/variables.scss` is not recommended and can cause other dependencies to fail.
|
||||||
|
|
||||||
---
|
## Override styles
|
||||||
|
|
||||||
## Themes
|
For styles that aren't defined as a variables, you may want to modify specific CSS classes. To add your own CSS overrides at the end of the cascade, edit `_sass/overrides.scss`. This will allow for all overrides to be kept in a single file, and for any upstream changes to still be applied.
|
||||||
{: .d-inline-block :}
|
|
||||||
|
|
||||||
Coming soon
|
For example, if you'd like to add your own styles for printing a page, you could add the following styles.
|
||||||
{: .label .label-yellow :}
|
|
||||||
|
|
||||||
Hard at work on a dark theme, and more.
|
#### Example
|
||||||
|
{: .no_toc }
|
||||||
|
|
||||||
|
```scss
|
||||||
|
// Print-only styles.
|
||||||
|
@media print {
|
||||||
|
.side-bar, .page-header { display: none; }
|
||||||
|
.main-content { max-width: auto; margin: 1em;}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
@@ -94,6 +94,30 @@ end
|
|||||||
- level 2 item
|
- level 2 item
|
||||||
- level 1 item
|
- level 1 item
|
||||||
|
|
||||||
|
### Nesting an ol in ul in an ol
|
||||||
|
|
||||||
|
- level 1 item (ul)
|
||||||
|
1. level 2 item (ol)
|
||||||
|
1. level 2 item (ol)
|
||||||
|
- level 3 item (ul)
|
||||||
|
- level 3 item (ul)
|
||||||
|
- level 1 item (ul)
|
||||||
|
1. level 2 item (ol)
|
||||||
|
1. level 2 item (ol)
|
||||||
|
- level 3 item (ul)
|
||||||
|
- level 3 item (ul)
|
||||||
|
1. level 4 item (ol)
|
||||||
|
1. level 4 item (ol)
|
||||||
|
- level 3 item (ul)
|
||||||
|
- level 3 item (ul)
|
||||||
|
- level 1 item (ul)
|
||||||
|
|
||||||
|
### And a task list
|
||||||
|
|
||||||
|
- [ ] Hello, this is a TODO item
|
||||||
|
- [ ] Hello, this is another TODO item
|
||||||
|
- [x] Goodbye, this item is done
|
||||||
|
|
||||||
### Small image
|
### Small image
|
||||||
|
|
||||||

|

|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: default
|
||||||
title: Navigation Structure
|
title: Navigation Structure
|
||||||
nav_order: 4
|
nav_order: 5
|
||||||
---
|
---
|
||||||
|
|
||||||
# Navigation Structure
|
# Navigation Structure
|
||||||
@@ -17,15 +17,18 @@ nav_order: 4
|
|||||||
|
|
||||||
## Main navigation
|
## Main navigation
|
||||||
|
|
||||||
The main navigation for your Just the Docs site is on the left side of the page at large screens and on the top (behind a tap) on small screens. The main navigation can be structured to accommodate a multi-level menu system (parent pages with children).
|
The main navigation for your Just the Docs site is on the left side of the page at large screens and on the top (behind a tap) on small screens. The main navigation can be structured to accommodate a multi-level menu system (pages with children and grandchildren).
|
||||||
|
|
||||||
### Top level pages
|
By default, all pages will appear as top level pages in the main nav unless a parent page is defined (see [Pages with Children](#pages-with-children)).
|
||||||
|
|
||||||
By default, all pages will appear as top level pages in the main nav.
|
---
|
||||||
|
|
||||||
### Ordering pages
|
## Ordering pages
|
||||||
|
|
||||||
To specify a page order, use the `nav_order` variable in your pages' YAML front matter.
|
To specify a page order, use the `nav_order` parameter in your pages' YAML front matter.
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
{: .no_toc }
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
---
|
---
|
||||||
@@ -35,9 +38,28 @@ nav_order: 4
|
|||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
|
||||||
### Pages with children
|
---
|
||||||
|
|
||||||
Sometimes you will want to create a page with many children (a section). To accomplish this you need to a few things. First, it is recommended that you keep pages that are related in a directory together... For example, in these docs, we keep all of the written documentation in the `./docs` directory and each of the sections in subdirectories like `./docs/ui-components` and `./docs/utilities`. This gives is an organization like:
|
## Excluding pages
|
||||||
|
|
||||||
|
For specific pages that you do not wish to include in the main navigation, e.g. a 404 page or a landing page, use the `nav_exclude: true` parameter in the YAML front matter for that page.
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
{: .no_toc }
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
layout: default
|
||||||
|
title: 404
|
||||||
|
nav_exclude: true
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Pages with children
|
||||||
|
|
||||||
|
Sometimes you will want to create a page with many children (a section). First, it is recommended that you keep pages that are related in a directory together... For example, in these docs, we keep all of the written documentation in the `./docs` directory and each of the sections in subdirectories like `./docs/ui-components` and `./docs/utilities`. This gives us an organization like:
|
||||||
|
|
||||||
```
|
```
|
||||||
+-- ..
|
+-- ..
|
||||||
@@ -45,7 +67,7 @@ Sometimes you will want to create a page with many children (a section). To acco
|
|||||||
|
|
|
|
||||||
|-- docs
|
|-- docs
|
||||||
| |-- ui-components
|
| |-- ui-components
|
||||||
| | |-- ui-components.md (parent page)
|
| | |-- index.md (parent page)
|
||||||
| | |-- buttons.md
|
| | |-- buttons.md
|
||||||
| | |-- code.md
|
| | |-- code.md
|
||||||
| | |-- labels.md
|
| | |-- labels.md
|
||||||
@@ -53,7 +75,7 @@ Sometimes you will want to create a page with many children (a section). To acco
|
|||||||
| | +-- typography.md
|
| | +-- typography.md
|
||||||
| |
|
| |
|
||||||
| |-- utilities
|
| |-- utilities
|
||||||
| | |-- utilities.md (parent page)
|
| | |-- index.md (parent page)
|
||||||
| | |-- color.md
|
| | |-- color.md
|
||||||
| | |-- layout.md
|
| | |-- layout.md
|
||||||
| | |-- responsive-modifiers.md
|
| | |-- responsive-modifiers.md
|
||||||
@@ -66,51 +88,127 @@ Sometimes you will want to create a page with many children (a section). To acco
|
|||||||
+-- ..
|
+-- ..
|
||||||
```
|
```
|
||||||
|
|
||||||
On the parent pages, add 3 YAML front matter variables:
|
On the parent pages, add this YAML front matter parameter:
|
||||||
- `has_children: true` (tells us that this a parent page)
|
- `has_children: true` (tells us that this is a parent page)
|
||||||
- `parent: ` set this to the title of the parent page (in this case, it's this page's title)
|
|
||||||
- `permalink: ` set this to the directory that the contains the pages
|
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
{: .no_toc }
|
{: .no_toc }
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
---
|
||||||
layout: default
|
layout: default
|
||||||
title: UI Components
|
title: UI Components
|
||||||
nav_order: 2
|
nav_order: 2
|
||||||
has_children: true
|
has_children: true
|
||||||
parent: UI Components
|
---
|
||||||
permalink: /ui-components
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Here we're setting up the UI Components landing page that is available at `/ui-components`, has children and is ordered second in the main nav.
|
Here we're setting up the UI Components landing page that is available at `/docs/ui-components`, which has children and is ordered second in the main nav.
|
||||||
|
|
||||||
### Child pages
|
### Child pages
|
||||||
|
{: .text-gamma }
|
||||||
|
|
||||||
On child pages, simply set the `parent:` YAML front matter to whatever the parent's page title is and set a nav order (this number is now scoped within the section).
|
On child pages, simply set the `parent:` YAML front matter to whatever the parent's page title is and set a nav order (this number is now scoped within the section).
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
{: .no_toc }
|
{: .no_toc }
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
---
|
||||||
layout: default
|
layout: default
|
||||||
title: Buttons
|
title: Buttons
|
||||||
parent: UI Components
|
parent: UI Components
|
||||||
nav_order: 2
|
nav_order: 2
|
||||||
|
---
|
||||||
```
|
```
|
||||||
|
|
||||||
The Buttons page appears a child of UI Components and appears second in the UI Components section.
|
The Buttons page appears as a child of UI Components and appears second in the UI Components section.
|
||||||
|
|
||||||
|
### Auto-generating Table of Contents
|
||||||
|
|
||||||
|
By default, all pages with children will automatically append a Table of Contents which lists the child pages after the parent page's content. To disable this auto Table of Contents, set `has_toc: false` in the parent page's YAML front matter.
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
{: .no_toc }
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
layout: default
|
||||||
|
title: UI Components
|
||||||
|
nav_order: 2
|
||||||
|
has_children: true
|
||||||
|
has_toc: false
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
### Children with children
|
||||||
|
{: .text-gamma }
|
||||||
|
|
||||||
|
Child pages can also have children (grandchildren). This is achieved by using a similar pattern on the child and grandchild pages.
|
||||||
|
|
||||||
|
1. Add the `has_children` attribute to the child
|
||||||
|
1. Add the `parent` and `grand_parent` attribute to the grandchild
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
{: .no_toc }
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
layout: default
|
||||||
|
title: Buttons
|
||||||
|
parent: UI Components
|
||||||
|
nav_order: 2
|
||||||
|
has_children: true
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
layout: default
|
||||||
|
title: Buttons Child Page
|
||||||
|
parent: Buttons
|
||||||
|
grand_parent: UI Components
|
||||||
|
nav_order: 1
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
This would create the following navigation structure:
|
||||||
|
|
||||||
|
```
|
||||||
|
+-- ..
|
||||||
|
|
|
||||||
|
|-- UI Components
|
||||||
|
| |-- ..
|
||||||
|
| |
|
||||||
|
| |-- Buttons
|
||||||
|
| | |-- Button Child Page
|
||||||
|
| |
|
||||||
|
| |-- ..
|
||||||
|
|
|
||||||
|
+-- ..
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Breadcrumbs
|
## Auxiliary Navigation
|
||||||
|
|
||||||
Breadcrumbs are auto generated based on the parent/child structure and the directory structure for the site. In order for breadcrumbs to work correctly for pages children, the URL structure must be the slugified version of the parent page's title. For example, the page UI Components, must use the `/ui-components` directory to house its descendant pages.
|
To add a auxiliary navigation item to your site (in the upper right on all pages), add it to the `aux_nav` [configuration option]({{ site.baseurl }}{% link docs/configuration.md %}#aux-nav) in your site's `_config.yml` file.
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
{: .no_toc }
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Aux links for the upper right navigation
|
||||||
|
aux_links:
|
||||||
|
"Just the Docs on GitHub":
|
||||||
|
- "//github.com/pmarsceill/just-the-docs"
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## In-page navigation with Table of Contents
|
## In-page navigation with Table of Contents
|
||||||
|
|
||||||
To generate a Table of Contents on your docs pages, you can use the `{:toc}` method from Kramdown, immediately after an `<ol>` in markdown. This will automatically generate an ordered list of anchor links to various sections of page based on headings and heading levels. There may be occasions where you're using a heading and you don't want it to show up in the TOC, to skip a particular heading use the `{: .no_toc }` CSS class.
|
To generate a Table of Contents on your docs pages, you can use the `{:toc}` method from Kramdown, immediately after an `<ol>` in Markdown. This will automatically generate an ordered list of anchor links to various sections of the page based on headings and heading levels. There may be occasions where you're using a heading and you don't want it to show up in the TOC, so to skip a particular heading use the `{: .no_toc }` CSS class.
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
{: .no_toc }
|
{: .no_toc }
|
||||||
|
@@ -1,42 +1,85 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: default
|
||||||
title: Search
|
title: Search
|
||||||
nav_order: 6
|
nav_order: 7
|
||||||
---
|
---
|
||||||
|
|
||||||
# Search
|
# Search
|
||||||
|
{: .no_toc }
|
||||||
|
|
||||||
Just the docs uses [lunr.js](http://lunrjs.com) to add a client-side search interface powered by a JSON index that Jekyll generates. All search results are shown in an auto-complete style interface (there is no search results page). By default, all generated html pages are indexed using the following data points:
|
## Table of contents
|
||||||
|
{: .no_toc .text-delta }
|
||||||
|
|
||||||
|
1. TOC
|
||||||
|
{:toc}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Just the Docs uses [lunr.js](http://lunrjs.com) to add a client-side search interface powered by a JSON index that Jekyll generates. All search results are shown in an auto-complete style interface (there is no search results page). By default, all generated HTML pages are indexed using the following data points:
|
||||||
|
|
||||||
- Page title
|
- Page title
|
||||||
- Page content
|
- Page content
|
||||||
- Page URL
|
- Page URL
|
||||||
|
|
||||||
## Setup search
|
## Set up search
|
||||||
|
|
||||||
Before you can use search, you must initialize the feature by running this
|
### Generate search index
|
||||||
rake command that comes with the `just-the-docs`
|
|
||||||
|
Before you can use search, you must initialize the feature by running this `rake` command that comes with `just-the-docs`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ bundle exec just-the-docs rake search:init
|
$ bundle exec just-the-docs rake search:init
|
||||||
```
|
```
|
||||||
|
|
||||||
This command creates the `search-data.json` file that Jekyll uses to create
|
This command creates the `search-data.json` file that Jekyll uses to create your search index. Alternatively, you can create the file manually in the `assets/js/` directory of your Jekyll site with this content:
|
||||||
your search index. Alternatively, you can create the file manually in the
|
|
||||||
root of your Jekyll site with this content:
|
|
||||||
|
|
||||||
```{% raw %}
|
```liquid
|
||||||
---
|
{% raw %}---
|
||||||
---
|
---
|
||||||
{
|
{
|
||||||
{% for page in site.html_pages %}"{{ forloop.index0 }}": {
|
{% assign comma = false %}
|
||||||
"id": "{{ forloop.index0 }}",
|
{% for page in site.html_pages %}{% if page.search_exclude != true %}{% if comma == true%},{% endif %}"{{ forloop.index0 }}": {
|
||||||
"title": "{{ page.title | xml_escape }}",
|
"title": "{{ page.title | replace: '&', '&' }}",
|
||||||
"content": "{{ page.content | markdownify | strip_html | xml_escape | remove: 'Table of contents' | remove: page.title | strip_newlines | replace: '\', ' '}}",
|
"content": "{{ page.content | markdownify | replace: '</h', ' . </h' | replace: '<hr', ' . <hr' | replace: '</p', ' . </p' | replace: '</ul', ' . </ul' | replace: '</tr', ' . </tr' | replace: '</li', ' | </li' | replace: '</td', ' | </td' | strip_html | escape_once | remove: 'Table of contents' | remove: '```' | remove: '---' | replace: '\', ' ' | replace: ' . . . ', ' . ' | replace: ' . . ', ' . ' | normalize_whitespace }}",
|
||||||
"url": "{{ page.url | xml_escape }}"
|
"url": "{{ page.url | absolute_url }}",
|
||||||
}{% if forloop.last %}{% else %},
|
"relUrl": "{{ page.url }}"
|
||||||
|
}{% assign comma = true %}
|
||||||
{% endif %}{% endfor %}
|
{% endif %}{% endfor %}
|
||||||
}{% endraw %}
|
}{% endraw %}
|
||||||
```
|
```
|
||||||
|
|
||||||
You can modify this by modifying the forloop in `search-data.json` and the javascript in `just-the-docs.js` on line 30.
|
_Note: If you don't run this rake command or create this file manually, search will not work (or it will use the search index data from this docs site, not your site's content)._
|
||||||
|
|
||||||
|
### Enable search in configuration
|
||||||
|
|
||||||
|
In your site's `_config.yml`, enable search:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Enable or disable the site search
|
||||||
|
search_enabled: true
|
||||||
|
```
|
||||||
|
|
||||||
|
The default is for hyphens to separate tokens in search terms:
|
||||||
|
`gem-based` is equivalent to `gem based`, matching either word.
|
||||||
|
To allow search for hyphenated words:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Set the search token separator
|
||||||
|
search_tokenizer_separator: /[\s/]+/
|
||||||
|
```
|
||||||
|
|
||||||
|
## Hiding pages from search
|
||||||
|
|
||||||
|
Sometimes you might have a page that you don't want to be indexed for the search nor to show up in search results, e.g, a 404 page. To exclude a page from search, add the `search_exclude: true` parameter to the page's YAML front matter:
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
{: .no_toc }
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
layout: default
|
||||||
|
title: Page not found
|
||||||
|
nav_exclude: true
|
||||||
|
search_exclude: true
|
||||||
|
---
|
||||||
|
```
|
||||||
|
@@ -6,7 +6,7 @@ nav_order: 2
|
|||||||
---
|
---
|
||||||
|
|
||||||
# Buttons
|
# Buttons
|
||||||
{:.no_toc}
|
{: .no_toc }
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
{: .no_toc .text-delta }
|
{: .no_toc .text-delta }
|
||||||
@@ -21,7 +21,6 @@ nav_order: 2
|
|||||||
### Links that look like buttons
|
### Links that look like buttons
|
||||||
|
|
||||||
<div class="code-example" markdown="1">
|
<div class="code-example" markdown="1">
|
||||||
|
|
||||||
[Link button](http://example.com/){: .btn }
|
[Link button](http://example.com/){: .btn }
|
||||||
|
|
||||||
[Link button](http://example.com/){: .btn .btn-purple }
|
[Link button](http://example.com/){: .btn .btn-purple }
|
||||||
@@ -29,10 +28,8 @@ nav_order: 2
|
|||||||
[Link button](http://example.com/){: .btn .btn-green }
|
[Link button](http://example.com/){: .btn .btn-green }
|
||||||
|
|
||||||
[Link button](http://example.com/){: .btn .btn-outline }
|
[Link button](http://example.com/){: .btn .btn-outline }
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
```markdown
|
```markdown
|
||||||
|
|
||||||
[Link button](http://example.com/){: .btn }
|
[Link button](http://example.com/){: .btn }
|
||||||
|
|
||||||
[Link button](http://example.com/){: .btn .btn-purple }
|
[Link button](http://example.com/){: .btn .btn-purple }
|
||||||
@@ -44,13 +41,10 @@ nav_order: 2
|
|||||||
|
|
||||||
### Button element
|
### Button element
|
||||||
|
|
||||||
GitHub flavored markdown does not support the `button` element, so you'll have to use inline HTML for this:
|
GitHub Flavored Markdown does not support the `button` element, so you'll have to use inline HTML for this:
|
||||||
|
|
||||||
|
|
||||||
<div class="code-example">
|
<div class="code-example">
|
||||||
|
|
||||||
<button type="button" name="button" class="btn">Button element</button>
|
<button type="button" name="button" class="btn">Button element</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
```html
|
```html
|
||||||
<button type="button" name="button" class="btn">Button element</button>
|
<button type="button" name="button" class="btn">Button element</button>
|
||||||
@@ -62,11 +56,9 @@ GitHub flavored markdown does not support the `button` element, so you'll have t
|
|||||||
|
|
||||||
### Button size
|
### Button size
|
||||||
|
|
||||||
Wrap the button in container that uses the [font-size utility classes]({{
|
Wrap the button in a container that uses the [font-size utility classes]({{ site.baseurl }}{% link docs/utilities/typography.md %}) to scale buttons:
|
||||||
site.baseurl }}{% link docs/utilities/typography.md %}) to scale buttons:
|
|
||||||
|
|
||||||
<div class="code-example" markdown="1">
|
<div class="code-example" markdown="1">
|
||||||
|
|
||||||
<span class="fs-6">
|
<span class="fs-6">
|
||||||
[Big ass button](http://example.com/){: .btn }
|
[Big ass button](http://example.com/){: .btn }
|
||||||
</span>
|
</span>
|
||||||
@@ -74,7 +66,6 @@ site.baseurl }}{% link docs/utilities/typography.md %}) to scale buttons:
|
|||||||
<span class="fs-3">
|
<span class="fs-3">
|
||||||
[Tiny ass button](http://example.com/){: .btn }
|
[Tiny ass button](http://example.com/){: .btn }
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
```markdown
|
```markdown
|
||||||
<span class="fs-8">
|
<span class="fs-8">
|
||||||
@@ -88,20 +79,19 @@ site.baseurl }}{% link docs/utilities/typography.md %}) to scale buttons:
|
|||||||
|
|
||||||
### Spacing between buttons
|
### Spacing between buttons
|
||||||
|
|
||||||
Use the [margin utility classes]({{ site.baseurl }}{% link docs/utilities/utilities.md %}#spacing) to add spacing between two buttons in the same block.
|
Use the [margin utility classes]({{ site.baseurl }}{% link docs/utilities/layout.md %}#spacing) to add spacing between two buttons in the same block.
|
||||||
|
|
||||||
<div class="code-example" markdown="1">
|
<div class="code-example" markdown="1">
|
||||||
|
[Button with space](http://example.com/){: .btn .btn-purple .mr-2 }
|
||||||
|
[Button ](http://example.com/){: .btn .btn-blue .mr-2 }
|
||||||
|
|
||||||
[Button with space](http://example.com/){: .btn .btn-purple .mr-2}
|
[Button with more space](http://example.com/){: .btn .btn-green .mr-4 }
|
||||||
[Button ](http://example.com/){: .btn .btn-blue .mr-2}
|
|
||||||
|
|
||||||
[Button with more space](http://example.com/){: .btn .btn-green .mr-4}
|
|
||||||
[Button ](http://example.com/){: .btn .btn-blue }
|
[Button ](http://example.com/){: .btn .btn-blue }
|
||||||
</div>
|
</div>
|
||||||
```markdown
|
```markdown
|
||||||
[Button with space](http://example.com/){: .btn .btn-purple .mr-2}
|
[Button with space](http://example.com/){: .btn .btn-purple .mr-2 }
|
||||||
[Button ](http://example.com/){: .btn .btn-blue }
|
[Button ](http://example.com/){: .btn .btn-blue }
|
||||||
|
|
||||||
[Button with more space](http://example.com/){: .btn .btn-green .mr-4}
|
[Button with more space](http://example.com/){: .btn .btn-green .mr-4 }
|
||||||
[Button ](http://example.com/){: .btn .btn-blue }
|
[Button ](http://example.com/){: .btn .btn-blue }
|
||||||
```
|
```
|
||||||
|
@@ -2,11 +2,11 @@
|
|||||||
layout: default
|
layout: default
|
||||||
title: Code
|
title: Code
|
||||||
parent: UI Components
|
parent: UI Components
|
||||||
nav_order: 5
|
nav_order: 6
|
||||||
---
|
---
|
||||||
|
|
||||||
# Code
|
# Code
|
||||||
{:.no_toc}
|
{: .no_toc }
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
{: .no_toc .text-delta }
|
{: .no_toc .text-delta }
|
||||||
@@ -18,12 +18,10 @@ nav_order: 5
|
|||||||
|
|
||||||
## Inline code
|
## Inline code
|
||||||
|
|
||||||
Code can be rendered inline using single ticks by wrapping your code in single back ticks.
|
Code can be rendered inline by wrapping it in single back ticks.
|
||||||
|
|
||||||
<div class="code-example" markdown="1">
|
<div class="code-example" markdown="1">
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, `<inline code snippet>` adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
Lorem ipsum dolor sit amet, `<inline code snippet>` adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
```markdown
|
```markdown
|
||||||
Lorem ipsum dolor sit amet, `<inline code snippet>` adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
Lorem ipsum dolor sit amet, `<inline code snippet>` adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||||
@@ -33,7 +31,7 @@ Lorem ipsum dolor sit amet, `<inline code snippet>` adipisicing elit, sed do eiu
|
|||||||
|
|
||||||
## Syntax highlighted code blocks
|
## Syntax highlighted code blocks
|
||||||
|
|
||||||
Use Jekyll's built in syntax highlighting with Rouge for code blocks by using three backticks, followed by the language name:
|
Use Jekyll's built-in syntax highlighting with Rouge for code blocks by using three backticks, followed by the language name:
|
||||||
|
|
||||||
<div class="code-example" markdown="1">
|
<div class="code-example" markdown="1">
|
||||||
```js
|
```js
|
||||||
@@ -58,7 +56,7 @@ var fun = function lang(l) {
|
|||||||
|
|
||||||
## Code blocks with rendered examples
|
## Code blocks with rendered examples
|
||||||
|
|
||||||
To demonstrate front end code, sometimes it useful to show a rendered example of that code. After including the styles from your project that you'll need to show the rendering, you can use a div with the `code-example` class, followed by the code block syntax. If you want to render your output with Markdown instead of HTML, use the `markdown="1"` attribute to tell Jekyll that the code you are rendering will be in Markdown format... This is about to get meta...
|
To demonstrate front end code, sometimes it's useful to show a rendered example of that code. After including the styles from your project that you'll need to show the rendering, you can use a `<div>` with the `code-example` class, followed by the code block syntax. If you want to render your output with Markdown instead of HTML, use the `markdown="1"` attribute to tell Jekyll that the code you are rendering will be in Markdown format... This is about to get meta...
|
||||||
|
|
||||||
<div class="code-example" markdown="1">
|
<div class="code-example" markdown="1">
|
||||||
|
|
||||||
|
@@ -10,44 +10,40 @@ nav_order: 3
|
|||||||
Use labels as a way to add an additional mark to a section of your docs. Labels come in a few colors. By default, labels will be blue.
|
Use labels as a way to add an additional mark to a section of your docs. Labels come in a few colors. By default, labels will be blue.
|
||||||
|
|
||||||
<div class="code-example" markdown="1">
|
<div class="code-example" markdown="1">
|
||||||
|
|
||||||
Default label
|
Default label
|
||||||
{: .label }
|
{: .label }
|
||||||
|
|
||||||
Blue label
|
Blue label
|
||||||
{: .label .label-blue}
|
{: .label .label-blue }
|
||||||
|
|
||||||
Stable
|
Stable
|
||||||
{: .label .label-green}
|
{: .label .label-green }
|
||||||
|
|
||||||
New release
|
New release
|
||||||
{: .label .label-purple}
|
{: .label .label-purple }
|
||||||
|
|
||||||
Coming soon
|
Coming soon
|
||||||
{: .label .label-yellow}
|
{: .label .label-yellow }
|
||||||
|
|
||||||
Deprecated
|
Deprecated
|
||||||
{: .label .label-red}
|
{: .label .label-red }
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
```markdown
|
```markdown
|
||||||
|
|
||||||
Default label
|
Default label
|
||||||
{: .label }
|
{: .label }
|
||||||
|
|
||||||
Blue label
|
Blue label
|
||||||
{: .label .label-blue}
|
{: .label .label-blue }
|
||||||
|
|
||||||
Stable
|
Stable
|
||||||
{: .label .label-green}
|
{: .label .label-green }
|
||||||
|
|
||||||
New release
|
New release
|
||||||
{: .label .label-purple}
|
{: .label .label-purple }
|
||||||
|
|
||||||
Coming soon
|
Coming soon
|
||||||
{: .label .label-yellow}
|
{: .label .label-yellow }
|
||||||
|
|
||||||
Deprecated
|
Deprecated
|
||||||
{: .label .label-red}
|
{: .label .label-red }
|
||||||
|
|
||||||
```
|
```
|
||||||
|
99
docs/ui-components/lists.md
Normal file
99
docs/ui-components/lists.md
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
---
|
||||||
|
layout: default
|
||||||
|
title: Lists
|
||||||
|
parent: UI Components
|
||||||
|
nav_order: 5
|
||||||
|
---
|
||||||
|
|
||||||
|
# Lists
|
||||||
|
{: .no_toc }
|
||||||
|
|
||||||
|
## Table of contents
|
||||||
|
{: .no_toc .text-delta }
|
||||||
|
|
||||||
|
1. TOC
|
||||||
|
{:toc}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Most lists can be rendered with pure Markdown.
|
||||||
|
|
||||||
|
## Unordered list
|
||||||
|
|
||||||
|
<div class="code-example" markdown="1">
|
||||||
|
- Item 1
|
||||||
|
- Item 2
|
||||||
|
- Item 3
|
||||||
|
|
||||||
|
_or_
|
||||||
|
|
||||||
|
* Item 1
|
||||||
|
* Item 2
|
||||||
|
* Item 3
|
||||||
|
</div>
|
||||||
|
```markdown
|
||||||
|
- Item 1
|
||||||
|
- Item 2
|
||||||
|
- Item 3
|
||||||
|
|
||||||
|
_or_
|
||||||
|
|
||||||
|
* Item 1
|
||||||
|
* Item 2
|
||||||
|
* Item 3
|
||||||
|
```
|
||||||
|
|
||||||
|
## Ordered list
|
||||||
|
|
||||||
|
<div class="code-example" markdown="1">
|
||||||
|
1. Item 1
|
||||||
|
1. Item 2
|
||||||
|
1. Item 3
|
||||||
|
</div>
|
||||||
|
```markdown
|
||||||
|
1. Item 1
|
||||||
|
1. Item 2
|
||||||
|
1. Item 3
|
||||||
|
```
|
||||||
|
|
||||||
|
## Task list
|
||||||
|
|
||||||
|
<div class="code-example" markdown="1">
|
||||||
|
- [ ] hello, this is a todo item
|
||||||
|
- [ ] hello, this is another todo item
|
||||||
|
- [x] goodbye, this item is done
|
||||||
|
</div>
|
||||||
|
```markdown
|
||||||
|
- [ ] hello, this is a todo item
|
||||||
|
- [ ] hello, this is another todo item
|
||||||
|
- [x] goodbye, this item is done
|
||||||
|
```
|
||||||
|
|
||||||
|
## Definition list
|
||||||
|
|
||||||
|
Definition lists require HTML syntax and aren't supported with the GitHub Flavored Markdown compiler.
|
||||||
|
|
||||||
|
<div class="code-example" markdown="1">
|
||||||
|
<dl>
|
||||||
|
<dt>Name</dt>
|
||||||
|
<dd>Godzilla</dd>
|
||||||
|
<dt>Born</dt>
|
||||||
|
<dd>1952</dd>
|
||||||
|
<dt>Birthplace</dt>
|
||||||
|
<dd>Japan</dd>
|
||||||
|
<dt>Color</dt>
|
||||||
|
<dd>Green</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
```html
|
||||||
|
<dl>
|
||||||
|
<dt>Name</dt>
|
||||||
|
<dd>Godzilla</dd>
|
||||||
|
<dt>Born</dt>
|
||||||
|
<dd>1952</dd>
|
||||||
|
<dt>Birthplace</dt>
|
||||||
|
<dd>Japan</dd>
|
||||||
|
<dt>Color</dt>
|
||||||
|
<dd>Green</dd>
|
||||||
|
</dl>
|
||||||
|
```
|
@@ -6,7 +6,7 @@ nav_order: 1
|
|||||||
---
|
---
|
||||||
|
|
||||||
# Typography
|
# Typography
|
||||||
{:.no_toc}
|
{: .no_toc }
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
{: .no_toc .text-delta }
|
{: .no_toc .text-delta }
|
||||||
@@ -24,17 +24,17 @@ By default, Just the Docs uses a native system font stack for sans-serif fonts:
|
|||||||
-apple-system, BlinkMacSystemFont, "helvetica neue", helvetica, roboto, noto, "segoe ui", arial, sans-serif
|
-apple-system, BlinkMacSystemFont, "helvetica neue", helvetica, roboto, noto, "segoe ui", arial, sans-serif
|
||||||
```
|
```
|
||||||
|
|
||||||
ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||||
abcdefghijklmnopqrstuvwxyz
|
abcdefghijklmnopqrstuvwxyz
|
||||||
{: .fs-5 .ls-10 .code-example }
|
{: .fs-5 .ls-10 .code-example }
|
||||||
|
|
||||||
For monospace type, like code snippets or the pre `<pre>` element, Just the Docs uses a native system font stack for monospace fonts:
|
For monospace type, like code snippets or the `<pre>` element, Just the Docs uses a native system font stack for monospace fonts:
|
||||||
|
|
||||||
```scss
|
```scss
|
||||||
"SFMono-Regular", Menlo, Consolas, Monospace
|
"SFMono-Regular", Menlo, Consolas, Monospace
|
||||||
```
|
```
|
||||||
|
|
||||||
ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||||
abcdefghijklmnopqrstuvwxyz
|
abcdefghijklmnopqrstuvwxyz
|
||||||
{: .fs-5 .ls-10 .text-mono .code-example }
|
{: .fs-5 .ls-10 .text-mono .code-example }
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ abcdefghijklmnopqrstuvwxyz
|
|||||||
|
|
||||||
## Responsive type scale
|
## Responsive type scale
|
||||||
|
|
||||||
Just the docs uses a responsive type scale that shifts depending on the viewport size. Common elements text elements rendered from markdown use a
|
Just the Docs uses a responsive type scale that shifts depending on the viewport size.
|
||||||
|
|
||||||
| Selector | Small screen size `font-size` | Large screen size `font-size` |
|
| Selector | Small screen size `font-size` | Large screen size `font-size` |
|
||||||
|:----------------------|:---------------------------------|:------------------------------|
|
|:----------------------|:---------------------------------|:------------------------------|
|
||||||
@@ -51,7 +51,7 @@ Just the docs uses a responsive type scale that shifts depending on the viewport
|
|||||||
| `h3`, `.text-gamma` | 16px | 18px |
|
| `h3`, `.text-gamma` | 16px | 18px |
|
||||||
| `h4`, `.text-delta` | 14px | 16px |
|
| `h4`, `.text-delta` | 14px | 16px |
|
||||||
| `h5`, `.text-epsilon` | 16px | 18px |
|
| `h5`, `.text-epsilon` | 16px | 18px |
|
||||||
| `h6`, `.text-zeta ` | 18px | 24px |
|
| `h6`, `.text-zeta` | 18px | 24px |
|
||||||
| `body` | 14px | 16px |
|
| `body` | 14px | 16px |
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -109,6 +109,6 @@ Text can be **bold**, _italic_, or ~~strikethrough~~.
|
|||||||
|
|
||||||
## Typographic Utilities
|
## Typographic Utilities
|
||||||
|
|
||||||
There are a number of specific typographic CSS classes that allow you to do override default styling for font size, font-weight, line height, and capitalization.
|
There are a number of specific typographic CSS classes that allow you to override default styling for font size, font weight, line height, and capitalization.
|
||||||
|
|
||||||
[View typography utilities]({{ site.base_url }}{% link docs/utilities/utilities.md %}#typography){: .btn .btn-outline }
|
[View typography utilities]({{ site.baseurl }}{% link docs/utilities/utilities.md %}#typography){: .btn .btn-outline }
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: default
|
||||||
title: UI Components
|
title: UI Components
|
||||||
nav_order: 2
|
nav_order: 3
|
||||||
has_children: true
|
has_children: true
|
||||||
parent: UI Components
|
permalink: /docs/ui-components
|
||||||
permalink: /ui-components
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# UI Components
|
# UI Components
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: default
|
||||||
title: Color
|
title: Color
|
||||||
nav_order: 3
|
|
||||||
parent: Utilities
|
parent: Utilities
|
||||||
|
nav_order: 3
|
||||||
---
|
---
|
||||||
|
|
||||||
# Color Utilities
|
# Color Utilities
|
||||||
{:.no_toc}
|
{: .no_toc }
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
{: .no_toc .text-delta }
|
{: .no_toc .text-delta }
|
||||||
@@ -16,7 +16,7 @@ parent: Utilities
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
All the colors used in Just the Docs have been systemsized into a series of variables that have been extended to both font color and background color utility classes.
|
All the colors used in Just the Docs have been systematized into a series of variables that have been extended to both font color and background color utility classes.
|
||||||
|
|
||||||
## Light Greys
|
## Light Greys
|
||||||
|
|
||||||
@@ -34,6 +34,7 @@ All the colors used in Just the Docs have been systemsized into a series of vari
|
|||||||
| <span class="d-inline-block p-2 mr-1 v-align-middle bg-grey-dk-000"></span> `grey-dk-000` | `.text-grey-dk-000` | `.bg-grey-dk-000` |
|
| <span class="d-inline-block p-2 mr-1 v-align-middle bg-grey-dk-000"></span> `grey-dk-000` | `.text-grey-dk-000` | `.bg-grey-dk-000` |
|
||||||
| <span class="d-inline-block p-2 mr-1 v-align-middle bg-grey-dk-100"></span> `grey-dk-100` | `.text-grey-dk-100` | `.bg-grey-dk-100` |
|
| <span class="d-inline-block p-2 mr-1 v-align-middle bg-grey-dk-100"></span> `grey-dk-100` | `.text-grey-dk-100` | `.bg-grey-dk-100` |
|
||||||
| <span class="d-inline-block p-2 mr-1 v-align-middle bg-grey-dk-200"></span> `grey-dk-200` | `.text-grey-dk-200` | `.bg-grey-dk-200` |
|
| <span class="d-inline-block p-2 mr-1 v-align-middle bg-grey-dk-200"></span> `grey-dk-200` | `.text-grey-dk-200` | `.bg-grey-dk-200` |
|
||||||
|
| <span class="d-inline-block p-2 mr-1 v-align-middle bg-grey-dk-250"></span> `grey-dk-250` | `.text-grey-dk-250` | `.bg-grey-dk-250` |
|
||||||
| <span class="d-inline-block p-2 mr-1 v-align-middle bg-grey-dk-300"></span> `grey-dk-300` | `.text-grey-dk-300` | `.bg-grey-dk-300` |
|
| <span class="d-inline-block p-2 mr-1 v-align-middle bg-grey-dk-300"></span> `grey-dk-300` | `.text-grey-dk-300` | `.bg-grey-dk-300` |
|
||||||
|
|
||||||
## Purples
|
## Purples
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: default
|
||||||
title: Layout
|
title: Layout
|
||||||
nav_order: 2
|
|
||||||
parent: Utilities
|
parent: Utilities
|
||||||
|
nav_order: 2
|
||||||
---
|
---
|
||||||
|
|
||||||
# Layout Utilities
|
# Layout Utilities
|
||||||
{:.no_toc}
|
{: .no_toc }
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
{: .no_toc .text-delta }
|
{: .no_toc .text-delta }
|
||||||
@@ -56,15 +56,14 @@ Spacing values are based on a `1rem = 16px` spacing scale, broken down into thes
|
|||||||
#### Examples
|
#### Examples
|
||||||
{: .no_toc }
|
{: .no_toc }
|
||||||
|
|
||||||
```markdown
|
|
||||||
In Markdown, use the `{: }` wrapper to apply custom classes:
|
In Markdown, use the `{: }` wrapper to apply custom classes:
|
||||||
|
|
||||||
|
```markdown
|
||||||
This paragraph will have a margin bottom of 1rem/16px at large screens.
|
This paragraph will have a margin bottom of 1rem/16px at large screens.
|
||||||
{: .mb-lg-4 }
|
{: .mb-lg-4 }
|
||||||
|
|
||||||
This paragraph will have 2rem/32px of padding on the right and left at all screen sizes.
|
This paragraph will have 2rem/32px of padding on the right and left at all screen sizes.
|
||||||
{: .px-6 }
|
{: .px-6 }
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Vertical Alignment
|
## Vertical Alignment
|
||||||
@@ -95,9 +94,9 @@ Use these classes in conjunction with the responsive modifiers.
|
|||||||
#### Examples
|
#### Examples
|
||||||
{: .no_toc }
|
{: .no_toc }
|
||||||
|
|
||||||
```markdown
|
|
||||||
In Markdown, use the `{: }` wrapper to apply custom classes:
|
In Markdown, use the `{: }` wrapper to apply custom classes:
|
||||||
|
|
||||||
|
```markdown
|
||||||
This button will be hidden until medium screen sizes:
|
This button will be hidden until medium screen sizes:
|
||||||
|
|
||||||
[ A button ](#url)
|
[ A button ](#url)
|
||||||
@@ -106,9 +105,8 @@ This button will be hidden until medium screen sizes:
|
|||||||
These headings will be `inline-block`:
|
These headings will be `inline-block`:
|
||||||
|
|
||||||
### heading 3
|
### heading 3
|
||||||
{ .d-inline-block }
|
{: .d-inline-block }
|
||||||
|
|
||||||
### heading 3
|
### heading 3
|
||||||
{ .d-inline-block }
|
{: .d-inline-block }
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: default
|
||||||
title: Responsive Modifiers
|
title: Responsive Modifiers
|
||||||
nav_order: 1
|
|
||||||
parent: Utilities
|
parent: Utilities
|
||||||
|
nav_order: 1
|
||||||
---
|
---
|
||||||
|
|
||||||
# Responsive modifiers
|
# Responsive modifiers
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: default
|
||||||
title: Typography
|
title: Typography
|
||||||
nav_order: 3
|
|
||||||
parent: Utilities
|
parent: Utilities
|
||||||
|
nav_order: 4
|
||||||
---
|
---
|
||||||
|
|
||||||
# Typography Utilities
|
# Typography Utilities
|
||||||
{:.no_toc}
|
{: .no_toc }
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
{: .no_toc .text-delta }
|
{: .no_toc .text-delta }
|
||||||
@@ -117,33 +117,31 @@ Use the `lh-` classes to explicitly apply line height to text.
|
|||||||
| `.lh-tight` | 1.1 | Default for headings |
|
| `.lh-tight` | 1.1 | Default for headings |
|
||||||
| `.lh-default` | 1.4 | Default for body (paragraphs) |
|
| `.lh-default` | 1.4 | Default for body (paragraphs) |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="code-example" markdown="1">
|
<div class="code-example" markdown="1">
|
||||||
No Line height
|
No Line height
|
||||||
No Line height
|
No Line height
|
||||||
{: .lh-0 }
|
{: .lh-0 }
|
||||||
|
|
||||||
Tight line height
|
Tight line height
|
||||||
Tight line height
|
Tight line height
|
||||||
{: .lh-tight }
|
{: .lh-tight }
|
||||||
|
|
||||||
Default line height
|
Default line height
|
||||||
Default line height
|
Default line height
|
||||||
{: .fh-default }
|
{: .fh-default }
|
||||||
</div>
|
</div>
|
||||||
```markdown
|
```markdown
|
||||||
In Markdown, use the `{: }` wrapper to apply custom classes:
|
In Markdown, use the `{: }` wrapper to apply custom classes:
|
||||||
|
|
||||||
No Line height
|
No Line height
|
||||||
No Line height
|
No Line height
|
||||||
{: .lh-0 }
|
{: .lh-0 }
|
||||||
|
|
||||||
Tight line height
|
Tight line height
|
||||||
Tight line height
|
Tight line height
|
||||||
{: .lh-tight }
|
{: .lh-tight }
|
||||||
|
|
||||||
Default line height
|
Default line height
|
||||||
Default line height
|
Default line height
|
||||||
{: .fh-default }
|
{: .fh-default }
|
||||||
```
|
```
|
||||||
|
@@ -1,14 +1,13 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: default
|
||||||
title: Utilities
|
title: Utilities
|
||||||
nav_order: 3
|
nav_order: 4
|
||||||
parent: Utilities
|
|
||||||
has_children: true
|
has_children: true
|
||||||
permalink: /utilities
|
permalink: docs/utilities
|
||||||
---
|
---
|
||||||
|
|
||||||
# Utilities
|
# Utilities
|
||||||
{:.no_toc}
|
{: .no_toc }
|
||||||
|
|
||||||
CSS utility classes come in handy when you to want to override default styles to give create additional whitespace (margins/padding), unexpected shifts in font-size or weight, add color, or to hide (or show) something a specific screen size.
|
CSS utility classes come in handy when you to want to override default styles to create additional whitespace (margins/padding), correct unexpected shifts in font size or weight, add color, or hide (or show) something at a specific screen size.
|
||||||
{: .fs-6 .fw-300 }
|
{: .fs-6 .fw-300 }
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 32 KiB |
46
index.md
46
index.md
@@ -2,24 +2,36 @@
|
|||||||
layout: default
|
layout: default
|
||||||
title: Home
|
title: Home
|
||||||
nav_order: 1
|
nav_order: 1
|
||||||
|
description: "Just the Docs is a responsive Jekyll theme with built-in search that is easily customizable and hosted on GitHub Pages."
|
||||||
|
permalink: /
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
# Focus on writing good documentation
|
# Focus on writing good documentation
|
||||||
{: .fs-9 }
|
{: .fs-9 }
|
||||||
|
|
||||||
Just the Docs gives your documentation a jumpstart with a responsive Jekyll theme that is easily customizable and hosted on GitHub pages.
|
Just the Docs gives your documentation a jumpstart with a responsive Jekyll theme that is easily customizable and hosted on GitHub Pages.
|
||||||
{: .fs-6 .fw-300 }
|
{: .fs-6 .fw-300 }
|
||||||
|
|
||||||
[Get started now](#getting-started){: .btn .btn-purple .fs-5 .mb-4 .mb-md-0 .mr-2 } [View it on GitHub](https://github.com/pmarsceill/just-the-docs){: .btn .fs-5 }
|
[Get started now](#getting-started){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 } [View it on GitHub](https://github.com/pmarsceill/just-the-docs){: .btn .fs-5 .mb-4 .mb-md-0 }
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
### Dependancies
|
|
||||||
Just the Docs is built for [Jekyll](https://jekyllrb.com), a static site generator. View the [quick start guide](https://jekyllrb.com/docs/quickstart/) for more information. Just the Docs requires no special Jekyll plugins and can run on GitHub Pages standard Jekyll compiler.
|
|
||||||
|
|
||||||
### Installation
|
### Dependencies
|
||||||
|
|
||||||
|
Just the Docs is built for [Jekyll](https://jekyllrb.com), a static site generator. View the [quick start guide](https://jekyllrb.com/docs/) for more information. Just the Docs requires no special plugins and can run on GitHub Pages' standard Jekyll compiler. The [Jekyll SEO Tag plugin](https://github.com/jekyll/jekyll-seo-tag) is included by default (no need to run any special installation) to inject SEO and open graph metadata on docs pages. For information on how to configure SEO and open graph metadata visit the [Jekyll SEO Tag usage guide](https://jekyll.github.io/jekyll-seo-tag/usage/).
|
||||||
|
|
||||||
|
### Quick start: Use as a GitHub Pages remote theme
|
||||||
|
|
||||||
|
1. Add Just the Docs to your Jekyll site's `_config.yml` as a [remote theme](https://blog.github.com/2017-11-29-use-any-theme-with-github-pages/)
|
||||||
|
```yaml
|
||||||
|
remote_theme: pmarsceill/just-the-docs
|
||||||
|
```
|
||||||
|
<small>You must have GitHub Pages enabled on your repo, one or more Markdown files, and a `_config.yml` file. [See an example repository](https://github.com/pmarsceill/jtd-remote)</small>
|
||||||
|
|
||||||
|
### Local installation: Use the gem-based theme
|
||||||
|
|
||||||
1. Install the Ruby Gem
|
1. Install the Ruby Gem
|
||||||
```bash
|
```bash
|
||||||
$ gem install just-the-docs
|
$ gem install just-the-docs
|
||||||
@@ -28,7 +40,7 @@ $ gem install just-the-docs
|
|||||||
# .. or add it to your your Jekyll site’s Gemfile
|
# .. or add it to your your Jekyll site’s Gemfile
|
||||||
gem "just-the-docs"
|
gem "just-the-docs"
|
||||||
```
|
```
|
||||||
2. Add Just the Docs to your Jekyll site’s `config.yml`
|
2. Add Just the Docs to your Jekyll site’s `_config.yml`
|
||||||
```yaml
|
```yaml
|
||||||
theme: "just-the-docs"
|
theme: "just-the-docs"
|
||||||
```
|
```
|
||||||
@@ -46,11 +58,17 @@ $ bundle exec jekyll serve
|
|||||||
```
|
```
|
||||||
4. Point your web browser to [http://localhost:4000](http://localhost:4000)
|
4. Point your web browser to [http://localhost:4000](http://localhost:4000)
|
||||||
|
|
||||||
|
If you're hosting your site on GitHub Pages, [set up GitHub Pages and Jekyll locally](https://help.github.com/en/articles/setting-up-your-github-pages-site-locally-with-jekyll) so that you can more easily work in your development environment.
|
||||||
|
|
||||||
|
### Configure Just the Docs
|
||||||
|
|
||||||
|
- [See configuration options]({{ site.baseurl }}{% link docs/configuration.md %})
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## About the project
|
## About the project
|
||||||
|
|
||||||
Just the Docs is © 2017 by [Patrick Marsceill](http://patrickmarsceill.com).
|
Just the Docs is © 2017-2019 by [Patrick Marsceill](http://patrickmarsceill.com).
|
||||||
|
|
||||||
### License
|
### License
|
||||||
|
|
||||||
@@ -59,9 +77,17 @@ Just the Docs is distributed by an [MIT license](https://github.com/pmarsceill/j
|
|||||||
### Contributing
|
### Contributing
|
||||||
|
|
||||||
When contributing to this repository, please first discuss the change you wish to make via issue,
|
When contributing to this repository, please first discuss the change you wish to make via issue,
|
||||||
email, or any other method with the owners of this repository before making a change. Read more about becoming a contributor in [our GitHub repo][954661c7].
|
email, or any other method with the owners of this repository before making a change. Read more about becoming a contributor in [our GitHub repo](https://github.com/pmarsceill/just-the-docs#contributing).
|
||||||
|
|
||||||
[954661c7]: https://github.com/pmarsceill/just-the-docs/tree/master/CONTRIBUTING.md "Contributing.md on Just the Docs GitHub repository"
|
#### Thank you to the contributors of Just the Docs!
|
||||||
|
|
||||||
|
<ul class="list-style-none">
|
||||||
|
{% for contributor in site.github.contributors %}
|
||||||
|
<li class="d-inline-block mr-1">
|
||||||
|
<a href="{{ contributor.html_url }}"><img src="{{ contributor.avatar_url }}" width="32" height="32" alt="{{ contributor.login }}"/></a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
### Code of Conduct
|
### Code of Conduct
|
||||||
|
|
||||||
|
@@ -2,19 +2,20 @@
|
|||||||
|
|
||||||
Gem::Specification.new do |spec|
|
Gem::Specification.new do |spec|
|
||||||
spec.name = "just-the-docs"
|
spec.name = "just-the-docs"
|
||||||
spec.version = "0.1.2"
|
spec.version = "0.2.7"
|
||||||
spec.authors = ["Patrick Marsceill"]
|
spec.authors = ["Patrick Marsceill"]
|
||||||
spec.email = ["patrick.marsceill@gmail.com"]
|
spec.email = ["patrick.marsceill@gmail.com"]
|
||||||
|
|
||||||
spec.summary = %q{A nice looking, high customizable, responsive Jekyll theme for documention with built-in search.}
|
spec.summary = %q{A modern, highly customizable, and responsive Jekyll theme for documention with built-in search.}
|
||||||
spec.homepage = "https://github.com/pmarsceill/just-the-docs"
|
spec.homepage = "https://github.com/pmarsceill/just-the-docs"
|
||||||
spec.license = "MIT"
|
spec.license = "MIT"
|
||||||
|
|
||||||
spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(assets|bin|_layouts|_includes|lib|Rakefile|_sass|LICENSE|README)}i) }
|
spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(assets|bin|_layouts|_includes|lib|Rakefile|_sass|LICENSE|README)}i) }
|
||||||
spec.executables << 'just-the-docs'
|
spec.executables << 'just-the-docs'
|
||||||
|
|
||||||
spec.add_runtime_dependency "jekyll", "~> 3.3"
|
spec.add_runtime_dependency "jekyll", "~> 3.8.5"
|
||||||
|
spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.0"
|
||||||
|
spec.add_runtime_dependency "rake", "~> 12.3.1"
|
||||||
|
|
||||||
spec.add_development_dependency "bundler", "~> 1.12"
|
spec.add_development_dependency "bundler", "~> 2.0.1"
|
||||||
spec.add_development_dependency "rake", "~> 10.0"
|
|
||||||
end
|
end
|
||||||
|
@@ -2,8 +2,9 @@ namespace :search do
|
|||||||
desc 'Generate the files needed for search functionality'
|
desc 'Generate the files needed for search functionality'
|
||||||
task :init do
|
task :init do
|
||||||
puts 'Creating search data json file...'
|
puts 'Creating search data json file...'
|
||||||
|
mkdir_p 'assets/js'
|
||||||
touch 'assets/js/search-data.json'
|
touch 'assets/js/search-data.json'
|
||||||
content = %Q[{{ page.content | markdownify | strip_html | xml_escape | remove: 'Table of contents' | strip_newlines | replace: '\\', ' ' }}]
|
content = %Q[{{ page.content | markdownify | replace: '</h', ' . </h' | replace: '<hr', ' . <hr' | replace: '</p', ' . </p' | replace: '</ul', ' . </ul' | replace: '</tr', ' . </tr' | replace: '</li', ' | </li' | replace: '</td', ' | </td' | strip_html | escape_once | remove: 'Table of contents' | remove: '```' | remove: '---' | replace: '\', ' ' | replace: ' . . . ', ' . ' | replace: ' . . ', ' . ' | normalize_whitespace }}]
|
||||||
puts 'Done.'
|
puts 'Done.'
|
||||||
puts 'Generating content...'
|
puts 'Generating content...'
|
||||||
|
|
||||||
@@ -11,12 +12,13 @@ namespace :search do
|
|||||||
f.puts '---
|
f.puts '---
|
||||||
---
|
---
|
||||||
{
|
{
|
||||||
{% for page in site.html_pages %}"{{ forloop.index0 }}": {
|
{% assign comma = false %}
|
||||||
"id": "{{ forloop.index0 }}",
|
{% for page in site.html_pages %}{% if page.search_exclude != true %}{% if comma == true%},{% endif %}"{{ forloop.index0 }}": {
|
||||||
"title": "{{ page.title | xml_escape }}",
|
"title": "{{ page.title | replace: '&', '&' }}",
|
||||||
"content": "'+content+'",
|
"content": "'+content+'",
|
||||||
"url": "{{ page.url | xml_escape }}"
|
"url": "{{ page.url | absolute_url }}",
|
||||||
}{% if forloop.last %}{% else %},
|
"relUrl": "{{ page.url }}"
|
||||||
|
}{% assign comma = true %}
|
||||||
{% endif %}{% endfor %}
|
{% endif %}{% endfor %}
|
||||||
}'
|
}'
|
||||||
end
|
end
|
||||||
|
1
node_modules/.bin/JSONStream
generated
vendored
1
node_modules/.bin/JSONStream
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../JSONStream/index.js
|
|
1
node_modules/.bin/browserslist
generated
vendored
1
node_modules/.bin/browserslist
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../browserslist/cli.js
|
|
1
node_modules/.bin/colorguard
generated
vendored
1
node_modules/.bin/colorguard
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../colorguard/bin/colorguard
|
|
1
node_modules/.bin/css-rule-stream
generated
vendored
1
node_modules/.bin/css-rule-stream
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../css-rule-stream/index.js
|
|
1
node_modules/.bin/doiuse
generated
vendored
1
node_modules/.bin/doiuse
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../doiuse/cli.js
|
|
1
node_modules/.bin/esparse
generated
vendored
1
node_modules/.bin/esparse
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../esprima/bin/esparse.js
|
|
1
node_modules/.bin/esvalidate
generated
vendored
1
node_modules/.bin/esvalidate
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../esprima/bin/esvalidate.js
|
|
1
node_modules/.bin/js-yaml
generated
vendored
1
node_modules/.bin/js-yaml
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../js-yaml/bin/js-yaml.js
|
|
1
node_modules/.bin/jsonfilter
generated
vendored
1
node_modules/.bin/jsonfilter
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../jsonfilter/cli.js
|
|
1
node_modules/.bin/semver
generated
vendored
1
node_modules/.bin/semver
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../semver/bin/semver
|
|
1
node_modules/.bin/specificity
generated
vendored
1
node_modules/.bin/specificity
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../specificity/bin/specificity
|
|
1
node_modules/.bin/strip-indent
generated
vendored
1
node_modules/.bin/strip-indent
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../strip-indent/cli.js
|
|
1
node_modules/.bin/stylehacks
generated
vendored
1
node_modules/.bin/stylehacks
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../stylehacks/dist/cli.js
|
|
1
node_modules/.bin/stylelint
generated
vendored
1
node_modules/.bin/stylelint
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../stylelint/bin/stylelint.js
|
|
1
node_modules/.bin/window-size
generated
vendored
1
node_modules/.bin/window-size
generated
vendored
@@ -1 +0,0 @@
|
|||||||
../window-size/cli.js
|
|
2
node_modules/JSONStream/.npmignore
generated
vendored
2
node_modules/JSONStream/.npmignore
generated
vendored
@@ -1,2 +0,0 @@
|
|||||||
node_modules/*
|
|
||||||
node_modules
|
|
4
node_modules/JSONStream/.travis.yml
generated
vendored
4
node_modules/JSONStream/.travis.yml
generated
vendored
@@ -1,4 +0,0 @@
|
|||||||
language: node_js
|
|
||||||
node_js:
|
|
||||||
- "0.8"
|
|
||||||
- "0.10"
|
|
15
node_modules/JSONStream/LICENSE.APACHE2
generated
vendored
15
node_modules/JSONStream/LICENSE.APACHE2
generated
vendored
@@ -1,15 +0,0 @@
|
|||||||
Apache License, Version 2.0
|
|
||||||
|
|
||||||
Copyright (c) 2011 Dominic Tarr
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
24
node_modules/JSONStream/LICENSE.MIT
generated
vendored
24
node_modules/JSONStream/LICENSE.MIT
generated
vendored
@@ -1,24 +0,0 @@
|
|||||||
The MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2011 Dominic Tarr
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge,
|
|
||||||
to any person obtaining a copy of this software and
|
|
||||||
associated documentation files (the "Software"), to
|
|
||||||
deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify,
|
|
||||||
merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom
|
|
||||||
the Software is furnished to do so,
|
|
||||||
subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice
|
|
||||||
shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
||||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
|
||||||
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
||||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
13
node_modules/JSONStream/examples/all_docs.js
generated
vendored
13
node_modules/JSONStream/examples/all_docs.js
generated
vendored
@@ -1,13 +0,0 @@
|
|||||||
var request = require('request')
|
|
||||||
, JSONStream = require('JSONStream')
|
|
||||||
, es = require('event-stream')
|
|
||||||
|
|
||||||
var parser = JSONStream.parse(['rows', true]) //emit parts that match this path (any element of the rows array)
|
|
||||||
, req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'})
|
|
||||||
, logger = es.mapSync(function (data) { //create a stream that logs to stderr,
|
|
||||||
console.error(data)
|
|
||||||
return data
|
|
||||||
})
|
|
||||||
|
|
||||||
req.pipe(parser)
|
|
||||||
parser.pipe(logger)
|
|
192
node_modules/JSONStream/index.js
generated
vendored
192
node_modules/JSONStream/index.js
generated
vendored
@@ -1,192 +0,0 @@
|
|||||||
#! /usr/bin/env node
|
|
||||||
|
|
||||||
var Parser = require('jsonparse')
|
|
||||||
, through = require('through')
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
the value of this.stack that creationix's jsonparse has is weird.
|
|
||||||
|
|
||||||
it makes this code ugly, but his problem is way harder that mine,
|
|
||||||
so i'll forgive him.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
exports.parse = function (path, map) {
|
|
||||||
|
|
||||||
var parser = new Parser()
|
|
||||||
var stream = through(function (chunk) {
|
|
||||||
if('string' === typeof chunk)
|
|
||||||
chunk = new Buffer(chunk)
|
|
||||||
parser.write(chunk)
|
|
||||||
},
|
|
||||||
function (data) {
|
|
||||||
if(data)
|
|
||||||
stream.write(data)
|
|
||||||
stream.queue(null)
|
|
||||||
})
|
|
||||||
|
|
||||||
if('string' === typeof path)
|
|
||||||
path = path.split('.').map(function (e) {
|
|
||||||
if (e === '*')
|
|
||||||
return true
|
|
||||||
else if (e === '') // '..'.split('.') returns an empty string
|
|
||||||
return {recurse: true}
|
|
||||||
else
|
|
||||||
return e
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
var count = 0, _key
|
|
||||||
if(!path || !path.length)
|
|
||||||
path = null
|
|
||||||
|
|
||||||
parser.onValue = function () {
|
|
||||||
if (!this.root && this.stack.length == 1)
|
|
||||||
stream.root = this.value
|
|
||||||
|
|
||||||
if(! path) return
|
|
||||||
|
|
||||||
var i = 0 // iterates on path
|
|
||||||
var j = 0 // iterates on stack
|
|
||||||
while (i < path.length) {
|
|
||||||
var key = path[i]
|
|
||||||
var c
|
|
||||||
j++
|
|
||||||
|
|
||||||
if (key && !key.recurse) {
|
|
||||||
c = (j === this.stack.length) ? this : this.stack[j]
|
|
||||||
if (!c) return
|
|
||||||
if (! check(key, c.key)) return
|
|
||||||
i++
|
|
||||||
} else {
|
|
||||||
i++
|
|
||||||
var nextKey = path[i]
|
|
||||||
if (! nextKey) return
|
|
||||||
while (true) {
|
|
||||||
c = (j === this.stack.length) ? this : this.stack[j]
|
|
||||||
if (!c) return
|
|
||||||
if (check(nextKey, c.key)) { i++; break}
|
|
||||||
j++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (j !== this.stack.length) return
|
|
||||||
|
|
||||||
count ++
|
|
||||||
var data = this.value[this.key]
|
|
||||||
if(null != data)
|
|
||||||
if(null != (data = map ? map(data) : data))
|
|
||||||
stream.queue(data)
|
|
||||||
delete this.value[this.key]
|
|
||||||
}
|
|
||||||
parser._onToken = parser.onToken;
|
|
||||||
|
|
||||||
parser.onToken = function (token, value) {
|
|
||||||
parser._onToken(token, value);
|
|
||||||
if (this.stack.length === 0) {
|
|
||||||
if (stream.root) {
|
|
||||||
if(!path)
|
|
||||||
stream.queue(stream.root)
|
|
||||||
stream.emit('root', stream.root, count)
|
|
||||||
count = 0;
|
|
||||||
stream.root = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
parser.onError = function (err) {
|
|
||||||
stream.emit('error', err)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return stream
|
|
||||||
}
|
|
||||||
|
|
||||||
function check (x, y) {
|
|
||||||
if ('string' === typeof x)
|
|
||||||
return y == x
|
|
||||||
else if (x && 'function' === typeof x.exec)
|
|
||||||
return x.exec(y)
|
|
||||||
else if ('boolean' === typeof x)
|
|
||||||
return x
|
|
||||||
else if ('function' === typeof x)
|
|
||||||
return x(y)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.stringify = function (op, sep, cl, indent) {
|
|
||||||
indent = indent || 0
|
|
||||||
if (op === false){
|
|
||||||
op = ''
|
|
||||||
sep = '\n'
|
|
||||||
cl = ''
|
|
||||||
} else if (op == null) {
|
|
||||||
|
|
||||||
op = '[\n'
|
|
||||||
sep = '\n,\n'
|
|
||||||
cl = '\n]\n'
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//else, what ever you like
|
|
||||||
|
|
||||||
var stream
|
|
||||||
, first = true
|
|
||||||
, anyData = false
|
|
||||||
stream = through(function (data) {
|
|
||||||
anyData = true
|
|
||||||
var json = JSON.stringify(data, null, indent)
|
|
||||||
if(first) { first = false ; stream.queue(op + json)}
|
|
||||||
else stream.queue(sep + json)
|
|
||||||
},
|
|
||||||
function (data) {
|
|
||||||
if(!anyData)
|
|
||||||
stream.queue(op)
|
|
||||||
stream.queue(cl)
|
|
||||||
stream.queue(null)
|
|
||||||
})
|
|
||||||
|
|
||||||
return stream
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.stringifyObject = function (op, sep, cl, indent) {
|
|
||||||
indent = indent || 0
|
|
||||||
if (op === false){
|
|
||||||
op = ''
|
|
||||||
sep = '\n'
|
|
||||||
cl = ''
|
|
||||||
} else if (op == null) {
|
|
||||||
|
|
||||||
op = '{\n'
|
|
||||||
sep = '\n,\n'
|
|
||||||
cl = '\n}\n'
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//else, what ever you like
|
|
||||||
|
|
||||||
var first = true
|
|
||||||
, anyData = false
|
|
||||||
stream = through(function (data) {
|
|
||||||
anyData = true
|
|
||||||
var json = JSON.stringify(data[0]) + ':' + JSON.stringify(data[1], null, indent)
|
|
||||||
if(first) { first = false ; this.queue(op + json)}
|
|
||||||
else this.queue(sep + json)
|
|
||||||
},
|
|
||||||
function (data) {
|
|
||||||
if(!anyData) this.queue(op)
|
|
||||||
this.queue(cl)
|
|
||||||
|
|
||||||
this.queue(null)
|
|
||||||
})
|
|
||||||
|
|
||||||
return stream
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!module.parent && process.title !== 'browser') {
|
|
||||||
process.stdin
|
|
||||||
.pipe(exports.parse(process.argv[2]))
|
|
||||||
.pipe(exports.stringify('[', ',\n', ']\n', 2))
|
|
||||||
.pipe(process.stdout)
|
|
||||||
}
|
|
93
node_modules/JSONStream/package.json
generated
vendored
93
node_modules/JSONStream/package.json
generated
vendored
@@ -1,93 +0,0 @@
|
|||||||
{
|
|
||||||
"_args": [
|
|
||||||
[
|
|
||||||
"JSONStream@^0.8.4",
|
|
||||||
"/Users/pmarsceill/_projects/just-the-docs/node_modules/jsonfilter"
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"_from": "JSONStream@>=0.8.4 <0.9.0",
|
|
||||||
"_id": "JSONStream@0.8.4",
|
|
||||||
"_inCache": true,
|
|
||||||
"_installable": true,
|
|
||||||
"_location": "/JSONStream",
|
|
||||||
"_npmUser": {
|
|
||||||
"email": "dominic.tarr@gmail.com",
|
|
||||||
"name": "dominictarr"
|
|
||||||
},
|
|
||||||
"_npmVersion": "1.4.9",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"name": "JSONStream",
|
|
||||||
"raw": "JSONStream@^0.8.4",
|
|
||||||
"rawSpec": "^0.8.4",
|
|
||||||
"scope": null,
|
|
||||||
"spec": ">=0.8.4 <0.9.0",
|
|
||||||
"type": "range"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/jsonfilter"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.8.4.tgz",
|
|
||||||
"_shasum": "91657dfe6ff857483066132b4618b62e8f4887bd",
|
|
||||||
"_shrinkwrap": null,
|
|
||||||
"_spec": "JSONStream@^0.8.4",
|
|
||||||
"_where": "/Users/pmarsceill/_projects/just-the-docs/node_modules/jsonfilter",
|
|
||||||
"author": {
|
|
||||||
"email": "dominic.tarr@gmail.com",
|
|
||||||
"name": "Dominic Tarr",
|
|
||||||
"url": "http://bit.ly/dominictarr"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"JSONStream": "./index.js"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/dominictarr/JSONStream/issues"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"jsonparse": "0.0.5",
|
|
||||||
"through": ">=2.2.7 <3"
|
|
||||||
},
|
|
||||||
"description": "rawStream.pipe(JSONStream.parse()).pipe(streamOfObjects)",
|
|
||||||
"devDependencies": {
|
|
||||||
"assertions": "~2.2.2",
|
|
||||||
"event-stream": "~0.7.0",
|
|
||||||
"it-is": "~1",
|
|
||||||
"render": "~0.1.1",
|
|
||||||
"tape": "~2.12.3",
|
|
||||||
"trees": "~0.0.3"
|
|
||||||
},
|
|
||||||
"directories": {},
|
|
||||||
"dist": {
|
|
||||||
"shasum": "91657dfe6ff857483066132b4618b62e8f4887bd",
|
|
||||||
"tarball": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.8.4.tgz"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "*"
|
|
||||||
},
|
|
||||||
"homepage": "http://github.com/dominictarr/JSONStream",
|
|
||||||
"keywords": [
|
|
||||||
"async",
|
|
||||||
"json",
|
|
||||||
"parser",
|
|
||||||
"parsing",
|
|
||||||
"stream",
|
|
||||||
"streaming"
|
|
||||||
],
|
|
||||||
"maintainers": [
|
|
||||||
{
|
|
||||||
"name": "dominictarr",
|
|
||||||
"email": "dominic.tarr@gmail.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"name": "JSONStream",
|
|
||||||
"optionalDependencies": {},
|
|
||||||
"readme": "ERROR: No README data found!",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git://github.com/dominictarr/JSONStream.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "set -e; for t in test/*.js; do echo '***' $t '***'; node $t; done"
|
|
||||||
},
|
|
||||||
"version": "0.8.4"
|
|
||||||
}
|
|
178
node_modules/JSONStream/readme.markdown
generated
vendored
178
node_modules/JSONStream/readme.markdown
generated
vendored
@@ -1,178 +0,0 @@
|
|||||||
# JSONStream
|
|
||||||
|
|
||||||
streaming JSON.parse and stringify
|
|
||||||
|
|
||||||
<img src=https://secure.travis-ci.org/dominictarr/JSONStream.png?branch=master>
|
|
||||||
|
|
||||||
## example
|
|
||||||
|
|
||||||
``` js
|
|
||||||
|
|
||||||
var request = require('request')
|
|
||||||
, JSONStream = require('JSONStream')
|
|
||||||
, es = require('event-stream')
|
|
||||||
|
|
||||||
request({url: 'http://isaacs.couchone.com/registry/_all_docs'})
|
|
||||||
.pipe(JSONStream.parse('rows.*'))
|
|
||||||
.pipe(es.mapSync(function (data) {
|
|
||||||
console.error(data)
|
|
||||||
return data
|
|
||||||
}))
|
|
||||||
```
|
|
||||||
|
|
||||||
## JSONStream.parse(path)
|
|
||||||
|
|
||||||
parse stream of values that match a path
|
|
||||||
|
|
||||||
``` js
|
|
||||||
JSONStream.parse('rows.*.doc')
|
|
||||||
```
|
|
||||||
|
|
||||||
The `..` operator is the recursive descent operator from [JSONPath](http://goessner.net/articles/JsonPath/), which will match a child at any depth (see examples below).
|
|
||||||
|
|
||||||
If your keys have keys that include `.` or `*` etc, use an array instead.
|
|
||||||
`['row', true, /^doc/]`.
|
|
||||||
|
|
||||||
If you use an array, `RegExp`s, booleans, and/or functions. The `..` operator is also available in array representation, using `{recurse: true}`.
|
|
||||||
any object that matches the path will be emitted as 'data' (and `pipe`d down stream)
|
|
||||||
|
|
||||||
If `path` is empty or null, no 'data' events are emitted.
|
|
||||||
|
|
||||||
### Examples
|
|
||||||
|
|
||||||
query a couchdb view:
|
|
||||||
|
|
||||||
``` bash
|
|
||||||
curl -sS localhost:5984/tests/_all_docs&include_docs=true
|
|
||||||
```
|
|
||||||
you will get something like this:
|
|
||||||
|
|
||||||
``` js
|
|
||||||
{"total_rows":129,"offset":0,"rows":[
|
|
||||||
{ "id":"change1_0.6995461115147918"
|
|
||||||
, "key":"change1_0.6995461115147918"
|
|
||||||
, "value":{"rev":"1-e240bae28c7bb3667f02760f6398d508"}
|
|
||||||
, "doc":{
|
|
||||||
"_id": "change1_0.6995461115147918"
|
|
||||||
, "_rev": "1-e240bae28c7bb3667f02760f6398d508","hello":1}
|
|
||||||
},
|
|
||||||
{ "id":"change2_0.6995461115147918"
|
|
||||||
, "key":"change2_0.6995461115147918"
|
|
||||||
, "value":{"rev":"1-13677d36b98c0c075145bb8975105153"}
|
|
||||||
, "doc":{
|
|
||||||
"_id":"change2_0.6995461115147918"
|
|
||||||
, "_rev":"1-13677d36b98c0c075145bb8975105153"
|
|
||||||
, "hello":2
|
|
||||||
}
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
we are probably most interested in the `rows.*.docs`
|
|
||||||
|
|
||||||
create a `Stream` that parses the documents from the feed like this:
|
|
||||||
|
|
||||||
``` js
|
|
||||||
var stream = JSONStream.parse(['rows', true, 'doc']) //rows, ANYTHING, doc
|
|
||||||
|
|
||||||
stream.on('data', function(data) {
|
|
||||||
console.log('received:', data);
|
|
||||||
});
|
|
||||||
|
|
||||||
stream.on('root', function(root, count) {
|
|
||||||
if (!count) {
|
|
||||||
console.log('no matches found:', root);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
```
|
|
||||||
awesome!
|
|
||||||
|
|
||||||
### recursive patterns (..)
|
|
||||||
|
|
||||||
`JSONStream.parser('docs..value')`
|
|
||||||
(or `JSONStream.parser(['docs', {recurse: true}, 'value'])` using an array)
|
|
||||||
will emit every `value` object that is a child, grand-child, etc. of the
|
|
||||||
`docs` object. In this example, it will match exactly 5 times at various depth
|
|
||||||
levels, emitting 0, 1, 2, 3 and 4 as results.
|
|
||||||
|
|
||||||
```js
|
|
||||||
{
|
|
||||||
"total": 5,
|
|
||||||
"docs": [
|
|
||||||
{
|
|
||||||
"key": {
|
|
||||||
"value": 0,
|
|
||||||
"some": "property"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{"value": 1},
|
|
||||||
{"value": 2},
|
|
||||||
{"blbl": [{}, {"a":0, "b":1, "value":3}, 10]},
|
|
||||||
{"value": 4}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## JSONStream.parse(pattern, map)
|
|
||||||
|
|
||||||
provide a function that can be used to map or filter
|
|
||||||
the json output. `map` is passed the value at that node of the pattern,
|
|
||||||
if `map` return non-nullish (anything but `null` or `undefined`)
|
|
||||||
that value will be emitted in the stream. If it returns a nullish value,
|
|
||||||
nothing will be emitted.
|
|
||||||
|
|
||||||
## JSONStream.stringify(open, sep, close)
|
|
||||||
|
|
||||||
Create a writable stream.
|
|
||||||
|
|
||||||
you may pass in custom `open`, `close`, and `seperator` strings.
|
|
||||||
But, by default, `JSONStream.stringify()` will create an array,
|
|
||||||
(with default options `open='[\n', sep='\n,\n', close='\n]\n'`)
|
|
||||||
|
|
||||||
If you call `JSONStream.stringify(false)`
|
|
||||||
the elements will only be seperated by a newline.
|
|
||||||
|
|
||||||
If you only write one item this will be valid JSON.
|
|
||||||
|
|
||||||
If you write many items,
|
|
||||||
you can use a `RegExp` to split it into valid chunks.
|
|
||||||
|
|
||||||
## JSONStream.stringifyObject(open, sep, close)
|
|
||||||
|
|
||||||
Very much like `JSONStream.stringify`,
|
|
||||||
but creates a writable stream for objects instead of arrays.
|
|
||||||
|
|
||||||
Accordingly, `open='{\n', sep='\n,\n', close='\n}\n'`.
|
|
||||||
|
|
||||||
When you `.write()` to the stream you must supply an array with `[ key, data ]`
|
|
||||||
as the first argument.
|
|
||||||
|
|
||||||
## unix tool
|
|
||||||
|
|
||||||
query npm to see all the modules that browserify has ever depended on.
|
|
||||||
|
|
||||||
``` bash
|
|
||||||
curl https://registry.npmjs.org/browserify | JSONStream 'versions.*.dependencies'
|
|
||||||
```
|
|
||||||
|
|
||||||
## numbers
|
|
||||||
|
|
||||||
There are occasional problems parsing and unparsing very precise numbers.
|
|
||||||
|
|
||||||
I have opened an issue here:
|
|
||||||
|
|
||||||
https://github.com/creationix/jsonparse/issues/2
|
|
||||||
|
|
||||||
+1
|
|
||||||
|
|
||||||
## Acknowlegements
|
|
||||||
|
|
||||||
this module depends on https://github.com/creationix/jsonparse
|
|
||||||
by Tim Caswell
|
|
||||||
and also thanks to Florent Jaby for teaching me about parsing with:
|
|
||||||
https://github.com/Floby/node-json-streams
|
|
||||||
|
|
||||||
## license
|
|
||||||
|
|
||||||
MIT / APACHE2
|
|
41
node_modules/JSONStream/test/bool.js
generated
vendored
41
node_modules/JSONStream/test/bool.js
generated
vendored
@@ -1,41 +0,0 @@
|
|||||||
|
|
||||||
var fs = require ('fs')
|
|
||||||
, join = require('path').join
|
|
||||||
, file = join(__dirname, 'fixtures','all_npm.json')
|
|
||||||
, JSONStream = require('../')
|
|
||||||
, it = require('it-is').style('colour')
|
|
||||||
|
|
||||||
function randomObj () {
|
|
||||||
return (
|
|
||||||
Math.random () < 0.4
|
|
||||||
? {hello: 'eonuhckmqjk',
|
|
||||||
whatever: 236515,
|
|
||||||
lies: true,
|
|
||||||
nothing: [null],
|
|
||||||
// stuff: [Math.random(),Math.random(),Math.random()]
|
|
||||||
}
|
|
||||||
: ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]]
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
var expected = []
|
|
||||||
, stringify = JSONStream.stringify()
|
|
||||||
, es = require('event-stream')
|
|
||||||
, stringified = ''
|
|
||||||
, called = 0
|
|
||||||
, count = 10
|
|
||||||
, ended = false
|
|
||||||
|
|
||||||
while (count --)
|
|
||||||
expected.push(randomObj())
|
|
||||||
|
|
||||||
es.connect(
|
|
||||||
es.readArray(expected),
|
|
||||||
stringify,
|
|
||||||
JSONStream.parse([true]),
|
|
||||||
es.writeArray(function (err, lines) {
|
|
||||||
|
|
||||||
it(lines).has(expected)
|
|
||||||
console.error('PASSED')
|
|
||||||
})
|
|
||||||
)
|
|
18
node_modules/JSONStream/test/browser.js
generated
vendored
18
node_modules/JSONStream/test/browser.js
generated
vendored
@@ -1,18 +0,0 @@
|
|||||||
var test = require('tape')
|
|
||||||
var JSONStream = require('../')
|
|
||||||
var testData = '{"rows":[{"hello":"world"}, {"foo": "bar"}]}'
|
|
||||||
|
|
||||||
test('basic parsing', function (t) {
|
|
||||||
t.plan(2)
|
|
||||||
var parsed = JSONStream.parse("rows.*")
|
|
||||||
var parsedKeys = {}
|
|
||||||
parsed.on('data', function(match) {
|
|
||||||
parsedKeys[Object.keys(match)[0]] = true
|
|
||||||
})
|
|
||||||
parsed.on('end', function() {
|
|
||||||
t.equal(!!parsedKeys['hello'], true)
|
|
||||||
t.equal(!!parsedKeys['foo'], true)
|
|
||||||
})
|
|
||||||
parsed.write(testData)
|
|
||||||
parsed.end()
|
|
||||||
})
|
|
27
node_modules/JSONStream/test/destroy_missing.js
generated
vendored
27
node_modules/JSONStream/test/destroy_missing.js
generated
vendored
@@ -1,27 +0,0 @@
|
|||||||
var fs = require ('fs');
|
|
||||||
var net = require('net');
|
|
||||||
var join = require('path').join;
|
|
||||||
var file = join(__dirname, 'fixtures','all_npm.json');
|
|
||||||
var JSONStream = require('../');
|
|
||||||
|
|
||||||
|
|
||||||
var server = net.createServer(function(client) {
|
|
||||||
var parser = JSONStream.parse([]);
|
|
||||||
parser.on('end', function() {
|
|
||||||
console.log('close')
|
|
||||||
console.error('PASSED');
|
|
||||||
server.close();
|
|
||||||
});
|
|
||||||
client.pipe(parser);
|
|
||||||
var n = 4
|
|
||||||
client.on('data', function () {
|
|
||||||
if(--n) return
|
|
||||||
client.end();
|
|
||||||
})
|
|
||||||
});
|
|
||||||
server.listen(9999);
|
|
||||||
|
|
||||||
|
|
||||||
var client = net.connect({ port : 9999 }, function() {
|
|
||||||
fs.createReadStream(file).pipe(client).on('data', console.log) //.resume();
|
|
||||||
});
|
|
29
node_modules/JSONStream/test/doubledot1.js
generated
vendored
29
node_modules/JSONStream/test/doubledot1.js
generated
vendored
@@ -1,29 +0,0 @@
|
|||||||
var fs = require ('fs')
|
|
||||||
, join = require('path').join
|
|
||||||
, file = join(__dirname, 'fixtures','all_npm.json')
|
|
||||||
, JSONStream = require('../')
|
|
||||||
, it = require('it-is')
|
|
||||||
|
|
||||||
var expected = JSON.parse(fs.readFileSync(file))
|
|
||||||
, parser = JSONStream.parse('rows..rev')
|
|
||||||
, called = 0
|
|
||||||
, ended = false
|
|
||||||
, parsed = []
|
|
||||||
|
|
||||||
fs.createReadStream(file).pipe(parser)
|
|
||||||
|
|
||||||
parser.on('data', function (data) {
|
|
||||||
called ++
|
|
||||||
parsed.push(data)
|
|
||||||
})
|
|
||||||
|
|
||||||
parser.on('end', function () {
|
|
||||||
ended = true
|
|
||||||
})
|
|
||||||
|
|
||||||
process.on('exit', function () {
|
|
||||||
it(called).equal(expected.rows.length)
|
|
||||||
for (var i = 0 ; i < expected.rows.length ; i++)
|
|
||||||
it(parsed[i]).deepEqual(expected.rows[i].value.rev)
|
|
||||||
console.error('PASSED')
|
|
||||||
})
|
|
29
node_modules/JSONStream/test/doubledot2.js
generated
vendored
29
node_modules/JSONStream/test/doubledot2.js
generated
vendored
@@ -1,29 +0,0 @@
|
|||||||
var fs = require ('fs')
|
|
||||||
, join = require('path').join
|
|
||||||
, file = join(__dirname, 'fixtures','depth.json')
|
|
||||||
, JSONStream = require('../')
|
|
||||||
, it = require('it-is')
|
|
||||||
|
|
||||||
var expected = JSON.parse(fs.readFileSync(file))
|
|
||||||
, parser = JSONStream.parse(['docs', {recurse: true}, 'value'])
|
|
||||||
, called = 0
|
|
||||||
, ended = false
|
|
||||||
, parsed = []
|
|
||||||
|
|
||||||
fs.createReadStream(file).pipe(parser)
|
|
||||||
|
|
||||||
parser.on('data', function (data) {
|
|
||||||
called ++
|
|
||||||
parsed.push(data)
|
|
||||||
})
|
|
||||||
|
|
||||||
parser.on('end', function () {
|
|
||||||
ended = true
|
|
||||||
})
|
|
||||||
|
|
||||||
process.on('exit', function () {
|
|
||||||
it(called).equal(5)
|
|
||||||
for (var i = 0 ; i < 5 ; i++)
|
|
||||||
it(parsed[i]).deepEqual(i)
|
|
||||||
console.error('PASSED')
|
|
||||||
})
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user