mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-12 09:54:22 +01:00
Add buffer btwn content and footer on some pages
This commit is contained in:
parent
268b8efbac
commit
8a9b3a19a2
@ -590,3 +590,13 @@ hr {
|
|||||||
#content-navigation {
|
#content-navigation {
|
||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#footer_buffer {
|
||||||
|
margin-top: 50vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 450px) {
|
||||||
|
#footer_buffer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -48,8 +48,10 @@ module JSON::Serializable
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
macro templated(filename, template = "template", navbar_search = true)
|
macro templated(filename, template = "template", navbar_search = true, buffer_footer=false)
|
||||||
navbar_search = {{navbar_search}}
|
navbar_search = {{navbar_search}}
|
||||||
|
buffer_footer = {{buffer_footer}}
|
||||||
|
|
||||||
render "src/invidious/views/#{{{filename}}}.ecr", "src/invidious/views/#{{{template}}}.ecr"
|
render "src/invidious/views/#{{{filename}}}.ecr", "src/invidious/views/#{{{template}}}.ecr"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ class Invidious::Routes::Channels < Invidious::Routes::BaseRoute
|
|||||||
items = items.select { |item| item.is_a?(SearchPlaylist) }.map { |item| item.as(SearchPlaylist) }
|
items = items.select { |item| item.is_a?(SearchPlaylist) }.map { |item| item.as(SearchPlaylist) }
|
||||||
items.each { |item| item.author = "" }
|
items.each { |item| item.author = "" }
|
||||||
|
|
||||||
templated "channel/playlists"
|
templated "channel/playlists", buffer_footer: true
|
||||||
end
|
end
|
||||||
|
|
||||||
def community(env)
|
def community(env)
|
||||||
@ -126,7 +126,7 @@ class Invidious::Routes::Channels < Invidious::Routes::BaseRoute
|
|||||||
featured_channel_categories = fetch_channel_featured_channels(ucid, channel.tabs["channels"], nil, nil).not_nil!
|
featured_channel_categories = fetch_channel_featured_channels(ucid, channel.tabs["channels"], nil, nil).not_nil!
|
||||||
end
|
end
|
||||||
|
|
||||||
templated "channel/featured_channels"
|
templated "channel/featured_channels", buffer_footer: true
|
||||||
end
|
end
|
||||||
|
|
||||||
def featured_channel_category(env)
|
def featured_channel_category(env)
|
||||||
@ -161,7 +161,7 @@ class Invidious::Routes::Channels < Invidious::Routes::BaseRoute
|
|||||||
end
|
end
|
||||||
locale, user, subscriptions, continuation, ucid, channel = data
|
locale, user, subscriptions, continuation, ucid, channel = data
|
||||||
|
|
||||||
templated "channel/about"
|
templated "channel/about", buffer_footer: true
|
||||||
end
|
end
|
||||||
|
|
||||||
private def fetch_basic_information(env)
|
private def fetch_basic_information(env)
|
||||||
|
@ -6,7 +6,7 @@ class Invidious::Routes::PreferencesRoute < Invidious::Routes::BaseRoute
|
|||||||
|
|
||||||
preferences = env.get("preferences").as(Preferences)
|
preferences = env.get("preferences").as(Preferences)
|
||||||
|
|
||||||
templated "preferences"
|
templated "preferences", buffer_footer: true
|
||||||
end
|
end
|
||||||
|
|
||||||
def update(env)
|
def update(env)
|
||||||
|
@ -132,6 +132,10 @@
|
|||||||
<script src="/js/notifications.js?v=<%= ASSET_COMMIT %>"></script>
|
<script src="/js/notifications.js?v=<%= ASSET_COMMIT %>"></script>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<% if buffer_footer %>
|
||||||
|
<div id="footer_buffer"></div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<footer class="pure-g">
|
<footer class="pure-g">
|
||||||
<div class="pure-u-1 pure-u-md-2-24"></div>
|
<div class="pure-u-1 pure-u-md-2-24"></div>
|
||||||
<div class="h-box pure-u-1 pure-u-md-20-24">
|
<div class="h-box pure-u-1 pure-u-md-20-24">
|
||||||
|
Loading…
Reference in New Issue
Block a user