From 2762238c8d3852c7bb86908b35806f7161c318db Mon Sep 17 00:00:00 2001 From: Logan Tegman Date: Thu, 6 Oct 2016 21:54:54 -0700 Subject: [PATCH] Fix sitemap, remove jobs remnants --- client/less/jobs.less | 16 --------- client/less/main.less | 1 - common/app/redux/actions.js | 1 - common/app/redux/types.js | 1 - server/boot/a-services.js | 3 -- server/boot/sitemap.js | 10 ++---- server/views/resources/sitemap.jade | 51 ++++++++++++++++++++++------- 7 files changed, 43 insertions(+), 40 deletions(-) delete mode 100644 client/less/jobs.less diff --git a/client/less/jobs.less b/client/less/jobs.less deleted file mode 100644 index e1d20aa500..0000000000 --- a/client/less/jobs.less +++ /dev/null @@ -1,16 +0,0 @@ -.jobs-list-highlight { - background-color: #ffc -} - -a.jobs-list-highlight:hover { - background-color: #ffc -} - -.jobs-list { - cursor: pointer; - cursor: hand; -} - -.jobs-checkbox-spacer input[type="checkbox"] { - margin-left: -23px -} diff --git a/client/less/main.less b/client/less/main.less index 72f237355f..0c12b2a69a 100644 --- a/client/less/main.less +++ b/client/less/main.less @@ -1141,7 +1141,6 @@ and (max-width : 400px) { } @import "chat.less"; -@import "jobs.less"; @import 'code-mirror.less'; @import "challenge.less"; @import "toastr.less"; diff --git a/common/app/redux/actions.js b/common/app/redux/actions.js index cc6e6867e7..03738bec72 100644 --- a/common/app/redux/actions.js +++ b/common/app/redux/actions.js @@ -119,7 +119,6 @@ export const updateNavHeight = createAction(types.updateNavHeight); // data export const updateChallengesData = createAction(types.updateChallengesData); -export const updateJobsData = createAction(types.updateJobsData); export const updateHikesData = createAction(types.updateHikesData); export const createErrorObservable = error => Observable.just({ diff --git a/common/app/redux/types.js b/common/app/redux/types.js index c01ef12618..dd75d7405a 100644 --- a/common/app/redux/types.js +++ b/common/app/redux/types.js @@ -28,7 +28,6 @@ export default createTypes([ // data handling 'updateChallengesData', - 'updateJobsData', 'updateHikesData', // drawers diff --git a/server/boot/a-services.js b/server/boot/a-services.js index 8c318d8543..6aeb0440fc 100644 --- a/server/boot/a-services.js +++ b/server/boot/a-services.js @@ -1,17 +1,14 @@ import Fetchr from 'fetchr'; import getHikesService from '../services/hikes'; -import getJobServices from '../services/job'; import getUserServices from '../services/user'; import getMapServices from '../services/map'; export default function bootServices(app) { const hikesService = getHikesService(app); - const jobServices = getJobServices(app); const userServices = getUserServices(app); const mapServices = getMapServices(app); Fetchr.registerFetcher(hikesService); - Fetchr.registerFetcher(jobServices); Fetchr.registerFetcher(userServices); Fetchr.registerFetcher(mapServices); app.use('/services', Fetchr.middleware()); diff --git a/server/boot/sitemap.js b/server/boot/sitemap.js index fc001a8b2d..54f672bcdc 100644 --- a/server/boot/sitemap.js +++ b/server/boot/sitemap.js @@ -32,28 +32,24 @@ export default function sitemapRouter(app) { const router = app.loopback.Router(); const challenges$ = getCachedObservable(app, 'Challenge', 'dashedName'); const stories$ = getCachedObservable(app, 'Story', 'storyLink', dasherize); - const jobs$ = getCachedObservable(app, 'Job', 'id'); function sitemap(req, res, next) { const now = moment(new Date()).format('YYYY-MM-DD'); return Observable.combineLatest( challenges$, stories$, - jobs$, ( challenges, stories, - jobs - ) => ({ challenges, stories, jobs }) + ) => ({ challenges, stories }) ) .subscribe( - ({ challenges, stories, jobs }) => { + ({ challenges, stories }) => { res.header('Content-Type', 'application/xml'); res.render('resources/sitemap', { appUrl, now, challenges, - stories, - jobs + stories }); }, next diff --git a/server/views/resources/sitemap.jade b/server/views/resources/sitemap.jade index 908b61f1e9..74a24fd2ae 100644 --- a/server/views/resources/sitemap.jade +++ b/server/views/resources/sitemap.jade @@ -26,7 +26,13 @@ urlset(xmlns="http://www.sitemaps.org/schemas/sitemap/0.9") priority= 0.9 url - loc http://www.freecodecamp.com/labs + loc http://www.freecodecamp.com/about + changefreq weekly + lastmod= now + priority= 0.9 + + url + loc http://www.freecodecamp.com/shop changefreq weekly lastmod= now priority= 0.9 @@ -38,14 +44,44 @@ urlset(xmlns="http://www.sitemaps.org/schemas/sitemap/0.9") priority= 0.9 url - loc http://www.freecodecamp.com/jobs + loc http://www.freecodecamp.com/coding-bootcamp-cost-calculator + changefreq monthly + lastmod= now + priority= 0.9 + + url + loc http://www.freecodecamp.com/privacy changefreq weekly lastmod= now priority= 0.9 url - loc http://www.freecodecamp.com/coding-bootcamp-cost-calculator - changefreq monthly + loc http://www.freecodecamp.com/software-resources-for-nonprofits + changefreq weekly + lastmod= now + priority= 0.9 + + url + loc http://www.freecodecamp.com/the-fastest-web-page-on-the-internet + changefreq weekly + lastmod= now + priority= 0.9 + + url + loc http://www.freecodecamp.com/academic-honesty + changefreq weekly + lastmod= now + priority= 0.9 + + url + loc http://www.freecodecamp.com/code-of-conduct + changefreq weekly + lastmod= now + priority= 0.9 + + url + loc http://www.freecodecamp.com/how-nonprofit-projects-work + changefreq weekly lastmod= now priority= 0.9 @@ -55,10 +91,3 @@ urlset(xmlns="http://www.sitemaps.org/schemas/sitemap/0.9") lastmod= now changefreq weekly priority= 0.9 - - each job in jobs - url - loc #{appUrl}/jobs/#{job} - lastmod= now - changefreq monthly - priority= 0.5