]> lifelog.hopto.org Git - LifeLog.git/commitdiff
Added more feeds.
authorWill Budic <redacted>
Fri, 22 Sep 2023 09:30:56 +0000 (19:30 +1000)
committerWill Budic <redacted>
Fri, 22 Sep 2023 09:30:56 +0000 (19:30 +1000)
htdocs/cgi-bin/CNFServices.cgi
htdocs/cgi-bin/index.cnf
htdocs/cgi-bin/system/modules/RSSFeedsPlugin.pm
htdocs/cgi-bin/wsrc/feeds.css
htdocs/cgi-bin/wsrc/feeds.js
htdocs/cgi-bin/wsrc/fonts/fontawesome-webfont.woff2 [new file with mode: 0644]

index 512925dd6b59b15b58ee75fdf868142d546da9de..b6ab00eb99784a2fa8eba9b797cc0944689ffcf4 100755 (executable)
@@ -98,7 +98,8 @@ The Perl Weekly ( http://perlweekly.com/ ) is a newsletter including links to bl
 #`The Cipher Brief RSS Feed`https://www.thecipherbrief.com/feed`The Cipher Brief is the go-to digital platform for the latest security news and high-level analysis. Each day, we offer multiple expert perspectives, engaging the private sector to find solutions and foster dialogue on what events mean for businesses and organizations around the world. More than just reporting on the news, The Cipher Brief helps readers understand what the news means to you.~
 #`Viral Now`https://viralnow.uk/feed/`ViralNow is a dynamic online platform at the forefront of curating and delivering trending and viral content. ViralNow brings you the latest and most engaging stories, videos, and articles from around the world.~
 #`The Sydney Morning Herald - World RSS Feed`http://www.smh.com.au/rssheadlines/world/article/rss.xml`The Sydney Morning Herald is Australia's leading news source. The Sydney Morning Herald sets the standard for journalistic excellence for Sydney, Australia, and the rest of the world. From breaking news, to travel and fashion, The Sydney Morning Herald continues to transform the way Australians get their news.~
-#`LifeHacker`https://lifehacker.com/rss`Lifehacker’s an award-winning daily blog that features tips, shortcuts, and downloads that help you work and live smarter and more efficiently.~
+#`Life Hacker`https://lifehacker.com/rss`Lifehacker’s an award-winning daily blog that features tips, shortcuts, and downloads that help you work and live smarter and more efficiently.~
+#`Politico`http://www.politico.com/rss/politicopicks.xml`POLITICO strives to be the dominant source for news on politics and policy in power centers across every continent where access to reliable information, nonpartisan journ.lism and real-time tools create, inform and engage a global citizenry.~
 >>
 
 __CNF_IS_COOL__
index 1e03012bad5e59d5cc6980369914daa8dc36b49f..c011985aa9b0d887b9ba750fa769710259474043 100644 (file)
@@ -42,7 +42,7 @@
         text-align: left;
         vertical-align: middle;
         margin:5px;
-        background: rgba(128,128,128,0.2);
+        background: rgba(0, 223, 246, 0.13);
     }
 
     #content ul {
index dab22faacce0dc5d85e6733c95b56fc7e394e951..7ed191fb7ac7cccd993ec1ab9dfc6705b0697452 100644 (file)
@@ -52,9 +52,11 @@ sub process ($self, $parser, $property) {
        my $page = '<div class="feed"><h2>List Of Feeds</h2><ol>';
        for my $idx (1 .. $#data){
            my @col = @{$data[$idx]};
-           $page .= qq|<li><span style="border: 1px solid black; padding: 5px; padding-bottom: 0px;"><a onclick="return fetchFeed('$col[1]')" style="cursor: pointer;"> <b>$col[1]</b> </a></span> &nbsp;&nbsp;[ $col[4] ]<dt style="padding:5px;">$col[3]</dt></li>\n|;
+           $page .= qq|<li><span style="border: 1px solid black; padding: 5px; padding-bottom: 0px;">
+           <a onclick="return fetchFeed('$col[1]')" style="cursor: pointer;"> <b>$col[1]</b> </a></span>
+            &nbsp;&nbsp;[ $col[4] ]<dt style="padding:10px;">$col[3]</dt></li>\n|;
        }
-       $page .= '</ol></feed>';
+       $page .= '</ol></div>';
        $parser->data()->{PAGE} = \$page
     }else{
        $parser->addPostParseProcessor($self,'collectFeeds');
@@ -94,7 +96,7 @@ sub collectFeeds($self, $parser) {
             if(isCNFTrue($self->{CONVERT_CNF_HTML})){
                $page .= _treeToHTML($tree);
                $page .=qq(<a class="ui-button ui-corner-all ui-widget" onclick="return fetchFeeds('#feeds_bottom')">RSS Feeds</a>
-                <div id="feeds_bottom" class="rz" style ="margin: 5px; visibility:hidden"></div>
+               <div id="feeds_bottom" style ="margin: 5px;padding:0;visibility:hidden"><br></div>
                )
             }
          }else{
@@ -126,7 +128,7 @@ sub _treeToHTML($tree){
         next if $item->name() ne 'Item';
         my ($Title,$Link,$Date) = $item -> array('Title','Link','Date');
         my $Description         = $item -> node('Description') -> val();
-        $Description =~ s/<a class=\"article-read-more\"/<a class=\"article-read-more\" target=\"feed\"/gs if $Description;
+           $Description =~ s/<a/<a target="feed"/gs if $Description;
         $bf.= qq(
             <div class="feed">
             <div class="feeds_item_$alt">
@@ -262,6 +264,10 @@ my  $buffer = capture_stdout {
             if(!$date) {
                 $date  = $item->query('dc:date');
             }
+            if(!$date){
+                print "Feed pub date item error with:$title";
+                next
+            }
             $date = $date->text_content;
             $date = CNFDateTime::_toCNFDate($date, $self->{TZ})->toTimestampShort();
             if($console){
index 463812b32f0864bea4fa6a90d060f61346134b6b..22e08090a213756223d247b329eacc9de5e3eade 100644 (file)
@@ -5,7 +5,6 @@
 
 .feed {
     text-align:left;
-    width: 100%;
     border: 1px solid black;
     margin-bottom: 5px;
     padding: 8px;
@@ -13,7 +12,9 @@
 .feed div {
     text-align:left;
     border:0;
-
+}
+.feed li {
+    margin-top: 5px;;
 }
 
 .feed_lbl  {
@@ -98,7 +99,7 @@
     margin-left: 10px;
     margin-right: 0;
     width: 30px;
-    content: "...read\f101";
+    content: "...more\f101";
 }
 
 .article-read-more a {
index 97d194204bd7302bcda3ceb05017dc6bd29446f6..37d27c85cee6175f5e70001f8ef068d722370c93 100644 (file)
@@ -12,10 +12,11 @@ function fetchFeeds(id){
         function(response) {pnl.html("Service Error: "+response.status,response.responseText);pnl.fadeOut(10000);}
     );
 }
-function fetchFeed(feed){
-    var pnl = $('#feeds');
+function fetchFeed(feed) {
+    ID = '#feeds';
+    var pnl = $(ID);
     pnl.html(
-    '<div><span style="border:1px solid Crimson;padding:5px;"><font color="Crimson"><b>P l e a s e &nbsp;&nbsp;    W a i t  '+feed+' loading...</b></font></span><br><img src="images/Wedges-9.1s-64px.png"></div>'
+    '<div><span style="border:1px solid Crimson;padding:5px;"><font color="Crimson"><b>Please &nbsp Wait ->  '+feed+' loading...</b></font></span><br><img src="images/Wedges-9.1s-64px.png"></div>'
     );
     pnl.show();
     pnl.css('visibility','visible');
diff --git a/htdocs/cgi-bin/wsrc/fonts/fontawesome-webfont.woff2 b/htdocs/cgi-bin/wsrc/fonts/fontawesome-webfont.woff2
new file mode 100644 (file)
index 0000000..4d13fc6
Binary files /dev/null and b/htdocs/cgi-bin/wsrc/fonts/fontawesome-webfont.woff2 differ