diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-11-26 10:50:34 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-11-26 10:50:34 -0600 |
| commit | 19bf0ccbf0625f0f8ac24fe7c024417c0ed5ae81 (patch) | |
| tree | e06ec063d8f407d1a3c050ca0586d091c4aa7ece /src | |
| parent | 2ea580e18e9b0f69efe4bdb443071fba882a6a5d (diff) | |
| download | invidious-19bf0ccbf0625f0f8ac24fe7c024417c0ed5ae81.tar.gz invidious-19bf0ccbf0625f0f8ac24fe7c024417c0ed5ae81.tar.bz2 invidious-19bf0ccbf0625f0f8ac24fe7c024417c0ed5ae81.zip | |
Add /feed/top and /feed/popular
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious.cr | 8 | ||||
| -rw-r--r-- | src/invidious/views/popular.ecr | 7 | ||||
| -rw-r--r-- | src/invidious/views/top.ecr | 7 |
3 files changed, 22 insertions, 0 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 5fa57ea4..ef4214d0 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -1669,6 +1669,14 @@ end # Feeds +get "/feed/top" do |env| + templated "top" +end + +get "/feed/popular" do |env| + templated "popular" +end + get "/feed/trending" do |env| trending_type = env.params.query["type"]? region = env.params.query["region"]? diff --git a/src/invidious/views/popular.ecr b/src/invidious/views/popular.ecr new file mode 100644 index 00000000..6cd3d8d6 --- /dev/null +++ b/src/invidious/views/popular.ecr @@ -0,0 +1,7 @@ +<div class="pure-g"> +<% popular_videos.each_slice(4) do |slice| %> + <% slice.each do |item| %> + <%= rendered "components/item" %> + <% end %> +<% end %> +</div> diff --git a/src/invidious/views/top.ecr b/src/invidious/views/top.ecr new file mode 100644 index 00000000..4dfc3b64 --- /dev/null +++ b/src/invidious/views/top.ecr @@ -0,0 +1,7 @@ +<div class="pure-g"> +<% top_videos.each_slice(4) do |slice| %> + <% slice.each do |item| %> + <%= rendered "components/item" %> + <% end %> +<% end %> +</div> |
