diff --git a/public/css/news.css b/public/css/news.css new file mode 100644 index 0000000..79bf574 --- /dev/null +++ b/public/css/news.css @@ -0,0 +1,11 @@ +body .channel { + font-size: 20px; + background-color: #e6e8e6; + padding: 40px; +} + +body .channel h1 { + text-align: center; + color: #b2675e; +} + diff --git a/source/app.d b/source/app.d index 7b91113..5b57ac1 100644 --- a/source/app.d +++ b/source/app.d @@ -74,7 +74,22 @@ (RSSFeed[] fl) { fl.each!( (RSSFeed feed) { + // start workers to serve RSS data tasks[feed.name] = runWorkerTaskH(&feedActor, feed.name, feed.path); + + // refresh RSS data with a timer + setTimer(feed.refresh, () { + tasks[feed.name].send(Task.getThis()); + + auto resp = receiveOnly!FeedActorResponse; + if(resp == FeedActorResponse.INVALID) { + tasks.remove(feed.name); + return; + } + + tasks[feed.name].send(FeedActorRequest.QUIT); + tasks[feed.name] = runWorkerTaskH(&feedActor, feed.name, feed.path); + }, true); }); }); diff --git a/source/cartastraccia/renderer.d b/source/cartastraccia/renderer.d index 76fee47..347ea28 100644 --- a/source/cartastraccia/renderer.d +++ b/source/cartastraccia/renderer.d @@ -19,7 +19,7 @@ auto container = doc.createElement("div", doc.root.firstChild); container.attr("class", "channel"); container.attr("id", feedName); - container.html = "