fedi-tumblr/layout/header.php

262 lines
13 KiB
PHP

<!DOCTYPE html>
<head>
<title><?php echo $setting['appname']; ?></title>
<style type="text/css">
@font-face {
font-family: 'fontello';
src: url('./font/fontello.eot?43704775');
src: url('./font/fontello.eot?43704775#iefix') format('embedded-opentype'),
url('./font/fontello.woff?43704775') format('woff'),
url('./font/fontello.ttf?43704775') format('truetype'),
url('./font/fontello.svg?43704775#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'patua';
src: url('./font/patua-one-v10-latin-regular.eot');
src: url('./font/patua-one-v10-latin-regular.woff') format('woff'),
url('./font/patua-one-v10-latin-regular.ttf') format('truetype'),
url('./font/patua-one-v10-latin-regular.svg') format('svg');
font-weight: normal;
font-style: normal;
}
.nte{
width:35px;
height:35px;
float:left;
margin:2px;
background-size:cover;
position:relative;
}
.nte_type{
position:absolute;
right:0px;
bottom:0px;
width:15px;
height:15px;
border-radius:15px;
font-family:fontello;
font-size:8px;
color:white;
}
.nte_type span{
font-family:fontello;
font-size:8px;
color:white !important;
margin-top:4px;
display:block;
}
#emojisearch {
border:0;
}
.loadingImage{
width:100px;
height:100px;
background-image: url("./img/loadingb.gif");
background-repeat:no-repeat;
}
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href='./<?php echo ($user_settings['theme'] == "custom" ? themes("file","css/color.php") : themes("file","css/color.css"))?>?id=<?php echo mt_rand(1000, 2500); ?>' />
<link rel="stylesheet" media='screen and (min-width: 801px)' href='./css/style.css?id=<?php echo mt_rand(1000, 2500); ?>' />
<link rel="stylesheet" media='screen and (max-width: 800px)' href='./css/mobile.css?id=<?php echo mt_rand(1000, 2500); ?>' />
<?php if (file_exists("themes/".sanitize($user_settings['theme'])."/css/style.css")) { ?><link rel="stylesheet" media='screen and (min-width: 801px)' href='./<?php echo themes("file","css/style.css")?>?id=<?php echo mt_rand(1000, 2500); ?>' /><?php } ?>
<?php if (file_exists("themes/".sanitize($user_settings['theme'])."/css/mobile.css")) { ?><link rel="stylesheet" media='screen and (max-width: 800px)' href='./<?php echo themes("file","css/mobile.css")?>?id=<?php echo mt_rand(1000, 2500); ?>' /><?php } ?>
<link rel="stylesheet" href="./css/animation.css"><!--[if IE 7]><link rel="stylesheet" href="css/" + font.fontname + "-ie7.css"><![endif]-->
<link rel="stylesheet" href="./css/animate.css">
</head>
<body>
<?php
if ($logedin) {
$notif = getnotif();
}
?>
<div id='hiddenside'></div>
<div class='gotop desktop'><a href='#top'>▲</a></div>
<div class="topbar" style='text-align:center; background-color:none;'>
<div class="topbar" style='height:45px; z-index:99;'>
<span style='float:left; line-height:45px;padding-left:10px;' class='appname desktop'>
<a href="./<?php echo ($logedin ? "?mode=home" : ""); ?>" style="font-family: 'patua', serif; font-weight:bold; color:white; font-size:20px; text-decoration:none" ><?php echo $setting['appname']; ?></a>
</span>
<?php if ($logedin): ?>
<span class='mid' style='margin:0 auto; height:100%;'>
<span class="topbutton" style='position:relative;'>
<a href='?mode=federated' class='fontello topicon tlicon ldr <?php echo ($tl['mode'] == "federated" ? "tiselected" : "");?>'>&#xe83c;</a>
</span>
<span class="topbutton" style='position:relative;'>
<a href='?mode=home' class='fontello topicon tlicon ldr <?php echo ($tl['mode'] == "home" ? "tiselected" : "");?>'>&#xe816;</a>
</span>
<span class="topbutton" style='position:relative;'>
<a href='?mode=local' class='fontello topicon tlicon ldr <?php echo ($tl['mode'] == "local" ? "tiselected" : "");?>'>&#xf1e0;</a>
</span>
<span class="topbutton" style='position:relative;'>
<a href='?mode=favourites' class='fontello topicon tlicon ldr <?php echo ($tl['mode'] == "favourites" ? "tiselected" : "");?>'>&#xe804;</a>
</span>
<span class="topbutton" style='position:relative;'>
<a href='?mode=direct' class='fontello topicon tlicon ldr <?php echo ($tl['mode'] == "direct" ? "tiselected" : "");?>'>&#xf0e0;</a>
</span>
<span class="topbutton" style='position:relative;'>
<a href='?mode=bookmarks' class='fontello topicon tlicon ldr <?php echo ($tl['mode'] == "bookmarks" ? "tiselected" : "");?>'>&#xe81e;</a>
</span>
</span>
<?php endif; ?>
<span class="fw" style='margin-right:20px; height:100%;'>
<?php if ($logedin): ?>
<span class="topbutton mobile" style='position:relative;'>
<a href="./<?php echo ($logedin ? "?mode=home" : ""); ?>"' class='fontello topicon' style='text-decoration:none; display:inline; font-size:20px;'>&#xe816;</a>
</span>
<span class="topbutton desktop" style='position:relative;'>
<div style='position:absolute; left:-200px; display:none; height: 50%; background-color:white; border-radius:10px; padding: 2px; margin-top: 8px;' class="search"><form method='get' style="margin-top:-11px;"><input type='text' name='search' style='margin-left:3px; width:150px' placeholder='Type your search here'><input type='submit' value='&#xe800;' class='fontello'></form></div>
<a href='?page=search' class='searchform fontello topicon' onClick='return false'>&#xe800;</a>
</span>
<span class="topbutton mobile compose" style='position:relative;'>
<a href='' onClick='return false;' class='fontello topicon' style='text-decoration:none; display:inline; font-size:20px;'>&#xe824;</a>
</span>
<span class="topbutton ntbutton">
<a href='?page=notifications' onClick='return false;' class='badge fontello topicon' style='text-decoration:none; display:inline; font-size:20px;'>&#xf0f3; <span class='alert' style=''></span> </a>
<div id='notifications'><div class='container'><?php echo $notif ?></div><span class='nloadmore'>Load More</span></div>
</span>
<span class="topbutton" id="usermenu">
<span class='fontello topicon' style='display:inline; font-size:20px;'>&#xe80b;</span>
<div class='menu'>
<ul>
<?php if ($logedin): ?>
<li class='mobile' style=''><a class='fontello ldr link' href='?mode=federated' onClick='return false'>&#xe83c; Federated</a></li>
<li class='mobile' style=''><a class='fontello ldr link' href='?mode=home' onClick='return false'>&#xe816; Home</a></li>
<li class='mobile' style=''><a class='fontello ldr link' href='?mode=local' onClick='return false'>&#xf1e0; Local</a></li>
<li class='mobile' style=''><a class='fontello ldr link' href='?mode=favourites' onClick='return false'>&#xe804; Favourited</a></li>
<li class='mobile' style=''><a class='fontello ldr link' href='?mode=direct' onClick='return false'>&#xf0e0; Direct</a></li>
<?php if (isset($user_settings['pleroma'])): ?>
<li class='mobile' style=''><a class='fontello ldr link' href='?mode=bookmarks' onClick='return false'>&#xe81e; Bookmarks</a></li>
<?php endif; ?>
<li class='mobile' style=''><a class='fontello searchmobiletoggle link' href='?page=search' onClick='return false;'>&#xe800; Search</a></li>
<li class='mobile' style=''></li>
<?php endif; ?>
<li><a class='fontello ldr link' href='?page=settings' onClick='return false'>&#xe82d; Settings</a></li>
<li><a class='fontello link' href='./logout'>&#xe832; Log Out</a></li>
</ul>
</div>
</span>
<?php else: ?>
<span class="topbutton" style='position:relative;'>
<a href='?page=about' class='fontello topicon ldr' style='text-decoration:none; display:inline; font-size:20px;'>&#xe814; </a>
</span>
<span class="topbutton desktop" style='position:relative;'>
<a href='?page=fediverse' class='fontello topicon ldr' style='text-decoration:none; display:inline; font-size:20px;'>&#xf1e0; </a>
</span>
<span class="topbutton desktop" style='position:relative;'>
<a href='?page=privacy' class='fontello topicon ldr' style='text-decoration:none; display:inline; font-size:20px;'>&#xe819; </a>
</span>
<span class="topbutton" style='position:relative;'>
<a href='?page=settings' class='fontello topicon ldr' style='text-decoration:none; display:inline; font-size:20px;'>&#xe82d; </a>
</span>
<span class="topbutton" style='position:relative; width:auto; margin-left:10px;'>
<a href='./login' style='display:inline:block; padding:3px; border: 1px solid white; font-weight:bold; border-radius:3px; color:white; text-decoration:none; display:inline; font-size:20px;'><span class='fontello' >&#xe832;</span> Login </a>
</span>
<?php
endif; ?>
<!--
<a href='?page=notifications' onClick='return false;'><span class="badge disabled">&#128276;</span></a>
<a href="./logout" style='color:lightgray; font-weight:bold; font-size:18px;'>Logout</a>
-->
</span>
</div>
</div>
<br>
<div class='wrapper'>
<div class='container'>
<div id='posts'>
<?php if ($logedin) { ?>
<div class='element' id="searchmobile">
<div class='avatar desktop' style='background-image:url(:avatar:) :style:'></div>
<div class='searchmobile' style="padding-top: 15px; padding-bottom: 15px;">
<form method="get">
<span class="searchmobiletoggle" style='padding-left:0px;padding-right:5px;font-weight:bold;'>X</span>
<input type="text" name="search" style='width:70%' placeholder="Type your search here">
<input type="submit" value="&#xe800;" class="fontello">
</form>
</div>
</div>
<div class='element' id='postform' style=''>
<div class='avatar desktop' style='background-image:url(<?php echo $user_settings['avatar']; ?>)'></div>
<div class='postform form' style='display:block;'>
<div style='text-align:right; width:95%; margin: 13px auto; display:block;'>
<form action='status.php' method='post' enctype='multipart/form-data'>
<input type='hidden' name='mode' value='<?php echo $tl['mode']; ?>'>
<input type='hidden' name='uploaded' id="uploaded" value=''>
<input type='hidden' name='thread' id="thread" value='null'>
<div style='width:100%; text-align:left;'>
<div style='width:100% height:27px; border-bottom: 1px solid transparent;'>
<input type='text' name='spoiler' placeholder='Title (optional)' value='' style='border:none; width:99%;'>
</div>
<textarea name='status' id="status" style='width:98.85%; height:100px; border:none;'></textarea>
</div>
<div style='display:none; clear:both; width:100%; text-align:left;' class='picker'><input type='text' id='emojisearch' placeholder="Type to Search"><div class='emojilist' style='max-height:100px; overflow:auto;'></div></div>
<div style='display:none; clear:both; width:100%; text-align:left;' class='contactpicker'><input type='text' id='contactsearch' placeholder="Type to Search"><div class='contactlist' style='max-height:100px; overflow:auto; scroll-behavior: smooth;'></div></div>
<div class="buttons">
<span style='float:left;'>
<div style='position:relative;border: 0px; float:left;'>
<input type='submit' value='Send' id='send' onClick='return false'>
</div>
<div class='formbtn fontello' style='position:relative;'>
&#xe818;
<input style='opacity:0; position:absolute; left:0px; top:5px; background-color:yellow;' type='file' id="files_input_field" name='file[]' multiple onchange="upload_files();">
</div>
<div class='formbtn fontello' style='position:relative;'>
<input type='checkbox' name='sensitive' id='sensitive' style='display:none;'>
<label for='sensitive' class='fontello'>&#xe81b;</label>
</div>
<div class='formbtn fontello' id="emoji" style='position:relative; cursor:pointer;'>
&#128540;
</div>
<div class='formbtn fontello' id="contact" style='position:relative; cursor:pointer;'>
&#xf234;
</div>
</span>
<span style='float:left;' class='status'>
</span>
<span style='float:right;' class="scope">
<select name='scope' id='scope'>
<option value="1" <?php echo ($user_settings['defscope'] == '1' ? "selected" : ""); ?>>&#xe83c; Public</option>
<option value="2" <?php echo ($user_settings['defscope'] == '2' ? "selected" : ""); ?>>&#xe816; Unlisted</option>
<option value="3" <?php echo ($user_settings['defscope'] == '3' ? "selected" : ""); ?>>&#xe819; Private</option>
<option value="4" <?php echo ($user_settings['defscope'] == '4' ? "selected" : ""); ?>>&#xf0e0; Direct</option>
</select>
</span>
</div>
</form>
<div style="clear: both;"></div>
</div>
</div>
</div>
<?php
}
?><div id="loader" class='element'></div>
<div id="content">