aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/templates
diff options
context:
space:
mode:
authorzrose584 <57181548+zrose584@users.noreply.github.com>2020-10-07 15:28:32 +0200
committerzrose584 <57181548+zrose584@users.noreply.github.com>2020-10-07 18:44:48 +0200
commit05cec148810a18727f345853e8aadcb3648c1965 (patch)
treebc0efc6fc72c5dd9170a28f082b22f1e3a333fd7 /youtube/templates
parent19da112a096e612ac9020b6cce9c9c1f9702a325 (diff)
downloadyt-local-05cec148810a18727f345853e8aadcb3648c1965.tar.lz
yt-local-05cec148810a18727f345853e8aadcb3648c1965.tar.xz
yt-local-05cec148810a18727f345853e8aadcb3648c1965.zip
autofocus search input
Diffstat (limited to 'youtube/templates')
-rw-r--r--youtube/templates/base.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube/templates/base.html b/youtube/templates/base.html
index 4ff83c5..44aef20 100644
--- a/youtube/templates/base.html
+++ b/youtube/templates/base.html
@@ -19,7 +19,8 @@
<header>
<a href="/youtube.com" id="home-link">Home</a>
<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>
<div class="dropdown">
<button class="dropdown-label">Options</button>