From 50bf84c4e46fade3d8c9b7fd2af7e06272609633 Mon Sep 17 00:00:00 2001 From: St John Karp Date: Sun, 12 Aug 2018 16:53:59 -0700 Subject: [PATCH] Show status timestamps Show how long ago the status was posted. Includes support for Swatch Internet time if SHOW_BEATS=true. --- composer.json | 1 + composer.lock | 4 ++-- public/css/styles.css | 5 +++++ resources/views/status.blade.php | 9 +++++++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 49fa722..c095c7a 100644 --- a/composer.json +++ b/composer.json @@ -9,6 +9,7 @@ "fideloper/proxy": "~3.3", "laravel/framework": "5.5.*", "laravel/tinker": "~1.0", + "nesbot/carbon": "^1.33", "revolution/laravel-mastodon-api": "^1.5", "revolution/socialite-mastodon": "^1.2" }, diff --git a/composer.lock b/composer.lock index 45772d6..9a7f8cc 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "777e302fe64df7b4f6c3d53b0d67ca01", - "content-hash": "99e2b15adf8ee6829bad59f44cae2cef", + "hash": "c699abc4e7b0c1784938122332cc0b9b", + "content-hash": "d3b83177a4165b407a361c33e1deac23", "packages": [ { "name": "dnoegel/php-xdg-base-dir", diff --git a/public/css/styles.css b/public/css/styles.css index d6ad87a..e40e51b 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -54,6 +54,11 @@ div.actions span { margin-right: 1em; } +time { + font-size: smaller; + margin-left: 1em; +} + /* Tooltip container */ .tooltip { position: relative; diff --git a/resources/views/status.blade.php b/resources/views/status.blade.php index 4bf59bc..9d48e82 100644 --- a/resources/views/status.blade.php +++ b/resources/views/status.blade.php @@ -10,6 +10,15 @@ {{ $status['account']['acct'] }} + @if ($status['reblog'] === null)

{!! $status['content'] !!}

@foreach ($status['media_attachments'] as $attachment)