diff --git a/index.js b/index.js index 1f54147..301eacc 100644 --- a/index.js +++ b/index.js @@ -39,6 +39,13 @@ app.get('/api/feed',function(req,res){ if (req.query.theme){ opts.theme = req.query.theme; } + if (req.query.header){ + if (req.query.header.toLowerCase() == 'no' || req.query.header.toLowerCase() == 'false'){ + opts.header = false; + }else{ + opts.header = true; + } + } var req = request.get(feedUrl); convert(req,opts,function(er,data){ diff --git a/lib/convert.js b/lib/convert.js index 295b9d2..ddeaa24 100644 --- a/lib/convert.js +++ b/lib/convert.js @@ -75,6 +75,7 @@ function buildUp(jsonObj,opts){ // assign opts to the obj jsonObj.opts = opts||{}; + console.log(opts); // iterate through the items jsonObj.items = jsonObj.items.filter(function(item){ diff --git a/lib/template.ejs b/lib/template.ejs index 2fd3553..8c15075 100644 --- a/lib/template.ejs +++ b/lib/template.ejs @@ -18,15 +18,16 @@ <% } %> -
-
- - <%- meta.title %>'s Feed on Mastodon - + <% if (opts.header !== false){ %> +
+ +
<%- meta.description %>
-
<%- meta.description %>
- -
+ <% } %>
<% items.forEach(function(item){ %>
diff --git a/static/index.html b/static/index.html index 0b4218c..394aa45 100644 --- a/static/index.html +++ b/static/index.html @@ -18,6 +18,7 @@
+

@@ -25,7 +26,7 @@

Live Preview:

- +