200520 New reply layout and Longhorn theme

This commit is contained in:
Daisuke
2020-05-20 14:53:33 -05:00
parent cb98b84c94
commit 2b1cee3f9d
27 changed files with 900 additions and 78 deletions

View File

@ -276,6 +276,24 @@ foreach($_GET as $key => $value){
case "userinfo":
$info = api_get("accounts/".htmlentities($value));
$rel = api_get("accounts/relationships?id=".htmlentities($value));
$photos = api_get("accounts/".htmlentities($value)."/statuses?only_media=true&limit=5&exclude_reblogs=true");
$photo = array();
$c = 0;
if (!empty($photos)){
foreach ($photos as $elem){
if ($elem['media_attachments'][0]['type'] == "image"){
$photo[$c]['url'] = $elem['media_attachments'][0]['url'];
if ($elem['sensitive'] == true){
$photo[$c]['s'] = true;
}
$c++;
}
if ($c == 3){
break;
}
}
}
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;'>
@ -291,6 +309,11 @@ foreach($_GET as $key => $value){
<span id='".$info['id']."' class='profileButton ".(in_array($info['id'],$user_settings['nsfw']) ? "unnsfw" : "nsfw" )."'>".(in_array($info['id'],$user_settings['nsfw']) ? "NSFW <span class='fontello'>&#xf205;</span>" : "NSFW <span class='fontello'>&#xf204;</span>" )."</span>
".($logedin ? "<span id='" . $info['id'] . "' class='profileButton " . ($rel[0]['muting'] ? "un" : "") . "mute'>" . ($rel[0]['muting'] ? "&#xe81a; Unmute" : "&#xe81b; Mute") . "</span>" : "")."
</span>
<div style='display:flex; width:280px'>";
foreach ($photo as $elem){
echo "<div style='overflow:hidden; display:block; height:90px; flex:1; background-image:url(\"".$elem['url']."\"); ".(isset($elem['s']) ? "filter: blur(5px);" : "")." background-size:cover; margin:2px;'></div>";
}
echo "</div>
</div>
";
die();
@ -367,3 +390,4 @@ if(isset($_POST['status'])){
die();
}