mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-23 00:29:53 +05:30
Move navbar search bar render check to templated
This commit is contained in:
parent
65942cd46c
commit
5c0458a887
@ -48,7 +48,8 @@ module JSON::Serializable
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
macro templated(filename, template = "template")
|
macro templated(filename, template = "template", navbar_search = true)
|
||||||
|
navbar_search = {{navbar_search}}
|
||||||
render "src/invidious/views/#{{{filename}}}.ecr", "src/invidious/views/#{{{template}}}.ecr"
|
render "src/invidious/views/#{{{filename}}}.ecr", "src/invidious/views/#{{{template}}}.ecr"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ class Invidious::Routes::Misc < Invidious::Routes::BaseRoute
|
|||||||
env.redirect "/feed/popular"
|
env.redirect "/feed/popular"
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
templated "search_homepage"
|
templated "search_homepage", navbar_search: false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<div class="pure-u-1 pure-u-md-2-24"></div>
|
<div class="pure-u-1 pure-u-md-2-24"></div>
|
||||||
<div class="pure-u-1 pure-u-md-20-24">
|
<div class="pure-u-1 pure-u-md-20-24">
|
||||||
<div class="pure-g navbar h-box">
|
<div class="pure-g navbar h-box">
|
||||||
<% if !env.get("preferences").as(Preferences).default_home.to_s.empty? || env.request.path != "/" %>
|
<% if navbar_search %>
|
||||||
<div class="pure-u-1 pure-u-md-4-24">
|
<div class="pure-u-1 pure-u-md-4-24">
|
||||||
<a href="/" class="index-link pure-menu-heading">Invidious</a>
|
<a href="/" class="index-link pure-menu-heading">Invidious</a>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user