Browse Source

Use "class=lozad" also for almost all images including webp

tags/v1.0.0
Didier GEORGIEFF 4 years ago
parent
commit
7ab67486fd

+ 1
- 1
layouts/_default/article.html View File

<a class="btn btn-transparent" href="{{ .Permalink }}">{{ i18n "readMore" }}</a> <a class="btn btn-transparent" href="{{ .Permalink }}">{{ i18n "readMore" }}</a>
</div> </div>
</div> </div>
</article>
</article>

+ 1
- 1
layouts/_default/single.html View File

<li class="list-inline-item"><a href="{{ `author/` | relLangURL }}{{ .Params.Author | urlize }}/">{{ .Params.Author }}</a></li> <li class="list-inline-item"><a href="{{ `author/` | relLangURL }}{{ .Params.Author | urlize }}/">{{ .Params.Author }}</a></li>
<li class="list-inline-item">{{ dateFormat "Monday, Jan 2, 2006" .Date }}</li> <li class="list-inline-item">{{ dateFormat "Monday, Jan 2, 2006" .Date }}</li>
</ul> </ul>
<img class="img-fluid mb-50" src="{{ .Params.Image | absURL }}" alt="blog-image">
<img class="img-fluid mb-50 lozad" data-src="{{ .Params.Image | absURL }}" alt="blog-image">
</div> </div>
<div class="col-lg-8 offset-lg-2"> <div class="col-lg-8 offset-lg-2">
<div class="post-single-content"> <div class="post-single-content">

+ 4
- 4
layouts/author/single.html View File

<div class="content text-center"> <div class="content text-center">
<figure> <figure>
{{ if .Params.Image }} {{ if .Params.Image }}
<img class="rounded-circle img-fluid" src="{{.Params.Image | relURL }}">
<img class="rounded-circle img-fluid lozad" data-src="{{.Params.Image | relURL }}">
{{else if .Params.Email}} {{else if .Params.Email}}
<img class="rounded-circle img-fluid"
src="https://www.gravatar.com/avatar/{{ md5 .Params.email }}?s=128&pg&d=identicon">
<img class="rounded-circle img-fluid lozad"
data-src="https://www.gravatar.com/avatar/{{ md5 .Params.email }}?s=128&pg&d=identicon">
{{ end }} {{ end }}
<figcaption> <figcaption>
<h5 class="font-weight-bold"> <h5 class="font-weight-bold">
</div> </div>
</div> </div>
</section> </section>
{{ end }}
{{ end }}

+ 2
- 2
layouts/partials/banner.html View File

{{"<!-- Welcome Slider-->" | safeHTML}} {{"<!-- Welcome Slider-->" | safeHTML}}
<section class="hero-area" style='background-image: url("{{ .bg_image_webp | absURL }}")'> <section class="hero-area" style='background-image: url("{{ .bg_image_webp | absURL }}")'>
<!-- this image is for trigger this section fallback background image --> <!-- this image is for trigger this section fallback background image -->
<img style="display: none;" onerror="this.onerror=null;this.parentElement.style.backgroundImage= 'url({{ .bg_image | absURL }})'" src="{{ .bg_image_webp | absURL }}" />
<img class="lozad" style="display: none;" onerror="this.onerror=null;this.parentElement.style.backgroundImage= 'url({{ .bg_image | absURL }})'" data-src="{{ .bg_image_webp | absURL }}" />


<div class="block"> <div class="block">
{{ if .icon }} {{ if .icon }}
</section> </section>
{{"<!-- /Welcome Slider-->" | safeHTML}} {{"<!-- /Welcome Slider-->" | safeHTML}}
{{end}} {{end}}
{{end}}
{{end}}

+ 1
- 1
layouts/partials/cta.html View File

{{"<!-- Start Call To Action -->" | safeHTML}} {{"<!-- Start Call To Action -->" | safeHTML}}
<section id="cta" class="call-to-action section-sm bg-1 overly" style='background-image: url("{{ .bg_image_webp | absURL }}")'> <section id="cta" class="call-to-action section-sm bg-1 overly" style='background-image: url("{{ .bg_image_webp | absURL }}")'>
<!-- this image is for trigger this section fallback background image --> <!-- this image is for trigger this section fallback background image -->
<img style="display: none;" onerror="this.onerror=null;this.parentElement.style.backgroundImage= 'url({{ .bg_image | absURL }})'" src="{{ .bg_image_webp | absURL }}" />
<img class="lozad" style="display: none;" onerror="this.onerror=null;this.parentElement.style.backgroundImage= 'url({{ .bg_image | absURL }})'" data-src="{{ .bg_image_webp | absURL }}" />
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-12 text-center"> <div class="col-lg-12 text-center">

+ 3
- 3
layouts/partials/feature.html View File

<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-lg-6 padding-0" style="background-image: url('{{ .image_webp | absURL }}'); background-size: cover; background-position: top center; background-repeat: no-repeat; min-height: 400px;"> <div class="col-lg-6 padding-0" style="background-image: url('{{ .image_webp | absURL }}'); background-size: cover; background-position: top center; background-repeat: no-repeat; min-height: 400px;">
<!-- this image is for trigger this section fallback background image -->
<img style="display: none;" onerror="this.onerror=null;this.parentElement.style.backgroundImage= 'url({{ .image | absURL }})'" src="{{ .image_webp | absURL }}" />
<!-- this image is for trigger this section fallback background image -->
<img style="display: none;" onerror="this.onerror=null;this.parentElement.style.backgroundImage= 'url({{ .image | absURL }})'" data-src="{{ .image_webp | absURL }}" />
</div> </div>
<div class="col-lg-6"> <div class="col-lg-6">
<div class="content-block"> <div class="content-block">
</section> </section>
{{"<!-- /feature -->" | safeHTML}} {{"<!-- /feature -->" | safeHTML}}
{{ end }} {{ end }}
{{ end }}
{{ end }}

+ 2
- 2
layouts/partials/funfacts.html View File

{{"<!-- Start Counter Section -->" | safeHTML}} {{"<!-- Start Counter Section -->" | safeHTML}}
<section id="counter" class="parallax-section bg-1 section overly" style='background-image: url("{{ .bg_image_webp | absURL }}")'> <section id="counter" class="parallax-section bg-1 section overly" style='background-image: url("{{ .bg_image_webp | absURL }}")'>
<!-- this image is for trigger this section fallback background image --> <!-- this image is for trigger this section fallback background image -->
<img style="display: none;" onerror="this.onerror=null;this.parentElement.style.backgroundImage= 'url({{ .bg_image | absURL }})'" src="{{ .bg_image_webp | absURL }}" />
<img class="lozad" style="display: none;" onerror="this.onerror=null;this.parentElement.style.backgroundImage= 'url({{ .bg_image | absURL }})'" data-src="{{ .bg_image_webp | absURL }}" />
<div class="container"> <div class="container">
<div class="row justify-content-center"> <div class="row justify-content-center">
{{ range .counter_item }} {{ range .counter_item }}
</section> </section>
{{"<!-- /Counter Section -->" | safeHTML}} {{"<!-- /Counter Section -->" | safeHTML}}
{{ end }} {{ end }}
{{ end }}
{{ end }}

+ 3
- 3
layouts/partials/navigation.html View File

<nav class="navbar navbar-expand-lg navbar-dark"> <nav class="navbar navbar-expand-lg navbar-dark">
<a class="navbar-brand p-0" href="{{ .Site.BaseURL | relLangURL }}"> <a class="navbar-brand p-0" href="{{ .Site.BaseURL | relLangURL }}">
{{ if .Site.Params.logo }} {{ if .Site.Params.logo }}
<img class="img-fluid" src="{{ .Site.Params.logo | absURL }}" alt="{{ .Site.Title }}">
<img class="lozad" class="img-fluid" data-src="{{ .Site.Params.logo | absURL }}" alt="{{ .Site.Title }}">
{{ else }} {{ else }}
{{ .Site.Title }} {{ .Site.Title }}
{{ end }} {{ end }}
</li> </li>
{{ end }} {{ end }}
{{ end }} {{ end }}


{{ range .Site.Menus.static }} {{ range .Site.Menus.static }}
<li class="nav-item"><a class="nav-link" target="_blank" href="{{ .URL }}">{{ i18n .Name }}</a> <li class="nav-item"><a class="nav-link" target="_blank" href="{{ .URL }}">{{ i18n .Name }}</a>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>
<!-- Language List --> <!-- Language List -->
{{- if .Site.IsMultiLingual }} {{- if .Site.IsMultiLingual }}

+ 2
- 2
layouts/partials/portfolio.html View File

<div class="col-lg-4 shuffle-item" <div class="col-lg-4 shuffle-item"
data-groups="[{{range $index, $element:= .categories }}{{if ne $index 0}},{{end}}&quot;{{. | urlize}}&quot;{{ end }}]"> data-groups="[{{range $index, $element:= .categories }}{{if ne $index 0}},{{end}}&quot;{{. | urlize}}&quot;{{ end }}]">
<div class="portfolio-block mb-4"> <div class="portfolio-block mb-4">
<img class="img-fluid" src="{{ .image_webp | absURL }}" onerror="this.onerror=null;this.src='{{ .image | absURL }}'" alt="{{ .name }}">
<img class="img-fluid lozad" data-src="{{ .image_webp | absURL }}" onerror="this.onerror=null;this.src='{{ .image | absURL }}'" alt="{{ .name }}">
<div class="caption"> <div class="caption">
<a class="search-icon image-popup" data-effect="mfp-with-zoom" href="{{ .image | relURL }}" <a class="search-icon image-popup" data-effect="mfp-with-zoom" href="{{ .image | relURL }}"
data-lightbox="image-1"> data-lightbox="image-1">
</section> </section>
{{"<!-- /Portfolio -->" | safeHTML}} {{"<!-- /Portfolio -->" | safeHTML}}
{{ end }} {{ end }}
{{ end }}
{{ end }}

+ 2
- 2
layouts/partials/skill.html View File

<h2>{{ .subtitle | markdownify }}</h2> <h2>{{ .subtitle | markdownify }}</h2>
<p> {{ .content | markdownify }}</p> <p> {{ .content | markdownify }}</p>
{{ with .image }} {{ with .image }}
<img class="img-fluid" src="{{ . | absURL }}" alt="image">
<img class="img-fluid lozad" data-src="{{ . | absURL }}" alt="image">
{{ end }} {{ end }}
</div> </div>
<div class="col-lg-6"> <div class="col-lg-6">
</section> </section>
{{"<!-- /skill -->" | safeHTML }} {{"<!-- /skill -->" | safeHTML }}
{{ end }} {{ end }}
{{ end }}
{{ end }}

+ 2
- 2
layouts/partials/testimonial.html View File

<section id="testimonial" class="testimonial overly section bg-2" <section id="testimonial" class="testimonial overly section bg-2"
style='background-image: url("{{ .bg_image_webp | absURL }}")'> style='background-image: url("{{ .bg_image_webp | absURL }}")'>
<!-- this image is for trigger this section fallback background image --> <!-- this image is for trigger this section fallback background image -->
<img style="display: none;" onerror="this.onerror=null;this.parentElement.style.backgroundImage= 'url({{ .bg_image | absURL }})'" src="{{ .bg_image_webp | absURL }}" />
<img class="lozad" style="display: none;" onerror="this.onerror=null;this.parentElement.style.backgroundImage= 'url({{ .bg_image | absURL }})'" data-src="{{ .bg_image_webp | absURL }}" />
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-xl-12"> <div class="col-xl-12">
</section> </section>
{{"<!-- /testimonial -->" | safeHTML}} {{"<!-- /testimonial -->" | safeHTML}}
{{ end }} {{ end }}
{{ end }}
{{ end }}

Loading…
Cancel
Save