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