Theme-Joffrey/views/index.ejs

280 lines
21 KiB
Plaintext

<!DOCTYPE html>
<html lang="<%- page.language %>">
<head>
<%- include('includes/head.ejs'); -%>
</head>
<body>
<% if (typeof page.adv === 'object' && page.adv.brand) { %>
<%- page.adv.brand %>
<% } %>
<div class="scroll_fix_wrap _page_wrap">
<div class="scroll_fix">
<div id="page_layout" style="width: 960px;">
<%- include('includes/header.ejs'); -%>
<%- include('includes/left.ejs'); -%>
<div id="page_body" class="fl_r" style="width: 795px;">
<div class="clear_fix no_login">
<div class="wide_column_left">
<div class="wide_column_wrap">
<div class="wide_column">
<div class="page_block">
<div class="page_info_wrap">
<div class="page_top">
<h1 class="page_name"><%- page.h1 %></h1>
</div>
</div>
<% if (typeof slider === 'object' && slider.length) { %>
<div class="wall_fixed">
<div class="wall_module">
<div class="wall_posts own">
<div class="_post post all own post_fixed">
<div class="_post_content">
<div class="post_header">
<a href="/" class="post_image">
<img src="/themes/<%- page.theme %>/public/images/ava.png?v=<%- page.ver %>"
class="post_img" height="50" width="50"
alt="Logo">
<span class="blind_label">.</span>
</a>
<div class="post_header_info">
<h5 class="post_author">
<a class="author"
href="/"><%- page.l.popular %> <%- page.l.movies %></a>
<span class="explain">
<span class="wall_fixed_label">&nbsp;</span>
</span>
</h5>
<div class="post_date">
<a class="post_link" href="/">
<span class="rel_date"><%- new Date().toISOString().slice(0, 10) %></span>
</a>
</div>
</div>
</div>
<div class="post_content">
<div class="post_info">
<div class="wall_text">
<div class="_wall_post_cont">
<div class="page_post_sized_thumbs clear_fix"
style="width: 510px;">
<% 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_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>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<% } %>
</div>
<% if (typeof page.adv === 'object' && page.adv.top) { %>
<div class="page_block">
<div style="padding: 20px; text-align: center;">
<%- page.adv.top %>
</div>
</div>
<% } %>
<% if (page.seo) { %>
<div class="page_block">
<div style="padding: 20px; text-align: justify">
<%- page.seo %>
</div>
</div>
<% } %>
<% if (typeof index === 'object') {
for (var type in index) {
if (index.hasOwnProperty(type) && index[type].length && type !== 'episode') {
index[type].forEach(function (category) { %>
<div class="wall_module">
<div class="page_block">
<div class="page_block_h2">
<div class="ui_tabs clear_fix">
<h2 class="ui_tab ui_tab_sel">
<%- category.name %>
</h2>
<div class="randomMovieIndex">
<div <% if (!category.url) { %>style="display:none"
<% } %>
class="cinemapress-random-index"
onclick="window.location.href='<%- (category.url && category.url.indexOf('?') + 1 ? category.url + '&random=' : category.url + '?random=') %><%- Math.random() %>'"
title="<%= page.l.random %>">
<img src="/themes/<%- page.theme %>/public/images/dice.svg"
alt="<%= page.l.random %>">
</div>
</div>
</div>
</div>
</div>
<div class="wall_posts own">
<% if (typeof category === 'object' && category.movies && category.movies.length) {
category.movies.forEach(function (movie) { %>
<div class="page_block">
<div class="_post post page_block all own">
<div class="_post_content">
<div class="post_header">
<a href="<%- movie.url %>" class="post_image">
<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>
</h5>
<% if (movie.premiere) { %>
<div class="post_date">
<span class="rel_date rel_date_needs_update"><%- page.l.premiere %>: <%- movie.premiere %></span>
</div>
<% } %>
</div>
</div>
<div class="post_content">
<div class="post_info">
<div class="wall_text">
<div class="_wall_post_cont">
<div class="wall_post_text">
<% if (movie.kp_rating) { %>
<div><%- page.l.rating %> <%- page.l.kp %>: <%- movie.kp_rating / 10 %> <span style="color: #999">(<%- movie.kp_vote %>)</span></div>
<% } %>
<% if (movie.imdb_rating) { %>
<div><%- page.l.rating %> <%- page.l.imdb %>: <%- movie.imdb_rating / 10 %> <span style="color: #999">(<%- movie.imdb_vote %>)</span></div>
<% } %>
<br>
<% if (movie.quality) { %>
<div><%- page.l.quality %>: <%- movie.quality %></div>
<% } %>
<% if (movie.translate) { %>
<div><%- page.l.translate %>: <%- movie.translate %></div>
<br>
<% } %>
<% if (movie.year) { %>
<div><%- page.l.year %>: <%- movie.year_url %></div>
<% } %>
<% if (movie.countries) { %>
<div><%- page.l.countries %>: <%- movie.countries_url %></div>
<% } %>
<% if (movie.genres) { %>
<div><%- page.l.genres %>: <%- movie.genres_url %></div>
<% } %>
<br>
<% if (movie.description_short) { %>
<div style="text-align:justify">
<%- movie.description_short %>
...
</div>
<% } %>
</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_min %>')" data-bg="<%- movie.poster %>" class="lazy 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<% } %>')" 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<% } %>')" data-bg="<% if (movie.pictures[1]) { %><%- movie.pictures[1].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 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>
</div>
</div>
</div>
</div>
</div>
<% }); } %>
</div>
</div>
<% }); } } } %>
<% if (typeof page.pagination === 'object') { %>
<div class="page_block">
<div style="margin: auto; text-align: center; padding: 10px">
<% if (page.pagination.first) { %>
<a href="<%- page.pagination.first.link %>" class="flat_button"
rel="nofollow"><%- page.pagination.first.number %></a>
<span class="flat_button"
style="color: #000; background: #fff">...</span>
<% } %>
<% if (page.pagination.prev.length) { %>
<% page.pagination.prev.forEach(function (prev) { %>
<a href="<%- prev.link %>" class="flat_button"
rel="nofollow"><%- prev.number %></a>
<% }); %>
<span class="flat_button"
style="color: #000; background: #fff">...</span>
<% } %>
<span class="flat_button"
style="color: #000; background: #fff"><%- page.pagination.current %></span>
<% if (page.pagination.next.length) { %>
<span class="flat_button"
style="color: #000; background: #fff">...</span>
<% page.pagination.next.forEach(function (next) { %>
<a href="<%- next.link %>" class="flat_button"
rel="nofollow"><%- next.number %></a>
<% }); %>
<% } %>
<% if (page.pagination.last) { %>
<span class="flat_button"
style="color: #000; background: #fff">...</span>
<a href="<%- page.pagination.last.link %>" class="flat_button"
rel="nofollow"><%- page.pagination.last.number %></a>
<% } %>
</div>
</div>
<% } %>
<% if (typeof page.adv === 'object' && page.adv.bottom) { %>
<div class="page_block">
<div style="padding: 20px; text-align: center;">
<%- page.adv.bottom %>
</div>
</div>
<% } %>
</div>
</div>
<%- include('includes/right.ejs'); -%>
</div>
</div>
</div>
<%- include('includes/footer.ejs'); -%>
<div class="clear"></div>
</div>
</div>
</div>
</body>
</html>