diff --git a/assets/css/default.css b/assets/css/default.css index b9411351..a725b456 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -178,7 +178,7 @@ img.thumbnail { flex: 1; } -.navbar > .searchbar { +.searchbar { flex-grow: 2; /* take double the space of the other items */ } @@ -191,7 +191,7 @@ img.thumbnail { display: inline; } -.navbar > .searchbar .pure-form input[type="search"] { +.searchbar .pure-form input[type="search"] { margin-bottom: 1px; border-top: 0; @@ -216,12 +216,12 @@ input[type="search"]::-webkit-search-cancel-button { background-size: 14px; } -.navbar > .searchbar .pure-form fieldset { +.searchbar .pure-form fieldset { padding: 0; } /* attract focus to the searchbar by adding a subtle transition */ -.navbar > .searchbar .pure-form input[type="search"]:focus { +.searchbar .pure-form input[type="search"]:focus { margin-bottom: 0px; border-bottom: 2px solid #aaa; } @@ -594,7 +594,7 @@ body.dark-theme { color: #f0f0f0; } -.dark-theme .navbar > .searchbar input { +.dark-theme .searchbar input { background-color: inherit; color: inherit; } @@ -633,7 +633,7 @@ body.dark-theme { color: #f0f0f0; } - .no-theme .navbar > .searchbar input { + .no-theme .searchbar input { background-color: inherit; color: inherit; } diff --git a/assets/css/empty.css b/assets/css/empty.css new file mode 100644 index 00000000..6ad1515d --- /dev/null +++ b/assets/css/empty.css @@ -0,0 +1,16 @@ +#search-widget { + text-align: center; + margin: 20vh 0 50px 0; +} + +#logo > h1 { + font-size: 3.5em; + margin: 0; + padding: 0; +} + +@media screen and (max-width: 1500px) and (max-height: 1000px) { + #logo > h1 { + font-size: 10vmin; + } +} diff --git a/locales/ar.json b/locales/ar.json index 12bcc199..d184395e 100644 --- a/locales/ar.json +++ b/locales/ar.json @@ -310,6 +310,7 @@ "`x` seconds": "`x` ثوانى", "Fallback comments: ": "التعليقات البديلة: ", "Popular": "الأكثر شعبية", + "Search": "", "Top": "الأفضل", "About": "حول", "Rating: ": "التقييم: ", diff --git a/locales/bn_BD.json b/locales/bn_BD.json index 0662a87c..1c1cc274 100644 --- a/locales/bn_BD.json +++ b/locales/bn_BD.json @@ -327,6 +327,7 @@ "`x` seconds.": "", "Fallback comments: ": "", "Popular": "", + "Search": "", "Top": "", "About": "", "Rating: ": "", @@ -350,4 +351,4 @@ "Playlists": "", "Community": "", "Current version: ": "" -} +} \ No newline at end of file diff --git a/locales/cs.json b/locales/cs.json index ba62298c..802249ef 100644 --- a/locales/cs.json +++ b/locales/cs.json @@ -361,6 +361,7 @@ }, "Fallback comments: ": "", "Popular": "", + "Search": "", "Top": "", "About": "Informace", "Rating: ": "Hodnocení: ", @@ -411,4 +412,4 @@ "hdr": "HDR", "filter": "filtr", "Current version: ": "" -} +} \ No newline at end of file diff --git a/locales/da.json b/locales/da.json index f3867f6a..b52905c3 100644 --- a/locales/da.json +++ b/locales/da.json @@ -361,6 +361,7 @@ }, "Fallback comments: ": "", "Popular": "", + "Search": "", "Top": "", "About": "", "Rating: ": "", @@ -384,4 +385,4 @@ "Playlists": "", "Community": "", "Current version: ": "" -} +} \ No newline at end of file diff --git a/locales/de.json b/locales/de.json index b995baac..82c99128 100644 --- a/locales/de.json +++ b/locales/de.json @@ -310,6 +310,7 @@ "`x` seconds": "`x` Sekunden", "Fallback comments: ": "Alternative Kommentare: ", "Popular": "Populär", + "Search": "", "Top": "Top", "About": "Über", "Rating: ": "Bewertung: ", @@ -333,4 +334,4 @@ "Playlists": "Wiedergabelisten", "Community": "Gemeinschaft", "Current version: ": "Aktuelle Version: " -} +} \ No newline at end of file diff --git a/locales/el.json b/locales/el.json index f74f2421..a3dbafb4 100644 --- a/locales/el.json +++ b/locales/el.json @@ -325,6 +325,7 @@ "`x` seconds.": "`x` δευτερόλεπτα.", "Fallback comments: ": "Εναλλακτικά σχόλια: ", "Popular": "Δημοφιλή", + "Search": "", "Top": "Κορυφαία", "About": "Σχετικά", "Rating: ": "Aξιολόγηση: ", @@ -348,4 +349,4 @@ "Playlists": "Λίστες Αναπαραγωγής", "Community": "Κοινότητα", "Current version: ": "Τρέχουσα έκδοση: " -} +} \ No newline at end of file diff --git a/locales/en-US.json b/locales/en-US.json index 66e71bb6..a7dc3107 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -361,6 +361,7 @@ }, "Fallback comments: ": "Fallback comments: ", "Popular": "Popular", + "Search": "Search", "Top": "Top", "About": "About", "Rating: ": "Rating: ", @@ -411,4 +412,4 @@ "hdr": "HDR", "filter": "Filter", "Current version: ": "Current version: " -} \ No newline at end of file +} diff --git a/locales/eo.json b/locales/eo.json index 3052ac35..1123b2df 100644 --- a/locales/eo.json +++ b/locales/eo.json @@ -310,6 +310,7 @@ "`x` seconds": "`x` sekundoj", "Fallback comments: ": "Retrodefaŭltaj komentoj: ", "Popular": "Popularaj", + "Search": "", "Top": "Supraj", "About": "Pri", "Rating: ": "Takso: ", @@ -333,4 +334,4 @@ "Playlists": "Ludlistoj", "Community": "Komunumo", "Current version: ": "Nuna versio: " -} +} \ No newline at end of file diff --git a/locales/es.json b/locales/es.json index 91faef1b..5af3f9bd 100644 --- a/locales/es.json +++ b/locales/es.json @@ -310,6 +310,7 @@ "`x` seconds": "`x` segundos", "Fallback comments: ": "Comentarios alternativos: ", "Popular": "Populares", + "Search": "", "Top": "Destacados", "About": "Acerca de", "Rating: ": "Valoración: ", @@ -333,4 +334,4 @@ "Playlists": "Listas de reproducción", "Community": "Comunidad", "Current version: ": "Versión actual: " -} +} \ No newline at end of file diff --git a/locales/eu.json b/locales/eu.json index 61299c72..709d9caf 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -310,6 +310,7 @@ "`x` seconds": "", "Fallback comments: ": "", "Popular": "", + "Search": "", "Top": "", "About": "", "Rating: ": "", diff --git a/locales/fa.json b/locales/fa.json index 0f0900a9..ef77c775 100644 --- a/locales/fa.json +++ b/locales/fa.json @@ -327,6 +327,7 @@ "`x` seconds.": "`x` ثانیه.", "Fallback comments: ": "نظرات عقب گرد: ", "Popular": "محبوب", + "Search": "", "Top": "بالا", "About": "درباره", "Rating: ": "رتبه دهی: ", @@ -350,4 +351,4 @@ "Playlists": "لیست های پخش", "Community": "اجتماع", "Current version: ": "نسخه فعلی: " -} +} \ No newline at end of file diff --git a/locales/fi.json b/locales/fi.json index 5dfd4ea2..6bf785ac 100644 --- a/locales/fi.json +++ b/locales/fi.json @@ -327,6 +327,7 @@ "`x` seconds.": "`x` sekuntia.", "Fallback comments: ": "varakommentit: ", "Popular": "Suosittu", + "Search": "", "Top": "Ylin", "About": "Tietoa", "Rating: ": "Arvosana: ", @@ -350,4 +351,4 @@ "Playlists": "Soittolistat", "Community": "Yhteisö", "Current version: ": "Tämänhetkinen versio: " -} +} \ No newline at end of file diff --git a/locales/fr.json b/locales/fr.json index d6bdc05a..c79d30d7 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -310,6 +310,7 @@ "`x` seconds": "`x` secondes", "Fallback comments: ": "Commentaires alternatifs : ", "Popular": "Populaire", + "Search": "", "Top": "Top", "About": "À propos", "Rating: ": "Évaluation : ", @@ -333,4 +334,4 @@ "Playlists": "Listes de lecture", "Community": "Communauté", "Current version: ": "Version actuelle : " -} +} \ No newline at end of file diff --git a/locales/he.json b/locales/he.json index f5e33877..0d9c4fd3 100644 --- a/locales/he.json +++ b/locales/he.json @@ -361,6 +361,7 @@ }, "Fallback comments: ": "", "Popular": "", + "Search": "", "Top": "Top", "About": "על אודות", "Rating: ": "דירוג: ", @@ -411,4 +412,4 @@ "hdr": "HDR", "filter": "סינון", "Current version: ": "הגרסה הנוכחית: " -} +} \ No newline at end of file diff --git a/locales/hr.json b/locales/hr.json index a9a179f3..ec633795 100644 --- a/locales/hr.json +++ b/locales/hr.json @@ -361,6 +361,7 @@ }, "Fallback comments: ": "Alternativni komentari: ", "Popular": "Popularni", + "Search": "", "Top": "Najbolji", "About": "Informacije", "Rating: ": "Ocjena: ", @@ -384,4 +385,4 @@ "Playlists": "Playliste", "Community": "Zajednica", "Current version: ": "Trenutačna verzija: " -} +} \ No newline at end of file diff --git a/locales/hu-HU.json b/locales/hu-HU.json index f60bb7d2..8b1c2c9d 100644 --- a/locales/hu-HU.json +++ b/locales/hu-HU.json @@ -309,6 +309,7 @@ "`x` seconds": "`x` másodperc", "Fallback comments: ": "Másodlagos kommentek: ", "Popular": "Népszerű", + "Search": "", "Top": "Top", "About": "Leírás", "Rating: ": "Besorolás: ", @@ -332,4 +333,4 @@ "Playlists": "Playlistek", "Community": "Közösség", "Current version: ": "Jelenlegi verzió: " -} +} \ No newline at end of file diff --git a/locales/id.json b/locales/id.json index 66662c69..943a23f4 100644 --- a/locales/id.json +++ b/locales/id.json @@ -361,6 +361,7 @@ }, "Fallback comments: ": "", "Popular": "Populer", + "Search": "", "Top": "", "About": "Ihwal", "Rating: ": "Peringkat: ", @@ -384,4 +385,4 @@ "Playlists": "Daftar putar", "Community": "Komunitas", "Current version: ": "Versi saat ini: " -} +} \ No newline at end of file diff --git a/locales/is.json b/locales/is.json index a2943b88..e4cb21f0 100644 --- a/locales/is.json +++ b/locales/is.json @@ -325,7 +325,7 @@ "`x` seconds.": "`x` sekúndur.", "Fallback comments: ": "Vara ummæli: ", "Popular": "Vinsælt", - "permalink": "Varanlegur tengill", + "Search": "", "Top": "Topp", "About": "Um", "Rating: ": "Einkunn: ", @@ -342,10 +342,11 @@ "%A %B %-d, %Y": "%A %B %-d, %Y", "(edited)": "(breytt)", "YouTube comment permalink": "YouTube ummæli varanlegur tengill", + "permalink": "Varanlegur tengill", "`x` marked it with a ❤": "`x` merkti það með ❤", "Audio mode": "Hljóð ham", "Video mode": "Myndband ham", "Videos": "Myndbönd", "Playlists": "Spilunarlistar", "Current version: ": "Núverandi útgáfa: " -} +} \ No newline at end of file diff --git a/locales/it.json b/locales/it.json index 789bdd1a..b09cf4f0 100644 --- a/locales/it.json +++ b/locales/it.json @@ -325,6 +325,7 @@ "`x` seconds..": "`x` secondi.", "Fallback comments: ": "Commenti alternativi: ", "Popular": "Popolare", + "Search": "", "Top": "Top", "About": "Al riguardo", "Rating: ": "Punteggio: ", @@ -348,4 +349,4 @@ "Playlists": "Playlist", "Community": "Comunità", "Current version: ": "Versione attuale: " -} +} \ No newline at end of file diff --git a/locales/ja.json b/locales/ja.json index 51b1332d..7d8ef74f 100644 --- a/locales/ja.json +++ b/locales/ja.json @@ -361,6 +361,7 @@ }, "Fallback comments: ": "フォールバック時のコメント: ", "Popular": "人気", + "Search": "", "Top": "トップ", "About": "このサービスについて", "Rating: ": "評価: ", @@ -384,4 +385,4 @@ "Playlists": "プレイリスト", "Community": "コミュニティ", "Current version: ": "現在のバージョン: " -} +} \ No newline at end of file diff --git a/locales/nb-NO.json b/locales/nb-NO.json index 355a1c33..06e57284 100644 --- a/locales/nb-NO.json +++ b/locales/nb-NO.json @@ -310,6 +310,7 @@ "`x` seconds": "`x` sekunder", "Fallback comments: ": "Tilbakefallskommentarer: ", "Popular": "Populært", + "Search": "", "Top": "Topp", "About": "Om", "Rating: ": "Vurdering: ", @@ -333,4 +334,4 @@ "Playlists": "Spillelister", "Community": "Gemenskap", "Current version: ": "Gjeldende versjon: " -} +} \ No newline at end of file diff --git a/locales/nl.json b/locales/nl.json index de2a2bb7..c837037f 100644 --- a/locales/nl.json +++ b/locales/nl.json @@ -310,6 +310,7 @@ "`x` seconds": "`x` seconden", "Fallback comments: ": "Terugvallen op ", "Popular": "Populair", + "Search": "", "Top": "Top", "About": "Over", "Rating: ": "Waardering: ", @@ -334,4 +335,4 @@ "Community": "Gemeenschap", "Current version: ": "Huidige versie: ", "Download is disabled.": "Downloaden is uitgeschakeld." -} +} \ No newline at end of file diff --git a/locales/pl.json b/locales/pl.json index 66b8f4b0..eba3cc11 100644 --- a/locales/pl.json +++ b/locales/pl.json @@ -310,6 +310,7 @@ "`x` seconds": "`x` sekund", "Fallback comments: ": "Zastępcze komentarze: ", "Popular": "Popularne", + "Search": "", "Top": "Top", "About": "Informacje", "Rating: ": "Ocena: ", @@ -333,4 +334,4 @@ "Playlists": "Playlisty", "Community": "Społeczność", "Current version: ": "Aktualna wersja: " -} +} \ No newline at end of file diff --git a/locales/pt-BR.json b/locales/pt-BR.json index cf73abd8..d462012c 100644 --- a/locales/pt-BR.json +++ b/locales/pt-BR.json @@ -310,6 +310,7 @@ "`x` seconds": "`x` segundos", "Fallback comments: ": "Comentários alternativos: ", "Popular": "Populares", + "Search": "", "Top": "No topo", "About": "Sobre", "Rating: ": "Avaliação: ", @@ -333,4 +334,4 @@ "Playlists": "Listas de reprodução", "Community": "Comunidade", "Current version: ": "Versão atual: " -} +} \ No newline at end of file diff --git a/locales/pt-PT.json b/locales/pt-PT.json index 1082c023..6d3fb704 100644 --- a/locales/pt-PT.json +++ b/locales/pt-PT.json @@ -327,6 +327,7 @@ "`x` seconds..": "`x` segundos.", "Fallback comments: ": "Comentários alternativos: ", "Popular": "Popular", + "Search": "", "Top": "Top", "About": "Sobre", "Rating: ": "Avaliação: ", @@ -350,4 +351,4 @@ "Playlists": "Listas de reprodução", "Community": "Comunidade", "Current version: ": "Versão atual: " -} +} \ No newline at end of file diff --git a/locales/ro.json b/locales/ro.json index 08d2c386..86ae9330 100644 --- a/locales/ro.json +++ b/locales/ro.json @@ -310,6 +310,7 @@ "`x` seconds": "`x` secunde", "Fallback comments: ": "Comentarii alternative: ", "Popular": "Popular", + "Search": "", "Top": "Top", "About": "Despre", "Rating: ": "Evaluare: ", diff --git a/locales/ru.json b/locales/ru.json index e69b32e5..77da364b 100644 --- a/locales/ru.json +++ b/locales/ru.json @@ -310,6 +310,7 @@ "`x` seconds": "`x` секунд", "Fallback comments: ": "Резервные комментарии: ", "Popular": "Популярное", + "Search": "", "Top": "Топ", "About": "О сайте", "Rating: ": "Рейтинг: ", diff --git a/locales/si.json b/locales/si.json index 0dabe03a..0b3ca597 100644 --- a/locales/si.json +++ b/locales/si.json @@ -361,6 +361,7 @@ }, "Fallback comments: ": "", "Popular": "", + "Search": "", "Top": "", "About": "", "Rating: ": "", @@ -411,4 +412,4 @@ "hdr": "", "filter": "", "Current version: ": "" -} +} \ No newline at end of file diff --git a/locales/sk.json b/locales/sk.json index 0957cb87..43e9bc94 100644 --- a/locales/sk.json +++ b/locales/sk.json @@ -327,6 +327,7 @@ "`x` seconds.": "", "Fallback comments: ": "", "Popular": "", + "Search": "", "Top": "", "About": "", "Rating: ": "", @@ -350,4 +351,4 @@ "Playlists": "", "Community": "", "Current version: ": "" -} +} \ No newline at end of file diff --git a/locales/sr.json b/locales/sr.json index dd8fb2fc..1e718d7a 100644 --- a/locales/sr.json +++ b/locales/sr.json @@ -361,6 +361,7 @@ }, "Fallback comments: ": "", "Popular": "", + "Search": "", "Top": "", "About": "", "Rating: ": "", @@ -411,4 +412,4 @@ "hdr": "", "filter": "", "Current version: ": "" -} +} \ No newline at end of file diff --git a/locales/sr_Cyrl.json b/locales/sr_Cyrl.json index adb25544..bb866522 100644 --- a/locales/sr_Cyrl.json +++ b/locales/sr_Cyrl.json @@ -310,6 +310,7 @@ "`x` seconds.": "", "Fallback comments: ": "", "Popular": "", + "Search": "", "Top": "", "About": "", "Rating: ": "", @@ -333,4 +334,4 @@ "Playlists": "", "Community": "", "Current version: ": "Тренутна верзија: " -} +} \ No newline at end of file diff --git a/locales/sv-SE.json b/locales/sv-SE.json index fef5316f..1f3e5eaf 100644 --- a/locales/sv-SE.json +++ b/locales/sv-SE.json @@ -310,6 +310,7 @@ "`x` seconds": "`x` sekunder", "Fallback comments: ": "Fallback-kommentarer: ", "Popular": "Populärt", + "Search": "", "Top": "Topp", "About": "Om", "Rating: ": "Betyg: ", @@ -333,4 +334,4 @@ "Playlists": "Spellistor", "Community": "Gemenskap", "Current version: ": "Nuvarande version: " -} +} \ No newline at end of file diff --git a/locales/tr.json b/locales/tr.json index 831ecc07..b87f4732 100644 --- a/locales/tr.json +++ b/locales/tr.json @@ -318,6 +318,7 @@ "`x` seconds": "`x` saniye", "Fallback comments: ": "Yedek yorumlar: ", "Popular": "Popüler", + "Search": "", "Top": "Enler", "About": "Hakkında", "Rating: ": "Değerlendirme: ", @@ -341,4 +342,4 @@ "Playlists": "Oynatma listeleri", "Community": "Topluluk", "Current version: ": "Şu anki sürüm: " -} +} \ No newline at end of file diff --git a/locales/uk.json b/locales/uk.json index b04e0b2d..3e5de1e3 100644 --- a/locales/uk.json +++ b/locales/uk.json @@ -310,6 +310,7 @@ "`x` seconds": "`x` секунд", "Fallback comments: ": "Резервні коментарі: ", "Popular": "Популярне", + "Search": "", "Top": "Топ", "About": "Про сайт", "Rating: ": "Рейтинг: ", diff --git a/locales/zh-CN.json b/locales/zh-CN.json index d7f12975..a45b52bd 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -310,6 +310,7 @@ "`x` seconds": "`x` 秒", "Fallback comments: ": "后备评论: ", "Popular": "热门频道", + "Search": "", "Top": "热门视频", "About": "关于", "Rating: ": "评分: ", @@ -333,4 +334,4 @@ "Playlists": "播放列表", "Community": "社区", "Current version: ": "当前版本: " -} +} \ No newline at end of file diff --git a/locales/zh-TW.json b/locales/zh-TW.json index 6b40db55..42218073 100644 --- a/locales/zh-TW.json +++ b/locales/zh-TW.json @@ -325,6 +325,7 @@ "`x` seconds.": "`x` 秒", "Fallback comments: ": "汰退留言: ", "Popular": "熱門頻道", + "Search": "", "Top": "熱門影片", "About": "關於", "Rating: ": "評分: ", @@ -348,4 +349,4 @@ "Playlists": "播放清單", "Community": "社群", "Current version: ": "目前版本: " -} +} \ No newline at end of file diff --git a/src/invidious/helpers/macros.cr b/src/invidious/helpers/macros.cr index 8b74bc86..5d426a8b 100644 --- a/src/invidious/helpers/macros.cr +++ b/src/invidious/helpers/macros.cr @@ -48,7 +48,8 @@ module JSON::Serializable 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" end diff --git a/src/invidious/routes/misc.cr b/src/invidious/routes/misc.cr index bc009633..d32ba892 100644 --- a/src/invidious/routes/misc.cr +++ b/src/invidious/routes/misc.cr @@ -22,7 +22,7 @@ class Invidious::Routes::Misc < Invidious::Routes::BaseRoute env.redirect "/feed/popular" end else - templated "empty" + templated "search_homepage", navbar_search: false end end diff --git a/src/invidious/views/empty.ecr b/src/invidious/views/empty.ecr deleted file mode 100644 index c10c097e..00000000 --- a/src/invidious/views/empty.ecr +++ /dev/null @@ -1,8 +0,0 @@ -<% content_for "header" do %> -"> - - Invidious - -<% end %> - -<%= rendered "components/feed_menu" %> diff --git a/src/invidious/views/preferences.ecr b/src/invidious/views/preferences.ecr index 14d63536..c1f10818 100644 --- a/src/invidious/views/preferences.ecr +++ b/src/invidious/views/preferences.ecr @@ -150,7 +150,7 @@ @@ -160,7 +160,7 @@ <% (feed_options.size - 1).times do |index| %> <% end %> diff --git a/src/invidious/views/search_homepage.ecr b/src/invidious/views/search_homepage.ecr new file mode 100644 index 00000000..b36500e9 --- /dev/null +++ b/src/invidious/views/search_homepage.ecr @@ -0,0 +1,24 @@ +<% content_for "header" do %> +"> + + Invidious + + +<% end %> + +<%= rendered "components/feed_menu" %> + +
+ +
+ +
+
diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr index 68cacc0f..5b63bf1f 100644 --- a/src/invidious/views/template.ecr +++ b/src/invidious/views/template.ecr @@ -28,16 +28,19 @@