Commit 4aff6813 authored by dmorley's avatar dmorley Committed by GitHub

Carbon (#168)

* fix merge error

* rebase

* Improve usage of Carbon. (#166)

* use carbon for nice human dates. add country name in full

* Improve usage of Carbon. (#166)
parent a1d95760
......@@ -19,6 +19,6 @@
"tests"
],
"dependencies": {
"facebox": "*",
"facebox": "*"
}
}
......@@ -189,6 +189,61 @@
],
"time": "2018-06-25T13:15:16+00:00"
},
{
"name": "nesbot/carbon",
"version": "1.31.1",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "385780c8ca2dbfd25452666e3f55e8dc1df58c41"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/385780c8ca2dbfd25452666e3f55e8dc1df58c41",
"reference": "385780c8ca2dbfd25452666e3f55e8dc1df58c41",
"shasum": ""
},
"require": {
"php": ">=5.3.9",
"symfony/translation": "~2.6 || ~3.0 || ~4.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2",
"phpunit/phpunit": "^4.8.35 || ^5.7"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Carbon\\Laravel\\ServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Brian Nesbitt",
"email": "brian@nesbot.com",
"homepage": "http://nesbot.com"
}
],
"description": "A simple API extension for DateTime.",
"homepage": "http://carbon.nesbot.com",
"keywords": [
"date",
"datetime",
"time"
],
"time": "2018-06-25T13:15:16+00:00"
},
{
"name": "noplanman/xec",
"version": "v0.1.0",
......
......@@ -65,53 +65,6 @@ $navs = [
];
?>
<nav class="navbar navbar-inverse bg-primary fixed-top">
<button class="navbar-toggler navbar-toggler-right hidden-md-up" type="button" data-toggle="collapse" data-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="/">Poduptime</a>
<div class="collapse navbar-toggleable hidden-md-up" id="navbar">
<ul class="navbar-nav">
<?php
foreach ($navs['views'] as $nav_item) {
printf(
'<li class="nav-item"><a class="nav-link%1$s" href="%2$s">%3$s%4$s</a></li>',
$nav_item['active'] ? ' active' : '',
$nav_item['href'],
$nav_item['text'],
$nav_item['active'] ? ' <span class="sr-only">(current)</span>' : ''
);
}
?>
</ul>
</div>
</nav>
<div class="container-fluid">
<div class="row">
<div class="sidebar col-md-3 col-lg-1 hidden-sm-down">
<?php foreach ($navs as $nav) : ?>
<ul class="nav nav-pills flex-column">
<?php
/** @var array $nav */
/** @var array $nav_item */
foreach ($nav as $nav_item) {
printf(
'<li class="nav-item"><a class="nav-link%1$s" href="%2$s">%3$s%4$s</a></li>',
$nav_item['active'] ? ' active' : '',
$nav_item['href'],
$nav_item['text'],
$nav_item['active'] ? ' <span class="sr-only">(current)</span>' : ''
);
}
?>
</ul>
<hr>
<?php endforeach; ?>
<p>
<small>Data refreshed: <br><?php echo Carbon::createFromTimestamp(filemtime($lastfile))->diffForHumans(); ?></small>
</p>
<header>
<div class="collapse bg-dark" id="navbarHeader">
<div class="container">
......@@ -189,12 +142,13 @@ $navs = [
</main>
<br>
<footer class="bd-footer text-muted">
<p>Data refreshed: <?php echo date('M d Y H:i', filemtime($lastfile)); ?> EST </p>
<small>Data refreshed: <?php echo Carbon::createFromTimestamp(filemtime($lastfile))->diffForHumans(); ?></small>
</footer>
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="node_modules/tablesorter/dist/js/jquery.tablesorter.combined.min.js"></script>
<script src="node_modules/tablesorter/dist/js/extras/jquery.tablesorter.pager.min.js"></script>
<script src="js/podup.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="bower_components/facebox/src/facebox.js"></script>
<script src="node_modules/chart.js/dist/Chart.min.js"></script>
<?php $statsview && include_once __DIR__ . '/statsviewjs.php'; ?>
......
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