couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject [25/50] couchdb commit: updated refs/heads/1.6.x to eeb31cb
Date Wed, 13 Aug 2014 23:26:13 GMT
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


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/3e981dc0
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/3e981dc0
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/3e981dc0

Branch: refs/heads/1.6.x
Commit: 3e981dc047f65a32e758929ed82077b791d683a9
Parents: e2104fa
Author: Robert Kowalski <rok@kowalski.gd>
Authored: Thu May 22 23:01:23 2014 +0200
Committer: Robert Kowalski <rok@kowalski.gd>
Committed: Thu Jun 5 20:59:25 2014 +0200

----------------------------------------------------------------------
 src/fauxton/assets/less/bootstrap/font-awesome/variables.less | 4 ++--
 src/fauxton/tasks/couchserver.js                              | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/3e981dc0/src/fauxton/assets/less/bootstrap/font-awesome/variables.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/bootstrap/font-awesome/variables.less b/src/fauxton/assets/less/bootstrap/font-awesome/variables.less
index bb2986d..5d93614 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;

http://git-wip-us.apache.org/repos/asf/couchdb/blob/3e981dc0/src/fauxton/tasks/couchserver.js
----------------------------------------------------------------------
diff --git a/src/fauxton/tasks/couchserver.js b/src/fauxton/tasks/couchserver.js
index e1f18f9..67b0ae0 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);


Mime
View raw message