cleaned up date formatting for display

beta
Ro 4 years ago
parent 72c9b3f9e6
commit 395850adb8

@ -28,6 +28,7 @@ class DashControl
"stats" => $data["stats"],
"pages" => $data["pages"],
"paginate" => $data["paginate"],
"status" => Session::active(),
];
break;
case "page":
@ -41,11 +42,13 @@ class DashControl
"title" => "Fipamo | Edit Page",
"page" => (new Book("../content/pages"))->findPageById($uuid),
"mode" => $mode,
"status" => Session::active(),
];
} else {
$pageOptions = [
"title" => "Fipamo | Create Page",
"mode" => $mode,
"status" => Session::active(),
];
}
} else {

@ -118,8 +118,6 @@ class Book
$doc = $parser->parse(file_get_contents($file), false);
$meta = $doc->getYAML();
//$date = getdate($meta["created"]);
$newDate = date("Y M D d", $meta["created"]);
$page = [
"id" => $meta["id"],
"uuid" => $meta["uuid"],
@ -129,8 +127,8 @@ class Book
"layout" => $meta["layout"],
"tags" => $meta["tags"],
"author" => $meta["author"],
"prettyDate" => $newDate,
"created" => $meta["created"],
"created" => date("Y M D d", $meta["created"]),
"updated" => date("Y M D d", $meta["updated"]),
"deleted" => $meta["deleted"],
"menu" => $meta["menu"],
"featured" => $meta["featured"],

@ -11,6 +11,7 @@
{% set _title = page['title'] %}
{% set tags = page['tags'] %}
{% set content = page['content'] %}
{% set date = page['created'] %}
{% else %}
{% set id = '' %}
{% set uuid = '' %}
@ -19,6 +20,7 @@
{% set title = '' %}
{% set tags = '' %}
{% set content = '' %}
{% set date = '' %}
{% endif %}
{% block title %}
@ -62,7 +64,7 @@
<label>CREATED</label>
<br/>
<span id="post-date" type="text">
PRETTY DATE
{{ date }}
</span>
</div>
<div id="post-meta" class="column">

@ -40,7 +40,7 @@
<span class="item-options" data-active="{{ featured }}">
Featured</span>
</div>
<span>{{ page.prettyDate }}</span>
<span>{{ page.updated }}</span>
</div>
</a>

Loading…
Cancel
Save