diff --git a/lib/devuan_helpers.rb b/lib/devuan_helpers.rb index 0d430dbd..14a44482 100644 --- a/lib/devuan_helpers.rb +++ b/lib/devuan_helpers.rb @@ -1,5 +1,24 @@ module DevuanHelpers + PROJECT_URL = "https://git.devuan.org/devuan-editors/devuan-www" + GIT_BRANCH = "beta.devuan.org" + EDIT_URL = "#{PROJECT_URL}/edit/#{GIT_BRANCH}/source" + SRC_URL = "#{PROJECT_URL}/tree/#{GIT_BRANCH}/source" + + def relative_source_path + current_page.source_file.split('/source')[1] + end + + def link_to_edit_page + link_to(t(:edit), File.join(EDIT_URL, relative_source_path)) + end + def link_to_source + link_to(t(:view_source), File.join(SRC_URL, relative_source_path)) + end + def link_to_new_issue + link_to(t(:issues), "#{PROJECT_URL}/issues/new?issue[label_ids][]=1291&issue[title]=#{current_page.url}") + end + def bitcoin_address "1QFbx3bKA8LABAGEaSe7EiP9JCxe2j4fN7".freeze end @@ -25,7 +44,7 @@ module DevuanHelpers end def email(email) - `echo #{email} | pandoc -f markdown_github -t html`.gsub(/<[\/]*p>/,'') + `echo #{email} | pandoc -f markdown_github -t html`.gsub(/<[\/]*>/,'') end def favicon_url diff --git a/locales/en.yml b/locales/en.yml index da4fd7a2..605c3c07 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -14,10 +14,12 @@ en: donate_now: "donate now!" download: Download download_more: more download options + edit: edit essential: essential essentials: Essentials featured: Featured free_software: Free Software + issues: report issues licenses: Software Licenses netinst_title: Devuan Network Installer for PC and other platforms operating_system: Operating System @@ -38,6 +40,8 @@ en: os_sources_title: "Devuan is free software: download the source code!" os_support: Meet Devuan supporters os_support_title: "Peruse Devuan documentation and get help!" + os_team: team + os_team_title: Meet Devuan team os_title: Discover Devuan GNU+Linux Operating System release_notes: Release Notes site_title: "Devuan GNU+Linux Free/Libre Operating System" @@ -47,6 +51,7 @@ en: tagline: "software freedom, your way" thank_you_for_supporting_devuan: Thank you for supporting Devuan toc: Table of Contents + view_source: view source copyright: fiscal: title: Learn about our fiscal sponsor diff --git a/source/partials/_footer.erb b/source/partials/_footer.erb index 13ea0d42..fa05258b 100644 --- a/source/partials/_footer.erb +++ b/source/partials/_footer.erb @@ -1,13 +1,9 @@