mirror of
https://github.com/LightAir/turbo-rss.git
synced 2026-02-04 03:56:19 +00:00
Добавлено изображение заголовка
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user