diff options
author | Robert Kowalski <rok@kowalski.gd> | 2014-05-22 23:01:23 +0200 |
---|---|---|
committer | Robert Kowalski <rok@kowalski.gd> | 2014-06-05 20:59:25 +0200 |
commit | 3e981dc047f65a32e758929ed82077b791d683a9 (patch) | |
tree | 58e61951969e7c5a5d35d12b10bc7ae79d53b0cf | |
parent | e2104faffc9437696f0a2e2cb420ed68508690d8 (diff) | |
download | couchdb-3e981dc047f65a32e758929ed82077b791d683a9.tar.gz |
Fauxton: use local version of font awesome
We are currently referencing to Font-Awesome on a CDN in the
variables.less, which is basically nice, but some users of
CouchDB are firewalled at work and can just use the local
network.
Additionally offline people without internet can't use Fauxton
if the font is loaded via CDN.
This also removes the cache-buster for imgs (GET-Params with
version) in our routing for the local files of the dev-server
to make it work, in the future we might want to use a real
router module for the long if/else block.
Closes: COUCHDB-2238
-rw-r--r-- | src/fauxton/assets/less/bootstrap/font-awesome/variables.less | 4 | ||||
-rw-r--r-- | src/fauxton/tasks/couchserver.js | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/fauxton/assets/less/bootstrap/font-awesome/variables.less b/src/fauxton/assets/less/bootstrap/font-awesome/variables.less index bb2986d68..5d9361423 100644 --- a/src/fauxton/assets/less/bootstrap/font-awesome/variables.less +++ b/src/fauxton/assets/less/bootstrap/font-awesome/variables.less @@ -1,8 +1,8 @@ // Variables // -------------------------- -//@FontAwesomePath: "../../img"; -@FontAwesomePath: "//netdna.bootstrapcdn.com/font-awesome/3.2.1/font"; // for referencing Bootstrap CDN font files directly +@FontAwesomePath: "../../img"; +//@FontAwesomePath: "//netdna.bootstrapcdn.com/font-awesome/3.2.1/font"; // for referencing Bootstrap CDN font files directly @FontAwesomeVersion: "3.2.1"; @borderColor: #eee; @iconMuted: #eee; diff --git a/src/fauxton/tasks/couchserver.js b/src/fauxton/tasks/couchserver.js index e1f18f919..67b0ae092 100644 --- a/src/fauxton/tasks/couchserver.js +++ b/src/fauxton/tasks/couchserver.js @@ -56,6 +56,7 @@ module.exports = function (grunt) { } else if (!!url.match(/mocha|\/test\/core\/|test\.config/)) { filePath = path.join('./test', url.replace('/test/','')); } else if (!!url.match(/\.css|img/)) { + url = url.replace(/\?.*/, ''); filePath = path.join(dist_dir,url); /*} else if (!!url.match(/\/js\//)) { // serve any javascript or files from dist debug dir @@ -87,7 +88,7 @@ module.exports = function (grunt) { res.end(JSON.stringify({error: err.message})); }) .pipe(res); - } + } proxy.proxyRequest(req, res); }).listen(port); |