From f7275853993e4b01793bc9078f7a0a4865aaf334 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Thu, 1 Jun 2023 10:11:12 -0500 Subject: enhancement: add links to user profiles --- index.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index a45b5ae..56553a2 100644 --- a/index.php +++ b/index.php @@ -138,11 +138,12 @@ function get_stories($api_url, $inline_title) { $sub_response_raw = file_get_contents($sub_url); $sub_response = json_decode($sub_response_raw, true); + // TODO: Can this be converted to a heredoc string with variables? $html = '
' . $sub_response['title'] . ''; $html .= '

by '; - $html .= $sub_response['by'] . ' | ' . $sub_response['score']; + $html .= $sub_response['by'] . ' | ' . $sub_response['score']; $html .= ' points

'; $html_output .= $html; } @@ -168,6 +169,7 @@ function get_user(string $api_url, string $inline_title) { $response = json_decode($response_raw, true); } + // TODO: Can this be converted to a heredoc string with variables? $html_output = '

' . $inline_title . '

'; $html_output .= '

About: ' . $response['about'] . '

'; $html_output .= '

Karma: ' . $response['karma'] . '

'; @@ -186,7 +188,7 @@ function get_user(string $api_url, string $inline_title) { $html .= '

by '; - $html .= $sub_response['by'] . ' | ' . $sub_response['score']; + $html .= $sub_response['by'] . ' | ' . $sub_response['score']; $html .= ' points

'; $html_output .= $html; } -- cgit v1.2.3-70-g09d2