summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-11-13 12:00:59 -0500
committerJules Laplace <jules@okfoc.us>2014-11-13 12:00:59 -0500
commit28ade7d7f9e1c8e35de713a04303538140e22ea9 (patch)
tree3c4d77b1f42b9e1849e3ac1192caa2151a77064d
parent3ab0c6c24b95552feb111b647205cc92c3ca170c (diff)
use plain html and \n -> <br> formatting on docs
-rwxr-xr-xpublic/assets/stylesheets/app.css8
-rw-r--r--server/lib/util.js4
-rw-r--r--server/lib/views/index.js2
-rw-r--r--views/docs.ejs2
4 files changed, 12 insertions, 4 deletions
diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css
index 7b53cca..48c6e97 100755
--- a/public/assets/stylesheets/app.css
+++ b/public/assets/stylesheets/app.css
@@ -633,7 +633,7 @@ iframe.embed {
border-top:1px solid black;
}
-.footer a, .footer span{
+.footer a, .footer span {
margin: 15px;
font-weight: 300;
font-size: 13px;
@@ -643,6 +643,12 @@ iframe.embed {
text-decoration:underline;
}
+.docs .content.doc-privacy p,
+.docs .content.doc-terms p {
+ font-size: 15px;
+ line-height: 25px;
+ font-weight: 300;
+}
/* PROFILE PAGE */
.profilePic {
diff --git a/server/lib/util.js b/server/lib/util.js
index 791d3e2..0a71cb7 100644
--- a/server/lib/util.js
+++ b/server/lib/util.js
@@ -30,7 +30,9 @@ util.capitalizeWord = function (s) {
util.escapeRegExp = function (s) {
return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
}
-
+util.htmlize = function(s) {
+ return ("<p>" + s.replace(/\n/g,"</p><p>") + "</p>").replace(/<p><\/p>/, "<br>")
+}
util.cleanQuery = function (query) {
var update = _.extend({}, query);
diff --git a/server/lib/views/index.js b/server/lib/views/index.js
index 6e3b449..b3a15c2 100644
--- a/server/lib/views/index.js
+++ b/server/lib/views/index.js
@@ -130,7 +130,7 @@ var views = module.exports = {
}
res.render('docs', {
doc: doc,
- content: marked(doc.body),
+ content: util.htmlize(doc.body),
isNew: false
})
})
diff --git a/views/docs.ejs b/views/docs.ejs
index 741cff7..b3ead82 100644
--- a/views/docs.ejs
+++ b/views/docs.ejs
@@ -11,7 +11,7 @@
[[ if (! isNew) { ]]
<h1>[[- doc.displayName ]]</h1>
- <div class="content">
+ <div class="content doc-[[- doc.name]]">
[[- content ]]
</div>