summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2019-03-01 16:47:06 -0600
committerOmar Roth <omarroth@hotmail.com>2019-03-01 16:52:37 -0600
commit5859cd290c9e36ee390756848ec8cb2df1d0397c (patch)
tree98590b18c4e8a2a8c16bd163e74268d226ee50b9
parenta39b1583dacff31664830fd4f8966014f8869fa0 (diff)
downloadinvidious-5859cd290c9e36ee390756848ec8cb2df1d0397c.tar.gz
invidious-5859cd290c9e36ee390756848ec8cb2df1d0397c.tar.bz2
invidious-5859cd290c9e36ee390756848ec8cb2df1d0397c.zip
Clean up footer and add version
-rw-r--r--src/invidious.cr8
-rw-r--r--src/invidious/views/subscriptions.ecr2
-rw-r--r--src/invidious/views/template.ecr50
3 files changed, 32 insertions, 28 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index 36450676..b6356a51 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -90,6 +90,8 @@ YT_URL = URI.parse("https://www.youtube.com")
REDDIT_URL = URI.parse("https://www.reddit.com")
LOGIN_URL = URI.parse("https://accounts.google.com")
TEXTCAPTCHA_URL = URI.parse("http://textcaptcha.com/omarroth@hotmail.com.json")
+CURRENT_COMMIT = `git rev-list HEAD --max-count=1 --abbrev-commit`.strip
+CURRENT_VERSION = `git describe --tags $(git rev-list --tags --max-count=1)`.strip
LOCALES = {
"ar" => load_locale("ar"),
@@ -119,6 +121,12 @@ config.video_threads.times do |i|
end
end
+# stats = Statistics.new
+# if config.statistics
+# spawn do
+# end
+# end
+
top_videos = [] of Video
if config.top_enabled
spawn do
diff --git a/src/invidious/views/subscriptions.ecr b/src/invidious/views/subscriptions.ecr
index 109da18f..f1b72aaa 100644
--- a/src/invidious/views/subscriptions.ecr
+++ b/src/invidious/views/subscriptions.ecr
@@ -72,7 +72,7 @@ function mark_watched(target) {
}
</script>
-<div class="pure-g">
+<div class="pure-g h-box">
<div class="pure-u-1 pure-u-md-1-5">
<% if page >= 2 %>
<a href="/feed/subscriptions?max_results=<%= max_results %>&page=<%= page - 1 %>">
diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr
index 0ca794ca..7e5f4809 100644
--- a/src/invidious/views/template.ecr
+++ b/src/invidious/views/template.ecr
@@ -100,34 +100,30 @@
</div>
</div>
<%= content %>
+ <div class="h-box">
+ <hr>
+ </div>
<div class="footer">
- <p>
- <a href="https://github.com/omarroth">
- <%= translate(locale, "Released under the AGPLv3 by Omar Roth.") %>
- </a>
- </p>
- <p>
- <a href="https://github.com/omarroth/invidious">
- <%= translate(locale, "Source available here.") %>
- </a>
- </p>
- <p><%= translate(locale, "Liberapay: ") %>
- <a href="https://liberapay.com/omarroth">
- https://liberapay.com/omarroth
- </a>
- </p>
- <p><%= translate(locale, "Patreon: ") %>
- <a href="https://patreon.com/omarroth">
- https://patreon.com/omarroth
- </a>
- </p>
- <p><%= translate(locale, "BTC: ") %>356DpZyMXu6rYd55Yqzjs29n79kGKWcYrY</p>
- <p><%= translate(locale, "BCH: ") %>qq4ptclkzej5eza6a50et5ggc58hxsq5aylqut2npk</p>
- <p>
- <a rel="jslicense" href="/licenses">
- <%= translate(locale, "View JavaScript license information.") %>
- </a>
- </p>
+ <div class="pure-g">
+ <div class="pure-u-1 pure-u-md-1-3">
+ <a href="https://github.com/omarroth/invidious">
+ <%= translate(locale, "Released under the AGPLv3 by Omar Roth.") %>
+ </a>
+ </div>
+ <div class="pure-u-1 pure-u-md-1-3"><%= translate(locale, "BTC: ") %>356DpZyMXu6rYd55Yqzjs29n79kGKWcYrY</div>
+ <div class="pure-u-1 pure-u-md-1-3"><%= translate(locale, "BCH: ") %>qq4ptclkzej5eza6a50et5ggc58hxsq5aylqut2npk</div>
+ <div class="pure-u-1 pure-u-md-1-3">
+ <a href="https://liberapay.com/omarroth"><%= translate(locale, "Liberapay") %></a>
+ /
+ <a href="https://patreon.com/omarroth"><%= translate(locale, "Patreon") %></a>
+ </div>
+ <div class="pure-u-1 pure-u-md-1-3">
+ <a rel="jslicense" href="/licenses">
+ <%= translate(locale, "View JavaScript license information.") %>
+ </a>
+ </div>
+ <div class="pure-u-1 pure-u-md-1-3"><%= translate(locale, "Current version: ") %> <%= CURRENT_VERSION %>-<%= CURRENT_COMMIT %></div>
+ </div>
</div>
</div>
<div class="pure-u-1 pure-u-md-2-24"></div>