Skip to content

Commit

Permalink
fix download button when direct. fix js when no baseurl
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico Prananta committed Jan 21, 2016
1 parent 459eee8 commit 747650b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _plugins/download.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def initialize(tag_name, text, tokens)

def render(context)
site = context.registers[:site]
@img = site.baseurl + @img
@img = site.baseurl + (@img ? @img : "")
if @url.length > 0
if @text
rendered = "<p style=\"text-align: center\"><a href=\""+@url+"\" class=\"centerbutton\">"+@text+"</a></p>"
Expand Down
6 changes: 5 additions & 1 deletion js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,11 @@
if (qs["fr"] > 0) {
window.history.back();
} else {
window.location = {{ site.baseurl }};
{% if site.baseurl == '' %}
window.location = '/';
{% else %}
window.location = {{ site. baseurl }};
{% endif %}
}
});
}
Expand Down

0 comments on commit 747650b

Please sign in to comment.