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

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,

View File

@@ -1 +1 @@
<rss xmlns:yandex="http://news.yandex.ru" xmlns:media="http://search.yahoo.com/mrss/" xmlns:turbo="http://turbo.yandex.ru" version="2.0"><channel><title><![CDATA[Channel Yandex RSS]]></title><link>http://github.com/LightAir/turbo-rss</link><description><![CDATA[Channel Yandex RSS]]></description><language>ru</language></channel></rss>
<rss xmlns:yandex="http://news.yandex.ru" xmlns:media="http://search.yahoo.com/mrss/" xmlns:turbo="http://turbo.yandex.ru" version="2.0"><channel><title><![CDATA[Untitled]]></title><link>http://github.com/LightAir/turbo-rss</link><description><![CDATA[Untitled]]></description><language>ru</language></channel></rss>

View File

@@ -1 +1 @@
<rss xmlns:yandex="http://news.yandex.ru" xmlns:media="http://search.yahoo.com/mrss/" xmlns:turbo="http://turbo.yandex.ru" version="2.0"><channel><title><![CDATA[title]]></title><link>http://example.com/rss.xml</link><description><![CDATA[description]]></description><language>ru</language><item turbo="true"><link></link><turbo:source></turbo:source><turbo:content><![CDATA[<header> <h1>No title</h1>undefined</header>]]></turbo:content></item></channel></rss>
<rss xmlns:yandex="http://news.yandex.ru" xmlns:media="http://search.yahoo.com/mrss/" xmlns:turbo="http://turbo.yandex.ru" version="2.0"><channel><title><![CDATA[title]]></title><link>http://example.com/rss.xml</link><description><![CDATA[description]]></description><language>ru</language><item turbo="true"><link></link><turbo:source></turbo:source><turbo:content><![CDATA[<header> <h1>No title</h1></header>undefined]]></turbo:content></item></channel></rss>

View File

@@ -1 +1 @@
<rss xmlns:yandex="http://news.yandex.ru" xmlns:media="http://search.yahoo.com/mrss/" xmlns:turbo="http://turbo.yandex.ru" version="2.0"><channel><title><![CDATA[Channel Yandex RSS]]></title><link>http://github.com/LightAir/turbo-rss</link><description><![CDATA[Channel Yandex RSS]]></description><language>ru</language><item turbo="true"><link></link><turbo:source></turbo:source><turbo:content><![CDATA[<header> <h1>No title</h1>undefined</header>]]></turbo:content></item></channel></rss>
<rss xmlns:yandex="http://news.yandex.ru" xmlns:media="http://search.yahoo.com/mrss/" xmlns:turbo="http://turbo.yandex.ru" version="2.0"><channel><title><![CDATA[Untitled]]></title><link>http://github.com/LightAir/turbo-rss</link><description><![CDATA[Untitled]]></description><language>ru</language><item turbo="true"><link></link><turbo:source></turbo:source><turbo:content><![CDATA[<header> <h1>No title</h1></header>undefined]]></turbo:content></item></channel></rss>