Small improvements

This commit is contained in:
lalka2016 2023-05-24 16:49:10 +03:00
parent 81da6e1518
commit 9b4e1c743a
6 changed files with 54 additions and 22 deletions

View file

@ -88,8 +88,8 @@
<div class="link dec"> <div class="link dec">
<a href="/logout?hash={urlencode($csrfToken)}">{_header_log_out}</a> <a href="/logout?hash={urlencode($csrfToken)}">{_header_log_out}</a>
</div> </div>
<div class="link"> {var $atSearch = str_contains($_SERVER['REQUEST_URI'], "/search")}
{var $atSearch = str_contains($_SERVER['REQUEST_URI'], "/search")} <div class="{if $atSearch}nodivider{else}link{/if}">
{if !$atSearch} {if !$atSearch}
<form action="/search" method="get" id="searcher"> <form action="/search" method="get" id="searcher">
@ -105,7 +105,7 @@
</form> </form>
{else} {else}
<form action="/search" method="get" id="searcher"> <form action="/search" method="get" id="searcher">
<input id="searchInput" value="{$_GET['query'] ?? ''}" type="search" class="sr" name="query" placeholder="{_header_search}" style="height: 20px;background: url('/assets/packages/static/openvk/img/search_icon.png') no-repeat 3px 4px; background-color: #fff; padding-left: 18px;width: 548px;" title="{_header_search} [Alt+Shift+F]" accesskey="f" /> <input id="searchInput" value="{$_GET['query'] ?? ''}" type="search" class="sr" name="query" placeholder="{_header_search}" style="height: 20px;background: url('/assets/packages/static/openvk/img/search_icon.png') no-repeat 3px 4px; background-color: #fff; padding-left: 18px;width: 555px;" title="{_header_search} [Alt+Shift+F]" accesskey="f" />
<select name="type" class="whatFind"> <select name="type" class="whatFind">
<option value="users" {if str_contains($_SERVER['REQUEST_URI'], "type=users")}selected{/if}>{_s_by_people}</option> <option value="users" {if str_contains($_SERVER['REQUEST_URI'], "type=users")}selected{/if}>{_s_by_people}</option>
<option value="groups" {if str_contains($_SERVER['REQUEST_URI'], "type=groups")}selected{/if}>{_s_by_groups}</option> <option value="groups" {if str_contains($_SERVER['REQUEST_URI'], "type=groups")}selected{/if}>{_s_by_groups}</option>

View file

@ -122,6 +122,12 @@
{/block} {/block}
{block content} {block content}
<style>
.comment, .post-divider
{
border:none;
}
</style>
<div style="margin-top:-7px"> <div style="margin-top:-7px">
{include "../components/paginator.xml", conf => (object) [ {include "../components/paginator.xml", conf => (object) [
"page" => $page, "page" => $page,
@ -138,7 +144,7 @@
{include searchOptions} {include searchOptions}
{var $data = is_array($iterator) ? $iterator : iterator_to_array($iterator)} {var $data = is_array($iterator) ? $iterator : iterator_to_array($iterator)}
<div class="container_gray" style="float:left;width:68%;border-top:1px solid #E5E7E6"> <div class="container_gray" style="float:left;width:70%;border-top:1px solid #E5E7E6">
{if sizeof($data) > 0} {if sizeof($data) > 0}
{if $type == "users" || $type == "groups" || $type == "apps"} {if $type == "users" || $type == "groups" || $type == "apps"}
<div class="content" n:foreach="$data as $dat"> <div class="content" n:foreach="$data as $dat">
@ -171,16 +177,9 @@
</table> </table>
</div> </div>
{elseif $type == "posts"} {elseif $type == "posts"}
{foreach $data as $dat} <div n:foreach="$data as $dat" class="content">
{if $dat->getTargetWall() < 0 && $dat->getWallOwner()->isHideFromGlobalFeedEnabled()} {include "../components/post.xml", post => $dat, commentSection => true, onWallOf => true}
{php continue;} </div>
{* костыль но я по-другому не придумал *}
{else}
<div class="content">
{include "../components/post.xml", post => $dat, commentSection => true, onWallOf => true}
</div>
{/if}
{/foreach}
{elseif $type == "comments"} {elseif $type == "comments"}
<div n:foreach="$data as $dat" class="content"> <div n:foreach="$data as $dat" class="content">
{include "../components/comment.xml", comment => $dat, linkW => true} {include "../components/comment.xml", comment => $dat, linkW => true}
@ -230,7 +229,7 @@
<div class="searchOption"> <div class="searchOption">
<div class="searchOptionName" id="n_sort" onclick="hideParams('sort')"><img src="/assets/packages/static/openvk/img/hide.png" class="searchHide">{_s_order_by}</div> <div class="searchOptionName" id="n_sort" onclick="hideParams('sort')"><img src="/assets/packages/static/openvk/img/hide.png" class="searchHide">{_s_order_by}</div>
<div class="searchOptionBlock" id="s_sort"> <div class="searchOptionBlock" id="s_sort">
<select name="sort" form="searcher"> <select name="sort" form="searcher" id="sortyor" onchange="this.value == 'random' ? document.getElementById('invertor').setAttribute('hidden', 'hidden') : document.getElementById('invertor').removeAttribute('hidden')">
<option value="id" {if $_GET["sort"] == "name"}selected{/if}>{_s_order_by_id}</option> <option value="id" {if $_GET["sort"] == "name"}selected{/if}>{_s_order_by_id}</option>
<option value="random" {if $_GET["sort"] == "random"}selected{/if}>{_s_order_by_random}</option> <option value="random" {if $_GET["sort"] == "random"}selected{/if}>{_s_order_by_random}</option>
{if $type == "users"} {if $type == "users"}
@ -240,7 +239,9 @@
{/if} {/if}
{/if} {/if}
</select> </select>
<div id="invertor" {if $_GET["sort"] == "random"}hidden{/if}>
<input type="checkbox" name="invert" value="1" form="searcher" {if !is_null($_GET['invert']) && $_GET['invert'] == "1"}checked{/if}>{_s_order_invert} <input type="checkbox" name="invert" value="1" form="searcher" {if !is_null($_GET['invert']) && $_GET['invert'] == "1"}checked{/if}>{_s_order_invert}
</div>
</div> </div>
</div> </div>
@ -275,6 +276,7 @@
<input type="text" value="{if !is_null($_GET['status'])}{$_GET['status']}{/if}" form="searcher" placeholder="{_status}" name="status"> <input type="text" value="{if !is_null($_GET['status'])}{$_GET['status']}{/if}" form="searcher" placeholder="{_status}" name="status">
<input type="text" value="{if !is_null($_GET['city'])}{$_GET['city']}{/if}" form="searcher" placeholder="{_city}" name="city"> <input type="text" value="{if !is_null($_GET['city'])}{$_GET['city']}{/if}" form="searcher" placeholder="{_city}" name="city">
<input type="text" value="{if !is_null($_GET['native_city'])}{$_GET['native_city']}{/if}" form="searcher" placeholder="{_s_native_city}" name="native_city"> <input type="text" value="{if !is_null($_GET['native_city'])}{$_GET['native_city']}{/if}" form="searcher" placeholder="{_s_native_city}" name="native_city">
<input name="is_online" type="checkbox" {if !is_null($_GET['is_online']) && $_GET['is_online'] == "1"}checked{/if} form="searcher" value="1">{_s_now_on_site}
</div> </div>
</div> </div>
@ -330,10 +332,9 @@
<input type="text" value="{if !is_null($_GET['fav_quote'])}{$_GET['fav_quote']}{/if}" form="searcher" placeholder="{_favorite_quotes}" name="fav_quote"> <input type="text" value="{if !is_null($_GET['fav_quote'])}{$_GET['fav_quote']}{/if}" form="searcher" placeholder="{_favorite_quotes}" name="fav_quote">
</div> </div>
</div> </div>
<input name="is_online" type="checkbox" {if !is_null($_GET['is_online']) && $_GET['is_online'] == "1"}checked{/if} form="searcher" value="1">{_s_now_on_site}
<!--<input name="with_photo" type="checkbox" {if !is_null($_GET['with_photo']) && $_GET['with_photo'] == "on"}checked{/if} form="searcher">{_s_with_photo}--> <!--<input name="with_photo" type="checkbox" {if !is_null($_GET['with_photo']) && $_GET['with_photo'] == "on"}checked{/if} form="searcher">{_s_with_photo}-->
{/if} {/if}
<input class="button" type="button" id="dnt" value="{_reset}" onclick="resetSearch()">
</div> </div>
{/block} {/block}

View file

@ -97,6 +97,14 @@ h1 {
background-size: 1.5px 41px; background-size: 1.5px 41px;
} }
.header_navigation .nodivider {
display: inline-block;
height: 29px;
padding: 11px 4px 0 7px;
background: none;
background-size: 1.5px 41px;
}
.header_navigation .link a { .header_navigation .link a {
color: #D7D7D7; color: #D7D7D7;
text-decoration: none; text-decoration: none;
@ -670,6 +678,7 @@ select {
font-family: tahoma, verdana, arial, sans-serif; font-family: tahoma, verdana, arial, sans-serif;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
outline:none;
} }
.header2 { .header2 {
@ -2306,10 +2315,9 @@ a.poll-retract-vote {
overflow-y: hidden; overflow-y: hidden;
background:#F7F7F7; background:#F7F7F7;
overflow-x:hidden; overflow-x:hidden;
width:29.2%; width:28.8%;
border-top:1px solid #E5E7E6; border-top:1px solid #E5E7E6;
float:right; float:right;
padding-left:9.6px;
scrollbar-width: none; scrollbar-width: none;
font-size:12px; font-size:12px;
background-color:#f7f7f7; background-color:#f7f7f7;
@ -2339,6 +2347,7 @@ a.poll-retract-vote {
.searchList .searchList
{ {
list-style: none; list-style: none;
user-select: none;
padding-left:0px; padding-left:0px;
} }

View file

@ -579,7 +579,7 @@ function expandSearch()
document.querySelector(".whatFind").style.display = "block"; document.querySelector(".whatFind").style.display = "block";
document.querySelector(".whatFind").style.marginRight = "-80px"; document.querySelector(".whatFind").style.marginRight = "-80px";
document.getElementById("searchInput").style.width = "650px"; document.getElementById("searchInput").style.width = "627px";
} }
async function decreaseSearch() async function decreaseSearch()
@ -612,6 +612,26 @@ function hideParams(name)
} }
} }
function resetSearch()
{
let inputs = document.querySelectorAll("input")
let selects = document.querySelectorAll("select")
for(const input of inputs)
{
if(input != dnt) {
input.value = ""
}
}
for(const select of selects)
{
if(select != sortyor) {
select.value = 0
}
}
}
$(document).on("scroll", () => { $(document).on("scroll", () => {
if($(document).scrollTop() > $(".sidebar").height() + 50) { if($(document).scrollTop() > $(".sidebar").height() + 50) {
$(".floating_sidebar")[0].classList.add("show"); $(".floating_sidebar")[0].classList.add("show");

View file

@ -1506,3 +1506,4 @@
"s_only_in_names" = "only in names"; "s_only_in_names" = "only in names";
"s_any" = "any"; "s_any" = "any";
"reset" = "Reset";

View file

@ -1400,3 +1400,4 @@
"s_only_in_names" = "только в именах"; "s_only_in_names" = "только в именах";
"s_any" = "любой"; "s_any" = "любой";
"reset" = "Сброс";