Commit 13f63af5 authored by yPhil's avatar yPhil
Browse files

Triangle feed folder + libs cleanup

parent 5165f72e
Pipeline #400901 passed with stage
in 1 minute
{
"name": "petrolette",
"version": "1.2.4",
"version": "1.2.6",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "1.2.4",
"version": "1.2.6",
"hasInstallScript": true,
"license": "GPL-3.0-only",
"dependencies": {
......@@ -21,7 +21,6 @@
"helmet": "^4.4.1",
"iconv-lite": "^0.4.24",
"morgan": "^1.10.0",
"node-abort-controller": "^1.2.0",
"node-fetch": "^2.6.1",
"npm": "^7.5.2",
"pm2": "^4.5.4",
......@@ -3230,11 +3229,6 @@
"node": ">= 0.4.0"
}
},
"node_modules/node-abort-controller": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-1.2.0.tgz",
"integrity": "sha512-x6Pv6ACfOUmYGDW/SRjSKBJs7waJRxRPQ9FeXFqfBtEtvJQBfuPl5P74p0Ow+vl0w6WURvXwn+xq/3S95Z7e5Q=="
},
"node_modules/node-fetch": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
......@@ -10536,11 +10530,6 @@
"resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz",
"integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU="
},
"node-abort-controller": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-1.2.0.tgz",
"integrity": "sha512-x6Pv6ACfOUmYGDW/SRjSKBJs7waJRxRPQ9FeXFqfBtEtvJQBfuPl5P74p0Ow+vl0w6WURvXwn+xq/3S95Z7e5Q=="
},
"node-fetch": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
......
{
"name": "petrolette",
"description": "News reading webapp.",
"version": "1.2.5",
"version": "1.2.6",
"private": true,
"license": "GPL-3.0-only",
"FAVICONS_CACHE_DIR": "favicons-cache",
......@@ -37,7 +37,6 @@
"helmet": "^4.4.1",
"iconv-lite": "^0.4.24",
"morgan": "^1.10.0",
"node-abort-controller": "^1.2.0",
"node-fetch": "^2.6.1",
"npm": "^7.5.2",
"pm2": "^4.5.4",
......
......@@ -127,8 +127,8 @@ a:active {
font-size: 12pt;
}
.icon-down.fold {
display: inline-block;
.rotator.fold {
/* display: inline-block; */
/* transition: all 0.2s linear; */
transform: rotate(-90deg);
......@@ -482,11 +482,11 @@ ul.help li {
/* border-top: 1px solid var(--color-ui-danger) !important; */
/* } */
i.feed-control {
.feed-control {
color: var(--color-fg5);
}
i.feed-control:hover {
.feed-control:hover {
color: var(--color-fg6);
}
......@@ -1181,7 +1181,7 @@ li.feed.selected {
height: var(--controls-toggle-size);
}
i.feedIcon {
.feedIcon {
transition: transform 0.2s linear;
font-size: var(--controls-font-size);
text-rendering: auto;
......
public/images/rss.png

63.3 KB | W: | H:

public/images/rss.png

920 Bytes | W: | H:

public/images/rss.png
public/images/rss.png
public/images/rss.png
public/images/rss.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -4,6 +4,13 @@ PTL.feed = {
add:function($column, url, name, type, limit, status, clickNew, isQueryString, progress) {
const $myFeedIcon = $('<img>').attr({
src: '/static/images/rss.png',
class: 'favicon',
width: '16px',
height: '16px',
onerror: "this.onerror=null;this.src='/static/images/rss.png';"
});
var feedIndex = $('#tabs').find('.feed').length;
......@@ -14,8 +21,9 @@ PTL.feed = {
.data('type', type)
.data('limit', limit);
var $feedIcon = $('<i>')
.attr('class', 'feed-control feedIcon icon-rss translate')
var $feedIcon = $('<div>')
.attr('class', 'feed-control feedIcon translate')
.append($myFeedIcon)
.data('title', 'Fold / unfold this feed (%1)', url)
.attr('title', PTL.tr('Fold / unfold this feed (%1)', url))
.click(function() {
......@@ -124,11 +132,25 @@ PTL.feed = {
);
$header.hover (function() {
$feedToggle.find('img.favicon').hide();
$feedIcon.removeClass('icon-rss').addClass('icon-down');
var $favicon = $(this).find('img.favicon');
var $thisFeedIcon = $favicon.parent();
var feedIconSrc = $favicon.attr('src');
$thisFeedIcon
.addClass('rotator')
.find('img.favicon')
.attr('src', '/static/images/triangle.png')
.data('src', feedIconSrc);
}, function() {
$feedToggle.find('img.favicon').show();
$feedIcon.removeClass('icon-down');
var $favicon = $(this).find('img.favicon');
var $thisFeedIcon = $favicon.parent();
var feedIconSrc = $favicon.data('src');
$thisFeedIcon
.removeClass('rotator')
.find('img.favicon')
.attr('src', feedIconSrc);
});
if (!PTL.util.isMobile()) {
......@@ -172,7 +194,7 @@ PTL.feed = {
feedLimit = newLimit || $dataStore.data('limit'),
feedStatus = $dataStore.data('status'),
$feedToggle = $feed.find('.feed-toggle'),
$feedIcon = $feed.find('.feed-toggle > i');
$feedIcon = $feed.find('.feed-toggle > div.feedIcon');
var l = PTL.util.getLocation(feedUrl),
feedProtocol = l.protocol ? l.protocol + '//' : '//',
......@@ -201,31 +223,20 @@ PTL.feed = {
.attr('href', feedUrl)
.attr('title', feedTitle + ' (' + feedUrl + ')');
const $myFeedIcon = $('<img>').attr({
class: 'favicon',
width: '16px',
height: '16px',
onerror: "this.onerror=null;this.src='/static/images/rss.png';"
});
$.get("/favicon", {
url: decodeURI(feedHost),
dataType: "json"
}).done(function(icon) {
if (icon) {
$feedIcon
.html($myFeedIcon.attr('src', icon))
.removeClass('icon-rss icon-down');
$feedIcon.find('img.favicon').attr('src', icon);
} else {
$feedIcon.addClass('icon-rss');
// $feedIcon.addClass('icon-rss');
}
}).fail(function(jqXHR, textStatus, errorThrown) {
console.log('ERROR: %s (%s)', feedUrl, textStatus, errorThrown);
$feedIcon.addClass('icon-rss');
// $feedIcon.addClass('icon-rss');
});
if ($dataStore.data('status') == 'on') {
......@@ -318,7 +329,7 @@ PTL.feed = {
.append('&nbsp;')
.append($value);
$feedIcon.addClass('icon-rss');
// $feedIcon.addClass('icon-rss');
$feedBodyUl
.append($errorItem);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment