diff --git a/jekyll_files/CHANGELOG.md b/jekyll_files/CHANGELOG.md index 460bcf0..3da18c6 100644 --- a/jekyll_files/CHANGELOG.md +++ b/jekyll_files/CHANGELOG.md @@ -1,26 +1,23 @@ - - ---- -layout: default -title: Changelog -nav_order: 4 ---- -# Laserfiche SharePoint Online Integration Changelog - -## 1.0.0.280 - -### Features - -- Initial release -- Ability to save documents to Laserfiche from SharePoint with mapped metadata -- Ability to view your Laserfiche repository from within SharePoint - -### Known Issues -- **488127:** Importing file from repository explorer hits a dead end when invalid metadata is entered - - **Workaround:** Press the cancel button and restart import process. -- **488097:** Admin Configuration page appears interactive when user is logged out - - **Workaround:** To edit the configuration, click the "Sign In" button. -- **487980:** If configured Laserfiche template is deleted, profile configuration page does not show a good error. - - **Workaround:** Delete the profile or reconfigure the metadata of the profile. - +--- +layout: default +title: Changelog +nav_order: 4 +--- +# Laserfiche SharePoint Online Integration Changelog + +## 1.0.0.280 + +### Features + +- Initial release +- Ability to save documents to Laserfiche from SharePoint with mapped metadata +- Ability to view your Laserfiche repository from within SharePoint + +### Known Issues +- **488127:** Importing file from repository explorer hits a dead end when invalid metadata is entered + - **Workaround:** Press the cancel button and restart import process. +- **488097:** Admin Configuration page appears interactive when user is logged out + - **Workaround:** To edit the configuration, click the "Sign In" button. +- **487980:** If configured Laserfiche template is deleted, profile configuration page does not show a good error. + - **Workaround:** Delete the profile or reconfigure the metadata of the profile. + diff --git a/jekyll_files/README.md b/jekyll_files/README.md index b22d24c..eeef420 100644 --- a/jekyll_files/README.md +++ b/jekyll_files/README.md @@ -1,4 +1 @@ - - -The styles here are adapted from the [Just-The-Docs](https://github.com/just-the-docs/just-the-docs) jekyll theme. +The styles here are adapted from the [Just-The-Docs](https://github.com/just-the-docs/just-the-docs) jekyll theme. diff --git a/jekyll_files/_config.yml b/jekyll_files/_config.yml index a187670..3a0c9e0 100644 --- a/jekyll_files/_config.yml +++ b/jekyll_files/_config.yml @@ -1,69 +1,66 @@ -# Copyright (c) Laserfiche. -# Licensed under the MIT License. See LICENSE in the project root for license information. - -# Jekyll Documentation Generator Configuration File - -title: Laserfiche SharePoint Online Integration - -exclude: - # from https://github.com/jekyll/jekyll/blob/master/lib/site_template/_config.yml: - - .sass-cache/ - - .jekyll-cache/ - - gemfiles/ - - Gemfile - - Gemfile.lock - - node_modules/ - - vendor/bundle/ - - vendor/cache/ - - vendor/gems/ - - vendor/ruby/ - # specific to the theme website: - - bin/ - - lib/ - - "*.gemspec" - - "*.gem" - - LICENSE.txt - - package.json - - package-lock.json - - Rakefile - - README.md - - CODE_OF_CONDUCT.md - - docker-compose.yml - - Dockerfile - # theme test code - - fixtures/ - -search_enabled: true -search: - # Split pages into sections that can be searched individually - # Supports 1 - 6, default: 2 - heading_level: 2 - # Maximum amount of previews per search result - # Default: 3 - previews: 2 - # Maximum amount of words to display before a matched word in the preview - # Default: 5 - preview_words_before: 3 - # Maximum amount of words to display after a matched word in the preview - # Default: 10 - preview_words_after: 3 - # Set the search token separator - # Default: /[\s\-/]+/ - # Example: enable support for hyphenated search words - tokenizer_separator: /[\s/]+/ - # Display the relative url in search results - # Supports true (default) or false - rel_url: true - # Enable or disable the search button that appears in the bottom right corner of every page - # Supports true or false (default) - button: false - -plugins: - - jekyll-seo-tag - # - jekyll-github-metadata - - jekyll-include-cache - -heading_anchors: true -color_scheme: lf-styles -favicon_ico: "/assets/favicon.webp" - +# Jekyll Documentation Generator Configuration File + +title: Laserfiche SharePoint Online Integration + +exclude: + # from https://github.com/jekyll/jekyll/blob/master/lib/site_template/_config.yml: + - .sass-cache/ + - .jekyll-cache/ + - gemfiles/ + - Gemfile + - Gemfile.lock + - node_modules/ + - vendor/bundle/ + - vendor/cache/ + - vendor/gems/ + - vendor/ruby/ + # specific to the theme website: + - bin/ + - lib/ + - "*.gemspec" + - "*.gem" + - LICENSE.txt + - package.json + - package-lock.json + - Rakefile + - README.md + - CODE_OF_CONDUCT.md + - docker-compose.yml + - Dockerfile + # theme test code + - fixtures/ + +search_enabled: true +search: + # Split pages into sections that can be searched individually + # Supports 1 - 6, default: 2 + heading_level: 2 + # Maximum amount of previews per search result + # Default: 3 + previews: 2 + # Maximum amount of words to display before a matched word in the preview + # Default: 5 + preview_words_before: 3 + # Maximum amount of words to display after a matched word in the preview + # Default: 10 + preview_words_after: 3 + # Set the search token separator + # Default: /[\s\-/]+/ + # Example: enable support for hyphenated search words + tokenizer_separator: /[\s/]+/ + # Display the relative url in search results + # Supports true (default) or false + rel_url: true + # Enable or disable the search button that appears in the bottom right corner of every page + # Supports true or false (default) + button: false + +plugins: + - jekyll-seo-tag + # - jekyll-github-metadata + - jekyll-include-cache + +heading_anchors: true +color_scheme: lf-styles +favicon_ico: "/assets/favicon.webp" + diff --git a/jekyll_files/_includes/components/aux_nav.html b/jekyll_files/_includes/components/aux_nav.html index 32537e5..f327da6 100644 --- a/jekyll_files/_includes/components/aux_nav.html +++ b/jekyll_files/_includes/components/aux_nav.html @@ -1,18 +1,15 @@ - - - + diff --git a/jekyll_files/_includes/components/breadcrumbs.html b/jekyll_files/_includes/components/breadcrumbs.html index ab6d051..82ad6bd 100644 --- a/jekyll_files/_includes/components/breadcrumbs.html +++ b/jekyll_files/_includes/components/breadcrumbs.html @@ -1,46 +1,43 @@ - - -{%- comment -%} - Include as: {%- include components/breadcrumbs.html -%} - Depends on: page, site. - Results in: HTML for the breadcrumbs component. - Overwrites: - pages_list, parent_page, grandparent_page. -{%- endcomment -%} - -{%- if page.url != "/" and page.parent -%} - - {%- assign pages_list = site[page.collection] - | default: site.html_pages - | where_exp: "item", "item.title != nil" - | where_exp: "item", "item.has_children != nil" -%} - - {%- if page.grand_parent -%} - {%- assign parent_page = pages_list - | where: "title", page.parent - | where: "parent", page.grand_parent - | first -%} - {%- assign grandparent_page = pages_list - | where: "title", page.grand_parent - | first -%} - {%- else -%} - {%- assign parent_page = pages_list - | where: "title", page.parent - | where_exp: "item", "item.parent == nil" - | first -%} - {%- endif -%} - - - -{%- endif -%} +{%- comment -%} + Include as: {%- include components/breadcrumbs.html -%} + Depends on: page, site. + Results in: HTML for the breadcrumbs component. + Overwrites: + pages_list, parent_page, grandparent_page. +{%- endcomment -%} + +{%- if page.url != "/" and page.parent -%} + + {%- assign pages_list = site[page.collection] + | default: site.html_pages + | where_exp: "item", "item.title != nil" + | where_exp: "item", "item.has_children != nil" -%} + + {%- if page.grand_parent -%} + {%- assign parent_page = pages_list + | where: "title", page.parent + | where: "parent", page.grand_parent + | first -%} + {%- assign grandparent_page = pages_list + | where: "title", page.grand_parent + | first -%} + {%- else -%} + {%- assign parent_page = pages_list + | where: "title", page.parent + | where_exp: "item", "item.parent == nil" + | first -%} + {%- endif -%} + + + +{%- endif -%} diff --git a/jekyll_files/_includes/components/children_nav.html b/jekyll_files/_includes/components/children_nav.html index a2b69bd..ce2482a 100644 --- a/jekyll_files/_includes/components/children_nav.html +++ b/jekyll_files/_includes/components/children_nav.html @@ -1,36 +1,33 @@ - - -{%- comment -%} - Include as: {%- include components/children_nav.html -%} - Depends on: page, site. - Results in: HTML for the children-navigation component. - Includes: - sorted_pages.html - toc_heading_custom.html - Overwrites: - child_pages. -{%- endcomment -%} - -{%- if page.has_children == true and page.has_toc != false -%} - {%- assign child_pages = site[page.collection] - | default: site.html_pages - | where: "parent", page.title - | where: "grand_parent", page.parent -%} - - {%- include sorted_pages.html pages = child_pages -%} - - {%- if page.child_nav_order == 'desc' or page.child_nav_order == 'reversed' -%} - {%- assign sorted_pages = sorted_pages | reverse -%} - {%- endif -%} -{%- endif -%} - -
-{% include toc_heading_custom.html %} - +{%- comment -%} + Include as: {%- include components/children_nav.html -%} + Depends on: page, site. + Results in: HTML for the children-navigation component. + Includes: + sorted_pages.html + toc_heading_custom.html + Overwrites: + child_pages. +{%- endcomment -%} + +{%- if page.has_children == true and page.has_toc != false -%} + {%- assign child_pages = site[page.collection] + | default: site.html_pages + | where: "parent", page.title + | where: "grand_parent", page.parent -%} + + {%- include sorted_pages.html pages = child_pages -%} + + {%- if page.child_nav_order == 'desc' or page.child_nav_order == 'reversed' -%} + {%- assign sorted_pages = sorted_pages | reverse -%} + {%- endif -%} +{%- endif -%} + +
+{% include toc_heading_custom.html %} + diff --git a/jekyll_files/_includes/components/footer.html b/jekyll_files/_includes/components/footer.html index 8cdf185..01b2c23 100644 --- a/jekyll_files/_includes/components/footer.html +++ b/jekyll_files/_includes/components/footer.html @@ -1,37 +1,34 @@ - - -{% capture footer_custom %} - {%- include footer_custom.html -%} -{% endcapture %} -{% if footer_custom != "" or site.last_edit_timestamp or site.gh_edit_link %} -
- -{% endif %} +{% capture footer_custom %} + {%- include footer_custom.html -%} +{% endcapture %} +{% if footer_custom != "" or site.last_edit_timestamp or site.gh_edit_link %} +
+ +{% endif %} diff --git a/jekyll_files/_includes/components/header.html b/jekyll_files/_includes/components/header.html index 067687b..f9c3386 100644 --- a/jekyll_files/_includes/components/header.html +++ b/jekyll_files/_includes/components/header.html @@ -1,14 +1,11 @@ - - -
- {% if site.search_enabled != false %} - {% include components/search_header.html %} - {% else %} -
- {% endif %} - {% include header_custom.html %} - {% if site.aux_links %} - {% include components/aux_nav.html %} - {% endif %} -
+
+ {% if site.search_enabled != false %} + {% include components/search_header.html %} + {% else %} +
+ {% endif %} + {% include header_custom.html %} + {% if site.aux_links %} + {% include components/aux_nav.html %} + {% endif %} +
diff --git a/jekyll_files/_includes/components/mermaid.html b/jekyll_files/_includes/components/mermaid.html index 061e70f..a99a563 100644 --- a/jekyll_files/_includes/components/mermaid.html +++ b/jekyll_files/_includes/components/mermaid.html @@ -1,48 +1,45 @@ - - -{% comment %} -The complexity of this file comes from a breaking change in Mermaid v10; mermaid.init has been deprecated (and supposedly, didn't work earlier?). - -So, we check whether the user's Mermaid version is >= 10; if not, we fall back to the previous init syntax. - -If a user is using a custom mermaid file and doesn't specify a version, we default to the < v10 behaviour. Users who use version v10 or above should specify this in the version key. -{% endcomment %} - -{% if site.mermaid.version %} - {% assign mermaid_major_version = site.mermaid.version | split: "." | first | plus: 0 %} -{% else %} - {% assign mermaid_major_version = 9 %} -{% endif %} - -{% if mermaid_major_version > 9 %} - - - -{% else %} - -{% if site.mermaid.path %} - -{% else %} - -{% endif %} - - - -{% endif %} +{% comment %} +The complexity of this file comes from a breaking change in Mermaid v10; mermaid.init has been deprecated (and supposedly, didn't work earlier?). + +So, we check whether the user's Mermaid version is >= 10; if not, we fall back to the previous init syntax. + +If a user is using a custom mermaid file and doesn't specify a version, we default to the < v10 behaviour. Users who use version v10 or above should specify this in the version key. +{% endcomment %} + +{% if site.mermaid.version %} + {% assign mermaid_major_version = site.mermaid.version | split: "." | first | plus: 0 %} +{% else %} + {% assign mermaid_major_version = 9 %} +{% endif %} + +{% if mermaid_major_version > 9 %} + + + +{% else %} + +{% if site.mermaid.path %} + +{% else %} + +{% endif %} + + + +{% endif %} diff --git a/jekyll_files/_includes/components/search_footer.html b/jekyll_files/_includes/components/search_footer.html index 70adb29..d448fdb 100644 --- a/jekyll_files/_includes/components/search_footer.html +++ b/jekyll_files/_includes/components/search_footer.html @@ -1,10 +1,7 @@ - - -{% if site.search.button %} - -{% endif %} - -
+{% if site.search.button %} + +{% endif %} + +
diff --git a/jekyll_files/_includes/components/search_header.html b/jekyll_files/_includes/components/search_header.html index cb7091e..3562124 100644 --- a/jekyll_files/_includes/components/search_header.html +++ b/jekyll_files/_includes/components/search_header.html @@ -1,12 +1,9 @@ - - -{% capture search_placeholder %}{% include search_placeholder_custom.html %}{% endcapture %} - - +{% capture search_placeholder %}{% include search_placeholder_custom.html %}{% endcapture %} + + diff --git a/jekyll_files/_includes/components/sidebar.html b/jekyll_files/_includes/components/sidebar.html index 1445637..82fc7bc 100644 --- a/jekyll_files/_includes/components/sidebar.html +++ b/jekyll_files/_includes/components/sidebar.html @@ -1,86 +1,83 @@ - - -{%- comment -%} - Include as: {%- include components/sidebar.html -%} - Depends on: page(?), site. - Results in: HTML for the side bar. - Includes: - title.html, nav.html, nav_footer_custom.html - Overwrites: - pages_top_size, collections_size, collection_entry, - collection_key, collection_value, collection, nav_footer_custom. - Should not be cached, because nav_footer_custom.html might depend on page. -{%- endcomment -%} - - +{%- comment -%} + Include as: {%- include components/sidebar.html -%} + Depends on: page(?), site. + Results in: HTML for the side bar. + Includes: + title.html, nav.html, nav_footer_custom.html + Overwrites: + pages_top_size, collections_size, collection_entry, + collection_key, collection_value, collection, nav_footer_custom. + Should not be cached, because nav_footer_custom.html might depend on page. +{%- endcomment -%} + + diff --git a/jekyll_files/_includes/favicon.html b/jekyll_files/_includes/favicon.html index 3085779..7d2a53d 100644 --- a/jekyll_files/_includes/favicon.html +++ b/jekyll_files/_includes/favicon.html @@ -1,26 +1,23 @@ - - -{%- comment -%} - Include as: {%- include_cached favicon.html -%} - Depends on: site.static_files. - Results in: HTML for a link to an existing `favicon.ico` file. - Overwrites: - file. - - The endoflife.date site has 226 pages and 3410 static files. @marcwrobel pointed - out that the time taken by evaluating the code in this file on every page when - building that site was significant, and suggested making it optional. As it is - page-independent, it can easily be cached. Doing that reduced the time taken by - rendering `_includes/head.html` from 15.294s to 10.760s, thereby reducing the - total build time from 26.074s to 21.656s -- a saving of about 17%. -{%- endcomment -%} - -{% for file in site.static_files %} - {% if file.path == site.favicon_ico or file.path == '/favicon.ico' %} - {% assign favicon = true %} - {% endif %} -{% endfor %} -{% if favicon %} - -{% endif %} +{%- comment -%} + Include as: {%- include_cached favicon.html -%} + Depends on: site.static_files. + Results in: HTML for a link to an existing `favicon.ico` file. + Overwrites: + file. + + The endoflife.date site has 226 pages and 3410 static files. @marcwrobel pointed + out that the time taken by evaluating the code in this file on every page when + building that site was significant, and suggested making it optional. As it is + page-independent, it can easily be cached. Doing that reduced the time taken by + rendering `_includes/head.html` from 15.294s to 10.760s, thereby reducing the + total build time from 26.074s to 21.656s -- a saving of about 17%. +{%- endcomment -%} + +{% for file in site.static_files %} + {% if file.path == site.favicon_ico or file.path == '/favicon.ico' %} + {% assign favicon = true %} + {% endif %} +{% endfor %} +{% if favicon %} + +{% endif %} diff --git a/jekyll_files/_includes/fix_linenos.html b/jekyll_files/_includes/fix_linenos.html index 74dc3ee..6243fb0 100644 --- a/jekyll_files/_includes/fix_linenos.html +++ b/jekyll_files/_includes/fix_linenos.html @@ -1,68 +1,65 @@ - - -{%- comment -%} -This file can be used to fix the HTML produced by Jekyll for highlighted -code with line numbers. - -It works with `{% highlight some_language linenos %}...{% endhighlight %}` -and with the Kramdown option to add line numbers to fenced code. - -The implementation was derived from the workaround provided by -Dmitry Hrabrov (DeXP) at -https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-188144901 - -EXPLANATION - -The HTML produced by Rouge highlighting with lie numbers is of the form -`code table`. Jekyll (<= 4.1.1) always wraps the highlighted HTML -with `pre`. This wrapping is not only unnecessary, but also transforms -the conforming HTML produced by Rouge to non-conforming HTML, which -results in HTML validation error reports. - -The fix removes the outer `pre` tags whenever they contain the pattern -``. - -Apart from avoiding HTML validation errors, the fix allows the use of -the [Jekyll layout for compressing HTML](http://jch.penibelst.de), -which relies on `pre` tags not being nested, according to -https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-172069842 - -USAGE - -(Any names can be used for `some_var` and `some_language`.) - -{% capture some_var %} -{% highlight some_language linenos %} -Some code -{% endhighlight %} -{% endcapture %} -{% include fix_linenos.html code=some_var %} - -For code fences: - -{% capture some_var %} -```some_language -Some code -``` -{% endcapture %} -{% assign some_var = some_var | markdownify %} -{% include fix_linenos.html code=some_var %} - -CAVEATS - -The above does not work when `Some code` happens to contain the matched string -`
`. - -The use of this file overwrites the variable `fix_linenos_code` with `nil`. - -{%- endcomment -%} - -{% assign fix_linenos_code = include.code %} -{% if fix_linenos_code contains '
' %} - {% assign fix_linenos_code = fix_linenos_code | replace: '
', '
' %}
-  {% assign fix_linenos_code = fix_linenos_code | replace: "
", "" %} -{% endif %} -{{ fix_linenos_code }} -{% assign fix_linenos_code = nil %} +{%- comment -%} +This file can be used to fix the HTML produced by Jekyll for highlighted +code with line numbers. + +It works with `{% highlight some_language linenos %}...{% endhighlight %}` +and with the Kramdown option to add line numbers to fenced code. + +The implementation was derived from the workaround provided by +Dmitry Hrabrov (DeXP) at +https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-188144901 + +EXPLANATION + +The HTML produced by Rouge highlighting with lie numbers is of the form +`code table`. Jekyll (<= 4.1.1) always wraps the highlighted HTML +with `pre`. This wrapping is not only unnecessary, but also transforms +the conforming HTML produced by Rouge to non-conforming HTML, which +results in HTML validation error reports. + +The fix removes the outer `pre` tags whenever they contain the pattern +`
`. + +Apart from avoiding HTML validation errors, the fix allows the use of +the [Jekyll layout for compressing HTML](http://jch.penibelst.de), +which relies on `pre` tags not being nested, according to +https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-172069842 + +USAGE + +(Any names can be used for `some_var` and `some_language`.) + +{% capture some_var %} +{% highlight some_language linenos %} +Some code +{% endhighlight %} +{% endcapture %} +{% include fix_linenos.html code=some_var %} + +For code fences: + +{% capture some_var %} +```some_language +Some code +``` +{% endcapture %} +{% assign some_var = some_var | markdownify %} +{% include fix_linenos.html code=some_var %} + +CAVEATS + +The above does not work when `Some code` happens to contain the matched string +`
`. + +The use of this file overwrites the variable `fix_linenos_code` with `nil`. + +{%- endcomment -%} + +{% assign fix_linenos_code = include.code %} +{% if fix_linenos_code contains '
' %} + {% assign fix_linenos_code = fix_linenos_code | replace: '
', '
' %}
+  {% assign fix_linenos_code = fix_linenos_code | replace: "
", "" %} +{% endif %} +{{ fix_linenos_code }} +{% assign fix_linenos_code = nil %} diff --git a/jekyll_files/_includes/footer_custom.html b/jekyll_files/_includes/footer_custom.html index de85e18..64e08c2 100644 --- a/jekyll_files/_includes/footer_custom.html +++ b/jekyll_files/_includes/footer_custom.html @@ -1,6 +1,3 @@ - - -{%- if site.footer_content -%} -

{{ site.footer_content }}

-{%- endif -%} +{%- if site.footer_content -%} +

{{ site.footer_content }}

+{%- endif -%} diff --git a/jekyll_files/_includes/head.html b/jekyll_files/_includes/head.html index f38a7f7..547d46c 100644 --- a/jekyll_files/_includes/head.html +++ b/jekyll_files/_includes/head.html @@ -1,52 +1,49 @@ - - -{%- comment -%} - Include as: {%- include head.html -%} - Depends on: site.ga_tracking, site.ga_tracking_anonymize_ip, - site.search_enabled, site.static_files, site.favicon_ico. - Results in: HTML for the head element. - Includes: - head_nav.html, head_custom.html. - Overwrites: - ga_tracking_ids, ga_property, file, favicon. - Should not be cached, because included files depend on page. -{%- endcomment -%} - - - - - - - - {% include head_nav.html %} - - {% if site.ga_tracking != nil %} - {% assign ga_tracking_ids = site.ga_tracking | split: "," %} - - - {% endif %} - - {% if site.search_enabled != false %} - - {% endif %} - - - - - - {% include_cached favicon.html %} - - {% seo %} - - {% include head_custom.html %} - - +{%- comment -%} + Include as: {%- include head.html -%} + Depends on: site.ga_tracking, site.ga_tracking_anonymize_ip, + site.search_enabled, site.static_files, site.favicon_ico. + Results in: HTML for the head element. + Includes: + head_nav.html, head_custom.html. + Overwrites: + ga_tracking_ids, ga_property, file, favicon. + Should not be cached, because included files depend on page. +{%- endcomment -%} + + + + + + + + {% include head_nav.html %} + + {% if site.ga_tracking != nil %} + {% assign ga_tracking_ids = site.ga_tracking | split: "," %} + + + {% endif %} + + {% if site.search_enabled != false %} + + {% endif %} + + + + + + {% include_cached favicon.html %} + + {% seo %} + + {% include head_custom.html %} + + diff --git a/jekyll_files/_includes/head_nav.html b/jekyll_files/_includes/head_nav.html index 4ed8cff..00ad569 100644 --- a/jekyll_files/_includes/head_nav.html +++ b/jekyll_files/_includes/head_nav.html @@ -1,51 +1,48 @@ - - -{%- comment -%} - Include as: {%- include head_nav.html -%} - Depends on: site.color_scheme. - Results in: HTML for a page-specific style element. - Includes: - css/activation.scss.liquid. - Overwrites: - activation, test_scss, scss, css, index, count. - Should not be cached, because css/activation.scss.liquid depends on page. -{%- endcomment -%} - -{% capture activation %} - {% include css/activation.scss.liquid %} -{%- endcapture -%} - -{% capture test_scss %} - @import "./support/support"; - @import "./color_schemes/light"; - {{ activation }} -{%- endcapture -%} - -{%- capture scss -%} - @import "./support/support"; - @import "./custom/setup"; - {% if site.color_scheme and site.color_scheme != "nil" -%} - {%- assign color_scheme = site.color_scheme -%} - {%- else -%} - {%- assign color_scheme = "light" -%} - {%- endif %} - @import "./color_schemes/light"; - {% unless color_scheme == "light" %} - @import "./color_schemes/{{ color_scheme }}"; - {% endunless %} - {{ activation }} -{%- endcapture -%} - -{%- comment -%} - Convert to CSS, then remove the color_scheme import rules to avoid duplication. - The value of count is page-dependent, but independent of custom color schemes. -{%- endcomment -%} -{%- assign count = test_scss | scssify | split: ".site-nav" | size -%} -{%- unless count == 1 %} -{%- assign index = 1 | minus: count -%} -{%- assign css = scss | scssify | split: ".site-nav" | slice: index, count | join: ".site-nav" -%} - -{%- endunless %} +{%- comment -%} + Include as: {%- include head_nav.html -%} + Depends on: site.color_scheme. + Results in: HTML for a page-specific style element. + Includes: + css/activation.scss.liquid. + Overwrites: + activation, test_scss, scss, css, index, count. + Should not be cached, because css/activation.scss.liquid depends on page. +{%- endcomment -%} + +{% capture activation %} + {% include css/activation.scss.liquid %} +{%- endcapture -%} + +{% capture test_scss %} + @import "./support/support"; + @import "./color_schemes/light"; + {{ activation }} +{%- endcapture -%} + +{%- capture scss -%} + @import "./support/support"; + @import "./custom/setup"; + {% if site.color_scheme and site.color_scheme != "nil" -%} + {%- assign color_scheme = site.color_scheme -%} + {%- else -%} + {%- assign color_scheme = "light" -%} + {%- endif %} + @import "./color_schemes/light"; + {% unless color_scheme == "light" %} + @import "./color_schemes/{{ color_scheme }}"; + {% endunless %} + {{ activation }} +{%- endcapture -%} + +{%- comment -%} + Convert to CSS, then remove the color_scheme import rules to avoid duplication. + The value of count is page-dependent, but independent of custom color schemes. +{%- endcomment -%} +{%- assign count = test_scss | scssify | split: ".site-nav" | size -%} +{%- unless count == 1 %} +{%- assign index = 1 | minus: count -%} +{%- assign css = scss | scssify | split: ".site-nav" | slice: index, count | join: ".site-nav" -%} + +{%- endunless %} diff --git a/jekyll_files/_includes/icons/code_copy.html b/jekyll_files/_includes/icons/code_copy.html index 81d7d25..fb6421f 100644 --- a/jekyll_files/_includes/icons/code_copy.html +++ b/jekyll_files/_includes/icons/code_copy.html @@ -1,18 +1,15 @@ - - - - - Copy - - - - - - - Copied - - - - - + + + Copy + + + + + + + Copied + + + + + diff --git a/jekyll_files/_includes/icons/document.html b/jekyll_files/_includes/icons/document.html index b0b516b..c09e8a5 100644 --- a/jekyll_files/_includes/icons/document.html +++ b/jekyll_files/_includes/icons/document.html @@ -1,9 +1,6 @@ - - - - Document - - - - + + Document + + + + diff --git a/jekyll_files/_includes/icons/expand.html b/jekyll_files/_includes/icons/expand.html index 9af75a6..79921a5 100644 --- a/jekyll_files/_includes/icons/expand.html +++ b/jekyll_files/_includes/icons/expand.html @@ -1,9 +1,6 @@ - - - - Expand - - - - + + Expand + + + + diff --git a/jekyll_files/_includes/icons/external_link.html b/jekyll_files/_includes/icons/external_link.html index 37dc48f..1592be6 100644 --- a/jekyll_files/_includes/icons/external_link.html +++ b/jekyll_files/_includes/icons/external_link.html @@ -1,8 +1,5 @@ - - - - - (external link) - - + + + (external link) + + diff --git a/jekyll_files/_includes/icons/icons.html b/jekyll_files/_includes/icons/icons.html index d626b85..007a495 100644 --- a/jekyll_files/_includes/icons/icons.html +++ b/jekyll_files/_includes/icons/icons.html @@ -1,16 +1,13 @@ - - - - {% include icons/link.html %} - {% include icons/menu.html %} - {% include icons/expand.html %} - {% include icons/external_link.html %} - {% if site.search_enabled != false %} - {% include icons/document.html %} - {% include icons/search.html %} - {% endif %} - {% if site.enable_copy_code_button != false %} - {% include icons/code_copy.html %} - {% endif %} - + + {% include icons/link.html %} + {% include icons/menu.html %} + {% include icons/expand.html %} + {% include icons/external_link.html %} + {% if site.search_enabled != false %} + {% include icons/document.html %} + {% include icons/search.html %} + {% endif %} + {% if site.enable_copy_code_button != false %} + {% include icons/code_copy.html %} + {% endif %} + diff --git a/jekyll_files/_includes/icons/link.html b/jekyll_files/_includes/icons/link.html index f58b34a..de24be7 100644 --- a/jekyll_files/_includes/icons/link.html +++ b/jekyll_files/_includes/icons/link.html @@ -1,9 +1,6 @@ - - - - Link - - - - + + Link + + + + diff --git a/jekyll_files/_includes/icons/menu.html b/jekyll_files/_includes/icons/menu.html index adfe666..d256575 100644 --- a/jekyll_files/_includes/icons/menu.html +++ b/jekyll_files/_includes/icons/menu.html @@ -1,9 +1,6 @@ - - - - Menu - - - - + + Menu + + + + diff --git a/jekyll_files/_includes/icons/search.html b/jekyll_files/_includes/icons/search.html index 34aa327..8f72c6a 100644 --- a/jekyll_files/_includes/icons/search.html +++ b/jekyll_files/_includes/icons/search.html @@ -1,9 +1,6 @@ - - - - Search - - - - + + Search + + + + diff --git a/jekyll_files/_includes/js/custom.js b/jekyll_files/_includes/js/custom.js index aece881..e69de29 100644 --- a/jekyll_files/_includes/js/custom.js +++ b/jekyll_files/_includes/js/custom.js @@ -1,2 +0,0 @@ -// Copyright (c) Laserfiche. -// Licensed under the MIT License. See LICENSE.md in the project root for license information. diff --git a/jekyll_files/_includes/lunr/custom-index.js b/jekyll_files/_includes/lunr/custom-index.js index 66a966e..e69de29 100644 --- a/jekyll_files/_includes/lunr/custom-index.js +++ b/jekyll_files/_includes/lunr/custom-index.js @@ -1,3 +0,0 @@ -// Copyright (c) Laserfiche. -// Licensed under the MIT License. See LICENSE.md in the project root for license information. - diff --git a/jekyll_files/_includes/mermaid_config.js b/jekyll_files/_includes/mermaid_config.js index 4547785..0967ef4 100644 --- a/jekyll_files/_includes/mermaid_config.js +++ b/jekyll_files/_includes/mermaid_config.js @@ -1,4 +1 @@ -// Copyright (c) Laserfiche. -// Licensed under the MIT License. See LICENSE.md in the project root for license information. - -{} +{} diff --git a/jekyll_files/_includes/nav.html b/jekyll_files/_includes/nav.html index 7a461e9..0b20b36 100644 --- a/jekyll_files/_includes/nav.html +++ b/jekyll_files/_includes/nav.html @@ -1,78 +1,75 @@ - - -{%- comment -%} - Include as: {%- include_cached nav.html pages=pages -%} - Depends on: include.pages. - Results in: HTML for the navigation panel. - Includes: - sorted_pages.html - Overwrites: - nav_pages, first_level_pages, second_level_pages, third_level_pages, - node, children_list, child, grand_children_list, grand_child. -{%- endcomment -%} - -{%- assign nav_pages = include.pages - | where_exp: "item", "item.title != nil" - | where_exp: "item", "item.nav_exclude != true" -%} - -{%- include sorted_pages.html pages = nav_pages -%} - -{%- comment -%} - It might be more efficient to sort the pages at each level separately. -{%- endcomment -%} - -{%- assign first_level_pages = sorted_pages - | where_exp: "item", "item.parent == nil" -%} -{%- assign second_level_pages = sorted_pages - | where_exp: "item", "item.parent != nil" - | where_exp: "item", "item.grand_parent == nil" -%} -{%- assign third_level_pages = sorted_pages - | where_exp: "item", "item.grand_parent != nil" -%} - - +{%- comment -%} + Include as: {%- include_cached nav.html pages=pages -%} + Depends on: include.pages. + Results in: HTML for the navigation panel. + Includes: + sorted_pages.html + Overwrites: + nav_pages, first_level_pages, second_level_pages, third_level_pages, + node, children_list, child, grand_children_list, grand_child. +{%- endcomment -%} + +{%- assign nav_pages = include.pages + | where_exp: "item", "item.title != nil" + | where_exp: "item", "item.nav_exclude != true" -%} + +{%- include sorted_pages.html pages = nav_pages -%} + +{%- comment -%} + It might be more efficient to sort the pages at each level separately. +{%- endcomment -%} + +{%- assign first_level_pages = sorted_pages + | where_exp: "item", "item.parent == nil" -%} +{%- assign second_level_pages = sorted_pages + | where_exp: "item", "item.parent != nil" + | where_exp: "item", "item.grand_parent == nil" -%} +{%- assign third_level_pages = sorted_pages + | where_exp: "item", "item.grand_parent != nil" -%} + + diff --git a/jekyll_files/_includes/nav_footer_custom.html b/jekyll_files/_includes/nav_footer_custom.html index 4777180..e69de29 100644 --- a/jekyll_files/_includes/nav_footer_custom.html +++ b/jekyll_files/_includes/nav_footer_custom.html @@ -1,3 +0,0 @@ - - diff --git a/jekyll_files/_includes/search_placeholder_custom.html b/jekyll_files/_includes/search_placeholder_custom.html index 4d8482c..2885058 100644 --- a/jekyll_files/_includes/search_placeholder_custom.html +++ b/jekyll_files/_includes/search_placeholder_custom.html @@ -1,4 +1 @@ - - -Search {{site.title}} +Search {{site.title}} diff --git a/jekyll_files/_includes/sorted_pages.html b/jekyll_files/_includes/sorted_pages.html index 22e97bd..659be10 100644 --- a/jekyll_files/_includes/sorted_pages.html +++ b/jekyll_files/_includes/sorted_pages.html @@ -1,112 +1,109 @@ - - -{%- comment -%} - Include as: {%- include sorted_pages.html pages=array_of_pages -%} - Depends on: include.pages. - Assigns to: sorted_pages. - Overwrites: - nav_order_pages, title_order_pages, double_quote, empty_array, - nav_number_pages, nav_string_pages, nav_order_groups, group, - title_number_pages, title_string_pages, title_order_groups. -{%- endcomment -%} - -{%- comment -%} - The `nav_order` values of pages affect the order in which they are shown in - the navigation panel and in the automatically generated tables of contents. - Sibling pages with the same `nav_order` value may be shown in any order. - Sibling pages with no `nav_order` value are shown after all pages that have - explicit `nav_order` values, ordered by their `title` values. - - The `nav_order` and `title` values can be numbers or strings. To avoid build - failures, we sort numbers and strings separately. We sort numbers by their - values, and strings lexicographically. The case-sensitivity of string sorting - is determined by the configuration setting of `nav_sort`. Pages with no `title` - value are excluded from the navigation. - - Note: Numbers used as `title` or `nav_order` values should not be in quotes, - unless you intend them to be lexicographically ordered. Numbers are written - without spaces or thousands-separators. Negative numbers are preceded by `-`. - Floats are written with the integral and fractional parts separated by `.`. - (Bounds on the magnitude and precision are presumably the same as in Liquid.) -{%- endcomment -%} - -{%- assign nav_order_pages = include.pages - | where_exp: "item", "item.nav_order != nil" -%} -{%- assign title_order_pages = include.pages - | where_exp: "item", "item.nav_order == nil" -%} - -{%- comment -%} - First, filter `nav_order_pages` and `title_order_pages` according to the type - of value to be used for sorting. - - The first character of the result of filtering with `jsonify` is `"` only for - strings. Removing `"` from its `slice : 0` has size 0 for strings and 1 for - numbers, so grouping the pages gives at most two groups. -{%- endcomment -%} - -{%- assign double_quote = '"' -%} -{%- assign empty_array = "" | split: "" -%} - -{%- assign nav_string_pages = empty_array -%} -{%- assign nav_number_pages = empty_array -%} -{%- unless nav_order_pages == empty -%} - {%- assign nav_order_groups = nav_order_pages - | group_by_exp: "item", - "item.nav_order | jsonify | slice: 0 | remove: double_quote | size" -%} - {%- for group in nav_order_groups -%} - {%- if group.name == 0 -%} - {%- assign nav_string_pages = group.items -%} - {%- elsif group.name == 1 -%} - {%- assign nav_number_pages = group.items -%} - {%- endif -%} - {%- endfor -%} -{%- endunless -%} - -{%- assign title_string_pages = empty_array -%} -{%- assign title_number_pages = empty_array -%} -{%- unless title_order_pages == empty -%} - {%- assign title_order_groups = title_order_pages - | group_by_exp: "item", - "item.title | jsonify | slice: 0 | remove: double_quote | size" -%} - {%- for group in title_order_groups -%} - {%- if group.name == 0 -%} - {%- assign title_string_pages = group.items -%} - {%- elsif group.name == 1 -%} - {%- assign title_number_pages = group.items -%} - {%- endif -%} - {%- endfor -%} -{%- endunless -%} - -{%- comment -%} - Now sort each array of pages separately, then concatenate the sorted arrays. -{%- endcomment -%} - -{%- unless nav_number_pages == empty -%} - {%- assign nav_number_pages = nav_number_pages | sort: "nav_order" -%} -{%- endunless -%} - -{%- unless nav_string_pages == empty -%} - {%- if site.nav_sort == 'case_insensitive' -%} - {%- assign nav_string_pages = nav_string_pages | sort_natural: "nav_order" -%} - {%- else -%} - {%- assign nav_string_pages = nav_string_pages | sort: "nav_order" -%} - {%- endif -%} -{%- endunless -%} - -{%- unless title_number_pages == empty -%} - {%- assign title_number_pages = title_number_pages | sort: "title" -%} -{%- endunless -%} - -{%- unless title_string_pages == empty -%} - {%- if site.nav_sort == 'case_insensitive' -%} - {%- assign title_string_pages = title_string_pages | sort_natural: "title" -%} - {%- else -%} - {%- assign title_string_pages = title_string_pages | sort: "title" -%} - {%- endif -%} -{%- endunless -%} - -{%- assign sorted_pages = nav_number_pages - | concat: nav_string_pages - | concat: title_number_pages - | concat: title_string_pages -%} +{%- comment -%} + Include as: {%- include sorted_pages.html pages=array_of_pages -%} + Depends on: include.pages. + Assigns to: sorted_pages. + Overwrites: + nav_order_pages, title_order_pages, double_quote, empty_array, + nav_number_pages, nav_string_pages, nav_order_groups, group, + title_number_pages, title_string_pages, title_order_groups. +{%- endcomment -%} + +{%- comment -%} + The `nav_order` values of pages affect the order in which they are shown in + the navigation panel and in the automatically generated tables of contents. + Sibling pages with the same `nav_order` value may be shown in any order. + Sibling pages with no `nav_order` value are shown after all pages that have + explicit `nav_order` values, ordered by their `title` values. + + The `nav_order` and `title` values can be numbers or strings. To avoid build + failures, we sort numbers and strings separately. We sort numbers by their + values, and strings lexicographically. The case-sensitivity of string sorting + is determined by the configuration setting of `nav_sort`. Pages with no `title` + value are excluded from the navigation. + + Note: Numbers used as `title` or `nav_order` values should not be in quotes, + unless you intend them to be lexicographically ordered. Numbers are written + without spaces or thousands-separators. Negative numbers are preceded by `-`. + Floats are written with the integral and fractional parts separated by `.`. + (Bounds on the magnitude and precision are presumably the same as in Liquid.) +{%- endcomment -%} + +{%- assign nav_order_pages = include.pages + | where_exp: "item", "item.nav_order != nil" -%} +{%- assign title_order_pages = include.pages + | where_exp: "item", "item.nav_order == nil" -%} + +{%- comment -%} + First, filter `nav_order_pages` and `title_order_pages` according to the type + of value to be used for sorting. + + The first character of the result of filtering with `jsonify` is `"` only for + strings. Removing `"` from its `slice : 0` has size 0 for strings and 1 for + numbers, so grouping the pages gives at most two groups. +{%- endcomment -%} + +{%- assign double_quote = '"' -%} +{%- assign empty_array = "" | split: "" -%} + +{%- assign nav_string_pages = empty_array -%} +{%- assign nav_number_pages = empty_array -%} +{%- unless nav_order_pages == empty -%} + {%- assign nav_order_groups = nav_order_pages + | group_by_exp: "item", + "item.nav_order | jsonify | slice: 0 | remove: double_quote | size" -%} + {%- for group in nav_order_groups -%} + {%- if group.name == 0 -%} + {%- assign nav_string_pages = group.items -%} + {%- elsif group.name == 1 -%} + {%- assign nav_number_pages = group.items -%} + {%- endif -%} + {%- endfor -%} +{%- endunless -%} + +{%- assign title_string_pages = empty_array -%} +{%- assign title_number_pages = empty_array -%} +{%- unless title_order_pages == empty -%} + {%- assign title_order_groups = title_order_pages + | group_by_exp: "item", + "item.title | jsonify | slice: 0 | remove: double_quote | size" -%} + {%- for group in title_order_groups -%} + {%- if group.name == 0 -%} + {%- assign title_string_pages = group.items -%} + {%- elsif group.name == 1 -%} + {%- assign title_number_pages = group.items -%} + {%- endif -%} + {%- endfor -%} +{%- endunless -%} + +{%- comment -%} + Now sort each array of pages separately, then concatenate the sorted arrays. +{%- endcomment -%} + +{%- unless nav_number_pages == empty -%} + {%- assign nav_number_pages = nav_number_pages | sort: "nav_order" -%} +{%- endunless -%} + +{%- unless nav_string_pages == empty -%} + {%- if site.nav_sort == 'case_insensitive' -%} + {%- assign nav_string_pages = nav_string_pages | sort_natural: "nav_order" -%} + {%- else -%} + {%- assign nav_string_pages = nav_string_pages | sort: "nav_order" -%} + {%- endif -%} +{%- endunless -%} + +{%- unless title_number_pages == empty -%} + {%- assign title_number_pages = title_number_pages | sort: "title" -%} +{%- endunless -%} + +{%- unless title_string_pages == empty -%} + {%- if site.nav_sort == 'case_insensitive' -%} + {%- assign title_string_pages = title_string_pages | sort_natural: "title" -%} + {%- else -%} + {%- assign title_string_pages = title_string_pages | sort: "title" -%} + {%- endif -%} +{%- endunless -%} + +{%- assign sorted_pages = nav_number_pages + | concat: nav_string_pages + | concat: title_number_pages + | concat: title_string_pages -%} diff --git a/jekyll_files/_includes/title.html b/jekyll_files/_includes/title.html index 700cf25..8f65336 100644 --- a/jekyll_files/_includes/title.html +++ b/jekyll_files/_includes/title.html @@ -1,8 +1,5 @@ - - -{% if site.logo %} - -{% else %} - {{ site.title }} -{% endif %} +{% if site.logo %} + +{% else %} + {{ site.title }} +{% endif %} diff --git a/jekyll_files/_includes/toc_heading_custom.html b/jekyll_files/_includes/toc_heading_custom.html index 34e5af4..82a7700 100644 --- a/jekyll_files/_includes/toc_heading_custom.html +++ b/jekyll_files/_includes/toc_heading_custom.html @@ -1,4 +1 @@ - - -

Table of contents

+

Table of contents

diff --git a/jekyll_files/_includes/vendor/anchor_headings.html b/jekyll_files/_includes/vendor/anchor_headings.html index 1a24828..36b8470 100644 --- a/jekyll_files/_includes/vendor/anchor_headings.html +++ b/jekyll_files/_includes/vendor/anchor_headings.html @@ -1,175 +1,172 @@ - - -{% capture headingsWorkspace %} - {% comment %} - Copyright (c) 2018 Vladimir "allejo" Jimenez - - 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. - {% endcomment %} - {% comment %} - Version 1.0.12 - 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 anchorBody="#" %} - - 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 - * headerAttrs (string) : '' - Any custom HTML attributes that will be added to the heading tag; you may NOT use `id`; - the `%heading%` and `%html_id%` placeholders are available - * anchorAttrs (string) : '' - Any custom HTML attributes that will be added to the `` tag; you may NOT use `href`, `class` or `title`; - the `%heading%` and `%html_id%` placeholders are available - * 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 - * generateId (true) : false - Set to true if a header without id should generate an id to use. - - 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 headerAttrs = include.headerAttrs %} - {% assign nodes = include.html | split: ' - {% if headerLevel == 0 %} - - {% assign firstChunk = node | split: '>' | first %} - - - {% unless firstChunk contains '<' %} - {% capture node %}{% endcapture %} - {% assign _workspace = node | split: _closingTag %} - {% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %} - {% assign header = _workspace[0] | replace: _hAttrToStrip, '' %} - {% assign escaped_header = header | strip_html | strip %} - - {% assign _classWorkspace = _workspace[0] | split: 'class="' %} - {% assign _classWorkspace = _classWorkspace[1] | split: '"' %} - {% assign _html_class = _classWorkspace[0] %} - - {% if _html_class contains "no_anchor" %} - {% assign skip_anchor = true %} - {% else %} - {% assign skip_anchor = false %} - {% endif %} - - {% assign _idWorkspace = _workspace[0] | split: 'id="' %} - {% if _idWorkspace[1] %} - {% assign _idWorkspace = _idWorkspace[1] | split: '"' %} - {% assign html_id = _idWorkspace[0] %} - {% elsif include.generateId %} - - {% assign html_id = escaped_header | slugify %} - {% if html_id == "" %} - {% assign html_id = false %} - {% endif %} - {% capture headerAttrs %}{{ headerAttrs }} id="%html_id%"{% endcapture %} - {% endif %} - - - {% capture anchor %}{% endcapture %} - - {% if skip_anchor == false and html_id and headerLevel >= minHeader and headerLevel <= maxHeader %} - {% if headerAttrs %} - {% capture _hAttrToStrip %}{{ _hAttrToStrip | split: '>' | first }} {{ headerAttrs | replace: '%heading%', escaped_header | replace: '%html_id%', html_id }}>{% endcapture %} - {% endif %} - - {% 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%', escaped_header }}"{% endcapture %} - {% endif %} - - {% if include.anchorAttrs %} - {% capture anchor %}{{ anchor }} {{ include.anchorAttrs | replace: '%heading%', escaped_header | replace: '%html_id%', html_id }}{% endcapture %} - {% endif %} - - {% capture anchor %}{{ include.anchorBody | replace: '%heading%', escaped_header | default: '' }}{% endcapture %} - - - {% if beforeHeading %} - {% capture anchor %}{{ anchor }} {% endcapture %} - {% else %} - {% capture anchor %} {{ anchor }}{% endcapture %} - {% endif %} - {% endif %} - - {% capture new_heading %} - - {% endcapture %} - - - {% assign chunkCount = _workspace | size %} - {% if chunkCount > 1 %} - {% capture new_heading %}{{ new_heading }}{{ _workspace | last }}{% endcapture %} - {% endif %} - - {% capture edited_headings %}{{ edited_headings }}{{ new_heading }}{% endcapture %} - {% endfor %} -{% endcapture %}{% assign headingsWorkspace = '' %}{{ edited_headings | strip }} +{% capture headingsWorkspace %} + {% comment %} + Copyright (c) 2018 Vladimir "allejo" Jimenez + + 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. + {% endcomment %} + {% comment %} + Version 1.0.12 + 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 anchorBody="#" %} + + 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 + * headerAttrs (string) : '' - Any custom HTML attributes that will be added to the heading tag; you may NOT use `id`; + the `%heading%` and `%html_id%` placeholders are available + * anchorAttrs (string) : '' - Any custom HTML attributes that will be added to the `` tag; you may NOT use `href`, `class` or `title`; + the `%heading%` and `%html_id%` placeholders are available + * 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 + * generateId (true) : false - Set to true if a header without id should generate an id to use. + + 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 headerAttrs = include.headerAttrs %} + {% assign nodes = include.html | split: ' + {% if headerLevel == 0 %} + + {% assign firstChunk = node | split: '>' | first %} + + + {% unless firstChunk contains '<' %} + {% capture node %}{% endcapture %} + {% assign _workspace = node | split: _closingTag %} + {% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %} + {% assign header = _workspace[0] | replace: _hAttrToStrip, '' %} + {% assign escaped_header = header | strip_html | strip %} + + {% assign _classWorkspace = _workspace[0] | split: 'class="' %} + {% assign _classWorkspace = _classWorkspace[1] | split: '"' %} + {% assign _html_class = _classWorkspace[0] %} + + {% if _html_class contains "no_anchor" %} + {% assign skip_anchor = true %} + {% else %} + {% assign skip_anchor = false %} + {% endif %} + + {% assign _idWorkspace = _workspace[0] | split: 'id="' %} + {% if _idWorkspace[1] %} + {% assign _idWorkspace = _idWorkspace[1] | split: '"' %} + {% assign html_id = _idWorkspace[0] %} + {% elsif include.generateId %} + + {% assign html_id = escaped_header | slugify %} + {% if html_id == "" %} + {% assign html_id = false %} + {% endif %} + {% capture headerAttrs %}{{ headerAttrs }} id="%html_id%"{% endcapture %} + {% endif %} + + + {% capture anchor %}{% endcapture %} + + {% if skip_anchor == false and html_id and headerLevel >= minHeader and headerLevel <= maxHeader %} + {% if headerAttrs %} + {% capture _hAttrToStrip %}{{ _hAttrToStrip | split: '>' | first }} {{ headerAttrs | replace: '%heading%', escaped_header | replace: '%html_id%', html_id }}>{% endcapture %} + {% endif %} + + {% 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%', escaped_header }}"{% endcapture %} + {% endif %} + + {% if include.anchorAttrs %} + {% capture anchor %}{{ anchor }} {{ include.anchorAttrs | replace: '%heading%', escaped_header | replace: '%html_id%', html_id }}{% endcapture %} + {% endif %} + + {% capture anchor %}{{ include.anchorBody | replace: '%heading%', escaped_header | default: '' }}{% endcapture %} + + + {% if beforeHeading %} + {% capture anchor %}{{ anchor }} {% endcapture %} + {% else %} + {% capture anchor %} {{ anchor }}{% endcapture %} + {% endif %} + {% endif %} + + {% capture new_heading %} + + {% endcapture %} + + + {% assign chunkCount = _workspace | size %} + {% if chunkCount > 1 %} + {% capture new_heading %}{{ new_heading }}{{ _workspace | last }}{% endcapture %} + {% endif %} + + {% capture edited_headings %}{{ edited_headings }}{{ new_heading }}{% endcapture %} + {% endfor %} +{% endcapture %}{% assign headingsWorkspace = '' %}{{ edited_headings | strip }} diff --git a/jekyll_files/_layouts/about.html b/jekyll_files/_layouts/about.html index 925fdbc..5e71126 100644 --- a/jekyll_files/_layouts/about.html +++ b/jekyll_files/_layouts/about.html @@ -1,8 +1,5 @@ - - ---- -layout: default ---- - -{{ content }} +--- +layout: default +--- + +{{ content }} diff --git a/jekyll_files/_layouts/default.html b/jekyll_files/_layouts/default.html index 17ffa9b..923c1c1 100644 --- a/jekyll_files/_layouts/default.html +++ b/jekyll_files/_layouts/default.html @@ -1,44 +1,41 @@ - - ---- -layout: table_wrappers ---- - - - - -{% include head.html %} - - Skip to main content - {% include icons/icons.html %} - {% include components/sidebar.html %} -
- {% include components/header.html %} -
- {% include components/breadcrumbs.html %} -
-
- {% if site.heading_anchors != false %} - {% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="" anchorClass="anchor-heading" anchorAttrs="aria-labelledby=\"%html_id%\"" %} - {% else %} - {{ content }} - {% endif %} - - {% if page.has_children == true and page.has_toc != false %} - {% include components/children_nav.html %} - {% endif %} -
- {% include components/footer.html %} -
-
- {% if site.search_enabled != false %} - {% include components/search_footer.html %} - {% endif %} -
- - {% if site.mermaid %} - {% include components/mermaid.html %} - {% endif %} - - +--- +layout: table_wrappers +--- + + + + +{% include head.html %} + + Skip to main content + {% include icons/icons.html %} + {% include components/sidebar.html %} +
+ {% include components/header.html %} +
+ {% include components/breadcrumbs.html %} +
+
+ {% if site.heading_anchors != false %} + {% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="" anchorClass="anchor-heading" anchorAttrs="aria-labelledby=\"%html_id%\"" %} + {% else %} + {{ content }} + {% endif %} + + {% if page.has_children == true and page.has_toc != false %} + {% include components/children_nav.html %} + {% endif %} +
+ {% include components/footer.html %} +
+
+ {% if site.search_enabled != false %} + {% include components/search_footer.html %} + {% endif %} +
+ + {% if site.mermaid %} + {% include components/mermaid.html %} + {% endif %} + + diff --git a/jekyll_files/_layouts/home.html b/jekyll_files/_layouts/home.html index 925fdbc..5e71126 100644 --- a/jekyll_files/_layouts/home.html +++ b/jekyll_files/_layouts/home.html @@ -1,8 +1,5 @@ - - ---- -layout: default ---- - -{{ content }} +--- +layout: default +--- + +{{ content }} diff --git a/jekyll_files/_layouts/minimal.html b/jekyll_files/_layouts/minimal.html index 4e0188e..b12c5db 100644 --- a/jekyll_files/_layouts/minimal.html +++ b/jekyll_files/_layouts/minimal.html @@ -1,37 +1,34 @@ - - ---- -layout: table_wrappers ---- - - - - -{% include head.html %} - - Skip to main content - {% include icons/icons.html %} -
- {% include components/breadcrumbs.html %} -
- {% if site.heading_anchors != false %} - {% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="" anchorClass="anchor-heading" anchorAttrs="aria-labelledby=\"%html_id%\"" %} - {% else %} - {{ content }} - {% endif %} - - {% if page.has_children == true and page.has_toc != false %} - {% include components/children_nav.html %} - {% endif %} - - {% include components/footer.html %} - -
-
- - {% if site.mermaid %} - {% include components/mermaid.html %} - {% endif %} - - +--- +layout: table_wrappers +--- + + + + +{% include head.html %} + + Skip to main content + {% include icons/icons.html %} +
+ {% include components/breadcrumbs.html %} +
+ {% if site.heading_anchors != false %} + {% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="" anchorClass="anchor-heading" anchorAttrs="aria-labelledby=\"%html_id%\"" %} + {% else %} + {{ content }} + {% endif %} + + {% if page.has_children == true and page.has_toc != false %} + {% include components/children_nav.html %} + {% endif %} + + {% include components/footer.html %} + +
+
+ + {% if site.mermaid %} + {% include components/mermaid.html %} + {% endif %} + + diff --git a/jekyll_files/_layouts/page.html b/jekyll_files/_layouts/page.html index 925fdbc..5e71126 100644 --- a/jekyll_files/_layouts/page.html +++ b/jekyll_files/_layouts/page.html @@ -1,8 +1,5 @@ - - ---- -layout: default ---- - -{{ content }} +--- +layout: default +--- + +{{ content }} diff --git a/jekyll_files/_layouts/post.html b/jekyll_files/_layouts/post.html index 925fdbc..5e71126 100644 --- a/jekyll_files/_layouts/post.html +++ b/jekyll_files/_layouts/post.html @@ -1,8 +1,5 @@ - - ---- -layout: default ---- - -{{ content }} +--- +layout: default +--- + +{{ content }} diff --git a/jekyll_files/_layouts/table_wrappers.html b/jekyll_files/_layouts/table_wrappers.html index aadbf33..3f8f226 100644 --- a/jekyll_files/_layouts/table_wrappers.html +++ b/jekyll_files/_layouts/table_wrappers.html @@ -1,10 +1,7 @@ - - ---- -layout: vendor/compress ---- - -{% assign content_ = content | replace: '', '
' %} -{{ content_ }} +--- +layout: vendor/compress +--- + +{% assign content_ = content | replace: '', '' %} +{{ content_ }} diff --git a/jekyll_files/_layouts/vendor/compress.html b/jekyll_files/_layouts/vendor/compress.html index 995ca73..bb34487 100644 --- a/jekyll_files/_layouts/vendor/compress.html +++ b/jekyll_files/_layouts/vendor/compress.html @@ -1,13 +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 %}{% 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: "" %}{% 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 "" %}{% endif %}{% unless _pre_before contains "" 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 = " ;; ;" | 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 %}
Step Bytes
raw {{ content | size }}{% if _profile_endings %}
endings {{ _profile_endings }}{% endif %}{% if _profile_startings %}
startings {{ _profile_startings }}{% endif %}{% if _profile_comments %}
comments {{ _profile_comments }}{% endif %}{% if _profile_collapse %}
collapse {{ _profile_collapse }}{% endif %}{% if _profile_clippings %}
clippings {{ _profile_clippings }}{% endif %}
{% endif %}{% endif %} +--- +# 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 %}{% 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: "" %}{% 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 "" %}{% endif %}{% unless _pre_before contains "" 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 = " ;; ;" | 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 %}
Step Bytes
raw {{ content | size }}{% if _profile_endings %}
endings {{ _profile_endings }}{% endif %}{% if _profile_startings %}
startings {{ _profile_startings }}{% endif %}{% if _profile_comments %}
comments {{ _profile_comments }}{% endif %}{% if _profile_collapse %}
collapse {{ _profile_collapse }}{% endif %}{% if _profile_clippings %}
clippings {{ _profile_clippings }}{% endif %}
{% endif %}{% endif %} diff --git a/jekyll_files/_sass/vendor/normalize.scss/README.md b/jekyll_files/_sass/vendor/normalize.scss/README.md index 1c74ddf..7af1714 100644 --- a/jekyll_files/_sass/vendor/normalize.scss/README.md +++ b/jekyll_files/_sass/vendor/normalize.scss/README.md @@ -1,10 +1,7 @@ - - -# normalize.scss - -Normalize.scss is an SCSS copy of [normalize.css](http://necolas.github.io/normalize.css), a customisable CSS file that makes browsers render all elements more consistently and in line with modern standards. - -The [normalize.scss fork](https://github.com/guerrero/normalize.scss) of [normalize.css](http://necolas.github.io/normalize.css) was archived in 2014, and has not been updated since v0.1.0. - -[View the normalize.css test file](http://necolas.github.io/normalize.css/latest/test.html) +# normalize.scss + +Normalize.scss is an SCSS copy of [normalize.css](http://necolas.github.io/normalize.css), a customisable CSS file that makes browsers render all elements more consistently and in line with modern standards. + +The [normalize.scss fork](https://github.com/guerrero/normalize.scss) of [normalize.css](http://necolas.github.io/normalize.css) was archived in 2014, and has not been updated since v0.1.0. + +[View the normalize.css test file](http://necolas.github.io/normalize.css/latest/test.html) diff --git a/jekyll_files/assets/js/just-the-docs.js b/jekyll_files/assets/js/just-the-docs.js index be05d36..fb924de 100644 --- a/jekyll_files/assets/js/just-the-docs.js +++ b/jekyll_files/assets/js/just-the-docs.js @@ -1,579 +1,576 @@ -// Copyright (c) Laserfiche. -// Licensed under the MIT License. See LICENSE.md in the project root for license information. - ---- ---- -(function (jtd, undefined) { - -// Event handling - -jtd.addEvent = function(el, type, handler) { - if (el.attachEvent) el.attachEvent('on'+type, handler); else el.addEventListener(type, handler); -} -jtd.removeEvent = function(el, 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 - -function initNav() { - jtd.addEvent(document, 'click', function(e){ - var target = e.target; - while (target && !(target.classList && target.classList.contains('nav-list-expander'))) { - target = target.parentNode; - } - if (target) { - e.preventDefault(); - target.ariaPressed = target.parentNode.classList.toggle('active'); - } - }); - - const siteNav = document.getElementById('site-nav'); - const mainHeader = document.getElementById('main-header'); - const menuButton = document.getElementById('menu-button'); - - disableHeadStyleSheet(); - - jtd.addEvent(menuButton, 'click', function(e){ - e.preventDefault(); - - if (menuButton.classList.toggle('nav-open')) { - siteNav.classList.add('nav-open'); - mainHeader.classList.add('nav-open'); - menuButton.ariaPressed = true; - } else { - siteNav.classList.remove('nav-open'); - mainHeader.classList.remove('nav-open'); - menuButton.ariaPressed = false; - } - }); - - {%- if site.search_enabled != false and site.search.button %} - const searchInput = document.getElementById('search-input'); - const searchButton = document.getElementById('search-button'); - - jtd.addEvent(searchButton, 'click', function(e){ - e.preventDefault(); - - mainHeader.classList.add('nav-open'); - searchInput.focus(); - }); - {%- endif %} -} - -// The page-specific