Kaynağa Gözat

Merge pull request #115 from divinerites/use-lozad-for-all-webp-img

Use "class=lozad" also for more images (except portfolio)
tags/v1.0.0
Evan 4 yıl önce
ebeveyn
işleme
2f530b6523
No account linked to committer's email address

+ 1
- 1
layouts/_default/article.html Dosyayı Görüntüle

<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 Dosyayı Görüntüle

<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">

+ 3
- 3
layouts/author/single.html Dosyayı Görüntüle

<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">

+ 1
- 1
layouts/partials/banner.html Dosyayı Görüntüle

{{"<!-- 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 }}

+ 1
- 1
layouts/partials/cta.html Dosyayı Görüntüle

{{"<!-- 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">

+ 2
- 2
layouts/partials/feature.html Dosyayı Görüntüle

<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 class="lozad" 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">

+ 1
- 1
layouts/partials/funfacts.html Dosyayı Görüntüle

{{"<!-- 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 }}

+ 2
- 3
layouts/partials/navigation.html Dosyayı Görüntüle

<section class="sticky-top navigation"> <section class="sticky-top navigation">
<div class="container"> <div class="container">
<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 img-fluid" data-src="{{ site.Params.logo | absURL }}" alt="{{ .Site.Title }}">
{{ else }} {{ else }}
{{ site.Title }} {{ site.Title }}
{{ end }} {{ end }}
{{ 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>

+ 1
- 1
layouts/partials/skill.html Dosyayı Görüntüle

<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">

+ 1
- 1
layouts/partials/testimonial.html Dosyayı Görüntüle

<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">

Loading…
İptal
Kaydet