diff options
| author | Omar Roth <omarroth@protonmail.com> | 2019-04-30 21:17:34 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@protonmail.com> | 2019-04-30 21:17:34 -0500 |
| commit | 21190a240fcd3b280e0d5be70bbd85fafbc60800 (patch) | |
| tree | 7d9956759596ee8f7a06686944139251acbb6226 /src | |
| parent | 8a525bc13109e9bee3a59d3082d763f91b1dc7f6 (diff) | |
| download | invidious-21190a240fcd3b280e0d5be70bbd85fafbc60800.tar.gz invidious-21190a240fcd3b280e0d5be70bbd85fafbc60800.tar.bz2 invidious-21190a240fcd3b280e0d5be70bbd85fafbc60800.zip | |
Add support for adding banner to site header
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/helpers/helpers.cr | 1 | ||||
| -rw-r--r-- | src/invidious/views/template.ecr | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.cr index 14b7719b..d1bda9f0 100644 --- a/src/invidious/helpers/helpers.cr +++ b/src/invidious/helpers/helpers.cr @@ -125,6 +125,7 @@ user: String, dmca_content: {type: Array(String), default: [] of String}, # For compliance with DMCA, disables download widget using list of video IDs check_tables: {type: Bool, default: false}, # Check table integrity, automatically try to add any missing columns, create tables, etc. cache_annotations: {type: Bool, default: false}, # Cache annotations requested from IA, will not cache empty annotations or annotations that only contain cards + banner: {type: String?, default: nil}, # Optional banner to be displayed along top of page for announcements, etc. }) end diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr index 87a8b950..e10ee5c6 100644 --- a/src/invidious/views/template.ecr +++ b/src/invidious/views/template.ecr @@ -94,13 +94,18 @@ <% if config.login_enabled %> <div class="pure-u-1-3"> <a href="/login?referer=<%= env.get?("current_page") %>" class="pure-menu-heading"> - <%= translate(locale, "Log in") %> + <%= translate(locale, "Log in") %> </a> </div> <% end %> <% end %> </div> </div> + <% if CONFIG.banner %> + <div class="h-box"> + <h3><%= CONFIG.banner %></h3> + <% end %> + </div> <%= content %> <div class="footer"> <div class="pure-g"> |
