Добавлено изображение заголовка

This commit is contained in:
LightAir
2018-04-24 21:07:22 +03:00
parent ffc9a0946c
commit a0824ccd66
4 changed files with 8 additions and 7 deletions

View File

@@ -33,7 +33,7 @@ function generateXML(data) {
let img = '';
let menu = '';
if (item.img) {
if (item.image_url) {
img = '<figure><img src="' + item.image_url + '" /></figure>';
}
@@ -41,7 +41,7 @@ function generateXML(data) {
menu = '<menu>' + item.menu + '</menu>';
}
let fullContent = '<header>' + img + ' <h1>' + item.title + '</h1>' + item.content + menu + '</header>';
let fullContent = '<header>' + img + ' <h1>' + item.title + '</h1>' + menu + '</header>' + item.content;
item_values.push({'turbo:content': {_cdata: fullContent}});
channel.push({item: item_values});
@@ -66,7 +66,7 @@ function generateXML(data) {
function YTurbo(options, items) {
options = options || {};
this.title = options.title || 'Channel Yandex RSS';
this.title = options.title || 'Untitled';
this.description = options.description || '';
this.link = options.link;
this.image_url = options.image_url;
@@ -77,9 +77,10 @@ function YTurbo(options, items) {
this.item = function (options) {
options = options || {};
let item = {
var item = {
title: options.title || 'No title',
description: options.description || '',
image_url: options.image_url,
url: options.url,
author: options.author,
date: options.date,