assets/data/authclient.html in j1-template-2024.2.1 vs assets/data/authclient.html in j1-template-2024.3.12

- old
+ new

@@ -1,10 +1,10 @@ --- regenerate: true exclude_from_search: true --- -{% capture cache %} +{%- capture cache -%} {% comment %} # ----------------------------------------------------------------------------- # ~/assets/data/authclient.html # Liquid PROCEDURE to generate the HTML (data) portion of all modals used @@ -14,11 +14,11 @@ # https://jekyll.one # # Copyright (C) 2023, 2024 Juergen Adams # # J1 Template is licensed under the MIT License. - # See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE.md + # See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE # ----------------------------------------------------------------------------- # Test data: # liquid_var: {{ liquid_var | debug }} # authclient_options: {{ authclient_options | debug }} # ----------------------------------------------------------------------------- @@ -129,266 +129,308 @@ {% endif %} {% comment %} Main ================================================================================ {% endcomment %} -<!-- [INFO ] [~/assets/data/authclient.html ] [ set meta data (robots) to exclude HTML datafiles from index ] --> -<head> - <meta name="robots" content="noindex, nofollow"> -</head> +<!DOCTYPE {{site.doctype}}> +<html lang="{{site.language}}"> + <head> + <!-- [INFO ] [~/assets/data/authclient.html ] [ set meta data (robots) to exclude HTML datafiles from index ] --> + <meta name="robots" content="noindex, nofollow"> + <meta name="authclient" content="module data file"> + </head> -<div id="{{authclient_options.xhr_data_element}}"> + <body> + <!-- START xhr_data_element --> + <div id="{{authclient_options.xhr_data_element}}"> - {% comment %} Modal SignIn - -------------------------------------------------------------------------------- {% endcomment %} - <!-- [INFO ] [~/assets/data/authclient.html ] [START: Modal signin|signup] --> - <div id="modalOmniSignIn" - class="modal fade" - role="dialog" - tabindex="-1" - aria-labelledby="modalOmniSignIn" aria-hidden="true"> - <div class="modal-dialog modal-frame modal-top modal-notify modal-primary" role="document"> + {% comment %} Modal SignIn + -------------------------------------------------------------------------- {% endcomment %} - <!-- Content --> - <div class="modal-content"> + <!-- [INFO ] [~/assets/data/authclient.html ] [START: Modal signin|signup] --> + <div id="modalOmniSignIn" + class="modal fade" + role="dialog" + tabindex="-1" + aria-labelledby="modalOmniSignIn" aria-hidden="true"> + <!-- Modal Dialog --> + <div class="modal-dialog modal-frame modal-top modal-notify modal-primary" role="document"> - <!--Header--> - <div class="modal-header"> - <p class="lead"> - {{signin_modal_title}} - </p> - </div> + <!-- MODAL Content --> + <div class="modal-content"> - <!-- Body --> - <div class="modal-body mr-5 ml-5 mb-0"> - <p style="text-align: justify;">{{signin_modal_body_text | asciidocify}}</p> - <h5 class="mt-1 mb-3 notoc">Available options</h5> + <!-- Modal Header --> + <div class="modal-header"> + <p class="lead"> + {{signin_modal_title}} + </p> + </div> + <!-- END Modal Header --> + <!-- MODAL Body --> + {%- capture signin_modal_body_text -%}{{signin_modal_body_text|asciidocify}}{%- endcapture -%} + <div class="modal-body mr-5 ml-5 mb-0"> + <p style="text-align: justify;"> + {{signin_modal_body_text}} + </p> + <h5 class="mt-1 mb-3 notoc">Available options</h5> - <!-- Modal nav pills --> - <div class="row ml-2 mr-2"> - <ul class="nav nav-pills nav-pills-icons mt-2" role="tablist"> + <!-- Modal nav pills --> + <div class="row ml-2 mr-2"> + <ul class="nav nav-pills nav-pills-icons mt-2" role="tablist"> - {% comment %} Array used to order the (provider) tabs - ---------------------------------------------------------------------- {% endcomment %} - {% for provider in providers %} + {% comment %} Array used to order the (provider) tabs + ---------------------------------------------------------------- {% endcomment %} + {% for provider in providers %} - {% if provider == active_provider %} - {% assign active_flag = " active" %} - {% else %} - {% assign active_flag = "" %} - {% endif %} + {% if provider == active_provider %} + {% assign active_flag = " active" %} + {% else %} + {% assign active_flag = "" %} + {% endif %} - {% if provider == 'disqus' and auth_disqus_enabled %} - <li class="nav-item"> - <a class="nav-link{{active_flag}}" href="#h-tabs-{{ auth_disqus_id }}" role="tab" data-bs-toggle="tab" aria-expanded="false" aria-selected="false"> - <i class="mdib mdib-disqus mt-1 mb-2"></i> {{ auth_disqus_title }} - </a> - </li> - {% endif %} + {% if provider == 'disqus' and auth_disqus_enabled %} + <li class="nav-item"> + <a class="nav-link{{active_flag}}" href="#h-tabs-{{ auth_disqus_id }}" role="tab" data-bs-toggle="tab" aria-expanded="false" aria-selected="false"> + <i class="mdib mdib-disqus mt-1 mb-2"></i> {{ auth_disqus_title }} + </a> + </li> + {% endif %} - {% if provider == 'github' and auth_github_enabled %} - <li class="nav-item"> - <a class="nav-link{{active_flag}}" href="#h-tabs-{{ auth_github_id }}" role="tab" data-bs-toggle="tab" aria-expanded="false" aria-selected="true"> - <i class="mdib mdib-github mt-1 mb-2"></i> {{ auth_github_title }} - </a> - </li> - {% endif %} + {% if provider == 'github' and auth_github_enabled %} + <li class="nav-item"> + <a class="nav-link{{active_flag}}" href="#h-tabs-{{ auth_github_id }}" role="tab" data-bs-toggle="tab" aria-expanded="false" aria-selected="true"> + <i class="mdib mdib-github mt-1 mb-2"></i> {{ auth_github_title }} + </a> + </li> + {% endif %} - {% if provider == 'facebook' and auth_facebook_enabled %} - <li class="nav-item"> - <a class="nav-link{{active_flag}}" href="#h-tabs-{{ auth_facebook_id }}" role="tab" data-bs-toggle="tab" aria-expanded="false" aria-selected="false"> - <i class="mdib mdib-facebook mt-1 mb-2"></i> {{ auth_facebook_title }} - </a> - </li> - {% endif %} + {% if provider == 'facebook' and auth_facebook_enabled %} + <li class="nav-item"> + <a class="nav-link{{active_flag}}" href="#h-tabs-{{ auth_facebook_id }}" role="tab" data-bs-toggle="tab" aria-expanded="false" aria-selected="false"> + <i class="mdib mdib-facebook mt-1 mb-2"></i> {{ auth_facebook_title }} + </a> + </li> + {% endif %} - {% if provider == 'twitter' and auth_twitter_enabled %} - <li class="nav-item"> - <a class="nav-link{{active_flag}}" href="#h-tabs-{{ auth_twitter_id }}" role="tab" data-bs-toggle="tab" aria-expanded="false" aria-selected="false"> - <i class="mdib mdib-twitter mt-1 mb-2"></i> {{ auth_twitter_title }} - </a> - </li> - {% endif %} + {% if provider == 'twitter' and auth_twitter_enabled %} + <li class="nav-item"> + <a class="nav-link{{active_flag}}" href="#h-tabs-{{ auth_twitter_id }}" role="tab" data-bs-toggle="tab" aria-expanded="false" aria-selected="false"> + <i class="mdib mdib-twitter mt-1 mb-2"></i> {{ auth_twitter_title }} + </a> + </li> + {% endif %} - {% if provider == 'patreon' and auth_patreon_enabled %} - <li class="nav-item"> - <a class="nav-link{{active_flag}}" href="#h-tabs-{{ auth_patreon_id }}" role="tab" data-bs-toggle="tab" aria-expanded="true" aria-selected="false"> - <i class="mdib mdib-patreon mt-1 mb-2"></i> - {{ auth_patreon_title }} - </a> - </li> - {% endif %} + {% if provider == 'patreon' and auth_patreon_enabled %} + <li class="nav-item"> + <a class="nav-link{{active_flag}}" href="#h-tabs-{{ auth_patreon_id }}" role="tab" data-bs-toggle="tab" aria-expanded="true" aria-selected="false"> + <i class="mdib mdib-patreon mt-1 mb-2"></i> + {{ auth_patreon_title }} + </a> + </li> + {% endif %} - {% endfor %} - </ul> + {% endfor %} + </ul> - <div class="tab-content tab-space"> - {% for provider in providers %} + <div class="tab-content tab-space"> + {% for provider in providers %} - {% if provider == active_provider %} - {% assign active_flag = " active" %} - {% else %} - {% assign active_flag = "" %} - {% endif %} + {% if provider == active_provider %} + {% assign active_flag = " active" %} + {% else %} + {% assign active_flag = "" %} + {% endif %} - {% if provider == 'disqus' and auth_disqus_enabled %} - <div class="tab-pane{{active_flag}}" id="h-tabs-{{ auth_disqus_id }}">{{ auth_disqus_text | asciidocify }}</div> - {% endif %} - {% if provider == 'github' and auth_github_enabled %} - <div class="tab-pane{{active_flag}}" id="h-tabs-{{ auth_github_id }}">{{ auth_github_text | asciidocify }}</div> - {% endif %} - {% if provider == 'facebook' and auth_facebook_enabled %} - <div class="tab-pane{{active_flag}}" id="h-tabs-{{ auth_facebook_id }}">{{ auth_facebook_text | asciidocify }}</div> - {% endif %} - {% if provider == 'patreon' and auth_patreon_enabled %} - <div class="tab-pane{{active_flag}}" id="h-tabs-{{ auth_patreon_id }}">{{ auth_patreon_text | asciidocify }}</div> - {% endif %} - {% if provider == 'twitter' and auth_twitter_enabled %} - <div class="tab-pane{{active_flag}}" id="h-tabs-{{ auth_twitter_id }}">{{ auth_twitter_text | asciidocify }}</div> - {% endif %} - {% endfor %} - </div> + {% if provider == 'disqus' and auth_disqus_enabled %} + <div class="tab-pane{{active_flag}}" id="h-tabs-{{ auth_disqus_id }}">{{ auth_disqus_text | asciidocify }}</div> + {% endif %} + {% if provider == 'github' and auth_github_enabled %} + <div class="tab-pane{{active_flag}}" id="h-tabs-{{ auth_github_id }}">{{ auth_github_text | asciidocify }}</div> + {% endif %} + {% if provider == 'facebook' and auth_facebook_enabled %} + <div class="tab-pane{{active_flag}}" id="h-tabs-{{ auth_facebook_id }}">{{ auth_facebook_text | asciidocify }}</div> + {% endif %} + {% if provider == 'patreon' and auth_patreon_enabled %} + <div class="tab-pane{{active_flag}}" id="h-tabs-{{ auth_patreon_id }}">{{ auth_patreon_text | asciidocify }}</div> + {% endif %} + {% if provider == 'twitter' and auth_twitter_enabled %} + <div class="tab-pane{{active_flag}}" id="h-tabs-{{ auth_twitter_id }}">{{ auth_twitter_text | asciidocify }}</div> + {% endif %} + {% endfor %} + </div> + </div> + </div> + <!-- END Body --> + <!-- Modal Footer --> + <div class="modal-footer justify-content-center"> + <a href="#" type="button" id="signInButton" class="btn btn btn-flex btn-md btn-primary mr-3" data-bs-dismiss="modal"> + <i class="mdib mdib-login mdib-18px mr-1"></i> + Yes, please + </a> + <a href="#" type="button" id="exitButton" class="btn btn btn-flex btn-md btn-secondary" data-bs-dismiss="modal"> + <i class="mdib mdib-close mdib-18px mr-1"></i> + No, thanks + </a> + </div> + <!-- END Modal Footer --> </div> - </div> + <!-- END MODAL Content --> - <!-- Footer --> - <div class="modal-footer justify-content-center"> - <a href="#" type="button" id="signInButton" class="btn btn btn-flex btn-md btn-primary mr-3" data-bs-dismiss="modal"> - <i class="mdib mdib-login mdib-18px mr-1"></i> - Yes, please - </a> - <a href="#" type="button" id="exitButton" class="btn btn btn-flex btn-md btn-secondary" data-bs-dismiss="modal"> - <i class="mdib mdib-close mdib-18px mr-1"></i> - No, thanks - </a> </div> - </div> - <!-- END Content --> + <!-- END Modal Dialog --> + </div> <!-- Modal SignIn --> + <!-- [INFO ] [~/assets/data/authclient.html ] [END: Modal signin] --> - </div> - </div> <!-- Modal SignIn --> - <!-- [INFO ] [~/assets/data/authclient.html ] [END: Modal signin] --> + {% comment %} END Modal SignIn + -------------------------------------------------------------------------- {% endcomment %} - {% comment %} Modal SignOut - -------------------------------------------------------------------------------- {% endcomment %} - <!-- [INFO ] [~/assets/data/authclient.html ] [START: Modal signout] --> - <div id="modalOmniSignOut" - class="modal fade top" - role="dialog" tabindex="-1" - aria-labelledby="modalOmniSignOut" aria-hidden="true" data-backdrop="false"> - <div class="modal-dialog modal-frame modal-top modal-notify modal-danger" role="document"> - <!-- Content --> - <div class="modal-content"> - <!-- Header --> - <div class="modal-header"> - <p class="lead"> - {{signout_modal_title}} - </p> - </div> <!-- END Header --> + {% comment %} Modal SignOut + -------------------------------------------------------------------------- {% endcomment %} + <!-- [INFO ] [~/assets/data/authclient.html ] [START: Modal signout] --> + <div id="modalOmniSignOut" + class="modal fade top" + role="dialog" tabindex="-1" + aria-labelledby="modalOmniSignOut" aria-hidden="true" data-backdrop="false"> + <!-- Modal Dialog --> + <div class="modal-dialog modal-frame modal-top modal-notify modal-danger" role="document"> + <!-- Content --> + <div class="modal-content"> - <!-- Body --> - <div class="modal-body mr-5 ml-5 mb-0"> - <!-- User info placed dynamically --> - <div id="user_state_info" class="text-left mb-3"> - <h4 class="user-info">You are signed in to provider: </h4> - </div> + <!-- Header --> + <div class="modal-header"> + <p class="lead"> + {{signout_modal_title}} + </p> + </div> <!-- END Header --> - <!-- p style="text-align: justify;"> - {{signout_modal_body_text | asciidocify}} - </p --> - <div>{{signout_modal_body_text | asciidocify}}</div> + <!-- Body --> + <div class="modal-body mr-5 ml-5 mb-0"> + <!-- User info placed dynamically --> + <div id="user_state_info" class="text-left mb-3"> + <h4 class="user-info">You are signed in to provider: </h4> + </div> - <!-- Options DISABLED for now - <h5 class="mt-1 mb-3 notoc">Available options</h5> - <form id="authclient-form" class="form-horizontal"> - <div class="mdc-list-group"> - <div class="ml-5 mt-0 mr-0 mb-5"> + {% comment %} Body text (DISABLED) + ------------------------------------------------------------------ + <!-- p style="text-align: justify;"> + {{signout_modal_body_text | asciidocify}} + </p --> + ------------------------------------------------------------------ {% endcomment %} + <div>{{signout_modal_body_text | asciidocify}}</div> - <div class="switch"> - <label> - <input id="providerSignOut" name="providerSignOut" type="checkbox"> - <span class="bmd-switch-track"></span> - SignOut completely (Provider) - </label> - </div> + {% comment %} + START Options (DISABLED) + ------------------------------------------------------------------ + <!-- Options DISABLED for now + <h5 class="mt-1 mb-3 notoc">Available options</h5> + <form id="authclient-form" class="form-horizontal"> + <div class="mdc-list-group"> + <div class="ml-5 mt-0 mr-0 mb-5"> - </div> - </div> - </form> - --> - </div> <!-- END Body --> + <div class="switch"> + <label> + <input id="providerSignOut" name="providerSignOut" type="checkbox"> + <span class="bmd-switch-track"></span> + SignOut completely (Provider) + </label> + </div> - <!-- Footer --> - <div class="modal-footer"> - <a href="#" type="button" id="signOutButton" class="btn btn btn-flex btn-md btn-danger mr-3" data-bs-dismiss="modal"> - <i class="mdib mdib-logout mdib-18px mr-1"></i> - Yes, please - </a> - <a href="#" type="button" id="exitButton" class="btn btn btn-flex btn-md btn-secondary" data-bs-dismiss="modal"> - <i class="mdib mdib-close mdib-18px mr-1"></i> - No, thanks - </a> - </div> <!-- END Footer --> + </div> + </div> + </form> + --> + END Options (DISABLED) + ------------------------------------------------------------------ + {% endcomment %} - </div> <!-- END Modal content --> - </div> <!-- END Modal dialog --> - </div> <!-- END Modal SignOut --> + </div> <!-- END Body --> - {% comment %} Modal UserStateInfo - -------------------------------------------------------------------------------- {% endcomment %} - <!-- [INFO ] [~/assets/data/authclient.html ] [START: Modal SIDE INFO signed in] --> - <div class="modal fade right" id="sideModalAlreadySigneIn" tabindex="-1" role="dialog" aria-labelledby="sideModalAlreadySigneIn" aria-hidden="true" data-backdrop="false"> - <div class="modal-dialog modal-side modal-top-right modal-notify modal-success" role="document"> - <!-- Content --> - <div class="modal-content"> - <!-- Header --> - <div class="modal-header"> - <i class="mdib mdib-account mdib-2x md-grey-100"></i> - <p class="lead">Info</p> + <!-- Footer --> + <div class="modal-footer"> + <a href="#" type="button" id="signOutButton" class="btn btn btn-flex btn-md btn-danger mr-3" data-bs-dismiss="modal"> + <i class="mdib mdib-logout mdib-18px mr-1"></i> + Yes, please + </a> + <a href="#" type="button" id="exitButton" class="btn btn btn-flex btn-md btn-secondary" data-bs-dismiss="modal"> + <i class="mdib mdib-close mdib-18px mr-1"></i> + No, thanks + </a> + </div> <!-- END Footer --> + + </div> <!-- END Modal content --> </div> - <!-- Body --> - <div class="modal-body"> - <div class="text-center"> - <p>You're already signed in</p> + <!-- END Modal dialog --> + </div> <!-- END Modal SignOut --> + <!-- [INFO ] [~/assets/data/authclient.html ] [END: Modal SignOut] --> + + {% comment %} Modal UserStateInfo + -------------------------------------------------------------------------- {% endcomment %} + <!-- [INFO ] [~/assets/data/authclient.html ] [START: Modal SIDE INFO signed in] --> + <div class="modal fade right" id="sideModalAlreadySigneIn" tabindex="-1" role="dialog" aria-labelledby="sideModalAlreadySigneIn" aria-hidden="true" data-backdrop="false"> + <!-- Modal Dialog --> + <div class="modal-dialog modal-side modal-top-right modal-notify modal-success" role="document"> + <!-- Content --> + <div class="modal-content"> + <!-- Header --> + <div class="modal-header"> + <i class="mdib mdib-account mdib-2x md-grey-100"></i> + <p class="lead">Info</p> + </div> + <!-- Body --> + <div class="modal-body"> + <div class="text-center"> + <p>You're already signed in</p> + </div> + </div> + <!-- Footer --> + <div class="modal-footer justify-content-center"> + <a href="#" type="button" class="btn btn btn-flex btn-md btn-primary" data-bs-dismiss="modal">OK</a> + </div> </div> + <!-- END Content --> </div> - <!-- Footer --> - <div class="modal-footer justify-content-center"> - <a href="#" type="button" class="btn btn btn-flex btn-md btn-primary" data-bs-dismiss="modal">OK</a> - </div> - </div> - <!-- END Content --> - </div> - </div> <!-- END Modal UserStateInfo --> - <!-- [INFO ] [~/assets/data/authclient.html ] [END: Modal SIDE INFO signed in] --> + <!-- END Modal Dialog --> + </div> <!-- END Modal UserStateInfo --> + <!-- [INFO ] [~/assets/data/authclient.html ] [END: Modal SIDE INFO signed in] --> - {% comment %} Modal TOP INFO signed in - -------------------------------------------------------------------------------- - <!-- [INFO ] [~/assets/data/authclient.html ] [START: Modal TOP INFO signed in] --> - <div class="modal fade top" id="modalTopInfoSignedIn" tabindex="-1" role="dialog" aria-labelledby="modalTopInfoSignedIn" aria-hidden="true" data-backdrop="false"> - <div class="modal-dialog modal-frame modal-top modal-notify modal-primary" role="document"> - <!-- Content --> - <div class="modal-content"> - <!-- Body --> - <div class="modal-body"> - <div class="row px-4"> - <p class="pt-1 pr-2">You're already signed in</p> - <a href="#" type="button" class="btn btn btn-flex btn-md btn-primary" data-bs-dismiss="modal"OK</a> + {% comment %} + START Modal TOP INFO signed in (DISABLED) + -------------------------------------------------------------------------- + <!-- [INFO ] [~/assets/data/authclient.html ] [START: Modal TOP INFO signed in] --> + <div class="modal fade top" id="modalTopInfoSignedIn" tabindex="-1" role="dialog" aria-labelledby="modalTopInfoSignedIn" aria-hidden="true" data-backdrop="false"> + <!-- Modal Dialog --> + <div class="modal-dialog modal-frame modal-top modal-notify modal-primary" role="document"> + <!-- MODAL Content --> + <div class="modal-content"> + <!-- MODAL Body --> + <div class="modal-body"> + <div class="row px-4"> + <p class="pt-1 pr-2">You're already signed in</p> + <a href="#" type="button" class="btn btn btn-flex btn-md btn-primary" data-bs-dismiss="modal"OK</a> + </div> + </div> + <!-- END MODAL Body --> </div> + <!-- END MODAL Content --> </div> + <!-- END Modal Dialog --> </div> - <!-- END Content --> + <!-- [INFO ] [~/assets/data/authclient.html ] [END: Modal TOP INFO signed in] --> + END Modal TOP INFO signed in (DISABLED) + -------------------------------------------------------------------------- + {% endcomment %} </div> - </div> - <!-- [INFO ] [~/assets/data/authclient.html ] [END: Modal TOP INFO signed in] --> - -------------------------------------------------------------------------------- {% endcomment %} -</div> -{% endcapture %} + <!-- EBD xhr_data_element --> + </body> -{% if production %} - {% capture _LINE_FEED %}{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment %}{{ cache | strip_html_comments }}{% else %}{% capture _content %}{{ cache | strip_html_comments }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ cache | strip_html_comments | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %} -{% else %} - {{ cache | remove:'<html><body>' | remove:'</body></html>' | strip_empty_lines }} -{% endif %} -{% assign cache = nil %} +</html> +{%- endcapture -%} + +{%- if production -%} + {% capture _LINE_FEED %}{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment %}{{ cache | strip_html_comments }}{% else %}{% capture _content %}{{ cache | strip_html_comments }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _END %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _END %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ cache | strip_html_comments | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %} +{%- else -%} + {{cache | remove:'<html><body>' | remove:'</body></html>' | strip_empty_lines | pretty_print}} +{%- endif -%} + +{%- assign cache = false -%}