jekyll-help-center-theme 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +68 -0
- data/_includes/breadcrumbs.html +22 -0
- data/_includes/footer.html +12 -0
- data/_includes/head.html +39 -0
- data/_includes/header.html +24 -0
- data/_includes/menu.html +28 -0
- data/_includes/minutes-to-read.html +7 -0
- data/_includes/posts.html +32 -0
- data/_layouts/default.html +22 -0
- data/_layouts/page.html +7 -0
- data/_layouts/post.html +53 -0
- data/assets/fonts/feather.eot +0 -0
- data/assets/fonts/feather.svg +250 -0
- data/assets/fonts/feather.ttf +0 -0
- data/assets/fonts/feather.woff +0 -0
- data/assets/img/1.gif +0 -0
- data/assets/img/2.gif +0 -0
- data/assets/img/3.gif +0 -0
- data/assets/img/4.gif +0 -0
- data/assets/img/favicon.png +0 -0
- data/assets/img/image.jpg +0 -0
- data/assets/img/image.png +0 -0
- data/assets/img/pattern.svg +47 -0
- data/assets/img/pattern2.svg +135 -0
- data/assets/img/readme/black.png +0 -0
- data/assets/img/readme/blue.png +0 -0
- data/assets/img/readme/gif.gif +0 -0
- data/assets/img/readme/purple.png +0 -0
- data/assets/img/readme/red.png +0 -0
- data/assets/img/readme/responsive.png +0 -0
- data/assets/js/simple-jekyll-search.js +413 -0
- data/assets/js/simple-jekyll-search.min.js +6 -0
- metadata +119 -0
|
Binary file
|
|
Binary file
|
data/assets/img/1.gif
ADDED
|
Binary file
|
data/assets/img/2.gif
ADDED
|
Binary file
|
data/assets/img/3.gif
ADDED
|
Binary file
|
data/assets/img/4.gif
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<svg version="1.1"
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
3
|
+
xmlns:xlink="http://www.w3.org/1999/xlink" id="snapshot-14864" width="250" height="250" viewBox="0 0 250 250"><desc>This image was made on Patterninja.com</desc><defs>
|
|
4
|
+
<!-- image 21419 -->
|
|
5
|
+
<g id="transformed-21419" data-image="21419" transform="translate(157.87956044287793, 176.87956044287793) rotate(15, 29.120439557122072, 29.120439557122072)"><g><svg version="1.1" width="58.240879114244144px" height="58.240879114244144px" viewBox="0 0 58.240879114244144 58.240879114244144"><g id="original-21419"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 442.762 442.762" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" preserveAspectRatio="xMidYMid meet">
|
|
6
|
+
<path d="M237.082 31.617c-113.596 0-205.68 84.96-205.68 189.764 0 28.473 6.809 55.473 18.986 79.711L1.736 389.064a13.883 13.883 0 0 0 15.824 20.108l106.506-29.232c32.432 19.719 71.266 31.205 113.016 31.205 113.594 0 205.68-84.959 205.68-189.764 0-104.804-92.086-189.764-205.68-189.764zm-.345 287.256c-11.227 0-20.356-9.132-20.356-20.357s9.131-20.357 20.356-20.357c11.227 0 20.357 9.133 20.357 20.357.002 11.224-9.129 20.357-20.357 20.357zm21.327-96.839c-2.674 1.828-4.522 3.175-5.522 4.021v21.272c0 8.712-7.091 15.8-15.802 15.8-8.715 0-15.802-7.088-15.802-15.8v-22.918c0-15.281 11.152-22.903 19.296-28.467 8.789-6.005 14.595-9.972 14.595-22.361 0-9.975-8.113-18.09-18.089-18.09-9.977 0-18.089 8.115-18.089 18.09 0 8.713-7.09 15.801-15.803 15.801-8.713 0-15.803-7.088-15.803-15.801 0-27.4 22.293-49.692 49.694-49.692 27.398 0 49.691 22.292 49.691 49.692.002 29.072-17.756 41.206-28.366 48.453z" fill="rgba(0, 0, 0, .1)" stroke="none"/>
|
|
7
|
+
</svg>
|
|
8
|
+
</g></svg></g></g>
|
|
9
|
+
<!-- /image 21419 -->
|
|
10
|
+
|
|
11
|
+
<!-- image 46719 -->
|
|
12
|
+
<g id="transformed-46719" data-image="46719" transform="translate(125.83700578687261, 3.837005786872581) rotate(355, 49.16299421312739, 49.16299421312742)"><g><svg version="1.1" width="98.32598842625478px" height="98.32598842625484px" viewBox="0 0 98.32598842625478 98.32598842625484"><g id="original-46719"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" preserveAspectRatio="xMidYMid meet">
|
|
13
|
+
<path d="M453.708 186.943H288.512c.569-3.022.869-6.105.869-9.245V76.216c0-27.432-22.317-49.748-49.748-49.748H49.737C22.311 26.468 0 48.784 0 76.216v101.482c0 27.425 22.311 49.736 49.737 49.736h29.221l-1.577 36.738a8.869 8.869 0 0 0 13.681 7.826l68.856-44.565h8.724a58.065 58.065 0 0 0-2.786 17.786v122.676c0 32.134 26.143 58.278 58.278 58.278h25.178l55.514 56.695a8.864 8.864 0 0 0 9.277 2.161 8.867 8.867 0 0 0 5.884-7.491l5.097-51.365h128.625c32.143 0 58.292-26.144 58.292-58.278V245.22c-.001-32.135-26.151-58.277-58.293-58.277zM177.98 209.696h-20.683c-1.71 0-3.383.494-4.819 1.424l-56.639 36.658 1.238-28.832a8.873 8.873 0 0 0-8.86-9.25H49.738c-17.645 0-32.001-14.354-32.001-31.998V76.216c0-17.651 14.356-32.01 32-32.01h189.898c17.651 0 32.01 14.36 32.01 32.01v101.482c0 3.177-.459 6.27-1.36 9.245h-46.152c-18.771 0-35.486 8.929-46.153 22.753zm316.284 158.199c0 22.354-18.193 40.541-40.555 40.541H317.05a8.869 8.869 0 0 0-8.826 7.994l-4.013 40.459-44.834-45.788a8.865 8.865 0 0 0-6.336-2.664h-28.906c-22.354 0-40.541-18.187-40.541-40.541V245.22c0-22.354 18.187-40.54 40.541-40.54H453.71v-.001c22.362 0 40.555 18.186 40.555 40.54v122.676z" fill="rgba(0, 0, 0, .1)" stroke="none"/>
|
|
14
|
+
<path d="M183.31 93.756c-1.206-19.413-16.755-34.962-36.168-36.167-10.807-.668-21.086 3.028-28.949 10.418-7.754 7.287-12.199 17.566-12.199 28.201-.001 4.9 3.968 8.87 8.868 8.87s8.869-3.971 8.869-8.869c0-5.846 2.347-11.27 6.609-15.277 4.258-4.002 9.836-6.005 15.702-5.641 10.329.641 18.922 9.234 19.564 19.562.484 7.802-3.346 15.177-9.997 19.249-12.391 7.585-19.789 20.693-19.789 35.065 0 4.898 3.97 8.869 8.869 8.869s8.869-3.971 8.869-8.869c0-8.149 4.229-15.601 11.312-19.937 12.265-7.507 19.332-21.101 18.44-35.474z" fill="rgba(0, 0, 0, .1)" stroke="none"/>
|
|
15
|
+
<path d="M338.925 240.4a8.869 8.869 0 0 0-8.869 8.869v75.063a8.87 8.87 0 0 0 17.738 0v-75.063a8.87 8.87 0 0 0-8.869-8.869z" fill="rgba(0, 0, 0, .1)" stroke="none"/>
|
|
16
|
+
<circle cx="338.916" cy="364.068" r="8.869" fill="rgba(0, 0, 0, .1)" stroke="none"/>
|
|
17
|
+
<circle cx="144.679" cy="182.046" r="8.869" fill="rgba(0, 0, 0, .1)" stroke="none"/>
|
|
18
|
+
</svg>
|
|
19
|
+
</g></svg></g></g>
|
|
20
|
+
<!-- /image 46719 -->
|
|
21
|
+
|
|
22
|
+
<!-- image 57142 -->
|
|
23
|
+
<g id="transformed-57142" data-image="57142" transform="translate(-7, -38) rotate(0, 42, 42)"><g><svg version="1.1" width="84px" height="84px" viewBox="0 0 84 84"><g id="original-57142"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 612 612" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" preserveAspectRatio="xMidYMid meet">
|
|
24
|
+
<path d="M230.724 181.208a1489.01 1489.01 0 0 1-5.119 5.508c2.17-2.337 5.119-5.508 5.119-5.508z" fill="rgba(0, 0, 0, .1)" stroke="none"/>
|
|
25
|
+
<path d="M336.962 200.875c7.956 9.792 11.906 21.337 11.906 34.634 0 9.514-2.727 18.666-8.151 27.512-2.977 5.007-6.898 9.848-11.795 14.465l-16.301 16.107c-15.634 15.356-25.732 28.958-30.35 40.865-4.618 11.878-6.927 27.54-6.927 46.957h36.275c0-17.108 1.947-30.044 5.814-38.807 3.866-8.763 12.323-19.444 25.37-32.102 17.942-17.387 29.849-30.572 35.746-39.53s8.874-20.641 8.874-35.051c0-23.756-8.039-43.285-24.146-58.585-16.106-15.3-37.526-22.922-64.288-22.922-28.931 0-51.686 8.929-68.266 26.789s-24.87 41.449-24.87 70.797h36.275c.667-17.665 3.478-31.184 8.346-40.559 8.679-16.83 24.369-25.259 47.068-25.259 18.333.001 31.491 4.897 39.42 14.689z" fill="rgba(0, 0, 0, .1)" stroke="none"/>
|
|
26
|
+
<path d="M612 306C612 137.004 474.995 0 306 0 137.004 0 0 137.004 0 306c0 168.995 137.004 306 306 306 168.995 0 306-137.005 306-306zm-584.182 0C27.818 152.36 152.36 27.818 306 27.818S584.182 152.36 584.182 306 459.64 584.182 306 584.182 27.818 459.64 27.818 306z" fill="rgba(0, 0, 0, .1)" stroke="none"/>
|
|
27
|
+
<path d="M274.51 415.214h40.559v42.367H274.51z" fill="rgba(0, 0, 0, .1)" stroke="none"/>
|
|
28
|
+
</svg>
|
|
29
|
+
</g></svg></g></g>
|
|
30
|
+
<!-- /image 57142 -->
|
|
31
|
+
|
|
32
|
+
<!-- image 00584 -->
|
|
33
|
+
<g id="transformed-00584" data-image="00584" transform="translate(-6.4630924234556275, 95.53690757654437) rotate(336, 30.463092423455628, 30.463092423455635)"><g><svg version="1.1" width="60.926184846911255px" height="60.92618484691127px" viewBox="0 0 60.926184846911255 60.92618484691127"><g id="original-00584"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 510 510" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" preserveAspectRatio="xMidYMid meet">
|
|
34
|
+
<path d="M255 0C114.75 0 0 114.75 0 255s114.75 255 255 255 255-114.75 255-255S395.25 0 255 0zm25.5 433.5h-51v-51h51v51zm53.55-196.35L311.1 260.1c-20.399 17.851-30.6 33.15-30.6 71.4h-51v-12.75c0-28.05 10.2-53.55 30.6-71.4l30.6-33.15c10.2-7.65 15.3-20.4 15.3-35.7 0-28.05-22.95-51-51-51s-51 22.95-51 51h-51c0-56.1 45.9-102 102-102s102 45.9 102 102c0 22.95-10.2 43.35-22.95 58.65z" fill="rgba(0, 0, 0, .1)" stroke="none"/>
|
|
35
|
+
</svg>
|
|
36
|
+
</g></svg></g></g>
|
|
37
|
+
<!-- /image 00584 -->
|
|
38
|
+
|
|
39
|
+
<!-- image 79911 -->
|
|
40
|
+
<g id="transformed-79911" data-image="79911" transform="translate(104.59936306378484, 103.59936306378484) rotate(9, 31.400636936215157, 31.400636936215164)"><g><svg version="1.1" width="62.801273872430315px" height="62.80127387243033px" viewBox="0 0 62.801273872430315 62.80127387243033"><g id="original-79911"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 511.999 511.999" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" preserveAspectRatio="xMidYMid meet">
|
|
41
|
+
<path d="M256 0C134.684 0 36 96.243 36 215.851c0 68.63 33.021 132.639 88.879 173.334V492a20 20 0 0 0 33.539 14.72l82.144-75.555c5.17.355 10.335.535 15.438.535 121.316 0 220-96.243 220-215.851C476 96.13 377.21 0 256 0zm0 391.701c-6.687 0-13.516-.376-20.298-1.118a19.977 19.977 0 0 0-15.715 5.161l-55.108 50.687v-67.726a20.002 20.002 0 0 0-9.034-16.726C105.848 329.2 76 274.573 76 215.851 76 118.886 156.747 40 256 40s180 78.886 180 175.851c0 96.963-80.748 175.85-180 175.85z" fill="rgba(0, 0, 0, .1)" stroke="none"/>
|
|
42
|
+
<path d="M266 98.877h-70c-11.046 0-20 8.954-20 20s8.954 20 20 20h70c16.542 0 30 13.458 30 30s-13.458 30-30 30h-20c-11.046 0-20 8.954-20 20v28.793c0 11.046 8.954 20 20 20s20-8.954 20-20v-8.793c38.598 0 70-31.401 70-70 0-38.598-31.402-70-70-70z" fill="rgba(0, 0, 0, .1)" stroke="none"/>
|
|
43
|
+
<circle cx="246" cy="319.16" r="27" fill="rgba(0, 0, 0, .1)" stroke="none"/>
|
|
44
|
+
</svg>
|
|
45
|
+
</g></svg></g></g>
|
|
46
|
+
<!-- /image 79911 -->
|
|
47
|
+
</defs><rect x="0" y="0" width="250" height="250" fill="rgba(196, 63, 63, 0)"></rect><use xlink:href="#transformed-21419" transform="translate(-250, -250)"></use><use xlink:href="#transformed-21419" transform="translate(0, -250)"></use><use xlink:href="#transformed-21419" transform="translate(250, -250)"></use><use xlink:href="#transformed-21419" transform="translate(-250, 0)"></use><use xlink:href="#transformed-21419" transform="translate(0, 0)"></use><use xlink:href="#transformed-21419" transform="translate(250, 0)"></use><use xlink:href="#transformed-21419" transform="translate(-250, 250)"></use><use xlink:href="#transformed-21419" transform="translate(0, 250)"></use><use xlink:href="#transformed-21419" transform="translate(250, 250)"></use><use xlink:href="#transformed-46719" transform="translate(-250, -250)"></use><use xlink:href="#transformed-46719" transform="translate(0, -250)"></use><use xlink:href="#transformed-46719" transform="translate(250, -250)"></use><use xlink:href="#transformed-46719" transform="translate(-250, 0)"></use><use xlink:href="#transformed-46719" transform="translate(0, 0)"></use><use xlink:href="#transformed-46719" transform="translate(250, 0)"></use><use xlink:href="#transformed-46719" transform="translate(-250, 250)"></use><use xlink:href="#transformed-46719" transform="translate(0, 250)"></use><use xlink:href="#transformed-46719" transform="translate(250, 250)"></use><use xlink:href="#transformed-57142" transform="translate(-250, -250)"></use><use xlink:href="#transformed-57142" transform="translate(0, -250)"></use><use xlink:href="#transformed-57142" transform="translate(250, -250)"></use><use xlink:href="#transformed-57142" transform="translate(-250, 0)"></use><use xlink:href="#transformed-57142" transform="translate(0, 0)"></use><use xlink:href="#transformed-57142" transform="translate(250, 0)"></use><use xlink:href="#transformed-57142" transform="translate(-250, 250)"></use><use xlink:href="#transformed-57142" transform="translate(0, 250)"></use><use xlink:href="#transformed-57142" transform="translate(250, 250)"></use><use xlink:href="#transformed-00584" transform="translate(-250, -250)"></use><use xlink:href="#transformed-00584" transform="translate(0, -250)"></use><use xlink:href="#transformed-00584" transform="translate(250, -250)"></use><use xlink:href="#transformed-00584" transform="translate(-250, 0)"></use><use xlink:href="#transformed-00584" transform="translate(0, 0)"></use><use xlink:href="#transformed-00584" transform="translate(250, 0)"></use><use xlink:href="#transformed-00584" transform="translate(-250, 250)"></use><use xlink:href="#transformed-00584" transform="translate(0, 250)"></use><use xlink:href="#transformed-00584" transform="translate(250, 250)"></use><use xlink:href="#transformed-79911" transform="translate(-250, -250)"></use><use xlink:href="#transformed-79911" transform="translate(0, -250)"></use><use xlink:href="#transformed-79911" transform="translate(250, -250)"></use><use xlink:href="#transformed-79911" transform="translate(-250, 0)"></use><use xlink:href="#transformed-79911" transform="translate(0, 0)"></use><use xlink:href="#transformed-79911" transform="translate(250, 0)"></use><use xlink:href="#transformed-79911" transform="translate(-250, 250)"></use><use xlink:href="#transformed-79911" transform="translate(0, 250)"></use><use xlink:href="#transformed-79911" transform="translate(250, 250)"></use></svg>
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" id="Camada_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 288.8 167" style="fill: rgba(0,0,0,.1);" xml:space="preserve">
|
|
5
|
+
<g>
|
|
6
|
+
<g>
|
|
7
|
+
<g>
|
|
8
|
+
<path d="M55.4,78.6c-12.6-2.3-24.7,5.7-27,18.1c-1.3,7.1,0.9,14.4,5.8,19.7l-2,10.6c-0.2,0.8,0.2,1.7,0.9,2.1
|
|
9
|
+
c0.7,0.5,1.6,0.5,2.3,0l10-6.2c0.5,0.1,1.1,0.3,1.6,0.4c12.6,2.3,24.7-5.7,27-18.1C76.3,92.8,68,80.9,55.4,78.6z M47.8,119.1
|
|
10
|
+
c-0.7-0.1-1.4-0.3-2.1-0.5c-0.6-0.2-1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3.1-1.5c0.2,0,0.5,0,0.8,0l17.7-1c2.1-0.1,3.7-1.9,3.6-4.1L151.2,57.5L151.2,57.5z"/>
|
|
63
|
+
</g>
|
|
64
|
+
<g>
|
|
65
|
+
<path d="M124.3,126.6c6,3,10.5,8.7,7.2,15.3c-3,6.1-11.2,4.9-13.8,6.4c-1.9,1.1-2.7,3.5-5.8,2c-2-1-2.2-3.1-1.4-4.6
|
|
66
|
+
c2.8-5.6,11.6-2.7,13.9-7.3c1.3-2.5,0.3-4.9-2.5-6.3c-6-3-6.7,4.3-11.2,2.1c-1.6-0.8-2.5-2.5-1.6-4.4
|
|
67
|
+
C111.4,125.2,118.6,123.8,124.3,126.6z M110.6,153.4c2.1,1.1,3,3.6,1.9,5.7s-3.6,3-5.7,1.9c-2.1-1.1-3-3.6-1.9-5.7
|
|
68
|
+
C105.9,153.2,108.5,152.3,110.6,153.4z"/>
|
|
69
|
+
</g>
|
|
70
|
+
<g>
|
|
71
|
+
<g id="help">
|
|
72
|
+
<path d="M59.4,12.5c-8.8,6.1-11,18.4-4.8,27.2s18.4,11,27.2,4.8s11-18.4,4.8-27.2S68.2,6.3,59.4,12.5z M80,38.5l-3.2,2.2l-2.2-3.2
|
|
73
|
+
l3.2-2.2L80,38.5z M74.8,23.9l-0.4,2.4c-0.5,2-0.5,3.4,1.2,5.8l-3.2,2.2l-0.6-0.8c-1.2-1.8-1.7-3.8-1.2-5.8l0.5-3.4
|
|
74
|
+
c0.3-0.9,0.1-1.9-0.6-2.9c-1.2-1.8-3.7-2.2-5.4-1c-1.8,1.2-2.2,3.7-1,5.4l-3.2,2.2c-2.5-3.5-1.6-8.4,1.9-10.9
|
|
75
|
+
c3.5-2.5,8.4-1.6,10.9,1.9C74.6,20.6,74.9,22.3,74.8,23.9z"/>
|
|
76
|
+
</g>
|
|
77
|
+
</g>
|
|
78
|
+
<g>
|
|
79
|
+
<path d="M189.1,104c-1.7-0.9-3.4-1.1-5-0.5l0,0l-0.4,0.1l0,0c-1.4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2.2-1.9-3.9-4.1-4.1c-1.2-0.1-2.4,0.3-3.3,1.2c-0.9,0.8-1.4,2-1.4,3.2c0,0.6,0.4,1,1,1s1-0.4,1-1
|
|
107
|
+
c0-0.7,0.3-1.3,0.7-1.7c0.5-0.4,1.1-0.7,1.8-0.6c1.2,0.1,2.1,1,2.2,2.2c0.1,0.9-0.4,1.7-1.1,2.2c-1.4,0.9-2.2,2.3-2.2,3.9
|
|
108
|
+
c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1c0-0.9,0.5-1.8,1.3-2.2C249.6,114.2,250.4,112.7,250.3,111.1z"/>
|
|
109
|
+
</g>
|
|
110
|
+
</g>
|
|
111
|
+
<g>
|
|
112
|
+
<g>
|
|
113
|
+
<path d="M267.8,127.6c-0.6,0-1,0.4-1,1v8.4c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1v-8.4C268.8,128,268.3,127.6,267.8,127.6z"/>
|
|
114
|
+
</g>
|
|
115
|
+
</g>
|
|
116
|
+
<g>
|
|
117
|
+
<g>
|
|
118
|
+
<circle cx="267.8" cy="141.5" r="1"/>
|
|
119
|
+
</g>
|
|
120
|
+
</g>
|
|
121
|
+
<g>
|
|
122
|
+
<g>
|
|
123
|
+
<circle cx="245.9" cy="121" r="1"/>
|
|
124
|
+
</g>
|
|
125
|
+
</g>
|
|
126
|
+
</g>
|
|
127
|
+
<g>
|
|
128
|
+
<path d="M243,30c-10.5,4.2-15.9,15.5-12,25.2c1.1,2.6,2.7,4.9,4.7,6.7l-1.2,10c-0.1,0.6,0.2,1.1,0.7,1.4c0.4,0.2,0.8,0.2,1.2,0.1
|
|
129
|
+
c0.1,0,0.2-0.1,0.3-0.2l8.8-6.7c3.7,0.6,7.8,0.2,11.6-1.3c10.5-4.2,15.9-15.5,12-25.2C265.2,30.2,253.5,25.8,243,30z M253.7,56.6
|
|
130
|
+
c-1,0.4-2.2-0.1-2.6-1.1c-0.4-1,0.1-2.2,1.1-2.6c1-0.4,2.2,0.1,2.6,1.1C255.2,55,254.7,56.2,253.7,56.6z M252,46.9
|
|
131
|
+
c-0.2,0.3-0.3,0.5-0.4,0.6l0.8,2c0.3,0.8-0.1,1.7-0.9,2.1c-0.8,0.3-1.7-0.1-2.1-0.9l-0.9-2.1c-0.6-1.4,0.2-2.5,0.7-3.4
|
|
132
|
+
c0.6-0.9,1-1.5,0.5-2.6c-0.4-0.9-1.4-1.4-2.3-1c-0.9,0.4-1.4,1.4-1,2.3c0.3,0.8-0.1,1.7-0.9,2.1c-0.8,0.3-1.7-0.1-2.1-0.9
|
|
133
|
+
c-1-2.5,0.2-5.4,2.8-6.5c2.5-1,5.4,0.2,6.5,2.8C254,44,252.8,45.8,252,46.9z"/>
|
|
134
|
+
</g>
|
|
135
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Simple-Jekyll-Search v1.4.1 (https://github.com/christian-fei/Simple-Jekyll-Search)
|
|
3
|
+
* Copyright 2015-2017, Christian Fei
|
|
4
|
+
* Licensed under MIT (https://github.com/christian-fei/Simple-Jekyll-Search/blob/master/LICENSE.md)
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
function fuzzysearch (needle, haystack) {
|
|
11
|
+
var tlen = haystack.length;
|
|
12
|
+
var qlen = needle.length;
|
|
13
|
+
if (qlen > tlen) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
if (qlen === tlen) {
|
|
17
|
+
return needle === haystack;
|
|
18
|
+
}
|
|
19
|
+
outer: for (var i = 0, j = 0; i < qlen; i++) {
|
|
20
|
+
var nch = needle.charCodeAt(i);
|
|
21
|
+
while (j < tlen) {
|
|
22
|
+
if (haystack.charCodeAt(j++) === nch) {
|
|
23
|
+
continue outer;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
module.exports = fuzzysearch;
|
|
32
|
+
|
|
33
|
+
},{}],2:[function(require,module,exports){
|
|
34
|
+
'use strict'
|
|
35
|
+
module.exports = {
|
|
36
|
+
load: load
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function load (location, callback) {
|
|
40
|
+
var xhr = getXHR()
|
|
41
|
+
xhr.open('GET', location, true)
|
|
42
|
+
xhr.onreadystatechange = createStateChangeListener(xhr, callback)
|
|
43
|
+
xhr.send()
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function createStateChangeListener (xhr, callback) {
|
|
47
|
+
return function () {
|
|
48
|
+
if (xhr.readyState === 4 && xhr.status === 200) {
|
|
49
|
+
try {
|
|
50
|
+
callback(null, JSON.parse(xhr.responseText))
|
|
51
|
+
} catch (err) {
|
|
52
|
+
callback(err, null)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function getXHR () {
|
|
59
|
+
return (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP')
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
},{}],3:[function(require,module,exports){
|
|
63
|
+
'use strict'
|
|
64
|
+
module.exports = function OptionsValidator (params) {
|
|
65
|
+
if (!validateParams(params)) {
|
|
66
|
+
throw new Error('-- OptionsValidator: required options missing')
|
|
67
|
+
}
|
|
68
|
+
if (!(this instanceof OptionsValidator)) {
|
|
69
|
+
return new OptionsValidator(params)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
var requiredOptions = params.required
|
|
73
|
+
|
|
74
|
+
this.getRequiredOptions = function () {
|
|
75
|
+
return requiredOptions
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
this.validate = function (parameters) {
|
|
79
|
+
var errors = []
|
|
80
|
+
requiredOptions.forEach(function (requiredOptionName) {
|
|
81
|
+
if (typeof parameters[requiredOptionName] === 'undefined') {
|
|
82
|
+
errors.push(requiredOptionName)
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
return errors
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function validateParams (params) {
|
|
89
|
+
if (!params) {
|
|
90
|
+
return false
|
|
91
|
+
}
|
|
92
|
+
return typeof params.required !== 'undefined' && params.required instanceof Array
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
},{}],4:[function(require,module,exports){
|
|
97
|
+
'use strict'
|
|
98
|
+
module.exports = {
|
|
99
|
+
put: put,
|
|
100
|
+
clear: clear,
|
|
101
|
+
get: get,
|
|
102
|
+
search: search,
|
|
103
|
+
setOptions: setOptions
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
var FuzzySearchStrategy = require('./SearchStrategies/FuzzySearchStrategy')
|
|
107
|
+
var LiteralSearchStrategy = require('./SearchStrategies/LiteralSearchStrategy')
|
|
108
|
+
|
|
109
|
+
var data = []
|
|
110
|
+
var opt = {}
|
|
111
|
+
opt.fuzzy = false
|
|
112
|
+
opt.limit = 10
|
|
113
|
+
opt.searchStrategy = opt.fuzzy ? FuzzySearchStrategy : LiteralSearchStrategy
|
|
114
|
+
|
|
115
|
+
function put (data) {
|
|
116
|
+
if (isObject(data)) {
|
|
117
|
+
return addObject(data)
|
|
118
|
+
}
|
|
119
|
+
if (isArray(data)) {
|
|
120
|
+
return addArray(data)
|
|
121
|
+
}
|
|
122
|
+
return undefined
|
|
123
|
+
}
|
|
124
|
+
function clear () {
|
|
125
|
+
data.length = 0
|
|
126
|
+
return data
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function get () {
|
|
130
|
+
return data
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function isObject (obj) { return !!obj && Object.prototype.toString.call(obj) === '[object Object]' }
|
|
134
|
+
function isArray (obj) { return !!obj && Object.prototype.toString.call(obj) === '[object Array]' }
|
|
135
|
+
|
|
136
|
+
function addObject (_data) {
|
|
137
|
+
data.push(_data)
|
|
138
|
+
return data
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function addArray (_data) {
|
|
142
|
+
var added = []
|
|
143
|
+
for (var i = 0; i < _data.length; i++) {
|
|
144
|
+
if (isObject(_data[i])) {
|
|
145
|
+
added.push(addObject(_data[i]))
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return added
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function search (crit) {
|
|
152
|
+
if (!crit) {
|
|
153
|
+
return []
|
|
154
|
+
}
|
|
155
|
+
return findMatches(data, crit, opt.searchStrategy, opt)
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function setOptions (_opt) {
|
|
159
|
+
opt = _opt || {}
|
|
160
|
+
|
|
161
|
+
opt.fuzzy = _opt.fuzzy || false
|
|
162
|
+
opt.limit = _opt.limit || 10
|
|
163
|
+
opt.searchStrategy = _opt.fuzzy ? FuzzySearchStrategy : LiteralSearchStrategy
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function findMatches (data, crit, strategy, opt) {
|
|
167
|
+
var matches = []
|
|
168
|
+
for (var i = 0; i < data.length && matches.length < opt.limit; i++) {
|
|
169
|
+
var match = findMatchesInObject(data[i], crit, strategy, opt)
|
|
170
|
+
if (match) {
|
|
171
|
+
matches.push(match)
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return matches
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function findMatchesInObject (obj, crit, strategy, opt) {
|
|
178
|
+
for (var key in obj) {
|
|
179
|
+
if (!isExcluded(obj[key], opt.exclude) && strategy.matches(obj[key], crit)) {
|
|
180
|
+
return obj
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function isExcluded (term, excludedTerms) {
|
|
186
|
+
var excluded = false
|
|
187
|
+
excludedTerms = excludedTerms || []
|
|
188
|
+
for (var i = 0; i < excludedTerms.length; i++) {
|
|
189
|
+
var excludedTerm = excludedTerms[i]
|
|
190
|
+
if (!excluded && new RegExp(term).test(excludedTerm)) {
|
|
191
|
+
excluded = true
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return excluded
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
},{"./SearchStrategies/FuzzySearchStrategy":5,"./SearchStrategies/LiteralSearchStrategy":6}],5:[function(require,module,exports){
|
|
198
|
+
'use strict'
|
|
199
|
+
var fuzzysearch = require('fuzzysearch')
|
|
200
|
+
|
|
201
|
+
module.exports = new FuzzySearchStrategy()
|
|
202
|
+
|
|
203
|
+
function FuzzySearchStrategy () {
|
|
204
|
+
this.matches = function (string, crit) {
|
|
205
|
+
return fuzzysearch(crit, string)
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
},{"fuzzysearch":1}],6:[function(require,module,exports){
|
|
210
|
+
'use strict'
|
|
211
|
+
module.exports = new LiteralSearchStrategy()
|
|
212
|
+
|
|
213
|
+
function LiteralSearchStrategy () {
|
|
214
|
+
this.matches = function (string, crit) {
|
|
215
|
+
if (typeof string !== 'string') {
|
|
216
|
+
return false
|
|
217
|
+
}
|
|
218
|
+
string = string.trim()
|
|
219
|
+
return string.toLowerCase().indexOf(crit.toLowerCase()) >= 0
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
},{}],7:[function(require,module,exports){
|
|
224
|
+
'use strict'
|
|
225
|
+
module.exports = {
|
|
226
|
+
compile: compile,
|
|
227
|
+
setOptions: setOptions
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
var options = {}
|
|
231
|
+
options.pattern = /\{(.*?)\}/g
|
|
232
|
+
options.template = ''
|
|
233
|
+
options.middleware = function () {}
|
|
234
|
+
|
|
235
|
+
function setOptions (_options) {
|
|
236
|
+
options.pattern = _options.pattern || options.pattern
|
|
237
|
+
options.template = _options.template || options.template
|
|
238
|
+
if (typeof _options.middleware === 'function') {
|
|
239
|
+
options.middleware = _options.middleware
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
function compile (data) {
|
|
244
|
+
return options.template.replace(options.pattern, function (match, prop) {
|
|
245
|
+
var value = options.middleware(prop, data[prop], options.template)
|
|
246
|
+
if (typeof value !== 'undefined') {
|
|
247
|
+
return value
|
|
248
|
+
}
|
|
249
|
+
return data[prop] || match
|
|
250
|
+
})
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
},{}],8:[function(require,module,exports){
|
|
254
|
+
/*!
|
|
255
|
+
* Simple-Jekyll-Search v1.4.1 (https://github.com/christian-fei/Simple-Jekyll-Search)
|
|
256
|
+
* Copyright 2015-2017, Christian Fei
|
|
257
|
+
* Licensed under MIT (https://github.com/christian-fei/Simple-Jekyll-Search/blob/master/LICENSE.md)
|
|
258
|
+
*/
|
|
259
|
+
|
|
260
|
+
;(function (window, document) {
|
|
261
|
+
'use strict'
|
|
262
|
+
|
|
263
|
+
var options = {
|
|
264
|
+
searchInput: null,
|
|
265
|
+
resultsContainer: null,
|
|
266
|
+
json: [],
|
|
267
|
+
searchResultTemplate: '<li><a href="{url}" title="{desc}">{title}</a></li>',
|
|
268
|
+
templateMiddleware: function () {},
|
|
269
|
+
noResultsText: 'No results found',
|
|
270
|
+
limit: 10,
|
|
271
|
+
fuzzy: false,
|
|
272
|
+
exclude: []
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
var requiredOptions = ['searchInput', 'resultsContainer', 'json']
|
|
276
|
+
|
|
277
|
+
var templater = require('./Templater')
|
|
278
|
+
var repository = require('./Repository')
|
|
279
|
+
var jsonLoader = require('./JSONLoader')
|
|
280
|
+
var optionsValidator = require('./OptionsValidator')({
|
|
281
|
+
required: requiredOptions
|
|
282
|
+
})
|
|
283
|
+
var utils = require('./utils')
|
|
284
|
+
|
|
285
|
+
/*
|
|
286
|
+
Public API
|
|
287
|
+
*/
|
|
288
|
+
window.SimpleJekyllSearch = function SimpleJekyllSearch (_options) {
|
|
289
|
+
var errors = optionsValidator.validate(_options)
|
|
290
|
+
if (errors.length > 0) {
|
|
291
|
+
throwError('You must specify the following required options: ' + requiredOptions)
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
options = utils.merge(options, _options)
|
|
295
|
+
|
|
296
|
+
templater.setOptions({
|
|
297
|
+
template: options.searchResultTemplate,
|
|
298
|
+
middleware: options.templateMiddleware
|
|
299
|
+
})
|
|
300
|
+
|
|
301
|
+
repository.setOptions({
|
|
302
|
+
fuzzy: options.fuzzy,
|
|
303
|
+
limit: options.limit
|
|
304
|
+
})
|
|
305
|
+
|
|
306
|
+
if (utils.isJSON(options.json)) {
|
|
307
|
+
initWithJSON(options.json)
|
|
308
|
+
} else {
|
|
309
|
+
initWithURL(options.json)
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return {
|
|
313
|
+
search: search
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// for backwards compatibility
|
|
318
|
+
window.SimpleJekyllSearch.init = window.SimpleJekyllSearch
|
|
319
|
+
|
|
320
|
+
if (typeof window.SimpleJekyllSearchInit === 'function') {
|
|
321
|
+
window.SimpleJekyllSearchInit.call(this, window.SimpleJekyllSearch)
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
function initWithJSON (json) {
|
|
325
|
+
repository.put(json)
|
|
326
|
+
registerInput()
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
function initWithURL (url) {
|
|
330
|
+
jsonLoader.load(url, function (err, json) {
|
|
331
|
+
if (err) {
|
|
332
|
+
throwError('failed to get JSON (' + url + ')')
|
|
333
|
+
}
|
|
334
|
+
initWithJSON(json)
|
|
335
|
+
})
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
function emptyResultsContainer () {
|
|
339
|
+
options.resultsContainer.innerHTML = ''
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
function appendToResultsContainer (text) {
|
|
343
|
+
options.resultsContainer.innerHTML += text
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
function registerInput () {
|
|
347
|
+
options.searchInput.addEventListener('keyup', function (e) {
|
|
348
|
+
var key = e.which
|
|
349
|
+
if (isWhitelistedKey(key)) {
|
|
350
|
+
emptyResultsContainer()
|
|
351
|
+
var query = e.target.value
|
|
352
|
+
search(query)
|
|
353
|
+
}
|
|
354
|
+
})
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
function search (query) {
|
|
358
|
+
if (isValidQuery(query)) {
|
|
359
|
+
render(repository.search(query))
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
function render (results) {
|
|
364
|
+
var len = results.length
|
|
365
|
+
if (len === 0) {
|
|
366
|
+
return appendToResultsContainer(options.noResultsText)
|
|
367
|
+
}
|
|
368
|
+
for (var i = 0; i < len; i++) {
|
|
369
|
+
appendToResultsContainer(templater.compile(results[i]))
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
function isValidQuery (query) {
|
|
374
|
+
return query && query.length > 0
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
function isWhitelistedKey (key) {
|
|
378
|
+
return [13, 16, 20, 37, 38, 39, 40, 91].indexOf(key) === -1
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
function throwError (message) { throw new Error('SimpleJekyllSearch --- ' + message) }
|
|
382
|
+
})(window, document)
|
|
383
|
+
|
|
384
|
+
},{"./JSONLoader":2,"./OptionsValidator":3,"./Repository":4,"./Templater":7,"./utils":9}],9:[function(require,module,exports){
|
|
385
|
+
'use strict'
|
|
386
|
+
module.exports = {
|
|
387
|
+
merge: merge,
|
|
388
|
+
isJSON: isJSON
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
function merge (defaultParams, mergeParams) {
|
|
392
|
+
var mergedOptions = {}
|
|
393
|
+
for (var option in defaultParams) {
|
|
394
|
+
mergedOptions[option] = defaultParams[option]
|
|
395
|
+
if (typeof mergeParams[option] !== 'undefined') {
|
|
396
|
+
mergedOptions[option] = mergeParams[option]
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
return mergedOptions
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
function isJSON (json) {
|
|
403
|
+
try {
|
|
404
|
+
if (json instanceof Object && JSON.parse(JSON.stringify(json))) {
|
|
405
|
+
return true
|
|
406
|
+
}
|
|
407
|
+
return false
|
|
408
|
+
} catch (e) {
|
|
409
|
+
return false
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
},{}]},{},[8]);
|