Added lazyload

This commit is contained in:
zeldaroot 2021-01-04 03:42:20 +02:00
parent c78aa26843
commit 5cef4aecee
8 changed files with 25 additions and 83 deletions

View File

@ -69,9 +69,7 @@
<% slider.forEach(function (movie, i) {if (i > 9) {
return;
} %>
<a href="<%- movie.url %>"
style="<% if (i > 2) { %>width: 68px; height: 97px;<% } else { %>width: 166px; height: 237px;<% } %> background-image: url('<%- movie.poster %>')"
class="page_post_thumb_wrap image_cover fl_l <% if (i === 2) { %>page_post_thumb_last_column<% } else if (i === 9) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else if (i > 2) { %>page_post_thumb_last_row<% } %>"></a>
<a href="<%- movie.url %>" style="<% if (i > 2) { %>width: 68px; height: 97px;<% } else { %>width: 166px; height: 237px;<% } %> background-image: url('<%- movie.poster_min %>')" data-bg="<%- movie.poster %>" class="lazy page_post_thumb_wrap image_cover fl_l <% if (i === 2) { %>page_post_thumb_last_column<% } else if (i === 9) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else if (i > 2) { %>page_post_thumb_last_row<% } %>"></a>
<% }); %>
</div>
</div>
@ -150,8 +148,7 @@
<div class="_post_content">
<div class="post_header">
<a href="<%- movie.url %>" class="post_image">
<img src="<%- movie.poster_min %>" class="post_img"
height="50" width="50" alt="<%= movie.title %>">
<img src="<%- movie.poster_min %>" data-src="<%- movie.poster %>" class="lazy post_img" height="50" width="50" alt="<%= movie.title %>">
<span class="blind_label">.</span>
</a>
<div class="post_header_info">
@ -210,21 +207,12 @@
<% } %>
</div>
<div class="page_post_sized_thumbs clear_fix"
style="width: 510px;">
<a href="<%- movie.url %>"
style="width: 245px; height: 350px; background-image: url('<%- movie.poster %>')"
class="page_post_thumb_wrap image_cover page_post_thumb_last_row fl_l"></a>
<div class="page_post_sized_thumbs clear_fix" style="width: 510px;">
<a href="<%- movie.url %>" style="width: 245px; height: 350px; background-image: url('<%- movie.poster_min %>')" data-bg="<%- movie.poster %>" class="page_post_thumb_wrap image_cover page_post_thumb_last_row fl_l"></a>
<% var trlr = (page.urls.movies.trailer) ? movie.url + '/' + page.urls.movies.trailer : movie.url; %>
<a href="<%- trlr %>"
style="width: 260px; height: 172px; background-image: url('<% if (movie.pictures[0]) { %><%- movie.pictures[0].picture_min %><% } else { %>/themes/default/public/desktop/img/player.png<% } %>')"
class="page_post_thumb_wrap image_cover page_post_thumb_video page_post_thumb_last_column fl_l"><span
class="page_post_video_duration">2:<%- (movie.title.length + 9 >= 60) ? '37' : movie.title.length + 9; %></span></a>
<a href="<%- trlr %>" style="width: 260px; height: 172px; background-image: url('<% if (movie.pictures[0]) { %><%- movie.pictures[0].picture_min %><% } else { %>/themes/default/public/desktop/img/player.png<% } %>')" data-bg="<% if (movie.pictures[0]) { %><%- movie.pictures[0].picture %><% } else { %>/themes/default/public/desktop/img/player.png<% } %>" class="lazy page_post_thumb_wrap image_cover page_post_thumb_video page_post_thumb_last_column fl_l"><span class="page_post_video_duration">2:<%- (movie.title.length + 9 >= 60) ? '37' : movie.title.length + 9; %></span></a>
<% var onln = (page.urls.movies.online) ? movie.url + '/' + page.urls.movies.online : movie.url; %>
<a href="<%- onln %>"
style="width: 260px; height: 172px; background-image: url('<% if (movie.pictures[1]) { %><%- movie.pictures[1].picture_min %><% } else { %>/themes/default/public/desktop/img/player.png<% } %>')"
class="page_post_thumb_wrap image_cover page_post_thumb_video page_post_thumb_last_column page_post_thumb_last_row fl_l"><span
class="page_post_video_duration"><%- (movie.title.length + 10 >= 60) ? '2' : '1'; %>:<%- (movie.title.length + 20 >= 60) ? '28' : movie.title.length + 20; %>:<%- (movie.title_en.length + 10 >= 60) ? '08' : movie.title_en.length + 10; %></span></a>
<a href="<%- onln %>" style="width: 260px; height: 172px; background-image: url('<% if (movie.pictures[1]) { %><%- movie.pictures[1].picture_min %><% } else { %>/themes/default/public/desktop/img/player.png<% } %>')" data-bg="<% if (movie.pictures[1]) { %><%- movie.pictures[1].picture %><% } else { %>/themes/default/public/desktop/img/player.png<% } %>" class="page_post_thumb_wrap image_cover page_post_thumb_video page_post_thumb_last_column page_post_thumb_last_row fl_l"><span class="page_post_video_duration"><%- (movie.title.length + 10 >= 60) ? '2' : '1'; %>:<%- (movie.title.length + 20 >= 60) ? '28' : movie.title.length + 20; %>:<%- (movie.title_en.length + 10 >= 60) ? '08' : movie.title_en.length + 10; %></span></a>
</div>
</div>
</div>

View File

@ -73,9 +73,7 @@
return;
} %>
<a href="<%- movie.url %>"
style="<% if (i > 2) { %>width: 68px; height: 97px;<% } else { %>width: 166px; height: 237px;<% } %> background-image: url('<%- movie.poster %>')"
class="page_post_thumb_wrap image_cover fl_l <% if (i === 2) { %>page_post_thumb_last_column<% } else if (i === 9) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else if (i > 2) { %>page_post_thumb_last_row<% } %>"></a>
<a href="<%- movie.url %>" style="<% if (i > 2) { %>width: 68px; height: 97px;<% } else { %>width: 166px; height: 237px;<% } %> background-image: url('<%- movie.poster_min %>')" data-bg="<%- movie.poster %>" class="lazy page_post_thumb_wrap image_cover fl_l <% if (i === 2) { %>page_post_thumb_last_column<% } else if (i === 9) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else if (i > 2) { %>page_post_thumb_last_row<% } %>"></a>
<% }); %>
@ -465,10 +463,7 @@
<% if (typeof category === 'object' && category.movies && category.movies.length) {
category.movies.splice(7, category.movies.length % 7);
category.movies.forEach(function (movie, i) { %>
<a href="<%- movie.url %>"
style="width: 68px; height: 97px; background-image: url('<%- movie.poster %>')"
class="page_post_thumb_wrap image_cover fl_l <% if (i === 0) { %>page_post_thumb_first_column page_post_thumb_first_row<% } else if (!(i % 6)) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else { %>page_post_thumb_last_row<% } %>"
title="<%= movie.title %>"></a>
<a href="<%- movie.url %>" style="width: 68px; height: 97px; background-image: url('<%- movie.poster_min %>')" data-bg="<%- movie.poster %>" class="lazy page_post_thumb_wrap image_cover fl_l <% if (i === 0) { %>page_post_thumb_first_column page_post_thumb_first_row<% } else if (!(i % 6)) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else { %>page_post_thumb_last_row<% } %>" title="<%= movie.title %>"></a>
<% }); } %>
</div>
</div>

View File

@ -73,9 +73,7 @@
return;
} %>
<a href="<%- movie.url %>"
style="<% if (i > 2) { %>width: 68px; height: 97px;<% } else { %>width: 166px; height: 237px;<% } %> background-image: url('<%- movie.poster %>')"
class="page_post_thumb_wrap image_cover fl_l <% if (i === 2) { %>page_post_thumb_last_column<% } else if (i === 9) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else if (i > 2) { %>page_post_thumb_last_row<% } %>"></a>
<a href="<%- movie.url %>" style="<% if (i > 2) { %>width: 68px; height: 97px;<% } else { %>width: 166px; height: 237px;<% } %> background-image: url('<%- movie.poster_min %>')" data-bg="<%- movie.poster %>" class="lazy page_post_thumb_wrap image_cover fl_l <% if (i === 2) { %>page_post_thumb_last_column<% } else if (i === 9) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else if (i > 2) { %>page_post_thumb_last_row<% } %>"></a>
<% }); %>
@ -468,10 +466,7 @@
<% if (typeof category === 'object' && category.movies && category.movies.length) {
category.movies.splice(7, category.movies.length % 7);
category.movies.forEach(function (movie, i) { %>
<a href="<%- movie.url %>"
style="width: 68px; height: 97px; background-image: url('<%- movie.poster %>')"
class="page_post_thumb_wrap image_cover fl_l <% if (i === 0) { %>page_post_thumb_first_column page_post_thumb_first_row<% } else if (!(i % 6)) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else { %>page_post_thumb_last_row<% } %>"
title="<%= movie.title %>"></a>
<a href="<%- movie.url %>" style="width: 68px; height: 97px; background-image: url('<%- movie.poster_min %>')" data-bg="<%- movie.poster %>" class="lazy page_post_thumb_wrap image_cover fl_l <% if (i === 0) { %>page_post_thumb_first_column page_post_thumb_first_row<% } else if (!(i % 6)) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else { %>page_post_thumb_last_row<% } %>" title="<%= movie.title %>"></a>
<% }); } %>
</div>
</div>

View File

@ -69,9 +69,7 @@
<% slider.forEach(function (movie, i) { if (i > 9) {
return;
} %>
<a href="<%- movie.url %>"
style="<% if (i > 2) { %>width: 68px; height: 97px;<% } else { %>width: 166px; height: 237px;<% } %> background-image: url('<%- movie.poster %>')"
class="page_post_thumb_wrap image_cover fl_l <% if (i === 2) { %>page_post_thumb_last_column<% } else if (i === 9) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else if (i > 2) { %>page_post_thumb_last_row<% } %>"></a>
<a href="<%- movie.url %>" style="<% if (i > 2) { %>width: 68px; height: 97px;<% } else { %>width: 166px; height: 237px;<% } %> background-image: url('<%- movie.poster_min %>')" data-bg="<%- movie.poster %>" class="lazy page_post_thumb_wrap image_cover fl_l <% if (i === 2) { %>page_post_thumb_last_column<% } else if (i === 9) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else if (i > 2) { %>page_post_thumb_last_row<% } %>"></a>
<% }); %>
</div>
</div>
@ -137,15 +135,12 @@
<div class="_post_content">
<div class="post_header">
<a href="<%- movie.url %>" class="post_image">
<img src="<%- movie.poster_min %>" class="post_img"
height="50" width="50"
alt="<%= movie.title %>">
<img src="<%- movie.poster_min %>" data-src="<%- movie.poster %>" class="lazy post_img" height="50" width="50" alt="<%= movie.title %>">
<span class="blind_label">.</span>
</a>
<div class="post_header_info">
<h5 class="post_author">
<a class="author"
href="<%- movie.url %>"><%= movie.title %><% if (movie.season && movie.episode) { %> (<%- movie.season %> <%- page.l.season %> <%- movie.episode %> <%- page.l.episode %>)<% } %></a>
<a class="author" href="<%- movie.url %>"><%= movie.title %><% if (movie.season && movie.episode) { %> (<%- movie.season %> <%- page.l.season %> <%- movie.episode %> <%- page.l.episode %>)<% } %></a>
</h5>
<% if (movie.premiere) { %>
<div class="post_date">
@ -199,21 +194,12 @@
<% } %>
</div>
<div class="page_post_sized_thumbs clear_fix"
style="width: 510px;">
<a href="<%- movie.url %>"
style="width: 245px; height: 350px; background-image: url('<%- movie.poster %>')"
class="page_post_thumb_wrap image_cover page_post_thumb_last_row fl_l"></a>
<div class="page_post_sized_thumbs clear_fix" style="width: 510px;">
<a href="<%- movie.url %>" style="width: 245px; height: 350px; background-image: url('<%- movie.poster_min %>')" data-bg="<%- movie.poster %>" class="page_post_thumb_wrap image_cover page_post_thumb_last_row fl_l"></a>
<% var trlr = (page.urls.movies.trailer) ? movie.url + '/' + page.urls.movies.trailer : movie.url; %>
<a href="<%- trlr %>"
style="width: 260px; height: 172px; background-image: url('<% if (movie.pictures[0]) { %><%- movie.pictures[0].picture_min %><% } else { %>/themes/default/public/desktop/img/player.png<% } %>')"
class="page_post_thumb_wrap image_cover page_post_thumb_video page_post_thumb_last_column fl_l"><span
class="page_post_video_duration">2:<%- (movie.title.length + 9 >= 60) ? '37' : movie.title.length + 9; %></span></a>
<a href="<%- trlr %>" style="width: 260px; height: 172px; background-image: url('<% if (movie.pictures[0]) { %><%- movie.pictures[0].picture_min %><% } else { %>/themes/default/public/desktop/img/player.png<% } %>')" data-bg="<% if (movie.pictures[0]) { %><%- movie.pictures[0].picture %><% } else { %>/themes/default/public/desktop/img/player.png<% } %>" class="lazy page_post_thumb_wrap image_cover page_post_thumb_video page_post_thumb_last_column fl_l"><span class="page_post_video_duration">2:<%- (movie.title.length + 9 >= 60) ? '37' : movie.title.length + 9; %></span></a>
<% var onln = (page.urls.movies.online) ? movie.url + '/' + page.urls.movies.online : movie.url; %>
<a href="<%- onln %>"
style="width: 260px; height: 172px; background-image: url('<% if (movie.pictures[1]) { %><%- movie.pictures[1].picture_min %><% } else { %>/themes/default/public/desktop/img/player.png<% } %>')"
class="page_post_thumb_wrap image_cover page_post_thumb_video page_post_thumb_last_column page_post_thumb_last_row fl_l"><span
class="page_post_video_duration"><%- (movie.title.length + 10 >= 60) ? '2' : '1'; %>:<%- (movie.title.length + 20 >= 60) ? '28' : movie.title.length + 20; %>:<%- (movie.title_en.length + 10 >= 60) ? '08' : movie.title_en.length + 10; %></span></a>
<a href="<%- onln %>" style="width: 260px; height: 172px; background-image: url('<% if (movie.pictures[1]) { %><%- movie.pictures[1].picture_min %><% } else { %>/themes/default/public/desktop/img/player.png<% } %>')" data-bg="<% if (movie.pictures[1]) { %><%- movie.pictures[1].picture %><% } else { %>/themes/default/public/desktop/img/player.png<% } %>" class="page_post_thumb_wrap image_cover page_post_thumb_video page_post_thumb_last_column page_post_thumb_last_row fl_l"><span class="page_post_video_duration"><%- (movie.title.length + 10 >= 60) ? '2' : '1'; %>:<%- (movie.title.length + 20 >= 60) ? '28' : movie.title.length + 20; %>:<%- (movie.title_en.length + 10 >= 60) ? '08' : movie.title_en.length + 10; %></span></a>
</div>
</div>
</div>

View File

@ -72,11 +72,7 @@
<% slider.forEach(function (movie, i) { if (i > 9) {
return;
} %>
<a href="<%- movie.url %>"
style="<% if (i > 2) { %>width: 68px; height: 97px;<% } else { %>width: 166px; height: 237px;<% } %> background-image: url('<%- movie.poster %>')"
class="page_post_thumb_wrap image_cover fl_l <% if (i === 2) { %>page_post_thumb_last_column<% } else if (i === 9) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else if (i > 2) { %>page_post_thumb_last_row<% } %>"></a>
<a href="<%- movie.url %>" style="<% if (i > 2) { %>width: 68px; height: 97px;<% } else { %>width: 166px; height: 237px;<% } %> background-image: url('<%- movie.poster_min %>')" data-bg="<%- movie.poster %>" class="lazy page_post_thumb_wrap image_cover fl_l <% if (i === 2) { %>page_post_thumb_last_column<% } else if (i === 9) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else if (i > 2) { %>page_post_thumb_last_row<% } %>"></a>
<% }); %>
</div>
@ -474,10 +470,7 @@
<% if (typeof category === 'object' && category.movies && category.movies.length) {
category.movies.splice(7, category.movies.length % 7);
category.movies.forEach(function (movie, i) { %>
<a href="<%- movie.url %>"
style="width: 68px; height: 97px; background-image: url('<%- movie.poster %>')"
class="page_post_thumb_wrap image_cover fl_l <% if (i === 0) { %>page_post_thumb_first_column page_post_thumb_first_row<% } else if (!(i % 6)) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else { %>page_post_thumb_last_row<% } %>"
title="<%= movie.title %>"></a>
<a href="<%- movie.url %>" style="width: 68px; height: 97px; background-image: url('<%- movie.poster_min %>')" data-bg="<%- movie.poster %>" class="lazy page_post_thumb_wrap image_cover fl_l <% if (i === 0) { %>page_post_thumb_first_column page_post_thumb_first_row<% } else if (!(i % 6)) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else { %>page_post_thumb_last_row<% } %>" title="<%= movie.title %>"></a>
<% }); } %>
</div>
</div>

View File

@ -73,9 +73,7 @@
return;
} %>
<a href="<%- movie.url %>"
style="<% if (i > 2) { %>width: 68px; height: 97px;<% } else { %>width: 166px; height: 237px;<% } %> background-image: url('<%- movie.poster %>')"
class="page_post_thumb_wrap image_cover fl_l <% if (i === 2) { %>page_post_thumb_last_column<% } else if (i === 9) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else if (i > 2) { %>page_post_thumb_last_row<% } %>"></a>
<a href="<%- movie.url %>" style="<% if (i > 2) { %>width: 68px; height: 97px;<% } else { %>width: 166px; height: 237px;<% } %> background-image: url('<%- movie.poster_min %>')" data-bg="<%- movie.poster %>" class="lazy page_post_thumb_wrap image_cover fl_l <% if (i === 2) { %>page_post_thumb_last_column<% } else if (i === 9) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else if (i > 2) { %>page_post_thumb_last_row<% } %>"></a>
<% }); %>
@ -468,10 +466,7 @@
<% if (typeof category === 'object' && category.movies && category.movies.length) {
category.movies.splice(7, category.movies.length % 7);
category.movies.forEach(function (movie, i) { %>
<a href="<%- movie.url %>"
style="width: 68px; height: 97px; background-image: url('<%- movie.poster %>')"
class="page_post_thumb_wrap image_cover fl_l <% if (i === 0) { %>page_post_thumb_first_column page_post_thumb_first_row<% } else if (!(i % 6)) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else { %>page_post_thumb_last_row<% } %>"
title="<%= movie.title %>"></a>
<a href="<%- movie.url %>" style="width: 68px; height: 97px; background-image: url('<%- movie.poster_min %>')" data-bg="<%- movie.poster %>" class="lazy page_post_thumb_wrap image_cover fl_l <% if (i === 0) { %>page_post_thumb_first_column page_post_thumb_first_row<% } else if (!(i % 6)) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else { %>page_post_thumb_last_row<% } %>" title="<%= movie.title %>"></a>
<% }); } %>
</div>
</div>

View File

@ -73,9 +73,7 @@
return;
} %>
<a href="<%- movie.url %>"
style="<% if (i > 2) { %>width: 68px; height: 97px;<% } else { %>width: 166px; height: 237px;<% } %> background-image: url('<%- movie.poster %>')"
class="page_post_thumb_wrap image_cover fl_l <% if (i === 2) { %>page_post_thumb_last_column<% } else if (i === 9) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else if (i > 2) { %>page_post_thumb_last_row<% } %>"></a>
<a href="<%- movie.url %>" style="<% if (i > 2) { %>width: 68px; height: 97px;<% } else { %>width: 166px; height: 237px;<% } %> background-image: url('<%- movie.poster_min %>')" data-bg="<%- movie.poster %>" class="lazy page_post_thumb_wrap image_cover fl_l <% if (i === 2) { %>page_post_thumb_last_column<% } else if (i === 9) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else if (i > 2) { %>page_post_thumb_last_row<% } %>"></a>
<% }); %>
@ -465,10 +463,7 @@
<% if (typeof category === 'object' && category.movies && category.movies.length) {
category.movies.splice(7, category.movies.length % 7);
category.movies.forEach(function (movie, i) { %>
<a href="<%- movie.url %>"
style="width: 68px; height: 97px; background-image: url('<%- movie.poster %>')"
class="page_post_thumb_wrap image_cover fl_l <% if (i === 0) { %>page_post_thumb_first_column page_post_thumb_first_row<% } else if (!(i % 6)) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else { %>page_post_thumb_last_row<% } %>"
title="<%= movie.title %>"></a>
<a href="<%- movie.url %>" style="width: 68px; height: 97px; background-image: url('<%- movie.poster_min %>')" data-bg="<%- movie.poster %>" class="lazy page_post_thumb_wrap image_cover fl_l <% if (i === 0) { %>page_post_thumb_first_column page_post_thumb_first_row<% } else if (!(i % 6)) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else { %>page_post_thumb_last_row<% } %>" title="<%= movie.title %>"></a>
<% }); } %>
</div>
</div>

View File

@ -73,9 +73,7 @@
return;
} %>
<a href="<%- movie.url %>"
style="<% if (i > 2) { %>width: 68px; height: 97px;<% } else { %>width: 166px; height: 237px;<% } %> background-image: url('<%- movie.poster %>')"
class="page_post_thumb_wrap image_cover fl_l <% if (i === 2) { %>page_post_thumb_last_column<% } else if (i === 9) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else if (i > 2) { %>page_post_thumb_last_row<% } %>"></a>
<a href="<%- movie.url %>" style="<% if (i > 2) { %>width: 68px; height: 97px;<% } else { %>width: 166px; height: 237px;<% } %> background-image: url('<%- movie.poster_min %>')" data-bg="<%- movie.poster %>" class="lazy page_post_thumb_wrap image_cover fl_l <% if (i === 2) { %>page_post_thumb_last_column<% } else if (i === 9) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else if (i > 2) { %>page_post_thumb_last_row<% } %>"></a>
<% }); %>
@ -465,10 +463,7 @@
<% if (typeof category === 'object' && category.movies && category.movies.length) {
category.movies.splice(7, category.movies.length % 7);
category.movies.forEach(function (movie, i) { %>
<a href="<%- movie.url %>"
style="width: 68px; height: 97px; background-image: url('<%- movie.poster %>')"
class="page_post_thumb_wrap image_cover fl_l <% if (i === 0) { %>page_post_thumb_first_column page_post_thumb_first_row<% } else if (!(i % 6)) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else { %>page_post_thumb_last_row<% } %>"
title="<%= movie.title %>"></a>
<a href="<%- movie.url %>" style="width: 68px; height: 97px; background-image: url('<%- movie.poster_min %>')" data-bg="<%- movie.poster %>" class="lazy page_post_thumb_wrap image_cover fl_l <% if (i === 0) { %>page_post_thumb_first_column page_post_thumb_first_row<% } else if (!(i % 6)) { %>page_post_thumb_last_column page_post_thumb_last_row<% } else { %>page_post_thumb_last_row<% } %>" title="<%= movie.title %>"></a>
<% }); } %>
</div>
</div>