Skip to content
This repository has been archived by the owner on Jul 16, 2018. It is now read-only.

Commit

Permalink
remove all local goggle content and redirect to goggles.mozilla.org i…
Browse files Browse the repository at this point in the history
…nstead
  • Loading branch information
Pomax committed Feb 23, 2016
1 parent c2c1e90 commit c62f038
Show file tree
Hide file tree
Showing 112 changed files with 134 additions and 443 deletions.
38 changes: 25 additions & 13 deletions app.js
Expand Up @@ -22,7 +22,6 @@ var express = require('express'),
i18n = require('webmaker-i18n'),
WebmakerAuth = require('webmaker-auth'),
navigation = require('./navigation'),
rtltrForLess = require('rtltr-for-less'),
markdown = require('markdown').markdown,
proxy = require('proxy-middleware'),
url = require('url');
Expand Down Expand Up @@ -207,7 +206,29 @@ app.use(function (req, res, next) {

var optimize = NODE_ENV !== 'development';

app.use(lessMiddleWare(rtltrForLess({
// goggles pages are straight up redirect to goggles.mozilla.org now
app.use(function gogglesRedirect(req, res, next) {
var path = req.path;
if (path.match(/\/goggles(\/.*)*$/)) {
res.redirect('https://goggles.mozilla.org');
} else {
next();
}
});

// convert requests for ltr- or rtl-specific CSS back to the real filename,
// as the rtltr-for-less package was a hack that was never meant to hit production.
app.use(function rtltrRedirect(req, res, next) {
var path = req.path;
if (path.match(/\w+\.(ltr|rtl)\.css/)) {
console.log("stripping ltr/rtl from css");
res.redirect(path.replace(/\.(ltr|rtl)/, ""));
} else {
next();
}
});

app.use(lessMiddleWare({
once: optimize,
debug: !optimize,
dest: '/css',
Expand All @@ -217,7 +238,8 @@ app.use(lessMiddleWare(rtltrForLess({
yuicompress: optimize,
optimization: optimize ? 0 : 2,
sourceMap: !optimize
})));
}));


app.use(express.compress());
app.use(express.static(WWW_ROOT));
Expand Down Expand Up @@ -459,16 +481,6 @@ app.get('/languages', routes.page('languages'));
app.get('/app', routes.app);
app.post('/app/send-download-link', routes.api.sendSMS);

// goggles onboard, with special image routing for lowest-threshold onboarding
app.get('/goggles', routes.angular);
app.get('/goggles/install', routes.angular);
['Shapes', 'Shapes2', 'Blur', 'Blur2'].forEach(function (img) {
img = img + '.jpg';
app.get('/' + img, function (req, res) {
res.redirect('/img/goggles/' + img);
});
});

app.get('/sitemap.xml', function (req, res) {
res.type('xml');
res.render('sitemap.xml');
Expand Down
2 changes: 1 addition & 1 deletion env.dist
Expand Up @@ -86,4 +86,4 @@ export PRERENDER_SERVICE_URL=http://localhost:3001


# Point to the domain that houses the xray goggles library
export XRAY_GOGGLES_URL=http://goggles.webmaker.org
export XRAY_GOGGLES_URL=http://goggles.mozilla.org
1 change: 0 additions & 1 deletion less/angular/pages/all.less
Expand Up @@ -6,7 +6,6 @@
@import 'badges';
@import 'signup';
@import 'appmaker';
@import 'goggles';
@import "madewithcode";
@import "make-your-own";
@import "feedback";
Expand Down
228 changes: 0 additions & 228 deletions less/angular/pages/goggles.less

This file was deleted.

2 changes: 1 addition & 1 deletion lib/makeapi.js
@@ -1,7 +1,7 @@
var toolURL = {
'application/x-popcorn': 'https://popcorn.webmaker.org',
'application/x-thimble': 'https://thimble.webmaker.org',
'application/x-x-ray-goggles': 'https://goggles.webmaker.org'
'application/x-x-ray-goggles': 'https://goggles.mozilla.org'
};

module.exports = function (options) {
Expand Down
2 changes: 1 addition & 1 deletion locale/af/explore.json
Expand Up @@ -100,7 +100,7 @@
"description": "copy for third topic of 'jump right in' on home page"
},
"Making is the basis of everything we do.": {
"message": "Making is the basis of everything we do. Try remixing one of our <a href=\"/{{ lang }}/resources\">starter resources</a>, or make something from scratch using <a href=\"https://goggles.webmaker.org/{{ lang }}\">X-Ray Goggles</a>, <a href=\"https://thimble.webmaker.org/{{ lang }}\">Thimble</a>, or <a href=\"https://popcorn.webmaker.org/{{ lang }}\">Popcorn Maker</a>. Then share it with the world using hashtag <a href=\"/{{ lang }}/search?type=tags&q=webmaker\">#webmaker</a>.",
"message": "Making is the basis of everything we do. Try remixing one of our <a href=\"/{{ lang }}/resources\">starter resources</a>, or make something from scratch using <a href=\"https://goggles.mozilla.org/{{ lang }}\">X-Ray Goggles</a>, <a href=\"https://thimble.webmaker.org/{{ lang }}\">Thimble</a>, or <a href=\"https://popcorn.webmaker.org/{{ lang }}\">Popcorn Maker</a>. Then share it with the world using hashtag <a href=\"/{{ lang }}/search?type=tags&q=webmaker\">#webmaker</a>.",
"description": "Make something copy"
},
"Email address": {
Expand Down
2 changes: 1 addition & 1 deletion locale/ar/explore.json
Expand Up @@ -100,7 +100,7 @@
"description": "copy for third topic of 'jump right in' on home page"
},
"Making is the basis of everything we do.": {
"message": "Making is the basis of everything we do. Try remixing one of our <a href=\"/{{ lang }}/resources\">starter resources</a>, or make something from scratch using <a href=\"https://goggles.webmaker.org/{{ lang }}\">X-Ray Goggles</a>, <a href=\"https://thimble.webmaker.org/{{ lang }}\">Thimble</a>, or <a href=\"https://popcorn.webmaker.org/{{ lang }}\">Popcorn Maker</a>. Then share it with the world using hashtag <a href=\"/{{ lang }}/search?type=tags&q=webmaker\">#webmaker</a>.",
"message": "Making is the basis of everything we do. Try remixing one of our <a href=\"/{{ lang }}/resources\">starter resources</a>, or make something from scratch using <a href=\"https://goggles.mozilla.org/{{ lang }}\">X-Ray Goggles</a>, <a href=\"https://thimble.webmaker.org/{{ lang }}\">Thimble</a>, or <a href=\"https://popcorn.webmaker.org/{{ lang }}\">Popcorn Maker</a>. Then share it with the world using hashtag <a href=\"/{{ lang }}/search?type=tags&q=webmaker\">#webmaker</a>.",
"description": "Make something copy"
},
"Email address": {
Expand Down
2 changes: 1 addition & 1 deletion locale/ar_SA/explore.json
Expand Up @@ -100,7 +100,7 @@
"description": "copy for third topic of 'jump right in' on home page"
},
"Making is the basis of everything we do.": {
"message": "Making is the basis of everything we do. Try remixing one of our <a href=\"/{{ lang }}/resources\">starter resources</a>, or make something from scratch using <a href=\"https://goggles.webmaker.org/{{ lang }}\">X-Ray Goggles</a>, <a href=\"https://thimble.webmaker.org/{{ lang }}\">Thimble</a>, or <a href=\"https://popcorn.webmaker.org/{{ lang }}\">Popcorn Maker</a>. Then share it with the world using hashtag <a href=\"/{{ lang }}/search?type=tags&q=webmaker\">#webmaker</a>.",
"message": "Making is the basis of everything we do. Try remixing one of our <a href=\"/{{ lang }}/resources\">starter resources</a>, or make something from scratch using <a href=\"https://goggles.mozilla.org/{{ lang }}\">X-Ray Goggles</a>, <a href=\"https://thimble.webmaker.org/{{ lang }}\">Thimble</a>, or <a href=\"https://popcorn.webmaker.org/{{ lang }}\">Popcorn Maker</a>. Then share it with the world using hashtag <a href=\"/{{ lang }}/search?type=tags&q=webmaker\">#webmaker</a>.",
"description": "Make something copy"
},
"Email address": {
Expand Down
2 changes: 1 addition & 1 deletion locale/bg_BG/explore.json
Expand Up @@ -100,7 +100,7 @@
"description": "copy for third topic of 'jump right in' on home page"
},
"Making is the basis of everything we do.": {
"message": "Making is the basis of everything we do. Try remixing one of our <a href=\"/{{ lang }}/resources\">starter resources</a>, or make something from scratch using <a href=\"https://goggles.webmaker.org/{{ lang }}\">X-Ray Goggles</a>, <a href=\"https://thimble.webmaker.org/{{ lang }}\">Thimble</a>, or <a href=\"https://popcorn.webmaker.org/{{ lang }}\">Popcorn Maker</a>. Then share it with the world using hashtag <a href=\"/{{ lang }}/search?type=tags&q=webmaker\">#webmaker</a>.",
"message": "Making is the basis of everything we do. Try remixing one of our <a href=\"/{{ lang }}/resources\">starter resources</a>, or make something from scratch using <a href=\"https://goggles.mozilla.org/{{ lang }}\">X-Ray Goggles</a>, <a href=\"https://thimble.webmaker.org/{{ lang }}\">Thimble</a>, or <a href=\"https://popcorn.webmaker.org/{{ lang }}\">Popcorn Maker</a>. Then share it with the world using hashtag <a href=\"/{{ lang }}/search?type=tags&q=webmaker\">#webmaker</a>.",
"description": "Make something copy"
},
"Email address": {
Expand Down
2 changes: 1 addition & 1 deletion locale/bn/explore.json
Expand Up @@ -100,7 +100,7 @@
"description": "copy for third topic of 'jump right in' on home page"
},
"Making is the basis of everything we do.": {
"message": "Making is the basis of everything we do. Try remixing one of our <a href=\"/{{ lang }}/resources\">starter resources</a>, or make something from scratch using <a href=\"https://goggles.webmaker.org/{{ lang }}\">X-Ray Goggles</a>, <a href=\"https://thimble.webmaker.org/{{ lang }}\">Thimble</a>, or <a href=\"https://popcorn.webmaker.org/{{ lang }}\">Popcorn Maker</a>. Then share it with the world using hashtag <a href=\"/{{ lang }}/search?type=tags&q=webmaker\">#webmaker</a>.",
"message": "Making is the basis of everything we do. Try remixing one of our <a href=\"/{{ lang }}/resources\">starter resources</a>, or make something from scratch using <a href=\"https://goggles.mozilla.org/{{ lang }}\">X-Ray Goggles</a>, <a href=\"https://thimble.webmaker.org/{{ lang }}\">Thimble</a>, or <a href=\"https://popcorn.webmaker.org/{{ lang }}\">Popcorn Maker</a>. Then share it with the world using hashtag <a href=\"/{{ lang }}/search?type=tags&q=webmaker\">#webmaker</a>.",
"description": "Make something copy"
},
"Email address": {
Expand Down
2 changes: 1 addition & 1 deletion locale/bn_BD/explore.json
Expand Up @@ -100,7 +100,7 @@
"description": "copy for third topic of 'jump right in' on home page"
},
"Making is the basis of everything we do.": {
"message": "Making is the basis of everything we do. Try remixing one of our <a href=\"/{{ lang }}/resources\">starter resources</a>, or make something from scratch using <a href=\"https://goggles.webmaker.org/{{ lang }}\">X-Ray Goggles</a>, <a href=\"https://thimble.webmaker.org/{{ lang }}\">Thimble</a>, or <a href=\"https://popcorn.webmaker.org/{{ lang }}\">Popcorn Maker</a>. Then share it with the world using hashtag <a href=\"/{{ lang }}/search?type=tags&q=webmaker\">#webmaker</a>.",
"message": "Making is the basis of everything we do. Try remixing one of our <a href=\"/{{ lang }}/resources\">starter resources</a>, or make something from scratch using <a href=\"https://goggles.mozilla.org/{{ lang }}\">X-Ray Goggles</a>, <a href=\"https://thimble.webmaker.org/{{ lang }}\">Thimble</a>, or <a href=\"https://popcorn.webmaker.org/{{ lang }}\">Popcorn Maker</a>. Then share it with the world using hashtag <a href=\"/{{ lang }}/search?type=tags&q=webmaker\">#webmaker</a>.",
"description": "Make something copy"
},
"Email address": {
Expand Down
2 changes: 1 addition & 1 deletion locale/bn_IN/explore.json
Expand Up @@ -100,7 +100,7 @@
"description": "copy for third topic of 'jump right in' on home page"
},
"Making is the basis of everything we do.": {
"message": "Making is the basis of everything we do. Try remixing one of our <a href=\"/{{ lang }}/resources\">starter resources</a>, or make something from scratch using <a href=\"https://goggles.webmaker.org/{{ lang }}\">X-Ray Goggles</a>, <a href=\"https://thimble.webmaker.org/{{ lang }}\">Thimble</a>, or <a href=\"https://popcorn.webmaker.org/{{ lang }}\">Popcorn Maker</a>. Then share it with the world using hashtag <a href=\"/{{ lang }}/search?type=tags&q=webmaker\">#webmaker</a>.",
"message": "Making is the basis of everything we do. Try remixing one of our <a href=\"/{{ lang }}/resources\">starter resources</a>, or make something from scratch using <a href=\"https://goggles.mozilla.org/{{ lang }}\">X-Ray Goggles</a>, <a href=\"https://thimble.webmaker.org/{{ lang }}\">Thimble</a>, or <a href=\"https://popcorn.webmaker.org/{{ lang }}\">Popcorn Maker</a>. Then share it with the world using hashtag <a href=\"/{{ lang }}/search?type=tags&q=webmaker\">#webmaker</a>.",
"description": "Make something copy"
},
"Email address": {
Expand Down
2 changes: 1 addition & 1 deletion locale/ca/explore.json
Expand Up @@ -100,7 +100,7 @@
"description": "copy for third topic of 'jump right in' on home page"
},
"Making is the basis of everything we do.": {
"message": "Making is the basis of everything we do. Try remixing one of our <a href=\"/{{ lang }}/resources\">starter resources</a>, or make something from scratch using <a href=\"https://goggles.webmaker.org/{{ lang }}\">X-Ray Goggles</a>, <a href=\"https://thimble.webmaker.org/{{ lang }}\">Thimble</a>, or <a href=\"https://popcorn.webmaker.org/{{ lang }}\">Popcorn Maker</a>. Then share it with the world using hashtag <a href=\"/{{ lang }}/search?type=tags&q=webmaker\">#webmaker</a>.",
"message": "Making is the basis of everything we do. Try remixing one of our <a href=\"/{{ lang }}/resources\">starter resources</a>, or make something from scratch using <a href=\"https://goggles.mozilla.org/{{ lang }}\">X-Ray Goggles</a>, <a href=\"https://thimble.webmaker.org/{{ lang }}\">Thimble</a>, or <a href=\"https://popcorn.webmaker.org/{{ lang }}\">Popcorn Maker</a>. Then share it with the world using hashtag <a href=\"/{{ lang }}/search?type=tags&q=webmaker\">#webmaker</a>.",
"description": "Make something copy"
},
"Email address": {
Expand Down
2 changes: 1 addition & 1 deletion locale/cs/explore.json
Expand Up @@ -100,7 +100,7 @@
"description": "copy for third topic of 'jump right in' on home page"
},
"Making is the basis of everything we do.": {
"message": "Making is the basis of everything we do. Try remixing one of our <a href=\"/{{ lang }}/resources\">starter resources</a>, or make something from scratch using <a href=\"https://goggles.webmaker.org/{{ lang }}\">X-Ray Goggles</a>, <a href=\"https://thimble.webmaker.org/{{ lang }}\">Thimble</a>, or <a href=\"https://popcorn.webmaker.org/{{ lang }}\">Popcorn Maker</a>. Then share it with the world using hashtag <a href=\"/{{ lang }}/search?type=tags&q=webmaker\">#webmaker</a>.",
"message": "Making is the basis of everything we do. Try remixing one of our <a href=\"/{{ lang }}/resources\">starter resources</a>, or make something from scratch using <a href=\"https://goggles.mozilla.org/{{ lang }}\">X-Ray Goggles</a>, <a href=\"https://thimble.webmaker.org/{{ lang }}\">Thimble</a>, or <a href=\"https://popcorn.webmaker.org/{{ lang }}\">Popcorn Maker</a>. Then share it with the world using hashtag <a href=\"/{{ lang }}/search?type=tags&q=webmaker\">#webmaker</a>.",
"description": "Make something copy"
},
"Email address": {
Expand Down

0 comments on commit c62f038

Please sign in to comment.