function run() { $client = \arc\cache::proxy(\arc\http::client(), function ($params) { return \arc\http\headers::parseCacheTime($params['target']->responseHeaders); }); $feeds = handleFeeds(__DIR__ . '/../data/feeds.json', $client); $aggregator = aggregator($client); echo h::doctype() . h::html(h::head(h::title('RSS Aggregator'), h::link(['href' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css', 'rel' => 'stylesheet']), h::link(['href' => 'cards.css', 'rel' => 'stylesheet']), h::script(['src' => '//code.jquery.com/jquery-1.12.0.min.js']), h::script(['src' => 'cards.js'])), h::body(h::raw($aggregator->render($feeds)), h::footer(h::form(['method' => 'POST'], h::input(['name' => 'newFeed']), h::button(['ype' => 'submit'], 'Add feed'))))); }