jekyll-bonsai 0.0.3 → 0.0.7

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.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +676 -0
  3. data/README.md +3 -5
  4. data/_config.yml +173 -76
  5. data/_data/emoji.yml +45 -0
  6. data/_data/themes.yml +145 -0
  7. data/_includes/anchor-headings.html +5 -1
  8. data/_includes/btn_state.html +14 -0
  9. data/_includes/connect.html +11 -9
  10. data/_includes/cookie-consent.html +79 -0
  11. data/_includes/dates.html +22 -0
  12. data/_includes/hp-tooltip.html +106 -0
  13. data/_includes/img/bullet-net-web.svg +1 -1
  14. data/_includes/img/bullet-tree.svg +1 -1
  15. data/_includes/img/pencil-filter.svg +17 -0
  16. data/_includes/share.html +10 -8
  17. data/_includes/site-nav.html +83 -37
  18. data/_includes/tags.html +49 -0
  19. data/_includes/themes.scss.liquid +80 -0
  20. data/_includes/toc.html +187 -0
  21. data/_layouts/404.html +10 -0
  22. data/_layouts/about.html +14 -0
  23. data/_layouts/archive.html +77 -0
  24. data/_layouts/base.html +68 -0
  25. data/_layouts/book.html +40 -0
  26. data/_layouts/entry.html +238 -93
  27. data/_layouts/home.html +96 -0
  28. data/_layouts/post.html +30 -22
  29. data/_layouts/privacy.html +15 -0
  30. data/_layouts/recent.html +66 -0
  31. data/_layouts/state.html +54 -43
  32. data/_sass/base/_code.scss +133 -0
  33. data/_sass/base/_layout.scss +30 -29
  34. data/_sass/base/_link.scss +105 -0
  35. data/_sass/base/_main.scss +19 -126
  36. data/_sass/base/_markdown.scss +281 -0
  37. data/_sass/base/_typography.scss +81 -67
  38. data/_sass/base/code_themes/_gruvbox.scss +92 -0
  39. data/_sass/base/code_themes/_monokai.scss +217 -0
  40. data/_sass/base/code_themes/_solarized.scss +84 -0
  41. data/_sass/components/_btn.scss +95 -0
  42. data/_sass/components/_infobox.scss +48 -0
  43. data/_sass/components/_item.scss +28 -0
  44. data/_sass/components/_search.scss +61 -0
  45. data/_sass/components/_tag_pills.scss +24 -0
  46. data/_sass/components/_visited.scss +42 -0
  47. data/_sass/includes/_anchor_headings.scss +36 -0
  48. data/_sass/includes/_connect.scss +8 -0
  49. data/_sass/includes/_cookie_consent.scss +46 -0
  50. data/_sass/includes/_dates.scss +6 -0
  51. data/_sass/includes/_hp_tooltip.scss +41 -0
  52. data/_sass/includes/_share.scss +10 -0
  53. data/_sass/includes/_site_nav.scss +26 -150
  54. data/_sass/includes/_svg.scss +89 -0
  55. data/_sass/includes/_toc.scss +38 -0
  56. data/_sass/layouts/_404.scss +3 -0
  57. data/_sass/layouts/_about.scss +3 -0
  58. data/_sass/layouts/_archive.scss +26 -0
  59. data/_sass/layouts/_book.scss +17 -0
  60. data/_sass/layouts/_entry.scss +140 -0
  61. data/_sass/layouts/_home.scss +75 -0
  62. data/_sass/layouts/_post.scss +17 -0
  63. data/_sass/layouts/_privacy.scss +3 -0
  64. data/_sass/layouts/_recent.scss +77 -0
  65. data/_sass/layouts/_state.scss +98 -0
  66. data/_sass/main.scss +72 -0
  67. data/_sass/{support → util}/_functions.scss +0 -0
  68. data/_sass/{support → util}/_variables.scss +21 -87
  69. data/_sass/{support → util}/mixins/_buttons.scss +0 -0
  70. data/_sass/util/mixins/_layout.scss +81 -0
  71. data/_sass/{support → util}/mixins/_typography.scss +0 -0
  72. data/assets/css/styles.scss +29 -6
  73. data/assets/img/bonsai-star.png +0 -0
  74. data/assets/img/bonsai-star.svg +1 -0
  75. data/assets/img/books/the-ancient-art-of-bonsai.png +0 -0
  76. data/assets/img/nav-base-star.svg +1 -0
  77. data/assets/img/nav-bonsai-star.svg +1 -0
  78. data/assets/js/entry.js +33 -5
  79. data/assets/js/graph.js +21 -509
  80. data/assets/js/scripts.js +41 -57
  81. data/assets/js/search.js +165 -0
  82. data/assets/js/site-nav.js +99 -99
  83. data/assets/js/theme-colors.js +23 -37
  84. data/assets/js/vendor/lunr.js +3475 -0
  85. data/assets/js/vendor/lunr.min.js +6 -0
  86. data/assets/js/visited-nav.js +65 -0
  87. metadata +145 -150
  88. data/_entries/digital-garden.bonsai.md +0 -36
  89. data/_entries/digital-garden.field-logs.md +0 -10
  90. data/_entries/digital-garden.fork.md +0 -10
  91. data/_entries/digital-garden.md +0 -17
  92. data/_entries/digital-garden.path.md +0 -11
  93. data/_entries/digital-garden.plants.md +0 -12
  94. data/_entries/digital-garden.pollinate.md +0 -10
  95. data/_entries/digital-garden.steps.md +0 -10
  96. data/_entries/digital-garden.stream.md +0 -12
  97. data/_entries/digital-garden.sweep.md +0 -12
  98. data/_entries/digital-garden.weather.md +0 -12
  99. data/_entries/features.md +0 -10
  100. data/_entries/features.notes.hover-preview.md +0 -10
  101. data/_entries/features.notes.md +0 -12
  102. data/_entries/features.notes.note-body.md +0 -12
  103. data/_entries/features.notes.note-body.share.md +0 -10
  104. data/_entries/features.notes.note-body.sidenotes.md +0 -52
  105. data/_entries/features.notes.note-foot.links.md +0 -10
  106. data/_entries/features.notes.note-foot.md +0 -11
  107. data/_entries/features.notes.note-foot.posts.md +0 -10
  108. data/_entries/features.notes.note-foot.webmentions.md +0 -10
  109. data/_entries/features.notes.note-head.md +0 -10
  110. data/_entries/features.pages.field-blogs.md +0 -10
  111. data/_entries/features.pages.md +0 -12
  112. data/_entries/features.pages.recent.md +0 -10
  113. data/_entries/features.pages.status-tags.md +0 -10
  114. data/_entries/features.site-nav.graph.links.md +0 -10
  115. data/_entries/features.site-nav.graph.links.namespacing.md +0 -14
  116. data/_entries/features.site-nav.graph.links.wikilinks.md +0 -25
  117. data/_entries/features.site-nav.graph.md +0 -12
  118. data/_entries/features.site-nav.graph.nodes.current-note.md +0 -10
  119. data/_entries/features.site-nav.graph.nodes.md +0 -12
  120. data/_entries/features.site-nav.graph.nodes.mia.missing-note.md +0 -20
  121. data/_entries/features.site-nav.graph.nodes.visited-status.md +0 -10
  122. data/_entries/features.site-nav.graph.toggle-graph.md +0 -13
  123. data/_entries/features.site-nav.graph.type.md +0 -16
  124. data/_entries/features.site-nav.graph.type.net-web.md +0 -10
  125. data/_entries/features.site-nav.graph.type.tree.md +0 -12
  126. data/_entries/features.site-nav.md +0 -10
  127. data/_entries/features.site-nav.visited.md +0 -14
  128. data/_entries/features.tags.md +0 -13
  129. data/_entries/features.themes.dark.md +0 -12
  130. data/_entries/features.themes.light.md +0 -10
  131. data/_entries/features.themes.md +0 -12
  132. data/_entries/features.visited.delete-data.md +0 -10
  133. data/_entries/features.visited.md +0 -12
  134. data/_entries/features.visitor-preferences.md +0 -27
  135. data/_entries/feedback.md +0 -10
  136. data/_entries/people.creator.md +0 -12
  137. data/_entries/people.md +0 -13
  138. data/_entries/people.visitors.md +0 -12
  139. data/_entries/plugins.jekyll-wikilinks.md +0 -10
  140. data/_entries/plugins.md +0 -10
  141. data/_entries/root.md +0 -26
  142. data/_includes/entry-attrs.html +0 -27
  143. data/_includes/head.html +0 -23
  144. data/_includes/hover-preview.html +0 -84
  145. data/_includes/metrics.html +0 -10
  146. data/_includes/styles.scss.liquid +0 -3
  147. data/_layouts/default.html +0 -39
  148. data/_pages/about.md +0 -7
  149. data/_pages/posts.html +0 -19
  150. data/_pages/recent.html +0 -48
  151. data/_plugins/doc_filters.rb +0 -44
  152. data/_plugins/prep_entry.rb +0 -43
  153. data/_plugins/sidenote.rb +0 -123
  154. data/_plugins/tags.rb +0 -52
  155. data/_sass/base/base.scss +0 -3
  156. data/_sass/color/dark.scss +0 -58
  157. data/_sass/color/light.scss +0 -58
  158. data/_sass/includes/_btn.scss +0 -106
  159. data/_sass/includes/_graph.scss +0 -69
  160. data/_sass/includes/_nav.scss +0 -89
  161. data/_sass/includes/_tooltip.scss +0 -29
  162. data/_sass/includes/includes.scss +0 -9
  163. data/_sass/markdown/_code.scss +0 -340
  164. data/_sass/markdown/_content.scss +0 -400
  165. data/_sass/markdown/_tables.scss +0 -60
  166. data/_sass/markdown/markdown.scss +0 -7
  167. data/_sass/modules.scss +0 -14
  168. data/_sass/pages/_index.scss +0 -72
  169. data/_sass/pages/_posts.scss +0 -17
  170. data/_sass/pages/_recent.scss +0 -26
  171. data/_sass/pages/_state.scss +0 -72
  172. data/_sass/pages/pages.scss +0 -4
  173. data/_sass/support/mixins/_layout.scss +0 -56
  174. data/_sass/support/mixins/mixins.scss +0 -3
  175. data/_sass/support/support.scss +0 -3
  176. data/_states/bamboo.md +0 -8
  177. data/_states/berry.md +0 -8
  178. data/_states/bloom.md +0 -8
  179. data/_states/bud.md +0 -6
  180. data/_states/fruit.md +0 -8
  181. data/_states/melon.md +0 -8
  182. data/_states/pot-bamboo.md +0 -8
  183. data/_states/seed.md +0 -8
  184. data/_states/sprout.md +0 -8
  185. data/_states/tags.md +0 -8
  186. data/_states/tea.md +0 -8
  187. data/assets/css/styles-dark.scss +0 -3
  188. data/assets/css/styles-light.scss +0 -3
  189. data/assets/img/nav-dot-dark.svg +0 -1
  190. data/assets/img/nav-dot-light.svg +0 -1
  191. data/assets/img/nav-wiki-links-dark.svg +0 -1
  192. data/assets/img/nav-wiki-links-light.svg +0 -1
  193. data/index.html +0 -82
@@ -0,0 +1,22 @@
1
+ {% comment %}
2
+
3
+ Usage:
4
+ {% include dates.html updated=page.updated date=page.date %}
5
+
6
+ Parameters:
7
+ * updated (seconds) - unix epoch time of page update.
8
+ * published (datetime) - datetime of page publish.
9
+
10
+ {% endcomment %}
11
+
12
+ <div class="dates text--date">
13
+ <div>
14
+ <a class="stat-tag btn--blue" href="{{ '/recent' | relative_url }}" title="Published">{{ site.data.emoji.published }}</a>
15
+ <time class="dt-published">{{ include.date | date: site.bonsai.date_format }}</time>
16
+ </div>
17
+ <div>
18
+ <a class="stat-tag btn--blue" href="{{ '/recent' | relative_url }}" title="Updated">{{ site.data.emoji.updated }}</a>
19
+ <!-- 'slice' because epoch timestamps currently use milliseconds -->
20
+ <time class="dt-updated">{{ include.updated | slice: 0, 10 | date: site.bonsai.date_format }}</time>
21
+ </div>
22
+ </div>
@@ -0,0 +1,106 @@
1
+ <!-- "hover-preview tooltip"
2
+
3
+ with help from: https://github.com/maximevaillancourt/digital-garden-jekyll-template/blob/master/_includes/link-previews.html
4
+
5
+ for hover-preview to work, every page should define...
6
+ - at a minimum:
7
+ - 'hp-title'
8
+ - 'hp-content'
9
+ - optionally
10
+ - 'hp-header'
11
+ ...in a div that wraps the desired element, so the hover-preview can properly build the content to display
12
+
13
+ -->
14
+
15
+ <style>
16
+ /* leave id for opacity toggle */
17
+ #hp-tooltip {
18
+ opacity: 0;
19
+ transition: opacity 100ms;
20
+ }
21
+ </style>
22
+
23
+ <div id="hp-tooltip" class="hp-tooltip">
24
+ <div id='hp-tooltip-content'></div>
25
+ </div>
26
+ <iframe id="hp-iframe" src=""></iframe>
27
+
28
+ <script>
29
+ var opacityTimeout;
30
+ var contentTimeout;
31
+ var transitionDurationMs = 100;
32
+
33
+ var iframe = document.getElementById('hp-iframe');
34
+ var tooltip = document.getElementById('hp-tooltip');
35
+ var tooltipContent = document.getElementById('hp-tooltip-content');
36
+
37
+ function hideTooltip() {
38
+ opacityTimeout = setTimeout(function() {
39
+ tooltip.style.opacity = 0;
40
+ contentTimeout = setTimeout(function() {
41
+ tooltipContent.innerHTML = '';
42
+ tooltip.style.display = 'none';
43
+ }, transitionDurationMs + 1);
44
+ }, transitionDurationMs)
45
+ }
46
+
47
+ function showTooltip(event) {
48
+ var elem = event.target;
49
+ var elem_props = elem.getClientRects()[elem.getClientRects().length - 1];
50
+ var top = window.pageYOffset || document.documentElement.scrollTop;
51
+
52
+ if (event.target.host === window.location.host) {
53
+ iframe.src = event.target.href;
54
+ iframe.onload = function() {
55
+ let title = iframe.contentWindow.document.querySelector('.hp-title').innerHTML;
56
+ let content = iframe.contentWindow.document.querySelector('.hp-content').innerHTML;
57
+ // populate header breadcrumbs if they exist
58
+ if (iframe.contentWindow.document.querySelector('.hp-header')) {
59
+ let header = iframe.contentWindow.document.querySelector('.hp-header').innerHTML;
60
+ tooltipContent.innerHTML = header + title + content;
61
+ // everything else (doesn't have header breadcrumbs)
62
+ } else {
63
+ tooltipContent.innerHTML = title + content;
64
+ }
65
+ tooltip.style.display = 'block';
66
+ setTimeout(function() {
67
+ tooltip.style.opacity = 1;
68
+ }, 1);
69
+ };
70
+
71
+ tooltip.style.left = elem_props.left - (tooltip.offsetWidth / 2) + (elem_props.width / 2) + "px";
72
+ if ((window.innerHeight - elem_props.top) < (tooltip.offsetHeight)) {
73
+ tooltip.style.top = elem_props.top + top - tooltip.offsetHeight - 10 + "px";
74
+ } else if ((window.innerHeight - elem_props.top) > (tooltip.offsetHeight)) {
75
+ tooltip.style.top = elem_props.top + top + 35 + "px";
76
+ }
77
+
78
+ if ((elem_props.left + (elem_props.width / 2)) < (tooltip.offsetWidth / 2)) {
79
+ tooltip.style.left = "10px";
80
+ } else if ((document.body.clientWidth - elem_props.left - (elem_props.width / 2)) < (tooltip.offsetWidth / 2)) {
81
+ tooltip.style.left = document.body.clientWidth - tooltip.offsetWidth - 20 + "px";
82
+ }
83
+ }
84
+ }
85
+
86
+ function setupListeners(linkElement) {
87
+ linkElement.addEventListener('mouseleave', function(_event) {
88
+ hideTooltip();
89
+ });
90
+
91
+ tooltip.addEventListener('mouseleave', function(_event) {
92
+ hideTooltip();
93
+ });
94
+
95
+ linkElement.addEventListener('mouseenter', function(event) {
96
+ clearTimeout(opacityTimeout);
97
+ clearTimeout(contentTimeout);
98
+ showTooltip(event);
99
+ });
100
+
101
+ tooltip.addEventListener('mouseenter', function(event) {
102
+ clearTimeout(opacityTimeout);
103
+ clearTimeout(contentTimeout);
104
+ });
105
+ }
106
+ </script>
@@ -1,4 +1,4 @@
1
- <svg class="graph-icon" xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 50 50" overflow="visible" stroke-width="5" stroke-linecap="round">
1
+ <svg class="graph-icon" xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 50 50" overflow="visible" stroke-width="5" stroke-linecap="round">
2
2
  <line class="bullet-link" x1="25" y1="33" x2="2" y2="50" stroke="#8C6239" />
3
3
  <line class="bullet-link" x1="25" y1="33" x2="25" y2="5" stroke="#8C6239" />
4
4
  <line class="bullet-link" x1="25" y1="33" x2="47" y2="50" stroke="#8C6239" />
@@ -1,4 +1,4 @@
1
- <svg class="graph-icon" xmlns="http://www.w3.org/2000/svg" height="10" width="10" viewBox="0 0 50 50" overflow="visible" stroke-width="5" stroke-linecap="round">
1
+ <svg class="graph-icon" xmlns="http://www.w3.org/2000/svg" height="15" width="15" viewBox="0 0 50 50" overflow="visible" stroke-width="5" stroke-linecap="round">
2
2
  <line class="bullet-link" x1="20" y1="25" x2="5" y2="50" stroke="#8C6239" />
3
3
  <line class="bullet-link" x1="25" y1="25" x2="25" y2="50" stroke="#8C6239" />
4
4
  <line class="bullet-link" x1="30" y1="25" x2="45" y2="50" stroke="#8C6239" />
@@ -0,0 +1,17 @@
1
+ <!-- due to a chromium bug regarding svg-reuse...: https://bugs.chromium.org/p/chromium/issues/detail?id=109212 -->
2
+ <!-- ...using this hacky off-screen-style from: https://stackoverflow.com/questions/67961573/how-to-hide-reusable-svg-with-filter-that-has-filterunits-userspaceonuse#comment120130719_67961573 -->
3
+ <svg xmlns="http://www.w3.org/2000/svg" height="0" width="0" style="absolute + top:-1000vw;">
4
+ <!-- from: https://css-tricks.com/creating-a-pencil-effect-in-svg/ -->
5
+ <filter id="PencilTexture" x="0%" y="0%" width="100%" height="100%" filterUnits="objectBoundingBox">
6
+ <feTurbulence type="fractalNoise" baseFrequency="0.5" numOctaves="5" stitchTiles="stitch" result="f1">
7
+ </feTurbulence>
8
+ <feColorMatrix type="matrix" values="0 0 0 0 0, 0 0 0 0 0, 0 0 0 0 0, 0 0 0 -1.5 1.5" result="f2">
9
+ </feColorMatrix>
10
+ <feComposite operator="in" in2="f2b" in="SourceGraphic" result="f3">
11
+ </feComposite>
12
+ <feTurbulence type="fractalNoise" baseFrequency="1.2" numOctaves="3" result="noise">
13
+ </feTurbulence>
14
+ <feDisplacementMap xChannelSelector="R" yChannelSelector="G" scale="2.5" in="f3" result="f4">
15
+ </feDisplacementMap>
16
+ </filter>
17
+ </svg>
data/_includes/share.html CHANGED
@@ -2,7 +2,7 @@
2
2
  {% if include.pageurl != nil and include.pageurl != '' %}
3
3
  {% assign pageurl = include.pageurl %}
4
4
  {% else %}
5
- {% assign pageurl = page.url %}
5
+ {% assign pageurl = page.url | relative_url %}
6
6
  {% endif %}
7
7
 
8
8
  <style>
@@ -33,13 +33,15 @@
33
33
  #share-buttons > div.mail > svg {height: 14px; margin-top: 11px;}
34
34
  </style>
35
35
 
36
- <div style="text-align: center;">
37
- <span style="user-select: none;" title="Share This">🐝</span>
36
+ <div class="share-bar">
37
+ <span class="share-icon" title="Share This">
38
+ {{ site.data.emoji.share }}
39
+ </span>
38
40
  <div id="share-buttons">
39
- {% if site.social.share contains 'email' %}<div class="mail" title="Share this through Email" onclick="window.open('mailto:?&body={{ site.url }}{{ site.baseurl }}{{ pageurl }}');"><svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1792 710v794q0 66-47 113t-113 47h-1472q-66 0-113-47t-47-113v-794q44 49 101 87 362 246 497 345 57 42 92.5 65.5t94.5 48 110 24.5h2q51 0 110-24.5t94.5-48 92.5-65.5q170-123 498-345 57-39 100-87zm0-294q0 79-49 151t-122 123q-376 261-468 325-10 7-42.5 30.5t-54 38-52 32.5-57.5 27-50 9h-2q-23 0-50-9t-57.5-27-52-32.5-54-38-42.5-30.5q-91-64-262-182.5t-205-142.5q-62-42-117-115.5t-55-136.5q0-78 41.5-130t118.5-52h1472q65 0 112.5 47t47.5 113z"/></svg></div>{% endif %}
40
- {% if site.social.share contains 'facebook' %}<div class="facebook" title="Share this on Facebook" onclick="window.open('http://www.facebook.com/share.php?u={{ site.url }}{{ site.baseurl }}{{ pageurl }}');"><svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759h-306v-759h-255v-296h255v-218q0-186 104-288.5t277-102.5q147 0 228 12z"/></svg></div>{% endif %}
41
- {% if site.social.share contains 'linkedin' %}<div class="linkedin" title="Share this on Linkedin" onclick="window.open('https://www.linkedin.com/shareArticle?mini=true&url={{ site.url }}{{ site.baseurl }}{{ pageurl }}&title=&summary=&source=');"><svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M477 625v991h-330v-991h330zm21-306q1 73-50.5 122t-135.5 49h-2q-82 0-132-49t-50-122q0-74 51.5-122.5t134.5-48.5 133 48.5 51 122.5zm1166 729v568h-329v-530q0-105-40.5-164.5t-126.5-59.5q-63 0-105.5 34.5t-63.5 85.5q-11 30-11 81v553h-329q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5 114.5-15.5q171 0 275 113.5t104 332.5z"/></svg></div>{% endif %}
42
- {% if site.social.share contains 'pinterest' %}<div class="pinterest" title="Share this on Pinterest" onclick="window.open('https://pinterest.com/pin/create/button/?url=&media={{ site.url }}{{ site.baseurl }}{{ page.image }}&description=');"><svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M256 597q0-108 37.5-203.5t103.5-166.5 152-123 185-78 202-26q158 0 294 66.5t221 193.5 85 287q0 96-19 188t-60 177-100 149.5-145 103-189 38.5q-68 0-135-32t-96-88q-10 39-28 112.5t-23.5 95-20.5 71-26 71-32 62.5-46 77.5-62 86.5l-14 5-9-10q-15-157-15-188 0-92 21.5-206.5t66.5-287.5 52-203q-32-65-32-169 0-83 52-156t132-73q61 0 95 40.5t34 102.5q0 66-44 191t-44 187q0 63 45 104.5t109 41.5q55 0 102-25t78.5-68 56-95 38-110.5 20-111 6.5-99.5q0-173-109.5-269.5t-285.5-96.5q-200 0-334 129.5t-134 328.5q0 44 12.5 85t27 65 27 45.5 12.5 30.5q0 28-15 73t-37 45q-2 0-17-3-51-15-90.5-56t-61-94.5-32.5-108-11-106.5z"/></svg></div>{% endif %}
43
- {% if site.social.share contains 'twitter' %}<div class="twitter" title="Share this on Twitter" onclick="window.open('http://twitter.com/intent/tweet?url={{ site.url }}{{ site.baseurl }}{{ pageurl }}');"><svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1684 408q-67 98-162 167 1 14 1 42 0 130-38 259.5t-115.5 248.5-184.5 210.5-258 146-323 54.5q-271 0-496-145 35 4 78 4 225 0 401-138-105-2-188-64.5t-114-159.5q33 5 61 5 43 0 85-11-112-23-185.5-111.5t-73.5-205.5v-4q68 38 146 41-66-44-105-115t-39-154q0-88 44-163 121 149 294.5 238.5t371.5 99.5q-8-38-8-74 0-134 94.5-228.5t228.5-94.5q140 0 236 102 109-21 205-78-37 115-142 178 93-10 186-50z"/></svg></div>{% endif %}
41
+ {% if site.social.share.type contains 'email' %}<div class="mail" title="Share this through Email" onclick="window.open('mailto:?&body={{ site.url }}{{ site.baseurl }}{{ pageurl }}');"><svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1792 710v794q0 66-47 113t-113 47h-1472q-66 0-113-47t-47-113v-794q44 49 101 87 362 246 497 345 57 42 92.5 65.5t94.5 48 110 24.5h2q51 0 110-24.5t94.5-48 92.5-65.5q170-123 498-345 57-39 100-87zm0-294q0 79-49 151t-122 123q-376 261-468 325-10 7-42.5 30.5t-54 38-52 32.5-57.5 27-50 9h-2q-23 0-50-9t-57.5-27-52-32.5-54-38-42.5-30.5q-91-64-262-182.5t-205-142.5q-62-42-117-115.5t-55-136.5q0-78 41.5-130t118.5-52h1472q65 0 112.5 47t47.5 113z"/></svg></div>{% endif %}
42
+ {% if site.social.share.type contains 'facebook' %}<div class="facebook" title="Share this on Facebook" onclick="window.open('http://www.facebook.com/share.php?u={{ site.url }}{{ site.baseurl }}{{ pageurl }}');"><svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759h-306v-759h-255v-296h255v-218q0-186 104-288.5t277-102.5q147 0 228 12z"/></svg></div>{% endif %}
43
+ {% if site.social.share.type contains 'linkedin' %}<div class="linkedin" title="Share this on Linkedin" onclick="window.open('https://www.linkedin.com/shareArticle?mini=true&url={{ site.url }}{{ site.baseurl }}{{ pageurl }}&title=&summary=&source=');"><svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M477 625v991h-330v-991h330zm21-306q1 73-50.5 122t-135.5 49h-2q-82 0-132-49t-50-122q0-74 51.5-122.5t134.5-48.5 133 48.5 51 122.5zm1166 729v568h-329v-530q0-105-40.5-164.5t-126.5-59.5q-63 0-105.5 34.5t-63.5 85.5q-11 30-11 81v553h-329q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5 114.5-15.5q171 0 275 113.5t104 332.5z"/></svg></div>{% endif %}
44
+ {% if site.social.share.type contains 'pinterest' %}<div class="pinterest" title="Share this on Pinterest" onclick="window.open('https://pinterest.com/pin/create/button/?url=&media={{ site.url }}{{ site.baseurl }}{{ page.image }}&description=');"><svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M256 597q0-108 37.5-203.5t103.5-166.5 152-123 185-78 202-26q158 0 294 66.5t221 193.5 85 287q0 96-19 188t-60 177-100 149.5-145 103-189 38.5q-68 0-135-32t-96-88q-10 39-28 112.5t-23.5 95-20.5 71-26 71-32 62.5-46 77.5-62 86.5l-14 5-9-10q-15-157-15-188 0-92 21.5-206.5t66.5-287.5 52-203q-32-65-32-169 0-83 52-156t132-73q61 0 95 40.5t34 102.5q0 66-44 191t-44 187q0 63 45 104.5t109 41.5q55 0 102-25t78.5-68 56-95 38-110.5 20-111 6.5-99.5q0-173-109.5-269.5t-285.5-96.5q-200 0-334 129.5t-134 328.5q0 44 12.5 85t27 65 27 45.5 12.5 30.5q0 28-15 73t-37 45q-2 0-17-3-51-15-90.5-56t-61-94.5-32.5-108-11-106.5z"/></svg></div>{% endif %}
45
+ {% if site.social.share.type contains 'twitter' %}<div class="twitter" title="Share this on Twitter" onclick="window.open('http://twitter.com/intent/tweet?url={{ site.url }}{{ site.baseurl }}{{ pageurl }}');"><svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1684 408q-67 98-162 167 1 14 1 42 0 130-38 259.5t-115.5 248.5-184.5 210.5-258 146-323 54.5q-271 0-496-145 35 4 78 4 225 0 401-138-105-2-188-64.5t-114-159.5q33 5 61 5 43 0 85-11-112-23-185.5-111.5t-73.5-205.5v-4q68 38 146 41-66-44-105-115t-39-154q0-88 44-163 121 149 294.5 238.5t371.5 99.5q-8-38-8-74 0-134 94.5-228.5t228.5-94.5q140 0 236 102 109-21 205-78-37 115-142 178 93-10 186-50z"/></svg></div>{% endif %}
44
46
  </div>
45
47
  </div>
@@ -1,48 +1,94 @@
1
- <nav id="site-nav" class="site-nav" role="navigation" aria-label="main">
1
+ <nav id="site-nav" class="site-nav" role="navigation">
2
2
  <header>
3
+ <span>
4
+ <a id="home-btn" class="btn btn--green" href="{{ '/' | relative_url }}" title="Go Home">
5
+ {{ site.data.emoji.home }}
6
+ </a>
7
+ </span>
8
+ <span class="dropdown">
9
+ <button class="dropdown__btn">
10
+ <span title="Page Navigation">
11
+ {{ site.data.emoji.pages }}
12
+ </span>
13
+ </button>
14
+ <div class="dropdown__content">
15
+ {% assign recent_page = site.pages | where: "name", "recent.md" %}
16
+ {% if recent_page.first %}
17
+ <a class="btn btn--blue drop-1" href="{{ '/recent' | relative_url }}" title="Go To Recent Changes">
18
+ {{ site.data.emoji.recent }}
19
+ </a>
20
+ {% endif %}
21
+ {% if site.states %}
22
+ {% assign root_state = site.states | find_exp: "item", "item.path == site.bonsai.states.root_path" %}
23
+ <a class="btn btn--brown drop-2" href="{{ root_state.url | relative_url }}" title="Go To States">
24
+ {{ site.data.emoji.stat_tags }}
25
+ </a>
26
+ {% endif %}
27
+ {% assign archive_page = site.pages | where: "name", "archive.md" %}
28
+ {% if archive_page.first %}
29
+ <a class="btn btn--purple drop-3" href="{{ '/archive' | relative_url }}" title="Go To Archive">
30
+ {{ site.data.emoji.archive }}
31
+ </a>
32
+ {% endif %}
33
+ </div>
34
+ </span>
35
+ <span class="dropdown">
36
+ <button class="dropdown__btn">
37
+ <span title="Theme Color Toggles">
38
+ {{ site.data.emoji.colors }}
39
+ </span>
40
+ </button>
41
+ <div class="dropdown__content">
42
+ {% for theme in site.data.themes %}
43
+ <a data-theme-id="{{ theme.id }}" class="btn btn--yellow drop-{{ forloop.index }}" title="{{ theme.id }}">
44
+ {{ theme.emoji }}
45
+ </a>
46
+ {% endfor %}
47
+ </div>
48
+ </span>
3
49
  <span class="dropdown">
4
- <button id="pages-btn" class="dropdown-btn">
5
- <span id="pages-emoji-span">🗺</span>
50
+ <button class="dropdown__btn">
51
+ <span title="Site-Nav Toggles">
52
+ {{ site.data.emoji.site_nav }}
53
+ </span>
6
54
  </button>
7
- <div class="dropdown-content">
8
- <!-- <button id="search-btn" class="site-nav-btn" title="Search">
9
- <span id="search-emoji-span">🔍</span>
10
- </button> -->
11
- <button id="posts-btn" class="dropbtn drop-2" title="Go To Posts">
12
- <span id="posts-emoji-span">📓</span>
13
- </button>
14
- <button id="stat-tags-btn" class="dropbtn drop-1" title="Go To Status Tags">
15
- <span id="stat-tags-emoji-span">🔖</span>
16
- </button>
17
- <button id="recent-btn" class="dropbtn drop-3" title="Go To Recent Changes">
18
- <span id="recent-emoji-span">🌦</span>
19
- </button>
20
- <button id="home-btn" class="dropbtn drop-4" title="Go To Home">
21
- <span id="home-emoji-span">🛖</span>
22
- </button>
55
+ <div class="dropdown__content">
56
+ {% if site.bonsai.nav.visited.enabled %}
57
+ <label class="btn btn--orange">
58
+ <input id="nav-type-checkbox" type="checkbox" checked="checked">
59
+ <span id="nav-type-emoji-span" title="Toggle Nav Type"></span>
60
+ </label>
61
+ {% endif %}
62
+ <label class="btn btn--green">
63
+ <input id="graph-type-checkbox" type="checkbox" checked="checked">
64
+ <span id="graph-type-emoji-span" title="Toggle Graph Type"></span>
65
+ </label>
66
+ <a id="delete-btn" class="btn btn--red drop-3" title="Delete Visited History">
67
+ {{ site.data.emoji.delete }}
68
+ </a>
23
69
  </div>
24
70
  </span>
25
- <label class="btn-selector">
26
- <input id="theme-colors-checkbox" type="checkbox" checked="checked">
27
- <span id="theme-colors-emoji-span" title="Toggle Colors"></span>
28
- </label>
29
- <label class="btn-selector">
30
- <input id="nav-type-checkbox" type="checkbox" checked="checked">
31
- <span id="nav-type-emoji-span" title="Toggle Nav Type"></span>
32
- </label>
33
- <label class="btn-selector">
34
- <input id="graph-type-checkbox" type="checkbox" checked="checked">
35
- <span id="graph-type-emoji-span" title="Toggle Graph Type"></span>
36
- </label>
71
+ {% if site.bonsai.nav.search.enabled %}
72
+ <a id="search-btn" class="btn btn--brown" href="#" title="Search (cmd/ctrl+k)">
73
+ {{ site.data.emoji.search }}
74
+ </a>
75
+ {% endif %}
37
76
  </header>
38
77
 
39
- <nav id="visited-nav" class="visited-nav"></nav>
40
- <svg id="svg-graph" height="100%" width="100%"></svg>
78
+ {% if site.bonsai.nav.search.enabled %}
79
+ <div id="search">
80
+ <input id="search-input" class="search__input hide"></input>
81
+ <div id="search-results" class="search__results"></div>
82
+ </div>
83
+ {% endif %}
84
+ <div id="site-nav-content">
85
+ <div id="jekyll-graph"></div>
86
+ {% if site.bonsai.nav.visited.enabled %}
87
+ <nav id="visited-nav" class="visited-nav"></nav>
88
+ {% endif %}
89
+ </div>
41
90
 
42
91
  <footer>
43
- <span class="small-descr">Grown 🪴 with 💚 from a <a href="https://github.com/manunamz/jekyll-bonsai/">jekyll-bonsai</a>.</span>
44
- <button id="delete-btn" class="delete-btn" title="Delete Visited History">
45
- <span id="delete-emoji-span" title="Delete Visited Info">🧹</span>
46
- </button>
92
+ <span class="text--small">🪴 Grown with 💚 from a <a class="web-link" href="https://jekyll-bonsai.netlify.app">jekyll-bonsai</a></span>
47
93
  </footer>
48
94
  </nav>
@@ -0,0 +1,49 @@
1
+ {% comment %}
2
+
3
+ Usage:
4
+ {% assign tag_attr = page.attributes | link_type: "tags" %}
5
+ {% include tags.html tags_attrs=tag_attr tags_fms=page.tags %}
6
+
7
+ Parameters:
8
+ * tags_attrs (array) - array of attributes that are hashes with keys
9
+ 'type' and 'urls'
10
+ (which correspond to `jekyll-wikilinks`
11
+ attributes and attributed metadata)
12
+ * tags_fms (array) - array of strings that are tag names
13
+ (which correspond to entry filenames)
14
+
15
+ Note:
16
+ To be used with germ-type documents.
17
+ (e.g. markdown documents that use tags metadata to map to entries)
18
+
19
+ {% endcomment %}
20
+
21
+
22
+ <!-- 'tags' attribute -->
23
+ {% for tag_attr in tags_attrs %}
24
+ {% for url in tag_attr.urls %}
25
+ {% assign entry = site.entries | where: "url", url | first %}
26
+ <button class="tag-pill {% if entry %}{% else %}disabled{% endif %}">
27
+ {% if entry %}
28
+ {% include btn_state.html states=entry.status %}
29
+ <a class="sem-tag" href="{{ entry.url | relative_url }}">{{ entry.title }}</a>
30
+ {% else %}
31
+ <span class="text--small">{{ site.data.emoji.missing }} {{ sem_tag }}</span>
32
+ {% endif %}
33
+ </button>
34
+ {% endfor %}
35
+ {% endfor %}
36
+ <!-- 'tags' frontmatter -->
37
+ {% for sem_tag in tags_fms %}
38
+ <!-- prefix with '/' to prevent matching subhierarchies -->
39
+ {% assign sem_tag_path = "/" | append: sem_tag | append: ".md" %}
40
+ {% assign entry = site.entries | find_exp: "item", "item.path contains sem_tag_path" %}
41
+ <button class="tag-pill {% if entry %}{% else %}disabled{% endif %}">
42
+ {% if entry %}
43
+ {% include btn_state.html states=entry.status %}
44
+ <a class="sem-tag" href="{{ entry.url | relative_url }}">{{ entry.title }}</a>
45
+ {% else %}
46
+ <span class="text--small">{{ site.data.emoji.missing }} {{ sem_tag }}</span>
47
+ {% endif %}
48
+ </button>
49
+ {% endfor %}
@@ -0,0 +1,80 @@
1
+ {% comment %}
2
+
3
+ Usage:
4
+ {% include themes.scss.liquid id=theme.id colors=theme.colors svg=theme.svg graph=theme.graph %}
5
+
6
+ Parameters:
7
+ * colors (object) - collection of color values for css theming
8
+ * svg (object) - collection of color values for svg images
9
+ * graph (object) - collection of graph/size values for d3 graph
10
+
11
+ {% endcomment %}
12
+
13
+ // theme colors
14
+ [data-theme='{{ include.id }}'] {
15
+ // logo images //
16
+
17
+ --favicon-src: {{ include.src.favicon }};
18
+ --logo-src: {{ include.src.logo }};
19
+ --nav-burger-base: {{ include.src.nav_burger.base }};
20
+ --nav-burger-bonsai: {{ include.src.nav_burger.bonsai }};
21
+
22
+ // theme colors //
23
+
24
+ // singles
25
+ --selection-color: {{ include.colors.selection }};
26
+ --body-background-color: {{ include.colors.background }};
27
+ --box-shadow-color: {{ include.colors.shadow }};
28
+ --body-text-color: {{ include.colors.text }};
29
+ --small-heading-color: {{ include.colors.text_grey }};
30
+ --accent-dark-color: {{ include.colors.accent_dark }};
31
+ --accent-light-color: {{ include.colors.accent_light }};
32
+
33
+ // link colors
34
+ --link-color: {{ include.colors.link.web.valid }};
35
+ --link-underline-color: {{ include.colors.link.web.underline }};
36
+ --wiki-link-color: {{ include.colors.link.wiki.valid }};
37
+ --wiki-link-underline-color: {{ include.colors.link.wiki.underline }};
38
+ --invalid-wiki-link-color: {{ include.colors.link.wiki.invalid }};
39
+
40
+ // svg colors //
41
+
42
+ // bullets
43
+ --bullet-link: {{ include.graph.link.color }};
44
+ --bullet-node: {{ include.graph.node.visited.color }};
45
+
46
+ // pencil
47
+
48
+ // fill
49
+ --pencil-fill-default: {{ include.svg.pencil.default }};
50
+ --pencil-fill-blue: {{ include.svg.pencil.blue }};
51
+ --pencil-fill-green: {{ include.svg.pencil.green }};
52
+ --pencil-fill-red: {{ include.svg.pencil.red }};
53
+ --pencil-fill-yellow: {{ include.svg.pencil.yellow }};
54
+ // stroke
55
+ --pencil-stroke-default: {{ include.svg.pencil.default }};
56
+ --pencil-stroke-blue: {{ include.svg.pencil.blue }};
57
+ --pencil-stroke-green: {{ include.svg.pencil.green }};
58
+ --pencil-stroke-red: {{ include.svg.pencil.red }};
59
+ --pencil-stroke-yellow: {{ include.svg.pencil.yellow }};
60
+
61
+ // graph colors //
62
+
63
+ // nodes
64
+ // glow
65
+ --graph-node-current-glow: {{ include.graph.node.current }};
66
+ --graph-node-tagged-glow: {{ include.graph.node.tagged }};
67
+ --graph-node-visited-glow: {{ include.graph.node.visited.glow }};
68
+ // color
69
+ --graph-node-stroke-color: {{ include.graph.node.stroke }};
70
+ --graph-node-missing-color: {{ include.graph.node.missing }};
71
+ --graph-node-unvisited-color: {{ include.graph.node.unvisited }};
72
+ --graph-node-visited-color: {{ include.graph.node.visited.color }};
73
+
74
+ // links
75
+ --graph-link-color: {{ include.graph.link.color }};
76
+ --graph-particles-color: {{ include.graph.particles.color }};
77
+
78
+ // label text
79
+ --graph-text-color: {{ include.graph.text.color }};
80
+ }