diff --git a/assets/css/default.css b/assets/css/default.css index a47762ec1..602ea8978 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -442,32 +442,44 @@ p.video-data { margin: 0; font-weight: bold; font-size: 80%; } * Footer */ -footer { - margin-top: auto; + footer { + color: #919191; + margin-top: 2.5em; padding: 1.5em 0; - text-align: center; - max-height: 30vh; } -.light-theme footer { - color: #7c7c7c; +.footer-content { + display: flex; + justify-content: space-between; + flex-wrap: wrap; + margin-top: -10px; } -.dark-theme footer { - color: #adadad; +footer .footer-content a { + color: #919191; } -.light-theme footer a { - color: #7c7c7c !important; +.footer-content #about-invidious-description > b { + font-size: 30px; } -.dark-theme footer a { - color: #adadad !important; +.footer-section { + margin-right: 20px; + margin-top: 20px; } -footer span { - margin: 4px 0; - display: block; +.footer-section-list { + margin-top: 8px; +} + +.footer-section-item { + margin-bottom: 4px; +} + +@media screen and (max-width: 929px) { + #about-invidious-description { + display: none; + } } /* keyframes */ @@ -533,6 +545,14 @@ span > select { color: #565d64; } +.light-theme footer { + background: #f2f2f2; +} + +.light-theme footer #about-invidious-description > b { + color: #7a7a7a; +} + @media (prefers-color-scheme: light) { .no-theme a:hover, .no-theme a:active, @@ -579,6 +599,14 @@ span > select { .light-theme .pure-menu-heading { color: #565d64; } + + .no-theme footer { + background: #f2f2f2; + } + + .no-theme footer #about-invidious-description > b { + color: #7a7a7a; + } } @@ -641,6 +669,16 @@ body.dark-theme { color: inherit; } + +.dark-theme footer { + background: #16191a; +} + +.dark-theme .footer-content #about-invidious-description > b { + color: #e5e5e5; +} + + @media (prefers-color-scheme: dark) { .no-theme a:hover, .no-theme a:active, @@ -696,11 +734,11 @@ body.dark-theme { } .no-theme footer { - color: #adadad; + background: #16191a; } - .no-theme footer a { - color: #adadad !important; + .no-theme footer #about-invidious-description > b { + color: #e5e5e5; } } @@ -786,6 +824,17 @@ h1, h2, h3, h4, h5, p, /* Center the "invidious" logo on the search page */ #logo > h1 { text-align: center; } +#footer_buffer { + margin-top: 50vh; +} + +@media screen and (max-width: 450px) { + #footer_buffer { + display: none; + } +} + + /* IE11 fixes */ :-ms-input-placeholder { color: #888; } diff --git a/config/config.example.yml b/config/config.example.yml index 38085a20b..a626e8729 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -475,6 +475,15 @@ hmac_key: "CHANGE_ME!!" ## #playlist_length_limit: 500 + +## +## Email to contact the instance maintainer; used in a mailto: link within the footer. +## +## Accepted values: Email +## Default: +## +# instance_maintainer_email: + ######################################### # # Default user preferences diff --git a/locales/en-US.json b/locales/en-US.json index 108876124..f2594c8cb 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -461,11 +461,25 @@ "next_steps_error_message": "After which you should try to: ", "next_steps_error_message_refresh": "Refresh", "next_steps_error_message_go_to_youtube": "Go to YouTube", - "footer_donate_page": "Donate", - "footer_documentation": "Documentation", - "footer_source_code": "Source code", - "footer_original_source_code": "Original source code", - "footer_modfied_source_code": "Modified source code", + + "footer_invidious_project_description": "A free and open source frontend for Youtube that that respects your privacy! Now you can watch videos (ad-free), subscribe to channels, create playlist and much more all without the prying eyes of Google!", + "footer_navigation_section_header": "Navigation", + "footer_home_link": "Home", + "footer_project_information_section_header": "Invidious", + "footer_project_homepage_link": "Project Homepage", + "footer_source_code_link": "Source Code", + "footer_issue_tracker_link": "Issue tracker", + "footer_public_instances_link": "Public instances", + "footer_donate_link": "Donate", + "footer_matrix_link": "Matrix", + "footer_support_section_header": "Support", + "footer_contact_link": "Contact instance maintainer", + "footer_report_bug_link": "Report a bug", + "footer_faq_link": "FAQs", + "footer_legal_section_header": "Legal", + "footer_licences_link": "Licences", + "footer_privacy_policy_link": "Privacy", + "adminprefs_modified_source_code_url_label": "URL to modified source code repository", "none": "none", "videoinfo_started_streaming_x_ago": "Started streaming `x` ago", diff --git a/src/invidious/config.cr b/src/invidious/config.cr index 09c2168b8..ba4036475 100644 --- a/src/invidious/config.cr +++ b/src/invidious/config.cr @@ -137,6 +137,9 @@ class Config # Playlist length limit property playlist_length_limit : Int32 = 500 + # Email to contact the instance maintainer. This is used within the footer as an mailto link. + property instance_maintainer_email : String? = nil + def disabled?(option) case disabled = CONFIG.disable_proxy when Bool diff --git a/src/invidious/helpers/macros.cr b/src/invidious/helpers/macros.cr index 43e7171ba..d55fa6fc9 100644 --- a/src/invidious/helpers/macros.cr +++ b/src/invidious/helpers/macros.cr @@ -48,8 +48,9 @@ module JSON::Serializable 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}} + buffer_footer = {{buffer_footer}} {{ filename = "src/invidious/views/" + _filename + ".ecr" }} {{ layout = "src/invidious/views/" + template + ".ecr" }} diff --git a/src/invidious/routes/channels.cr b/src/invidious/routes/channels.cr index d4d8b1c12..29af1dabf 100644 --- a/src/invidious/routes/channels.cr +++ b/src/invidious/routes/channels.cr @@ -115,7 +115,7 @@ module Invidious::Routes::Channels items.each(&.author = "") selected_tab = Frontend::ChannelPage::TabsAvailable::Playlists - templated "channel" + templated "channel", buffer_footer: true end def self.podcasts(env) diff --git a/src/invidious/routes/preferences.cr b/src/invidious/routes/preferences.cr index 112535bd4..9f00f1b20 100644 --- a/src/invidious/routes/preferences.cr +++ b/src/invidious/routes/preferences.cr @@ -8,7 +8,7 @@ module Invidious::Routes::PreferencesRoute preferences = env.get("preferences").as(Preferences) - templated "user/preferences" + templated "user/preferences", buffer_footer: true end def self.update(env) diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr index 9904b4fca..5d105d6c9 100644 --- a/src/invidious/views/template.ecr +++ b/src/invidious/views/template.ecr @@ -112,47 +112,9 @@ <%= content %> - + <% if buffer_footer %> + + <% end %> @@ -172,6 +134,143 @@ <% end %> <% end %> + +