aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/templates/base.html
diff options
context:
space:
mode:
authorJames Taylor <28744867+user234683@users.noreply.github.com>2020-10-09 13:55:25 -0700
committerGitHub <noreply@github.com>2020-10-09 13:55:25 -0700
commitcdb3440d1d9f8509a190133d9394715746ddb651 (patch)
treef97afa33bd992609ca63763c28f3a745f4ccc0c5 /youtube/templates/base.html
parenta10a97a4593d8d65fae752439c3db44210d752e7 (diff)
parent05cec148810a18727f345853e8aadcb3648c1965 (diff)
downloadyt-local-cdb3440d1d9f8509a190133d9394715746ddb651.tar.lz
yt-local-cdb3440d1d9f8509a190133d9394715746ddb651.tar.xz
yt-local-cdb3440d1d9f8509a190133d9394715746ddb651.zip
Merge pull request #21 from zrose584/search_focus
autofocus search input on homepage
Diffstat (limited to 'youtube/templates/base.html')
-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>