130520 User search and wetcat theme

This commit is contained in:
Daisuke
2020-05-13 15:26:38 -05:00
parent 1f2b2fd19c
commit 125b944385
21 changed files with 689 additions and 123 deletions

View File

@ -276,12 +276,8 @@ foreach($_GET as $key => $value){
case "userinfo":
$info = api_get("accounts/".htmlentities($value));
$rel = api_get("accounts/relationships?id=".htmlentities($value));
$image=imagecreatefromstring(file_get_contents($info['avatar']));
$thumb=imagecreatetruecolor(1,1);
imagecopyresampled($thumb,$image,0,0,0,0,1,1,imagesx($image),imagesy($image));
$mainColor=strtoupper(dechex(imagecolorat($thumb,0,0)));
echo "<div class='userinfo_he' style='background-color:#$mainColor; background-size:cover; background-image:url(" . $info['header_static'] . ");'>
echo "<div class='userinfo_he' style='background-color:#".averageColor($info['avatar'])."; background-size:cover;" . (!empty($info['header']) ? "background-image:url(".$info['header'].");" : "") . "'>
<span style='margin:5px; display:inline-block;'>
<a href='".$info['url']."' target='_blank' class='external' style='font-weight:bold; font-size:13px; text-decoration:none; color: white; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;'>".$info['acct']."</a>
</span>
@ -326,9 +322,13 @@ foreach($_GET as $key => $value){
case "emoji":
echo emoji_list(sanitize($value));
//die();
break;
case "contact":
echo contact_search(sanitize($value));
break;
}
}