_layouts/default.html in j1-template-2023.2.7 vs _layouts/default.html in j1-template-2023.3.0

- old
+ new

@@ -1,11 +1,11 @@ --- layout: compress # final layout in inheritance debug: false # enable|disable additional debug information written to (static) content source --- -{% capture j1_cache %} +{%- capture j1_cache -%} {% comment %} # ----------------------------------------------------------------------------- # ~/_layouts/default.html # Liquid default (base) layout template for all content-pages @@ -31,10 +31,14 @@ # Do NOT add any CONTENT here. If needed, go for a "next level" layout # (e.g. 'home.html' or 'page.html') that extents the layout DEFAULT by # additional data for your specific needs based on YAML configuration # data files. # ----------------------------------------------------------------------------- + # NOTE: + # Output whitespace control: '%-' and '-%'for all liquid markups to strip + # blank lines from the rendered HTML. + # ----------------------------------------------------------------------------- # Test data: # {{ lanes_collate | debug }} # ----------------------------------------------------------------------------- {% endcomment %} @@ -150,41 +154,41 @@ {% assign back_url_text = "Fortsetzung nicht möglich" %} {% assign reason = "Die aktuellen Einstellungen Ihres Browsers erlauben KEINE Ausführung von Javascript." %} {% assign contact_issue = "Technischer Kontakt" %} {% endif %} - {% comment %} current noscript cause errors in NU HTML Checker + {% comment %} current noscript cause errors in Nu HTML Checker See: https://validator.w3.org/nu ---------------------------------------------------------------------------- {% endcomment %} {% if page_noscript %} - <!-- [INFO ] [j1.layout.default.html ] [ place an noscript info|error page ] --> + <!-- [INFO ] [j1.layout.default.html ] [ place a noscript info|error page ] --> <noscript> <html lang="{{language}}"> <head> <meta charset="utf-8" /> - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <link rel="icon" type="{{site.favicon.type}}" href="{{site.data.j1_config.image_path}}/{{site.favicon.image}}" /> - <!-- title>{{title}} · {{http_error}}</title --> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="icon" type="{{site.favicon.type}}" href="{{site.data.j1_config.image_path}}/{{site.favicon.image}}"> - <!-- [INFO ] [j1.layout.default.html ] [ multiple title tags cause issues at Bing ] --> <style> - .my { margin-top: 8.5rem !important;} + .noscript_css {margin-top: 8.5rem !important;} /*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */ html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{cursor: pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{cursor: pointer ;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}body,html{width:100%;height:100%;background-color:#21232a}body{color:#fff;text-align:center;text-shadow:0 2px 4px rgba(0,0,0,.5);padding:0;min-height:100%;-webkit-box-shadow:inset 0 0 100px rgba(0,0,0,.8);box-shadow:inset 0 0 100px rgba(0,0,0,.8);display:table;font-family:"Open Sans",Arial,sans-serif}h1{font-family:inherit;font-weight:500;line-height:1.1;color:inherit;font-size:36px}h1 small{font-size:68%;font-weight:400;line-height:1;color:#777}a{text-decoration:none;color:#fff;font-size:inherit;border-bottom:dotted 1px #707070}.lead{color:silver;font-size:21px;line-height:1.4}.cover{display:table-cell;vertical-align:middle;padding:0 20px}footer{position:fixed;width:100%;height:40px;left:0;bottom:0;color:#a0a0a0;font-size:14px} </style> </head> + <body> - <div class="header my"> + <div class="header noscript_css"> <h1>{{title}} <small>{{http_error}}</small></h1> <p class="lead">{{reason}}</p> <div><a href="{{back_url}}">{{back_url_text}}</a></div> </div> <footer> <p>{{copyright_info}} · {{contact_issue}}: <a href="mailto:{{webmaster_email}}?subject={{title}}">{{webmaster_email}}</a></p> </footer> </body> + </html> </noscript> {% endif %} {% comment %} wrapper to suppress DOM flicker|Overflow @@ -272,42 +276,44 @@ </body> <!-- [INFO ] [j1.layout.default.html ] [ end page processing ] --> </html> -{% endcapture %} +{%- endcapture -%} {% comment %} POST processing of the generated page using (captured) cache -------------------------------------------------------------------------------- {% endcomment %} -{% case environment %} +{%- case environment -%} {% comment %} DEVELOPMENT mode - {{ j1_cache | regex_replace: 'js-nbinteract-widget', 'btn btn-primary btn-raised js-nbinteract-widget' | regex_replace: '<h[1-2].*?>(.*?)<\/h[1-2]>', '<h2>\1</h2>' | regex_replace: '&#182;|¶' | strip_empty_lines | remove: '<p>excerpt__end</p>' | pretty_print }} ------------------------------------------------------------------------------ {% endcomment %} - {% when 'development' or 'dev' or 'test' %} - {% if prettify %} + {%- when 'development' or 'dev' or 'test' -%} + {%- if prettify -%} {{ j1_cache | strip_empty_lines | remove: '<p>excerpt__end</p>' | pretty_print }} - {% else %} + {%- else -%} {{ j1_cache | strip_empty_lines | remove: '<p>excerpt__end</p>' }} - {% endif %} {% comment %} END prettify {% endcomment %} + {%- endif- %} + {% comment %} END IF prettify {% endcomment %} {% comment %} PRODUCTION mode ------------------------------------------------------------------------------ {% endcomment %} - {% when 'production' or 'prod' %} - {% unless compress %} - {% if prettify %} + {%- when 'production' or 'prod' -%} + {%- unless compress -%} + {%- if prettify -%} {{ j1_cache | remove: '<p>excerpt__end</p>' | strip_html_comments | strip_js_comments | strip_empty_lines | pretty_print }} - {% else %} - {{ j1_cache | remove: '<p>excerpt__end</p>' | strip_html_comments | strip_js_comments | strip_empty_lines }} - {% endif %} {% comment %} END prettify {% endcomment %} - {% endunless %} {% comment %} UNLESS compress {% endcomment %} + {%- else -%} + {{ j1_cache | remove: '<p>excerpt__end</p>' | strip_html_comments | strip_js_comments | strip_empty_lines }} + {%- endif -%} {%- comment -%} END prettify {%- endcomment -%} + {%- endunless -%} + {% comment %} UNLESS compress {% endcomment %} - {% if compress %} - {{ j1_cache | remove: '<p>excerpt__end</p>' | strip_html_comments | strip_js_comments | strip_empty_lines }} - {% endif %} + {%- if compress -%} + {{ j1_cache | remove: '<p>excerpt__end</p>' | strip_html_comments | strip_js_comments | strip_empty_lines }} + {%- endif -%} + {% comment %} IF compress {% endcomment %} {% comment %} UNKNOWN mode ------------------------------------------------------------------------------ {% endcomment %} - {% else %} - {{ j1_cache | remove: '<p>excerpt__end</p>'| strip_empty_lines }} + {%- else -%} + {{ j1_cache | remove: '<p>excerpt__end</p>'| strip_empty_lines }} -{% endcase %} +{%- endcase -%}