Compare commits

..

No commits in common. "aa95418b7074effb4ea000dc5eb862a887fa2707" and "61fd417013ec9fa461be2622433c234fe1dc7520" have entirely different histories.

2 changed files with 27 additions and 45 deletions

View File

@ -2,38 +2,32 @@
{% function content() %} {% function content() %}
<div style="text-align:center;height:50%;margin-top:25vh;"> <div style="text-align:center;height:50%;margin-top:25vh;">
<div style="width:12cm;display:inline-block;"> <div style="max-width:15cm;display:inline-block;">
<h1>{{ Escapes.htmlescape(BigGlobe.cfg.sitename) }}</h1> <h1>{{ Escapes.htmlescape(BigGlobe.cfg.sitename) }}</h1>
<form action="/search" method="GET" id="searchform"> <form action="/search" method="GET" id="searchform">
<input type="text" name="n" placeholder="Filter by name..." style="position:relative;width:100%;" /> <input type="text" name="n" placeholder="Filter by name..." style="position:relative;width:100%;" />
{% if BigGlobe.cfg.enable18plus then %}
<ul class="over18">
<li>
<input type="radio" name="a" value="-1" id="o18h" onchange="upd(-1)" checked />
<label for="o18h">Hide 18+</label>
</li><li>
<input type="radio" name="a" value="0" id="o18s" onchange="upd(0)" />
<label for="o18s">Show 18+</label>
</li><li>
<input type="radio" name="a" value="1" id="o18o" onchange="upd(1)" />
<label for="o18o">Only 18+</label>
</li>
</ul>
{% end %}
<input type="hidden" id="tparam" name="t" value="" /> <input type="hidden" id="tparam" name="t" value="" />
<div data-formid="searchform" data-formparaminputid="tparam" style="position:relative;width:100%;margin-top:1em;" class="tagbox">
<div style="position: relative;"> <p>Filter by tags...</p>
<div data-formid="searchform" data-formparaminputid="tparam" style="position:relative;width:58%;margin-top:1em;display:inline-block;vertical-align:top;white-space:nowrap;overflow-x:scroll;" class="tagbox"> <span style="position:relative;min-width:4px;left:0;" contenteditable></span>
<p>Filter by tags...</p>
<!-- Firefox has a 10-year old bug where a contenteditable with 0 padding loses focus when you press the right arrow key to the end -->
<span style="position:relative;min-width:4px;left:0;padding-right:1px;" contenteditable autofocus></span>
</div>
{% if BigGlobe.cfg.enable18plus then %}
<ul class="over18" style="width:40%;display:inline-block;vertical-align:middle;">
<li>
<input type="radio" name="a" value="-1" id="o18h" onchange="upd(-1)" checked />
<label for="o18h">&#x1F6C7;</label>
</li><li>
<input type="radio" name="a" value="0" id="o18s" onchange="upd(0)" />
<label for="o18s">18+?</label>
</li><li>
<input type="radio" name="a" value="1" id="o18o" onchange="upd(1)" />
<label for="o18o">&check;</label>
</li>
</ul>
{% end %}
<div class="autocomplete" style="visibility:hidden;width:100%;position:absolute;top:70%;box-sizing:border-box;"></div>
</div> </div>
<div class="autocomplete" style="visibility:hidden;width:100%;"></div>
<input type="submit" value="Search" style="margin-top:1em;" /> <input type="submit" value="Search" style="margin-top:1em;" />
@ -83,8 +77,6 @@
showalltags = function() {} showalltags = function() {}
} }
document.querySelector("[autofocus]").focus()
</script> </script>
{% end %} {% end %}

View File

@ -19,15 +19,9 @@
worked = false worked = false
end end
if BigGlobe.cfg.anarchy == "ANARCHY" then if worked and BigGlobe.cfg.anarchy == "ANARCHY" then
if u and u.privs > DB.USER_PRIVS_APPROVED then response:addHeader("Refresh", "3;url=" .. zzz)
worked = false response:statusCode(303)
end
if worked then
response:addHeader("Refresh", "3;url=" .. zzz)
response:statusCode(303)
end
end end
end end
@ -36,13 +30,9 @@
{% function content() %} {% function content() %}
{% if BigGlobe.cfg.anarchy == "ANARCHY" then %} {% if BigGlobe.cfg.anarchy == "ANARCHY" then %}
{% if worked and zzz then %} <p>In anarchy mode, anyone can be anything. Please wait..</p>
<p>In anarchy mode, anyone can be anything. Please wait..</p>
<p>If that doesn't work, <a href="{{ Escapes.htmlescape(zzz) }}">click here</a>.</p> <p>If that doesn't work, <a href="{{ Escapes.htmlescape(zzz) }}">click here</a>.</p>
{% else %}
<p>User doesn't exist.</p>
{% end %}
{% else %} {% else %}
{% if worked then %} {% if worked then %}
<p>Link has been sent to {{ em and Escapes.htmlescape(em) }}. This page may be closed.</p> <p>Link has been sent to {{ em and Escapes.htmlescape(em) }}. This page may be closed.</p>