Merge pull request #21 from zrose584/search_focus
autofocus search input on homepage
This commit is contained in:
commit
cdb3440d1d
@ -5,6 +5,7 @@ import traceback
|
|||||||
import re
|
import re
|
||||||
from sys import exc_info
|
from sys import exc_info
|
||||||
yt_app = flask.Flask(__name__)
|
yt_app = flask.Flask(__name__)
|
||||||
|
yt_app.config['TEMPLATES_AUTO_RELOAD'] = True
|
||||||
yt_app.url_map.strict_slashes = False
|
yt_app.url_map.strict_slashes = False
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,8 @@
|
|||||||
<header>
|
<header>
|
||||||
<a href="/youtube.com" id="home-link">Home</a>
|
<a href="/youtube.com" id="home-link">Home</a>
|
||||||
<form id="site-search" action="/youtube.com/search">
|
<form id="site-search" action="/youtube.com/search">
|
||||||
<input type="search" name="query" class="search-box" value="{{ search_box_value }}">
|
<input type="search" name="query" class="search-box" value="{{ search_box_value }}"
|
||||||
|
{{ "autofocus" if request.path == "/" else "" }}>
|
||||||
<button type="submit" value="Search" class="search-button">Search</button>
|
<button type="submit" value="Search" class="search-button">Search</button>
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<button class="dropdown-label">Options</button>
|
<button class="dropdown-label">Options</button>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user