summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/response.js5
-rw-r--r--locales/en.json6
-rw-r--r--public/views/index/body.ejs2
3 files changed, 9 insertions, 4 deletions
diff --git a/lib/response.js b/lib/response.js
index ae3e45fa..2ea2f1c6 100644
--- a/lib/response.js
+++ b/lib/response.js
@@ -2,6 +2,7 @@
// response
// external modules
var fs = require('fs')
+var path = require('path')
var markdownpdf = require('markdown-pdf')
var shortId = require('shortid')
var querystring = require('querystring')
@@ -75,7 +76,9 @@ function showIndex (req, res, next) {
allowPDFExport: config.allowPDFExport,
signin: req.isAuthenticated(),
infoMessage: req.flash('info'),
- errorMessage: req.flash('error')
+ errorMessage: req.flash('error'),
+ privacyStatement: fs.existsSync(path.join(config.docsPath, 'privacy.md')),
+ termsOfUse: fs.existsSync(path.join(config.docsPath, 'terms-of-use.md'))
})
}
diff --git a/locales/en.json b/locales/en.json
index 1aef3f6d..b19089e4 100644
--- a/locales/en.json
+++ b/locales/en.json
@@ -105,5 +105,7 @@
"Export to Snippet": "Export to Snippet",
"Select Visibility Level": "Select Visibility Level",
"Night Theme": "Night Theme",
- "Follow us on %s and %s.": "Follow us on %s, and %s."
-}
+ "Follow us on %s and %s.": "Follow us on %s, and %s.",
+ "Privacy": "Privacy",
+ "Terms of Use": "Terms of Use"
+} \ No newline at end of file
diff --git a/public/views/index/body.ejs b/public/views/index/body.ejs
index d8766fec..e3a3a85c 100644
--- a/public/views/index/body.ejs
+++ b/public/views/index/body.ejs
@@ -147,7 +147,7 @@
<option value="da">dansk</option>
</select>
<p>
- &copy; 2018 <a href="https://hackmd.io">HackMD</a> | <a href="<%- url %>/s/release-notes" target="_blank"><%= __('Releases') %></a>
+ &copy; 2018 <a href="https://hackmd.io">HackMD</a> | <a href="<%- url %>/s/release-notes" target="_blank"><%= __('Releases') %></a><% if(privacyStatement) { %> | <a href="<%- url %>/s/privacy" target="_blank"><%= __('Privacy') %></a><% } %><% if(termsOfUse) { %> | <a href="<%- url %>/s/terms-of-use" target="_blank"><%= __('Terms of Use') %></a><% } %>
</p>
<h6 class="social-foot">
<%- __('Follow us on %s and %s.', '<a href="https://github.com/hackmdio/HackMD" target="_blank"><i class="fa fa-github"></i> GitHub</a>, <a href="https://twitter.com/hackmdio" target="_blank"><i class="fa fa-twitter"></i> Twitter</a>', '<a href="https://www.facebook.com/hackmdio" target="_blank"><i class="fa fa-facebook-square"></i> Facebook</a>') %>