diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 540fb00..aecd74e 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,7 +3,7 @@ - + @@ -24,14 +24,14 @@ - + - - + + @@ -40,18 +40,8 @@ - - - - - - - - - - - - + + @@ -60,7 +50,7 @@ - + @@ -70,7 +60,7 @@ - + @@ -80,13 +70,25 @@ - - + + + + + + + + + + + + + + @@ -97,23 +99,11 @@ - - - - - - - - - - - - - + @@ -122,17 +112,27 @@ - + + + + + + + + + + + - + @@ -143,31 +143,21 @@ - + - - + + - - - - - - - - - - - + - - + + @@ -175,20 +165,10 @@ - - - - - - - - - - - + @@ -237,22 +217,23 @@ @@ -267,10 +248,9 @@ - @@ -297,7 +277,7 @@ - + @@ -316,6 +296,20 @@ + + + + + + + + - + + @@ -372,26 +370,26 @@ - + - + - + @@ -677,24 +675,54 @@ 1458048832162 - 1458052564781 + 1458079238959 - - + - + + - - + @@ -703,6 +731,7 @@ + @@ -749,7 +778,11 @@ - @@ -758,7 +791,7 @@ - + @@ -766,11 +799,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - @@ -778,7 +843,6 @@ - @@ -786,7 +850,6 @@ - @@ -794,7 +857,6 @@ - @@ -802,7 +864,6 @@ - @@ -810,7 +871,6 @@ - @@ -818,7 +878,6 @@ - @@ -826,7 +885,6 @@ - @@ -834,7 +892,6 @@ - @@ -842,7 +899,6 @@ - @@ -850,7 +906,6 @@ - @@ -858,7 +913,6 @@ - @@ -866,7 +920,6 @@ - @@ -874,7 +927,6 @@ - @@ -882,7 +934,6 @@ - @@ -890,7 +941,6 @@ - @@ -898,7 +948,6 @@ - @@ -911,7 +960,6 @@ - @@ -957,20 +1005,12 @@ - + - - - - - - - - @@ -983,7 +1023,7 @@ - + @@ -997,27 +1037,10 @@ - - - - - - - - - - - - - - - - - @@ -1025,7 +1048,6 @@ - @@ -1037,22 +1059,6 @@ - - - - - - - - - - - - - - - - @@ -1061,10 +1067,38 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1072,44 +1106,52 @@ - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 5f41281..119f64e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -56,6 +56,7 @@ gulp.task('styles', function() { gulp.task('partials', function() { gulp.src(['html/ejs/**/*']).pipe(gulp.dest('dist/ejs')); gulp.src(['html/icons/**/*']).pipe(gulp.dest('dist/icons')); + gulp.src(['html/assets/fm.png']).pipe(gulp.dest('dist/assets')); }); diff --git a/html/css/app.css b/html/css/app.css index df9673d..ab08c7e 100644 --- a/html/css/app.css +++ b/html/css/app.css @@ -178,3 +178,14 @@ float:right; #footer, .mui-appbar { background-color: #775585; } + +.card{ + padding-bottom:5PX; + border-bottom:1px solid silver; + } + +div.content img { + display: block; + float: none !important; + max-width: 1140px !important; +} diff --git a/html/index.html b/html/index.html index 8c1fd55..3aa120c 100644 --- a/html/index.html +++ b/html/index.html @@ -39,6 +39,8 @@ + + diff --git a/html/js/jquery.unveil.js b/html/js/jquery.unveil.js index 38feb61..4d3d138 100644 --- a/html/js/jquery.unveil.js +++ b/html/js/jquery.unveil.js @@ -32,7 +32,14 @@ flag = true; } } + if (source && !flag) { + + if (!S(source).startsWith('http')) { + source = 'http://' + S(source).stripLeft('/').s; + } + source = 'http://image.silvrtree.co.uk/1140,fit,q80/' + source; + this.setAttribute("src", source); if (typeof callback === "function") callback.call(this); } diff --git a/lifestyle.js b/lifestyle.js index cce42b8..c184935 100644 --- a/lifestyle.js +++ b/lifestyle.js @@ -1,225 +1,310 @@ -var outputFile = 'lifestyle', - RssBraider = require('rss-braider'), - fs = require('fs'), - ejs = require('ejs'), - read = require('fs').readFileSync, - join = require('path').join, - str = read(join(__dirname, '/templates/rss.ejs'), 'utf8'), - feeds = {}; +var outputFile = 'lifestyle', RssBraider = require('rss-braider'), fs = require( + 'fs'), ejs = require('ejs'), read = require('fs').readFileSync, join = require( + 'path').join, str = read(join(__dirname, '/templates/rss.ejs'), + 'utf8'), feeds = {}; // Pull feeds from config files: , // feeds.simple_test_feed = require("./config/feed").feed; // Or define in-line feeds.simple_test_feed = { - "feed_name": "feed", - "default_count": 1, - "no_cdata_fields": [], // Don't wrap these fields in CDATA tags - "meta": { - "title": "Lifestyle", - "description": "Combined Lifestyle Feed", - 'site_url': 'http://pipes.silvrtree.co.uk/lifestyle.xml' + "feed_name": "feed", "default_count": 1, "no_cdata_fields": [], // Don't wrap these fields in CDATA tags + "meta": { + "title": "Lifestyle", + "description": "Combined Lifestyle Feed", + 'site_url': 'http://pipes.silvrtree.co.uk/lifestyle.xml' + }, "plugins": ['filter_last_week', 'fix_images', 'fix_scripts'], "sources": [ + { + + "count": 100, + "feed_url": "http://feeds2.feedburner.com/acquire" }, - "plugins": ['filter_last_week', 'fix_images', 'fix_scripts'], - "sources": [{ - "count": 100, - "feed_url": "http://feeds2.feedburner.com/acquire" - }, + { - { + "count": 100, + "feed_url": "http://www.fhm.com/category/style/feed" + }, + { - "count": 100, - "feed_url": "http://www.fhm.com/category/style/feed" - }, { + "count": 100, + "feed_url": "http://www.askmen.com/style.rss" + }, + { - "count": 100, - "feed_url": "http://www.askmen.com/style.rss" - }, { + "count": 100, + "feed_url": "http://www.askmen.com/fine_living.rss" + }, + { - "count": 100, - "feed_url": "http://www.askmen.com/fine_living.rss" - }, { + "count": 100, + "feed_url": "http://www.askmen.com/money.rss" + } + /*, + { - "count": 100, - "feed_url": "http://www.askmen.com/money.rss" - } - /*, - { + "count" : 100, + "feed_url" : "http://abetterguy.com/feed/" + }*/, - "count" : 100, - "feed_url" : "http://abetterguy.com/feed/" - }*/ - , + { - { + "count": 100, + "feed_url": "http://www.dmarge.com/feed" + }, + { - "count": 100, - "feed_url": "http://www.dmarge.com/feed" - }, { + "count": 100, + "feed_url": "http://www.esquire.com/rss/all.xml" + }, + { - "count": 100, - "feed_url": "http://www.esquire.com/rss/all.xml" - }, { + "count": 100, + "feed_url": "http://feeds.feedburner.com/gearpatrol" + }, - "count": 100, - "feed_url": "http://feeds.feedburner.com/gearpatrol" - }, + { - { + "count": 100, + "feed_url": "http://www.getkempt.com/rss.xml" + }, + { - "count": 100, - "feed_url": "http://www.getkempt.com/rss.xml" - }, { + "count": 100, + "feed_url": "http://feeds.feedburner.com/kinowear" + }, + { - "count": 100, - "feed_url": "http://feeds.feedburner.com/kinowear" - }, { + "count": 100, + "feed_url": "http://www.mensfitness.co.uk/feeds/all" + }, + { - "count": 100, - "feed_url": "http://www.mensfitness.co.uk/feeds/all" - }, { + "count": 100, + "feed_url": "http://feeds.feedburner.com/TheArtOfManliness" + }, + { - "count": 100, - "feed_url": "http://feeds.feedburner.com/TheArtOfManliness" - }, { + "count": 100, + "feed_url": "http://www.trunkclub.com/blog/feed" + }, + { - "count": 100, - "feed_url": "http://www.trunkclub.com/blog/feed" - }, { + "count": 100, + "feed_url": "http://feeds.feedburner.com/acontinuouslean/" + }, + { - "count": 100, - "feed_url": "http://feeds.feedburner.com/acontinuouslean/" - }, { + "count": 100, + "feed_url": "http://www.fashionbeans.com/feed/" + }, + { - "count": 100, - "feed_url": "http://www.fashionbeans.com/feed/" - }, { + "count": 100, + "feed_url": "http://feeds.feedburner.com/MensFlair?format=xml" + }, + { - "count": 100, - "feed_url": "http://feeds.feedburner.com/MensFlair?format=xml" - }, { + "count": 100, + "feed_url": "http://feeds.feedburner.com/TheChoosyBeggar" + }, + { - "count": 100, - "feed_url": "http://feeds.feedburner.com/TheChoosyBeggar" - }, { + "count": 100, + "feed_url": "http://www.valetmag.com/distribution/rss_all.xml" + }, + { - "count": 100, - "feed_url": "http://www.valetmag.com/distribution/rss_all.xml" - }, { + "count": 100, + "feed_url": "http://putthison.com/rss" + }, + { - "count": 100, - "feed_url": "http://putthison.com/rss" - }, { + "count": 100, + "feed_url": "http://dieworkwear.com/rss" + }, + { - "count": 100, - "feed_url": "http://dieworkwear.com/rss" - }, { + "count": 100, + "feed_url": "http://menofhabit.tumblr.com/rss" + }, + { - "count": 100, - "feed_url": "http://menofhabit.tumblr.com/rss" - }, { + "count": 100, + "feed_url": "http://www.hodinkee.com/blog/rss.xml" + }, + { - "count": 100, - "feed_url": "http://www.hodinkee.com/blog/rss.xml" - }, { + "count": 100, + "feed_url": "http://feeds.feedburner.com/firstinwatches" + }, + { - "count": 100, - "feed_url": "http://feeds.feedburner.com/firstinwatches" - }, { + "count": 100, + "feed_url": "http://feeds2.feedburner.com/primermagazine/otzU" + }, + { - "count": 100, - "feed_url": "http://feeds2.feedburner.com/primermagazine/otzU" - }, { + "count": 100, + "feed_url": "http://chrisguillebeau.com/3x5/feed/" + }, + { - "count": 100, - "feed_url": "http://chrisguillebeau.com/3x5/feed/" - }, { + "count": 100, + "feed_url": "http://feeds.feedburner.com/TheAwesomer" + }, + { - "count": 100, - "feed_url": "http://feeds.feedburner.com/TheAwesomer" - }, { + "count": 100, + "feed_url": "http://bondclothes.blogspot.com/feeds/posts/default" + }, + { - "count": 100, - "feed_url": "http://bondclothes.blogspot.com/feeds/posts/default" - }, { + "count": 100, + "feed_url": "http://affordablebond007.tumblr.com/rss" + }, + { - "count": 100, - "feed_url": "http://affordablebond007.tumblr.com/rss" - }, { + "count": 100, + "feed_url": "http://thecozyspace.tumblr.com/rss" + }, + { - "count": 100, - "feed_url": "http://thecozyspace.tumblr.com/rss" - }, { + "count": 100, + "feed_url": "http://www.gentlemansgazette.com/feed/" + }, + { - "count": 100, - "feed_url": "http://www.gentlemansgazette.com/feed/" - }, { + "count": 100, + "feed_url": "http://feeds.feedburner.com/wellspent" + }, + { - "count": 100, - "feed_url": "http://feeds.feedburner.com/wellspent" - }, { + "count": 100, + "feed_url": "http://hespokestyle.com/feed/" + }, + { - "count": 100, - "feed_url": "http://hespokestyle.com/feed/" - }, { + "count": 100, + "feed_url": "http://effortlessgent.com/feed/" + }, + { - "count": 100, - "feed_url": "http://effortlessgent.com/feed/" - }, { + "count": 100, + "feed_url": "https://feeds.feedburner.com/thisfits" + }, + { + "count": 100, + "feed_url": "http://www.businessoffashion.com/syndication/feed" + }, + { + "count": 100, + "feed_url": "http://dieworkwear.com/rss" + }, + { + "count": 100, + "feed_url": "http://georgehahn.com/feed/" + }, + { + "count": 100, + "feed_url": "http://www.mensjournal.com/services/rss/gear" + } - "count": 100, - "feed_url": "https://feeds.feedburner.com/thisfits" - } - ] + , + { + "count": 100, + "feed_url": "http://www.mensjournal.com/services/rss/food-drink" + } + + , + { + "count": 100, + "feed_url": "http://www.mensjournal.com/services/rss/travel" + } + + , + { + "count": 100, + "feed_url": "http://www.mensjournal.com/services/rss/adventure" + } + + , + { + "count": 100, + "feed_url": "http://www.mensjournal.com/services/rss/health-fitness" + } + + , + { + "count": 100, + "feed_url": "http://www.mensjournal.com/services/rss/style" + }, + { + "count": 100, + "feed_url": "https://feeds.feedburner.com/uncrate" + }, + { + "count": 100, + "feed_url": "https://feeds.feedburner.com/ManOfMany" + }, + { + "count": 100, + "feed_url": "http://www.mantelligence.com/feed/" + } + + ] }; var braider_options = { - feeds: feeds, - indent: " ", - date_sort_order: "desc", // Newest first - log_level: "warn", - dedupe_fields: ['link', 'guid'], - plugins_directories: [__dirname + "/plugins/"] + feeds: feeds, + indent: " ", + date_sort_order: "desc", // Newest first + log_level: "warn", + dedupe_fields: ['link', 'guid'], + plugins_directories: [__dirname + "/plugins/"] }; var rss_braider = RssBraider.createClient(braider_options); // Override logging level (debug, info, warn, err, off) //rss_braider.logger.level('off'); -rss_braider.processFeed('simple_test_feed', 'json', function (err, data) { - if (err) { +rss_braider.processFeed('simple_test_feed', 'json', function(err, data) { + if (err) { + return console.log(err); + } + + var j = JSON.parse(data); + var ejsOutput = ejs.compile(str)(j); + + fs.writeFile(__dirname + "/dist/" + outputFile + ".json", + data, + function(err) { + if (err) { return console.log(err); - } + } - var j = JSON.parse(data); - var ejsOutput = ejs.compile(str)(j); - - fs.writeFile(__dirname + "/dist/" + outputFile + ".json", data, function (err) { - if (err) { - return console.log(err); - } - - console.log("The file was saved!"); + console.log("The file was saved!"); }); - fs.writeFile(__dirname + "/dist/" + outputFile + ".html", ejsOutput, function (err) { + fs.writeFile(__dirname + "/dist/" + outputFile + ".html", + ejsOutput, + function(err) { - if (err) { - return console.log(err); - } + if (err) { + return console.log(err); + } - console.log("The file was saved!"); + console.log("The file was saved!"); }); }); /* -rss_braider.processFeed('simple_test_feed', 'rss', function (err, data) { + rss_braider.processFeed('simple_test_feed', 'rss', function (err, data) { - fs.writeFile(__dirname + "/html/" + outputFile + ".xml", data, function (err) { - if (err) { - return console.log(err); - } + fs.writeFile(__dirname + "/html/" + outputFile + ".xml", data, function (err) { + if (err) { + return console.log(err); + } - console.log("The file was saved!"); - }); -}); -*/ + console.log("The file was saved!"); + }); + }); + */