diff --git a/custom_template.css b/custom_template.css index 4d9f9fc..a8b835a 100644 --- a/custom_template.css +++ b/custom_template.css @@ -1,3 +1,5 @@ +/* Copy this file to custom.css and edit the styling as you like */ + /* === Custom CSS based on: https://github.com/ilyadzh/plain-css */ :root { diff --git a/libs/twtxt.php b/libs/twtxt.php index a1f0af3..ddd0e76 100644 --- a/libs/twtxt.php +++ b/libs/twtxt.php @@ -396,6 +396,7 @@ function getTwtsFromTwtxtString($url) { $twt->originalTwtStr = $currentLine; $twt->hash = getHashFromTwt($currentLine, $twtxtData->mainURL); + $twt->timestamp = $timestamp; $twt->fullDate = date('j F Y h:i:s A', $timestamp) . ' (UTC)'; $twt->displayDate = $displayDate; $twt->content = $twtContent; diff --git a/partials/base.php b/partials/base.php index f41ca8a..69ea709 100644 --- a/partials/base.php +++ b/partials/base.php @@ -33,7 +33,8 @@ $title = "Timeline"; // Fallback, should be set in all views // HACKED by sp@darch.dk if(!empty($_GET['list'])) { - $url = "https://darch.dk/twtxt-lists/".$_GET['list']; + $url = $baseURL.$_GET['list']; + //$url = "https://darch.dk/".$_GET['list']; } else { $url = $config['public_txt_url']; diff --git a/partials/header.php b/partials/header.php index 3aa4a29..2ff1158 100644 --- a/partials/header.php +++ b/partials/header.php @@ -21,15 +21,15 @@ $profile = getTwtsFromTwtxtString($config['public_txt_url']);

- +

diff --git a/partials/lists.php b/partials/lists.php index 068de12..1d2981f 100644 --- a/partials/lists.php +++ b/partials/lists.php @@ -34,9 +34,9 @@ $listName = str_replace("twtxt-", "", $listName); $listName = str_replace("_", " ", $listName); $listName = str_replace(".txt", "", $listName); + //$filename = "TODO".$baseURL."/".$filename; echo ""; - } - + } ?> diff --git a/partials/profile.php b/partials/profile.php index 9ab987f..e31dbc4 100644 --- a/partials/profile.php +++ b/partials/profile.php @@ -11,7 +11,7 @@ $profileURL = $baseURL . '/?profile=' . $profile->mainURL;
- + diff --git a/views/following.php b/views/following.php index 374b8ba..c89d165 100644 --- a/views/following.php +++ b/views/following.php @@ -14,7 +14,9 @@ include 'partials/header.php'; Nick - URL + URL + Time ago + @@ -22,9 +24,26 @@ include 'partials/header.php'; - - - + + + + + + twts)) { + + // Then test if latest twt is at top or bottom of file: + $resetVar = reset(getTwtsFromTwtxtString($currentFollower[1])->twts); + $endVar = end(getTwtsFromTwtxtString($currentFollower[1])->twts); + if ($resetVar->timestamp < $endVar->timestamp) { // TODO: this can be swapped to get time of first twt + echo $endVar->displayDate; + } else { + echo $resetVar->displayDate; + } + } + ?> +