diff --git a/css/color.css b/css/color.css index 6aaa81e..b8ef6b1 100644 --- a/css/color.css +++ b/css/color.css @@ -116,6 +116,16 @@ input[type="submit"] { color:white; } +.search input[type="submit"] { + color:#305792 !important; + background-color:transparent !important; + border: 0px !important; +} + +.search input[type="text"],input[name="spoiler"] { + box-shadow: none !important; +} + .formbtn { color:#305792; } @@ -132,19 +142,19 @@ input[type="submit"] { background-color: white; } -.postMenu div{ +.menu div{ box-shadow: 1px 1px 2px black; } -.postMenu li:hover { +.menu li:hover { background-color:#203960 !important; } -.postMenu li a{ +.menu li a{ color:#203960; } -.postMenu li:hover a{ +.menu li:hover a{ color:white; } diff --git a/css/mobile.css b/css/mobile.css index d769b47..62b7d61 100644 --- a/css/mobile.css +++ b/css/mobile.css @@ -24,6 +24,7 @@ body { ul{ padding:0px; margin:0px; + list-style: none; } select{ @@ -73,8 +74,13 @@ textarea { .topbar { width: 100vw; height: 45px; - margin: 0; - position: relative; + margin-top: 45px; + position:fixed; bottom:0px; left:0px; + z-index:99; +} + +.topbar > div.topbar{ + position:fixed; bottom:0px; left:0px; } .wrapper { @@ -114,9 +120,10 @@ aside { display: table; text-align: center; right: 20px; - bottom: 20px; + bottom: 60px; border-radius: 10px; z-index:50; + background-color: #001935 !important; } .gotop a { @@ -131,7 +138,7 @@ aside { background-color: rgba(255, 255, 255, 0); position: fixed; left: 0px; - bottom: 0px; + top: 0px; width: 100vw; height: auto; z-index: 99; @@ -175,7 +182,7 @@ aside { #notifications { position: fixed; left: 0px; - top: 45px; + bottom: 45px; width: 100vw; max-height: 400px; display: none; @@ -302,11 +309,15 @@ aside { width: 150px; height: 100px; position: absolute; - top: 45px; + top: -322px; left: -80px; transition: 0.4s; } +#usermenu li { + height: 32px !important; +} + #usermenu:hover>.menu, #usermenu:active>.menu { display: block; @@ -385,7 +396,7 @@ aside { position:fixed; width: 100vw !important; left:0px; - top:45px; + bottom:45px; text-align: center; border-radius: 3px; z-index: 99; diff --git a/css/style.css b/css/style.css index 42f31ca..92ab83b 100644 --- a/css/style.css +++ b/css/style.css @@ -27,6 +27,7 @@ body { ul{ padding:0px; margin:0px; + list-style: none; } select{ @@ -80,6 +81,10 @@ textarea { position: relative; } +.topbar > div.topbar{ + position:fixed; top:0px; left:0px; +} + .wrapper { width: 100%; clear: both; diff --git a/img/loading.gif b/img/loading.gif index ab3ad70..599bdcd 100644 Binary files a/img/loading.gif and b/img/loading.gif differ diff --git a/img/loadingb.gif b/img/loadingb.gif index 347fa5f..73fa116 100644 Binary files a/img/loadingb.gif and b/img/loadingb.gif differ diff --git a/include/functions.php b/include/functions.php index ba191d6..688eaf4 100644 --- a/include/functions.php +++ b/include/functions.php @@ -41,6 +41,7 @@ function get_urls($input) { /* this function replaces the emoji codes in a text with the correspondent emojis of the specified instance, returns the html code with the emojis in the specified size*/ + /* function emoji($text, $size = 30, $srv) { $data = json_decode(file_get_contents("https://$srv/api/v1/custom_emojis") , true) [0]['url']; $u = explode("/", $data); @@ -53,6 +54,7 @@ function emoji($text, $size = 30, $srv) { $text = str_replace("https;", "https:", $text); return $text; } +*/ /* this is the same as above but is used on other places, like user bios and places where the shortcodes and the emoji url is defined in the same place */ @@ -63,7 +65,8 @@ function emojify($string, $emojis, $size = 40) { return $string; } - +/* This function displays the emoji list of an instance based on a search + string given on $val */ function emoji_list($val){ $emojilist = api_get("/custom_emojis"); $c = 0; @@ -85,7 +88,9 @@ function emoji_list($val){ return $return; } - + + +/* general function to check if one strings starts with a given search */ function starts_with($string,$search){ if (substr(strtolower($string),0,strlen($search)) == strtolower($search)){ return true; @@ -93,6 +98,7 @@ function starts_with($string,$search){ return false; } +/* general function to check if one strings contains with a given search */ function contains($string,$search){ if (is_numeric(strpos(strtolower($string),strtolower($search)))){ return true; @@ -148,25 +154,6 @@ function user_info($user) { ); } -function api_getv2($url) { - global $srv; - global $token; - - $curl = curl_init(); - curl_setopt($curl, CURLOPT_URL, "https://$srv/api/v2/" . $url); - if (!is_null($token)) { - curl_setopt($curl, CURLOPT_HTTPHEADER, array( - 'Authorization: Bearer ' . $token - )); - } - curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); - $result = curl_exec($curl); - curl_close($curl); - - return json_decode($result, true); -} - - /* a function to make an authenticated general GET api call to the logged-in instance */ function api_get($url) { global $srv; @@ -185,6 +172,25 @@ function api_get($url) { return json_decode($result, true); } +/* same as above but used in some newer api endpoinds (v2) */ +function api_getv2($url) { + global $srv; + global $token; + + $curl = curl_init(); + curl_setopt($curl, CURLOPT_URL, "https://$srv/api/v2/" . $url); + if (!is_null($token)) { + curl_setopt($curl, CURLOPT_HTTPHEADER, array( + 'Authorization: Bearer ' . $token + )); + } + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + $result = curl_exec($curl); + curl_close($curl); + + return json_decode($result, true); +} + /* a function to make an authenticated general POST api call to the logged-in instance */ function api_post($url, $array) { global $srv; @@ -253,6 +259,8 @@ function api_patch($url, $array) { return json_decode($result, true); } +/* Function to upload files to the profile of the authenticated user + $type can be 'avatar' or 'header'*/ function upload_profile($file,$type){ global $srv; global $token; @@ -320,15 +328,15 @@ function render_reply($item) { $reply['menu'] = ""; $json['id'] = $item['id']; @@ -350,11 +358,6 @@ function render_reply($item) { $reply['replyto'] = ($item['in_reply_to_id'] ? " " : ""); $reply['text'] = processText($item); - $public = ""; - $private = ""; - $unlisted = ""; - $direct = ""; - $reply['date'] = "" . time_elapsed_string($item['created_at']) . " - "; $reply['media'] = ""; @@ -394,7 +397,7 @@ function render_reply($item) { $reply['buttons'] = " " . ($logedin ? "
" : "") . "
" . $item['favourites_count'] . "
-
" . $item['reblogs_count'] . "
+
" . $item['reblogs_count'] . "
"; $result = themes("get","templates/reply.txt"); diff --git a/js/scripts.js b/js/scripts.js index 5bffad6..9f1a173 100644 --- a/js/scripts.js +++ b/js/scripts.js @@ -129,6 +129,15 @@ $('body').on('click', '.gotop a', function(e) { return false; }); +$('body').on('click', '.topbar:not(a)', function(e) { + if(e.target !== e.currentTarget) return; + e.preventDefault(); + $('html, body').animate({ + scrollTop: 0 + }, 800); + return false; +}); + $('body').on('click', '#loader', function() { var cnt = $("#loaded").contents(); // $("#content").prepend(cnt); diff --git a/layout/footer.php b/layout/footer.php index c829d96..4d74747 100644 --- a/layout/footer.php +++ b/layout/footer.php @@ -11,6 +11,7 @@ $query = http_build_query(array_filter(array( //'explicit' => ($nocookies == true ? $user_settings['explicit'] : false) , ))); ?> +
diff --git a/layout/header.php b/layout/header.php index 9e15cdb..b0268ff 100644 --- a/layout/header.php +++ b/layout/header.php @@ -64,9 +64,11 @@ } - - ?id=' /> + + + + @@ -79,9 +81,9 @@ if ($logedin) { ?>
-
+
-
+
" style="font-family: 'patua', serif; font-weight:bold; color:white; font-size:20px; text-decoration:none" > @@ -115,7 +117,7 @@ if ($logedin) { - + @@ -132,7 +134,7 @@ if ($logedin) { -