Add autofocus to search input fields #194
This commit is contained in:
parent
39fb6294d7
commit
5770913103
@ -6,7 +6,7 @@
|
||||
{{ form.hidden_tag() }}
|
||||
<p>
|
||||
{{ form.username.label }}<br>
|
||||
{{ form.username(size=32) }}<br>
|
||||
{{ form.username(size=32, autofocus=true) }}<br>
|
||||
{% for error in form.username.errors %}
|
||||
<span style="color: red;">[{{ error }}]</span>
|
||||
{% endfor %}
|
||||
@ -33,4 +33,4 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
@ -4,7 +4,7 @@
|
||||
<div class="ui center aligned text container">
|
||||
<form action="{{url_for('ytsearch', _method='GET')}}">
|
||||
<div class="ui search">
|
||||
<input class="prompt" name="q" type="text" placeholder="Search...">
|
||||
<input class="prompt" name="q" type="text" placeholder="Search..." autofocus>
|
||||
<select name="s" id="sort">
|
||||
<option value="0">Relevance</option>
|
||||
<option value="3">Views</option>
|
||||
@ -19,13 +19,13 @@
|
||||
{% if results.channels %}
|
||||
<h3 class="ui dividing header">Users</h3>
|
||||
{% endif %}
|
||||
<div class="ui relaxed divided list">
|
||||
<div class="ui relaxed divided list">
|
||||
{% for res in results.channels %}
|
||||
<div class="item">
|
||||
<div class="image">
|
||||
{% if config.isInstance %}
|
||||
<img src="{{res.thumbnail}}" alt="Avatar">
|
||||
{% else %}
|
||||
{% else %}
|
||||
<img alt="Avatar" src="{{ url_for('img', url=res.thumbnail) }}">
|
||||
{% endif %}
|
||||
</div>
|
||||
@ -45,7 +45,7 @@
|
||||
<div class="ui label">
|
||||
<i class="video icon"></i> {{res.videos}}
|
||||
</div>
|
||||
|
||||
|
||||
{% if restricted or current_user.is_authenticated %}
|
||||
<div class="right floated content">
|
||||
{% if not current_user.is_following_yt(res.channelId) %}
|
||||
@ -59,7 +59,7 @@
|
||||
{{ btform.submit(value='Unfollow') }}
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@ -94,4 +94,4 @@
|
||||
{%endif%}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user