Skip to content

Commit

Permalink
feat(ui): add footer with links to docs and discussions
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcooke committed Jul 30, 2021
1 parent 9bcb599 commit 1247dae
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ public/assets
vendor/bundle

Procfile.local
VERSION

9 changes: 9 additions & 0 deletions app/assets/images/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions app/assets/stylesheets/application/components/_footer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.footer__links {
display:flex;
margin-left:auto;
align-items: center;
font-size:13px;
color:#999;
li {
height:24px;

}
li + li {
margin-left:18px;
}
a {
text-decoration: underline;
}
}

.footer__name {
height:16px;
background:image-url('icon.svg') no-repeat 0 0;
background-size:16px;
padding-left:22px;
font-weight:bold;
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@
overflow-y:scroll;
overflow-x:hidden;
}

.siteContent__footer {
border-top:1px solid #efefef;
margin-top:20px;
padding:25px;
display:flex;
}
8 changes: 6 additions & 2 deletions app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@

%section.siteContent__main
= yield
%footer.siteContent__footer
%ul.footer__links
%li.footer__name
Powered by #{link_to "Postal", "https://postalserver.io", target: '_blank'} #{Postal.version}.
%li= link_to "Documentation", "https://docs.postalserver.io", target: '_blank'
%li= link_to "Ask for help", "https://discussions.postalserver.io", target: '_blank'

- if logged_in?
<!--- Postal Version #{Postal.version} -->
13 changes: 7 additions & 6 deletions lib/postal/version.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
module Postal

VERSION = '1.0.0'
REVISION = nil
CHANNEL = 'dev'
VERSION_PATH = File.expand_path('../../VERSION', __dir__)
VERSION = if File.file?(VERSION_PATH)
File.read(VERSION_PATH).strip.delete_prefix('v')
else
'0.0.0-dev'
end

def self.version
[VERSION, REVISION, CHANNEL].compact.join('-')
VERSION
end

end

0 comments on commit 1247dae

Please sign in to comment.