fedi-tumblr/layout/sidebar.php
2021-09-07 19:07:04 -05:00

60 lines
2.3 KiB
PHP

<aside>
<?php
if ($logedin || $tl['mode'] == 'user') {
echo "
<div class='side_element' style='margin:0px; width:100%;'>
<div style='width:100%; height:120px; display:block; background-color:#" . averageColor($info['avatar']) . "; background-size:cover; background-image:url(" . $info['header_static'] . "); ' class='profileheader'></div>
<div class='avatar' style='background-color:white; background-image:url(" . $info['avatar'] . "); text-align:center; float:none; display:inline-block; border:3px solid white; margin-top:-50px; border-radius:90px;'></div>
<div style='clear:both; margin-top:-15px; padding-bottom:10px;'>" . ($logedin ? "<a href='?mode=account' class='ldr'>" : "") . "<span style='font-weight:bold; font-size:22px;'>
" . emojify($info['display_name'], $info['emojis'], 20). "</span>" . ($logedin ? "</a>" : "") . "
<br><span>(@" . $info['acct'] . ")</span>
</div>
</div>
<div class='side_element' style='margin-top:20px; margin-left:0px; width:100%;'>
<ul>
<a href='?mode=federated' class='ldr'><li>&#xe83c; Federated</li></a>
<a href='?mode=home' class='ldr'><li>&#xe816; Home</li></a>
<a href='?mode=local' class='ldr'><li>&#xf1e0; Local</li></a>
<a href='?mode=favourites' class='ldr'><li>&#xe804; Favourites</li></a>
<a href='?mode=direct' class='ldr'><li>&#xf0e0; Direct Messages</li></a>
<a href='?page=settings' class='ldr'><li>&#xe82d; Settings</li></a>
</ul>
</div>
<div class='side_element' style='margin-top:20px; margin-left:0px; width:100%;'>
<ul>";
$lists = api_get("/lists");
foreach ($lists as $list) {
echo "<a href='?list=" . $list['id'] . "' class='ldr'><li>&#xe832; " . $list['title'] . "</li></a>";
}
echo "</ul>
</div>
<div class='side_element' style='margin-top:20px; margin-left:0px; width:100%;'>
<ul>
";
foreach($user_settings['fhtags'] as $word){
if ($word != ""){
echo "<a href='?tag=" . $word . "' class='ldr'><li><b>#</b> " . $word . "</li></a>";
}
}
echo "
</ul>
</div>
";
}
if ($logedin) {
echo "";
}
else {
echo "<div class='side_element'>
<div style='width:90%; margin:8px; display:inline-block;'>
<span style='font-weight:bold; font-size:20px; clear:both;'>" . $setting['appname'] . "</span><br>
<span>" . $setting['description'] . "</span>
</div>
</div>";
}
?>
</aside>