1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2025-04-06 19:15:44 +02:00

add german feeds and allow to change the language

This commit is contained in:
Bernhard Posselt 2016-01-23 17:08:45 +01:00
parent 120a94582f
commit e3ae4ea0be
14 changed files with 341 additions and 185 deletions

View File

@ -26,7 +26,6 @@
#explore .grid-item {
float: left;
width: 300px;
padding: 30px;
border-collapse: collapse;
border: 1px solid #ccc;
margin: 0 25px 25px 0;
@ -41,22 +40,31 @@
background-position: 0 center;
}
#explore h1 a {
word-wrap: break-word;
}
#explore h1 a:hover {
text-decoration: underline;
}
#explore .category-wrapper {
text-align: center;
}
#explore .category {
display: inline-block;
font-weight: normal;
font-size: 10pt;
color: #fff;
background-color: #1d2d44;
padding: 5px;
float: right;
border-radius: 3px;
padding: 10px;
font-weight: bold;
}
#explore .grid-item-content {
padding: 30px;
}
#explore .explore-logo {
text-align: center;
margin-top: 25px;
@ -75,6 +83,17 @@
padding-top: 25px;
}
#explore .explore-filter {
text-align: right;
padding: 30px;
}
#explore .explore-filter input,
#explore .explore-filter select {
margin-left: 10px;
display: inline-block;
}
#explore .explore-filter input {
width: 200px;
}

2
css/news.min.css vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,57 @@
{
"Technologie": [{
"title": "ComputerBase",
"favicon": "https:\/\/computerbase.de\/favicon.ico",
"url": "http:\/\/www.computerbase.de\/",
"feed": "http:\/\/www.computerbase.de\/rss\/news.xml",
"description": "Unabh\u00e4ngiges Tech-Magazin",
"votes": 100
}, {
"title": "Golem.de",
"favicon": "http:\/\/golem.de\/favicon.ico",
"url": "http:\/\/www.golem.de\/",
"feed": "http:\/\/golem.de.dynamic.feedsportal.com\/pf\/578068\/http:\/\/rss.golem.de\/rss.php?feed=RSS1.0",
"description": "IT-News fuer Profis",
"votes": 100,
"image": "http:\/\/www.golem.de\/staticrl\/images\/golem-rss.png"
}, {
"title": "derStandard.at \u203a Web",
"favicon": "https:\/\/derstandard.at\/img\/derstandard.at.ico",
"url": "http:\/\/derstandard.at\/Web",
"feed": "http:\/\/derstandard.at\/?page=rss&ressort=web",
"description": "Nachrichten in Echtzeit. derStandard.at: Permanent aktualisierte Nachrichten aus aller Welt vom Online-Newsroom der f\u00fchrenden Qualit\u00e4tszeitung \u00d6sterreichs. Plus die ganze Tageszeitung gratis im WWW. News in German, brought to you by the leading quality newspaper from Austria.",
"votes": 100
}, {
"title": "Pro-Linux News",
"favicon": "http:\/\/www.pro-linux.de\/favicon.ico",
"url": "http:\/\/www.pro-linux.de\/",
"feed": "http:\/\/www.pro-linux.de\/rss\/index1.xml",
"description": "Wir geben Ihrem Computer das Leben zur\u00fcck",
"votes": 100,
"image": "http:\/\/www.pro-linux.de\/images\/NB3\/base\/global\/pl-logo_i70.png"
}, {
"title": "heise online News",
"favicon": "https:\/\/www.heise.de\/favicon.ico",
"url": "http:\/\/www.heise.de\/newsticker\/",
"feed": "http:\/\/heise.de.feedsportal.com\/c\/35207\/f\/653901\/index.rss",
"description": "Nachrichten nicht nur aus der Welt der Computer",
"votes": 100
}],
"FOSS": [{
"title": "heise open news",
"favicon": "https:\/\/www.heise.de\/favicon.ico",
"url": "http:\/\/www.heise.de\/open\/news\/",
"feed": "http:\/\/heise.de.open.feedsportal.com\/c\/32509\/f\/480599\/index.rss",
"description": "Nachrichten zu Open Source",
"votes": 100
}
],
"Nachrichten": [{
"title": "derStandard.at",
"favicon": "https:\/\/derstandard.at\/img\/derstandard.at.ico",
"url": "http:\/\/derstandard.at\/",
"feed": "http:\/\/derstandard.at\/?page=rss&ressort=seite1",
"description": "Nachrichten in Echtzeit. derStandard.at: Permanent aktualisierte Nachrichten aus aller Welt vom Online-Newsroom der f\u00fchrenden Qualit\u00e4tszeitung \u00d6sterreichs. Plus die ganze Tageszeitung gratis im WWW. News in German, brought to you by the leading quality newspaper from Austria.",
"votes": 100
}]
}

View File

@ -1,145 +1,146 @@
{
"ownCloud": [
{
"title": "ownCloud Planet",
"favicon": "https://owncloud.org/wp-content/themes/owncloudorgnew/assets/img/common/favicon.png",
"url": "https://owncloud.org/news/",
"feed": "https://owncloud.org/feed/",
"description": "ownCloud Planet is a blog feed aggregator",
"votes": 1000
},
{
"title": "News app releases",
"favicon": "https://owncloud.org/wp-content/themes/owncloudorgnew/assets/img/common/favicon.png",
"url": "https://github.com/owncloud/news/releases",
"feed": "https://github.com/owncloud/news/releases.atom",
"description": "ownCloud News app releases page. Get notified when a new release comes out",
"votes": 900
}
],
"FOSS": [
{
"title": "Planet GNOME",
"favicon": "http:\/\/planet.gnome.org\/img\/gnome-16.png",
"url": "http:\/\/planet.gnome.org\/",
"feed": "http:\/\/planet.gnome.org\/rss20.xml",
"description": "Planet GNOME - http:\/\/planet.gnome.org\/",
"votes": 100
},
{
"title": "Planet KDE",
"favicon": "https:\/\/planetkde.org\/favicon.ico",
"url": "http:\/\/planetKDE.org\/",
"feed": "http:\/\/planetKDE.org\/rss20.xml",
"description": "Planet KDE - http:\/\/planetKDE.org\/",
"votes": 100
}
],
"Tech": [
{
"title": "Slashdot",
"favicon": "https://slashdot.org/favicon.ico",
"url": "https://slashdot.org",
"feed": "https://rss.slashdot.org/Slashdot/slashdot",
"description": "Slashdot: News for nerds, stuff that matters",
"votes": 500
}
],
"UX": [
{
"title": "Mozilla UX blog",
"favicon": "https://blog.mozilla.org/ux/wp-content/themes/OneMozilla/img/favicon.ico",
"url": "https://blog.mozilla.org/ux/",
"feed": "https://blog.mozilla.org/ux/feed/",
"description": "Designing great products that make sense & bring joy",
"votes": 500
},
{
"title": "Little Big Details",
"url": "http://littlebigdetails.com/",
"feed": "http://littlebigdetails.com/rss",
"favicon": "http://33.media.tumblr.com/avatar_21babec3285d_128.png",
"description": "UX eastereggs and goodies",
"votes": 1000
},
{
"title": "Ignore the code",
"favicon": "http://ignorethecode.net/blog_images/iphone.png",
"url": "http://ignorethecode.net/blog/",
"feed": "http://feeds.feedburner.com/IgnoreTheCode",
"description": "A blog about usability",
"votes": 500
},
{
"title": "Elezea",
"url": "http://www.elezea.com",
"feed": "http://feedpress.me/elezea",
"description": "Links and articles about technology, design, and sociology. Written by Rian van der Merwe.",
"votes": 500
}
],
"Music": [
{
"title": "Pebber Brown",
"favicon": "https:\/\/s.ytimg.com\/yts\/img\/favicon-vflz7uhzw.ico",
"url": "http:\/\/www.youtube.com\/channel\/UCbA-Tt8ELg8v0d7RdieeZyA",
"feed": "http:\/\/www.youtube.com\/feeds\/videos.xml?channel_id=UCbA-Tt8ELg8v0d7RdieeZyA",
"description": "Videos about music theory and scales",
"votes": 100
}
],
"Science": [
{
"title": "Numberphile",
"favicon": "https:\/\/s.ytimg.com\/yts\/img\/favicon-vflz7uhzw.ico",
"url": "http:\/\/www.youtube.com\/channel\/UCoxcjq-8xIDTYp3uz647V5A",
"feed": "http:\/\/www.youtube.com\/feeds\/videos.xml?channel_id=UCoxcjq-8xIDTYp3uz647V5A",
"description": "Awesome mathematics videos",
"votes": 500
},
{
"title": "Periodic Videos",
"favicon": "https:\/\/s.ytimg.com\/yts\/img\/favicon-vflz7uhzw.ico",
"url": "http:\/\/www.youtube.com\/channel\/UCtESv1e7ntJaLJYKIO1FoYw",
"feed": "http:\/\/www.youtube.com\/feeds\/videos.xml?channel_id=UCtESv1e7ntJaLJYKIO1FoYw",
"description": "Videos about elements and chemistry",
"votes": 1000
}
],
"Food": [
{
"title": "Smitten Kitchen",
"favicon": "http://smittenkitchen.com/uploads/favicon.ico",
"url": "http://smittenkitchen.com/",
"feed": "http://feeds.feedburner.com/smittenkitchen",
"description": "A home cooking weblog from a tiny kitchen in New York City. The place to find all of your new favorite things to cook",
"votes": 500
},
{
"title": "Food in Jars",
"favicon": "http://foodinjars.com.s164546.gridserver.com/arugulapesto/wp-content/uploads/2013/05/jar-favicon.png",
"url": "http://foodinjars.com/",
"feed": "http://feedpress.me/FIJ",
"description": "A blog dedicated to canning, preserving, and pantry staples made from scratch.",
"votes": 500
}
],
"Comics": [
{
"title": "Explosm.net",
"favicon": "http://explosm.net/favicons/favicon.ico",
"url": "http:\/\/www.explosm.net\/rss.php",
"feed": "http:\/\/feeds.feedburner.com\/Explosm",
"description": "Flash Animations, Daily Comics and more!",
"votes": 100
},
{
"title": "The Oatmeal - Comics, Quizzes, & Stories",
"favicon": "http:\/\/theoatmeal.com\/favicon.ico",
"url": "http:\/\/theoatmeal.com\/",
"feed": "http:\/\/feeds.feedburner.com\/oatmealfeed",
"description": "The oatmeal tastes better than stale skittles found under the couch cushions",
"votes": 100
}
]
"ownCloud": [{
"title": "ownCloud Planet",
"favicon": "https://owncloud.org/wp-content/themes/owncloudorgnew/assets/img/common/favicon.png",
"url": "https://owncloud.org/news/",
"feed": "https://owncloud.org/feed/",
"description": "ownCloud Planet is a blog feed aggregator",
"votes": 1000
}, {
"title": "News app releases",
"favicon": "https://owncloud.org/wp-content/themes/owncloudorgnew/assets/img/common/favicon.png",
"url": "https://github.com/owncloud/news/releases",
"feed": "https://github.com/owncloud/news/releases.atom",
"description": "ownCloud News app releases page. Get notified when a new release comes out",
"votes": 900
}],
"FOSS": [{
"title": "Planet GNOME",
"favicon": "http:\/\/planet.gnome.org\/img\/gnome-16.png",
"url": "http:\/\/planet.gnome.org\/",
"feed": "http:\/\/planet.gnome.org\/rss20.xml",
"description": "Planet GNOME - http:\/\/planet.gnome.org\/",
"votes": 100
}, {
"title": "Planet KDE",
"favicon": "https:\/\/planetkde.org\/favicon.ico",
"url": "http:\/\/planetKDE.org\/",
"feed": "http:\/\/planetKDE.org\/rss20.xml",
"description": "Planet KDE - http:\/\/planetKDE.org\/",
"votes": 100
}, {
"title": "Planet Mozilla",
"favicon": "https:\/\/planet.mozilla.org\/img\/mozilla-16.png",
"url": "http:\/\/planet.mozilla.org\/",
"feed": "http:\/\/planet.mozilla.org\/atom.xml",
"description": "Planet Mozilla - Mozilla Blogs",
"votes": 100
}
],
"Tech": [{
"title": "Slashdot",
"favicon": "https://slashdot.org/favicon.ico",
"url": "https://slashdot.org",
"feed": "https://rss.slashdot.org/Slashdot/slashdot",
"description": "Slashdot: News for nerds, stuff that matters",
"votes": 500
}],
"Gaming": [{
"title": "TotalBiscuit, The Cynical Brit",
"favicon": "https:\/\/s.ytimg.com\/yts\/img\/favicon-vflz7uhzw.ico",
"url": "http:\/\/www.youtube.com\/channel\/UCy1Ms_5qBTawC-k7PVjHXKQ",
"feed": "http:\/\/www.youtube.com\/feeds\/videos.xml?channel_id=UCy1Ms_5qBTawC-k7PVjHXKQ",
"description": "",
"votes": 100
}, {
"title": "Force Gaming",
"favicon": "https:\/\/s.ytimg.com\/yts\/img\/favicon-vflz7uhzw.ico",
"url": "http:\/\/www.youtube.com\/channel\/UCGhs9S33RAeT5DEuKTO4Oew",
"feed": "http:\/\/www.youtube.com\/feeds\/videos.xml?channel_id=UCGhs9S33RAeT5DEuKTO4Oew",
"description": "",
"votes": 100
}
],
"UX": [{
"title": "Mozilla UX blog",
"favicon": "https://blog.mozilla.org/ux/wp-content/themes/OneMozilla/img/favicon.ico",
"url": "https://blog.mozilla.org/ux/",
"feed": "https://blog.mozilla.org/ux/feed/",
"description": "Designing great products that make sense & bring joy",
"votes": 500
}, {
"title": "Little Big Details",
"url": "http://littlebigdetails.com/",
"feed": "http://littlebigdetails.com/rss",
"favicon": "http://33.media.tumblr.com/avatar_21babec3285d_128.png",
"description": "UX eastereggs and goodies",
"votes": 1000
}, {
"title": "Ignore the code",
"favicon": "http://ignorethecode.net/blog_images/iphone.png",
"url": "http://ignorethecode.net/blog/",
"feed": "http://feeds.feedburner.com/IgnoreTheCode",
"description": "A blog about usability",
"votes": 500
}, {
"title": "Elezea",
"url": "http://www.elezea.com",
"feed": "http://feedpress.me/elezea",
"description": "Links and articles about technology, design, and sociology. Written by Rian van der Merwe.",
"votes": 500
}],
"Music": [{
"title": "Pebber Brown",
"favicon": "https:\/\/s.ytimg.com\/yts\/img\/favicon-vflz7uhzw.ico",
"url": "http:\/\/www.youtube.com\/channel\/UCbA-Tt8ELg8v0d7RdieeZyA",
"feed": "http:\/\/www.youtube.com\/feeds\/videos.xml?channel_id=UCbA-Tt8ELg8v0d7RdieeZyA",
"description": "Videos about music theory and scales",
"votes": 100
}],
"Science": [{
"title": "Numberphile",
"favicon": "https:\/\/s.ytimg.com\/yts\/img\/favicon-vflz7uhzw.ico",
"url": "http:\/\/www.youtube.com\/channel\/UCoxcjq-8xIDTYp3uz647V5A",
"feed": "http:\/\/www.youtube.com\/feeds\/videos.xml?channel_id=UCoxcjq-8xIDTYp3uz647V5A",
"description": "Awesome mathematics videos",
"votes": 500
}, {
"title": "Periodic Videos",
"favicon": "https:\/\/s.ytimg.com\/yts\/img\/favicon-vflz7uhzw.ico",
"url": "http:\/\/www.youtube.com\/channel\/UCtESv1e7ntJaLJYKIO1FoYw",
"feed": "http:\/\/www.youtube.com\/feeds\/videos.xml?channel_id=UCtESv1e7ntJaLJYKIO1FoYw",
"description": "Videos about elements and chemistry",
"votes": 1000
}],
"Food": [{
"title": "Smitten Kitchen",
"favicon": "http://smittenkitchen.com/uploads/favicon.ico",
"url": "http://smittenkitchen.com/",
"feed": "http://feeds.feedburner.com/smittenkitchen",
"description": "A home cooking weblog from a tiny kitchen in New York City. The place to find all of your new favorite things to cook",
"votes": 500
}, {
"title": "Food in Jars",
"favicon": "http://foodinjars.com.s164546.gridserver.com/arugulapesto/wp-content/uploads/2013/05/jar-favicon.png",
"url": "http://foodinjars.com/",
"feed": "http://feedpress.me/FIJ",
"description": "A blog dedicated to canning, preserving, and pantry staples made from scratch.",
"votes": 500
}],
"Comics": [{
"title": "Explosm.net",
"favicon": "http://explosm.net/favicons/favicon.ico",
"url": "http:\/\/www.explosm.net\/rss.php",
"feed": "http:\/\/feeds.feedburner.com\/Explosm",
"description": "Flash Animations, Daily Comics and more!",
"votes": 100
}, {
"title": "The Oatmeal - Comics, Quizzes, & Stories",
"favicon": "http:\/\/theoatmeal.com\/favicon.ico",
"url": "http:\/\/theoatmeal.com\/",
"feed": "http:\/\/feeds.feedburner.com\/oatmealfeed",
"description": "The oatmeal tastes better than stale skittles found under the couch cushions",
"votes": 100
}]
}

View File

@ -137,16 +137,21 @@ app.config(function ($routeProvider, $provide, $httpProvider) {
var getExploreResolve = function () {
return {
sites: /* @ngInject */ function (
$http, $q, BASE_URL, Publisher, SettingsResource) {
$http, $q, BASE_URL, $location, Publisher, SettingsResource) {
var deferred = $q.defer();
// always use the code from the url
var language = $location.search().lang;
if (!language) {
language = SettingsResource.get('language');
}
$http.get(BASE_URL + '/settings').then(function (data) {
Publisher.publishAll(data);
// get url and strip trailing slashes
var url = SettingsResource.get('exploreUrl')
.replace(/\/+$/, '');
var language = SettingsResource.get('language');
var exploreUrl = url + '/feeds.' + language + '.json';
var defaultExploreUrl = url + '/feeds.en.json';

View File

@ -134,17 +134,22 @@ app.config(["$routeProvider", "$provide", "$httpProvider", function ($routeProvi
var getExploreResolve = function () {
return {
sites: /* @ngInject */ ["$http", "$q", "BASE_URL", "Publisher", "SettingsResource", function (
$http, $q, BASE_URL, Publisher, SettingsResource) {
sites: /* @ngInject */ ["$http", "$q", "BASE_URL", "$location", "Publisher", "SettingsResource", function (
$http, $q, BASE_URL, $location, Publisher, SettingsResource) {
var deferred = $q.defer();
// always use the code from the url
var language = $location.search().lang;
if (!language) {
language = SettingsResource.get('language');
}
$http.get(BASE_URL + '/settings').then(function (data) {
Publisher.publishAll(data);
// get url and strip trailing slashes
var url = SettingsResource.get('exploreUrl')
.replace(/\/+$/, '');
var language = SettingsResource.get('language');
var exploreUrl = url + '/feeds.' + language + '.json';
var defaultExploreUrl = url + '/feeds.en.json';
@ -535,7 +540,8 @@ app.controller('ContentController',
};
}]);
app.controller('ExploreController', ["sites", "$rootScope", "FeedResource", function (sites, $rootScope, FeedResource) {
app.controller('ExploreController',
["sites", "$rootScope", "FeedResource", "SettingsResource", "$location", function (sites, $rootScope, FeedResource, SettingsResource, $location) {
'use strict';
this.sites = sites;
@ -565,7 +571,25 @@ app.controller('ExploreController', ["sites", "$rootScope", "FeedResource", func
}).length > 0;
};
this.getSupportedLanguageCodes = function () {
return SettingsResource.getSupportedLanguageCodes();
};
this.getCurrentLanguageCode = function () {
var language = $location.search().lang;
if (!language) {
language = SettingsResource.get('language');
}
return language;
};
this.showLanguage = function (languageCode) {
$location.url('/explore/?lang=' + languageCode);
};
this.selectedLanguageCode = this.getCurrentLanguageCode();
}]);
app.controller('NavigationController',
["$route", "FEED_TYPE", "FeedResource", "FolderResource", "ItemResource", "SettingsResource", "Publisher", "$rootScope", "$location", "$q", function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource,
SettingsResource, Publisher, $rootScope, $location, $q) {
@ -584,6 +608,10 @@ app.controller('NavigationController',
return parseInt($route.current.params.id, 10);
};
this.getLanguageCode = function () {
return SettingsResource.get('language');
};
this.getFeeds = function () {
return FeedResource.getAll();
};
@ -2002,13 +2030,17 @@ app.service('SettingsResource', ["$http", "BASE_URL", function ($http, BASE_URL)
};
this.defaultLanguageCode = 'en';
this.supportedLanguageCodes = [
'ar-ma', 'ar', 'bg', 'ca', 'cs', 'cv', 'da', 'de', 'el', 'en-ca',
'ar-ma', 'ar', 'bg', 'ca', 'cs', 'cv', 'da', 'de', 'el', 'en', 'en-ca',
'en-gb', 'eo', 'es', 'et', 'eu', 'fi', 'fr-ca', 'fr', 'gl', 'he', 'hi',
'hu', 'id', 'is', 'it', 'ja', 'ka', 'ko', 'lv', 'ms-my', 'nb', 'ne',
'nl', 'pl', 'pt-br', 'pt', 'ro', 'ru', 'sk', 'sl', 'sv', 'th', 'tr',
'tzm-la', 'tzm', 'uk', 'zh-cn', 'zh-tw'
];
this.getSupportedLanguageCodes = function () {
return this.supportedLanguageCodes;
};
this.receive = function (data) {
var self = this;
Object.keys(data).forEach(function (key) {
@ -2058,6 +2090,7 @@ app.service('SettingsResource', ["$http", "BASE_URL", function ($http, BASE_URL)
};
}]);
/**
* This prefills the add feed section if an external link has ?subsribe_to
* filled out

4
js/build/app.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,8 @@
* @author Bernhard Posselt <dev@bernhard-posselt.com>
* @copyright Bernhard Posselt 2014
*/
app.controller('ExploreController', function (sites, $rootScope, FeedResource) {
app.controller('ExploreController',
function (sites, $rootScope, FeedResource, SettingsResource, $location) {
'use strict';
this.sites = sites;
@ -37,4 +38,21 @@ app.controller('ExploreController', function (sites, $rootScope, FeedResource) {
}).length > 0;
};
});
this.getSupportedLanguageCodes = function () {
return SettingsResource.getSupportedLanguageCodes();
};
this.getCurrentLanguageCode = function () {
var language = $location.search().lang;
if (!language) {
language = SettingsResource.get('language');
}
return language;
};
this.showLanguage = function (languageCode) {
$location.url('/explore/?lang=' + languageCode);
};
this.selectedLanguageCode = this.getCurrentLanguageCode();
});

View File

@ -25,6 +25,10 @@ function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource,
return parseInt($route.current.params.id, 10);
};
this.getLanguageCode = function () {
return SettingsResource.get('language');
};
this.getFeeds = function () {
return FeedResource.getAll();
};

View File

@ -23,13 +23,17 @@ app.service('SettingsResource', function ($http, BASE_URL) {
};
this.defaultLanguageCode = 'en';
this.supportedLanguageCodes = [
'ar-ma', 'ar', 'bg', 'ca', 'cs', 'cv', 'da', 'de', 'el', 'en-ca',
'ar-ma', 'ar', 'bg', 'ca', 'cs', 'cv', 'da', 'de', 'el', 'en', 'en-ca',
'en-gb', 'eo', 'es', 'et', 'eu', 'fi', 'fr-ca', 'fr', 'gl', 'he', 'hi',
'hu', 'id', 'is', 'it', 'ja', 'ka', 'ko', 'lv', 'ms-my', 'nb', 'ne',
'nl', 'pl', 'pt-br', 'pt', 'ro', 'ru', 'sk', 'sl', 'sv', 'th', 'tr',
'tzm-la', 'tzm', 'uk', 'zh-cn', 'zh-tw'
];
this.getSupportedLanguageCodes = function () {
return this.supportedLanguageCodes;
};
this.receive = function (data) {
var self = this;
Object.keys(data).forEach(function (key) {
@ -78,4 +82,4 @@ app.service('SettingsResource', function ($http, BASE_URL) {
return languageCode;
};
});
});

View File

@ -6,32 +6,47 @@
<input ng-model="Explore.filter" type="search" placeholder="<?php p(addslashes($l->t('filter'))) ?>" news-auto-focus>
</label>
</div>-->
<div class="explore-header">
<a href="https://github.com/owncloud/news/wiki/Explore-Feed-Section"><?php p($l->t('Got more awesome feeds? Share them with us!')) ?></a>
</div>
<div class="explore-filter">
<label for="explorelanguagecode"><?php p($l->t('Language')) ?>: </label>
<select id="explorelanguagecode" name="explorelanguagecode"
ng-change="Explore.showLanguage(Explore.selectedLanguageCode)"
ng-options="language as language for language in Explore.getSupportedLanguageCodes()"
ng-model="Explore.selectedLanguageCode"></select>
</div>
<div class="grid">
<div ng-repeat="entry in Explore.feeds | filter:Explore.filter | orderBy:'-votes'" ng-show="!Explore.feedExists(entry.feed)" class="explore-feed grid-item" news-refresh-masonry>
<span class="category">{{ entry.category }}</span>
<h1 ng-show="entry.favicon"
ng-style="{ backgroundImage: 'url(' + entry.favicon + ')'}">
<a target="_blank" ng-href="{{ entry.url }}">{{ entry.title }}</a>
</h1>
<h1 ng-hide="entry.favicon" class="icon-rss">
{{ entry.title }}
</h1>
<div style="clear:both"></div>
<div class="explore-content">
<p>{{ entry.description }}</p>
<div class="explore-logo">
<img ng-src="{{ entry.image }}" ng-if="entry.image">
<div class="category-wrapper">
<div class="category">
{{ entry.category }}
</div>
</div>
<div class="explore-subscribe">
<button ng-click="Explore.subscribeTo(entry.feed)">
<?php p($l->t('Subscribe')) ?>
</button>
<div class="grid-item-content">
<h1 ng-show="entry.favicon"
ng-style="{ backgroundImage: 'url(' + entry.favicon + ')'}">
<a target="_blank" ng-href="{{ entry.url }}">{{ entry.title }}</a>
</h1>
<h1 ng-hide="entry.favicon" class="icon-rss">
{{ entry.title }}
</h1>
<div style="clear:both"></div>
<div class="explore-content">
<p>{{ entry.description }}</p>
<div class="explore-logo">
<img ng-src="{{ entry.image }}" ng-if="entry.image">
</div>
</div>
<div class="explore-subscribe">
<button ng-click="Explore.subscribeTo(entry.feed)">
<?php p($l->t('Subscribe')) ?>
</button>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,5 +1,5 @@
<li ng-class="{active: Navigation.isExploreActive()}" class="explore-feed">
<a class="icon-link" ng-href="#/explore/">
<a class="icon-link" ng-href="#/explore/?lang={{Navigation.getLanguageCode()}}">
<?php p($l->t('Explore')) ?>
</a>
</li>
</li>