From 328dd14b553fd2f8a2a117d057e14dd9e4fcab82 Mon Sep 17 00:00:00 2001 From: Alberto Date: Thu, 14 Mar 2019 17:27:32 +0100 Subject: [PATCH 01/19] Removed unused line in the header and added minification to the html --- Gruntfile.js | 1 + _app/_includes/head.html | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index fc607b5dc..2623755df 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -470,6 +470,7 @@ module.exports = function (grunt) { 'cssmin', 'uglify', 'filerev', + 'htmlmin', 'usemin' ]) diff --git a/_app/_includes/head.html b/_app/_includes/head.html index 9130443ce..e55c914cc 100644 --- a/_app/_includes/head.html +++ b/_app/_includes/head.html @@ -21,7 +21,6 @@ - From 324f2f1aed2ac36869418f755295db1632a8d1e4 Mon Sep 17 00:00:00 2001 From: Alberto Date: Thu, 14 Mar 2019 17:43:42 +0100 Subject: [PATCH 02/19] Added htmlmin as dependency --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 4590ae80a..1b768a992 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "grunt-contrib-connect": "^1.0.2", "grunt-contrib-copy": "^1.0.0", "grunt-contrib-cssmin": "^0.12.2", + "grunt-contrib-htmlmin": "^3.0.0", "grunt-contrib-uglify": "^3.4.0", "grunt-contrib-watch": "^0.6.1", "grunt-exec": "^2.0.0", From b44946dfd7ffa332931c71f112a32736c4baa5df Mon Sep 17 00:00:00 2001 From: Alberto Date: Thu, 14 Mar 2019 18:27:20 +0100 Subject: [PATCH 03/19] Updated cartojs with right commit --- grunt-tasks/config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grunt-tasks/config.js b/grunt-tasks/config.js index baed44d1e..b4bfa0d6b 100644 --- a/grunt-tasks/config.js +++ b/grunt-tasks/config.js @@ -10,8 +10,8 @@ module.exports = { repo: 'git://github.com/CartoDB/carto.js.git', path: '/carto-js', data: '/_data', - branch: '', - tag: 'v4.1.11' + branch: 'fix-doc-html', + // tag: 'v4.1.11' }, /* carto-js v3 config */ 'carto-js-v3': { From 6a483baf557070849b707414a77490347a76327d Mon Sep 17 00:00:00 2001 From: Alberto Date: Thu, 14 Mar 2019 18:53:29 +0100 Subject: [PATCH 04/19] Added escape to the content comming from the json --- _app/_includes/reference/example_tab.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_app/_includes/reference/example_tab.html b/_app/_includes/reference/example_tab.html index 94177390c..adf2c0f7e 100644 --- a/_app/_includes/reference/example_tab.html +++ b/_app/_includes/reference/example_tab.html @@ -9,7 +9,7 @@
{% endif %} Example -{{ caption | remove: '(String)'}} +{{ caption | remove: '(String)' | escape}}
{% highlight javascript linenos %} {{ example.description }} From 6df35280090ed79cbc72a637ec80d8312ba3f4f7 Mon Sep 17 00:00:00 2001 From: Alberto Date: Thu, 14 Mar 2019 19:07:24 +0100 Subject: [PATCH 05/19] Escaped another include --- .../reference/description_detail.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/_app/_includes/reference/description_detail.html b/_app/_includes/reference/description_detail.html index f370f565e..0a26bdbf2 100644 --- a/_app/_includes/reference/description_detail.html +++ b/_app/_includes/reference/description_detail.html @@ -1,37 +1,37 @@ {% assign next_index = forloop.index0 | plus: 1 %} {% assign prev_index = forloop.index0 | minus: 1 %} {% if include.d.type == 'text' %} - {{include.d.value}} + {{include.d.value | escape}} {% elsif include.d.type == 'root' %} {% include reference/description.html desc=include.d.children %} {% elsif include.d.type == 'linkReference' %} {% if include.p[next_index].type == 'link' %} - {% include reference/description.html desc=include.d.children %} + {% include reference/description.html desc=include.d.children %} {% else %} [{% include reference/description.html desc=include.d.children %}] {% endif %} {% elsif include.d.type == 'strong' %} - {{include.d.children[0].value}} + {{include.d.children[0].value | escape}} {% elsif include.d.type == 'link' and include.p[prev_index].type != 'linkReference' %} {% if include.d.url contains 'http' %} - {{ include.d.children[0].value }} + {{ include.d.children[0].value | escape }} {% else %} - {{ include.d.children[0].value }} + {{ include.d.children[0].value | escape }} {% endif %} {% elsif include.d.type == 'inlineCode' %} - {{ include.d.value }} + {{ include.d.value | escape }} {% elsif include.d.type == 'code'%} {% if include.d.lang == 'javascript'%} {% highlight javascript %} - {{ include.d.value }} + {{ include.d.value | escape }} {% endhighlight %} {% else %} {% highlight html %} - {{ include.d.value }} + {{ include.d.value | escape }} {% endhighlight %} {% endif %} {% elsif include.d.type == 'html' %} - {{ include.d.value }} + {{ include.d.value | escape }} {% elsif include.d.type == 'paragraph' %} {% for item in include.d %} {% include reference/description.html desc = item %} From afcea319d901357e5e48238378df89baf96498db Mon Sep 17 00:00:00 2001 From: Alberto Date: Fri, 15 Mar 2019 10:27:09 +0100 Subject: [PATCH 06/19] Updated htmlmin configuration and removed extra space in description --- _config.yml | 3 +-- grunt-tasks/main/htmlmin.js | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/_config.yml b/_config.yml index a550caf52..1300f91d3 100644 --- a/_config.yml +++ b/_config.yml @@ -4,8 +4,7 @@ source: '_app' destination: '_site/developers' title: 'Documentation — CARTO' -description: > - Documentation - CARTO +description: "Documentation - CARTO" baseurl: "/developers" url: "https://carto.com" ghpages: "https://cartodb.github.io/developers" diff --git a/grunt-tasks/main/htmlmin.js b/grunt-tasks/main/htmlmin.js index 6a301499a..4d905dbf3 100644 --- a/grunt-tasks/main/htmlmin.js +++ b/grunt-tasks/main/htmlmin.js @@ -1,17 +1,18 @@ module.exports = { dist: { options: { - collapseBooleanAttributes: true, + removeComments: true, collapseWhitespace: true, - conservativeCollapse: true, - removeAttributeQuotes: true, - removeCommentsFromCDATA: true, - removeEmptyAttributes: true, - removeRedundantAttributes: false, - removeOptionalTags: true, - useShortDoctype: true, - minifyJS: true, - minifyCSS: true + // collapseBooleanAttributes: true, + // conservativeCollapse: true, + // removeAttributeQuotes: true, + // removeCommentsFromCDATA: true, + // removeEmptyAttributes: true, + // removeRedundantAttributes: false, + // removeOptionalTags: false, + // useShortDoctype: false, + // minifyJS: false, + // minifyCSS: false }, files: [{ expand: true, From b91e665725198cf1e0da3fe05a464e8da04183eb Mon Sep 17 00:00:00 2001 From: Alberto Date: Fri, 15 Mar 2019 10:40:16 +0100 Subject: [PATCH 07/19] htmlmin will be executed after usemin --- Gruntfile.js | 4 +- package-lock.json | 127 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 2623755df..5ea9b0e86 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -470,8 +470,8 @@ module.exports = function (grunt) { 'cssmin', 'uglify', 'filerev', - 'htmlmin', - 'usemin' + 'usemin', + 'htmlmin' ]) grunt.registerTask('serve', 'start the server and preview your app', function (target) { diff --git a/package-lock.json b/package-lock.json index 9e035edae..636a80776 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1527,6 +1527,15 @@ "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=" }, + "camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "requires": { + "no-case": "2.3.2", + "upper-case": "1.1.3" + } + }, "camelcase": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", @@ -5117,6 +5126,54 @@ "maxmin": "1.1.0" } }, + "grunt-contrib-htmlmin": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-htmlmin/-/grunt-contrib-htmlmin-3.0.0.tgz", + "integrity": "sha512-nGZaod6iKx+Uqxnt1lBZ7rWaGYaJr7KzALjERW5J/no/V0rASiACE9te25HJPdR2x9+SwxuCGsNEs1oKBnQ/0A==", + "requires": { + "chalk": "2.4.2", + "html-minifier": "3.5.21", + "pretty-bytes": "5.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.5.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "pretty-bytes": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.1.0.tgz", + "integrity": "sha512-wa5+qGVg9Yt7PB6rYm3kXlKzgzgivYTLRandezh43jjRqgyDyP+9YxfJpJiLs9yKD1WeU8/OvtToWpW7255FtA==" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "3.0.0" + } + } + } + }, "grunt-contrib-uglify": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-3.4.0.tgz", @@ -5766,6 +5823,11 @@ "sntp": "1.0.9" } }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" + }, "highlight.js": { "version": "9.12.0", "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.12.0.tgz", @@ -5803,6 +5865,40 @@ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==" }, + "html-minifier": { + "version": "3.5.21", + "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.21.tgz", + "integrity": "sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA==", + "requires": { + "camel-case": "3.0.0", + "clean-css": "4.2.1", + "commander": "2.17.1", + "he": "1.2.0", + "param-case": "2.1.1", + "relateurl": "0.2.7", + "uglify-js": "3.4.7" + }, + "dependencies": { + "clean-css": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", + "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", + "requires": { + "source-map": "0.6.1" + } + }, + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, "html-void-elements": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-1.0.2.tgz", @@ -6870,6 +6966,11 @@ "signal-exit": "3.0.2" } }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=" + }, "lru-cache": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", @@ -7285,6 +7386,14 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" }, + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "requires": { + "lower-case": "1.1.4" + } + }, "node-gyp": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.2.tgz", @@ -7706,6 +7815,14 @@ "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=" }, + "param-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", + "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", + "requires": { + "no-case": "2.3.2" + } + }, "parents": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", @@ -8366,6 +8483,11 @@ } } }, + "relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=" + }, "remark-reference-links": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/remark-reference-links/-/remark-reference-links-4.0.1.tgz", @@ -9822,6 +9944,11 @@ "resolved": "https://registry.npmjs.org/upath/-/upath-1.0.4.tgz", "integrity": "sha512-d4SJySNBXDaQp+DPrziv3xGS6w3d2Xt69FijJr86zMPBy23JEloMCEOUBBzuN7xCtjLCnmB9tI/z7SBCahHBOw==" }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=" + }, "uri-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-1.0.0.tgz", From c1ae41b658ea1fe8111c0c30177d89ae2bc44f0f Mon Sep 17 00:00:00 2001 From: Alberto Date: Fri, 15 Mar 2019 12:06:42 +0100 Subject: [PATCH 08/19] Some svg minified and new changes to the htmlmin --- .../icons/button-icons/airship-logo.svg | 24 ++--- .../icons/button-icons/carto-js-logo.svg | 22 ++--- .../icons/button-icons/sql-api-logo.svg | 19 ++-- .../reference/description_detail.html | 14 +-- _app/_includes/reference/example_tab.html | 4 +- _app/img/icons/cartoframes.svg | 52 ++++------- _app/img/icons/copy-icon.svg | 15 +-- _app/img/icons/data-observatory.svg | 93 ++++++------------- _app/img/icons/jsfiddle-icon.svg | 18 +--- grunt-tasks/main/htmlmin.js | 3 + 10 files changed, 91 insertions(+), 173 deletions(-) diff --git a/_app/_includes/icons/button-icons/airship-logo.svg b/_app/_includes/icons/button-icons/airship-logo.svg index f40e2424a..ed0af7508 100644 --- a/_app/_includes/icons/button-icons/airship-logo.svg +++ b/_app/_includes/icons/button-icons/airship-logo.svg @@ -1,17 +1,11 @@ - - - - airship - Created with Sketch. - - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/_app/_includes/icons/button-icons/carto-js-logo.svg b/_app/_includes/icons/button-icons/carto-js-logo.svg index 46c8d09bb..4a2afef81 100644 --- a/_app/_includes/icons/button-icons/carto-js-logo.svg +++ b/_app/_includes/icons/button-icons/carto-js-logo.svg @@ -1,16 +1,10 @@ - - - - carto-js - Created with Sketch. - - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/_app/_includes/icons/button-icons/sql-api-logo.svg b/_app/_includes/icons/button-icons/sql-api-logo.svg index f8447ff6f..221928e40 100644 --- a/_app/_includes/icons/button-icons/sql-api-logo.svg +++ b/_app/_includes/icons/button-icons/sql-api-logo.svg @@ -1,15 +1,8 @@ - - - - sql-api - Created with Sketch. - - - - - - - - + + + + + + \ No newline at end of file diff --git a/_app/_includes/reference/description_detail.html b/_app/_includes/reference/description_detail.html index 0a26bdbf2..e3044b894 100644 --- a/_app/_includes/reference/description_detail.html +++ b/_app/_includes/reference/description_detail.html @@ -6,7 +6,7 @@ {% include reference/description.html desc=include.d.children %} {% elsif include.d.type == 'linkReference' %} {% if include.p[next_index].type == 'link' %} - {% include reference/description.html desc=include.d.children %} + {% include reference/description.html desc=include.d.children %} {% else %} [{% include reference/description.html desc=include.d.children %}] {% endif %} @@ -14,24 +14,24 @@ {{include.d.children[0].value | escape}} {% elsif include.d.type == 'link' and include.p[prev_index].type != 'linkReference' %} {% if include.d.url contains 'http' %} - {{ include.d.children[0].value | escape }} + {{ include.d.children[0].value | escape }} {% else %} - {{ include.d.children[0].value | escape }} + {{ include.d.children[0].value | escape }} {% endif %} {% elsif include.d.type == 'inlineCode' %} - {{ include.d.value | escape }} + {{ include.d.value }} {% elsif include.d.type == 'code'%} {% if include.d.lang == 'javascript'%} {% highlight javascript %} - {{ include.d.value | escape }} + {{ include.d.value }} {% endhighlight %} {% else %} {% highlight html %} - {{ include.d.value | escape }} + {{ include.d.value }} {% endhighlight %} {% endif %} {% elsif include.d.type == 'html' %} - {{ include.d.value | escape }} + {{ include.d.value }} {% elsif include.d.type == 'paragraph' %} {% for item in include.d %} {% include reference/description.html desc = item %} diff --git a/_app/_includes/reference/example_tab.html b/_app/_includes/reference/example_tab.html index adf2c0f7e..35c0b819d 100644 --- a/_app/_includes/reference/example_tab.html +++ b/_app/_includes/reference/example_tab.html @@ -9,7 +9,9 @@
{% endif %} Example -{{ caption | remove: '(String)' | escape}} + +{{ caption | remove: '(String)'}} +
{% highlight javascript linenos %} {{ example.description }} diff --git a/_app/img/icons/cartoframes.svg b/_app/img/icons/cartoframes.svg index 27d78048a..344c01018 100644 --- a/_app/img/icons/cartoframes.svg +++ b/_app/img/icons/cartoframes.svg @@ -1,34 +1,22 @@ - - - - cartoframes - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/_app/img/icons/copy-icon.svg b/_app/img/icons/copy-icon.svg index 0aecb9a35..af4dbdac4 100644 --- a/_app/img/icons/copy-icon.svg +++ b/_app/img/icons/copy-icon.svg @@ -1,14 +1,3 @@ - - - - Group - Created with Sketch. - - - - - - - - + + \ No newline at end of file diff --git a/_app/img/icons/data-observatory.svg b/_app/img/icons/data-observatory.svg index 9e8b5e9fb..1b6cd1052 100644 --- a/_app/img/icons/data-observatory.svg +++ b/_app/img/icons/data-observatory.svg @@ -1,66 +1,31 @@ - - - - data-obs - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/_app/img/icons/jsfiddle-icon.svg b/_app/img/icons/jsfiddle-icon.svg index f38fae517..ad9cc8cf6 100644 --- a/_app/img/icons/jsfiddle-icon.svg +++ b/_app/img/icons/jsfiddle-icon.svg @@ -1,15 +1,5 @@ - - - - Group - Created with Sketch. - - - - - - - - - + + + + \ No newline at end of file diff --git a/grunt-tasks/main/htmlmin.js b/grunt-tasks/main/htmlmin.js index 4d905dbf3..f37f7ad1e 100644 --- a/grunt-tasks/main/htmlmin.js +++ b/grunt-tasks/main/htmlmin.js @@ -3,6 +3,9 @@ module.exports = { options: { removeComments: true, collapseWhitespace: true, + // ignoreCustomFragments: [ + // /| )?((.|\r|\n)+?)<\/code>/g, + // ] // collapseBooleanAttributes: true, // conservativeCollapse: true, // removeAttributeQuotes: true, From ff130e276c7ec9705d946601fe5a126a0295d986 Mon Sep 17 00:00:00 2001 From: Alberto Date: Fri, 15 Mar 2019 12:27:45 +0100 Subject: [PATCH 09/19] Changed css to try to fix the header error --- _app/_sass/components/_navbar.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/_app/_sass/components/_navbar.scss b/_app/_sass/components/_navbar.scss index 4db0c4145..075459cf1 100644 --- a/_app/_sass/components/_navbar.scss +++ b/_app/_sass/components/_navbar.scss @@ -114,6 +114,10 @@ } } +.Dropdown--new { + transition: opacity 0.2s ease-in-out; +} + /* search */ .search-form { margin-left: 12px; From 08fdb302f5985176330357470d8ee53a2822c466 Mon Sep 17 00:00:00 2001 From: Alberto Date: Fri, 15 Mar 2019 13:05:12 +0100 Subject: [PATCH 10/19] Removed transition for the logo --- _app/_sass/components/_navbar.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_app/_sass/components/_navbar.scss b/_app/_sass/components/_navbar.scss index 075459cf1..26d1a6cc3 100644 --- a/_app/_sass/components/_navbar.scss +++ b/_app/_sass/components/_navbar.scss @@ -2,6 +2,9 @@ .Navbar-header, .Navbar-buttonMenu { z-index: 400; + .Logo { + transition: unset; + } } .NavbarMobile { From 00ddecec649826089ecfdeaefc3618bfee529fbb Mon Sep 17 00:00:00 2001 From: Alberto Date: Fri, 15 Mar 2019 13:21:30 +0100 Subject: [PATCH 11/19] Changed data observatory icon --- _app/img/icons/data-observatory.svg | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/_app/img/icons/data-observatory.svg b/_app/img/icons/data-observatory.svg index 1b6cd1052..c380c118c 100644 --- a/_app/img/icons/data-observatory.svg +++ b/_app/img/icons/data-observatory.svg @@ -1,31 +1,31 @@ - + - - - - + + + + - + - + - - + + - + - + - + \ No newline at end of file From 6b55912de57646ea88a616b6dd09d801102a8b9a Mon Sep 17 00:00:00 2001 From: Alberto Date: Wed, 20 Mar 2019 12:57:13 +0100 Subject: [PATCH 12/19] Now instead of copying hangar scss from dist will copy it from src --- grunt-tasks/main/copy-hangar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grunt-tasks/main/copy-hangar.js b/grunt-tasks/main/copy-hangar.js index 2c54e2ded..a7db12f8b 100644 --- a/grunt-tasks/main/copy-hangar.js +++ b/grunt-tasks/main/copy-hangar.js @@ -11,7 +11,7 @@ module.exports = { dest: '<%= config.app %>/_includes/hangaralpha' }, { expand: true, - cwd: 'node_modules/hangar-alpha/dist/scss', + cwd: 'node_modules/hangar-alpha/src/scss', src: '**/*.scss', dest: '<%= config.tmp %><%= config.baseurl %>/sass/hangaralpha' }, { From 81bfcce40b2017c8863a0d93bfc2227ec62a378e Mon Sep 17 00:00:00 2001 From: Alberto Date: Wed, 20 Mar 2019 13:54:48 +0100 Subject: [PATCH 13/19] Updated cssmin --- package-lock.json | 89 +++++++++++++---------------------------------- package.json | 4 +-- 2 files changed, 27 insertions(+), 66 deletions(-) diff --git a/package-lock.json b/package-lock.json index 636a80776..313062ac4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1452,14 +1452,6 @@ "weinre": "2.0.0-pre-I0Z7U9OV" } }, - "browserify-zlib": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", - "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", - "requires": { - "pako": "0.2.9" - } - }, "browserslist": { "version": "1.7.7", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", @@ -1668,30 +1660,11 @@ } }, "clean-css": { - "version": "3.4.28", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-3.4.28.tgz", - "integrity": "sha1-vxlF6C/ICPVWlebd6uwBQA79A/8=", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz", + "integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=", "requires": { - "commander": "2.8.1", - "source-map": "0.4.4" - }, - "dependencies": { - "commander": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", - "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", - "requires": { - "graceful-readlink": "1.0.1" - } - }, - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "requires": { - "amdefine": "1.0.1" - } - } + "source-map": "0.5.7" } }, "cliui": { @@ -4895,11 +4868,6 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=" }, - "graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=" - }, "grunt": { "version": "0.4.5", "resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.5.tgz", @@ -5117,13 +5085,13 @@ } }, "grunt-contrib-cssmin": { - "version": "0.12.3", - "resolved": "https://registry.npmjs.org/grunt-contrib-cssmin/-/grunt-contrib-cssmin-0.12.3.tgz", - "integrity": "sha1-QVdZYJb7dlb8RktMx7B0beHzkBQ=", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/grunt-contrib-cssmin/-/grunt-contrib-cssmin-2.2.1.tgz", + "integrity": "sha512-IXNomhQ5ekVZbDbj/ik5YccoD9khU6LT2fDXqO1+/Txjq8cp0tQKjVS8i8EAbHOrSDkL7/UD6A7b+xj98gqh9w==", "requires": { "chalk": "1.1.3", - "clean-css": "3.4.28", - "maxmin": "1.1.0" + "clean-css": "4.1.11", + "maxmin": "2.1.0" } }, "grunt-contrib-htmlmin": { @@ -5647,12 +5615,11 @@ } }, "gzip-size": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-1.0.0.tgz", - "integrity": "sha1-Zs+LEBBHInuVus5uodoMF37Vwi8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-3.0.0.tgz", + "integrity": "sha1-VGGI6b3DN/Zzdy+BZgRks4nc5SA=", "requires": { - "browserify-zlib": "0.1.4", - "concat-stream": "1.6.0" + "duplexer": "0.1.1" } }, "handy": { @@ -5661,9 +5628,9 @@ "integrity": "sha1-gls40+0ozJ+rsGlXWItKiUM8hGc=" }, "hangar-alpha": { - "version": "0.1.38-37", - "resolved": "https://registry.npmjs.org/hangar-alpha/-/hangar-alpha-0.1.38-37.tgz", - "integrity": "sha512-CEIdaTcvyH2ixORmwyaRm0aw/fynE4RsBVu4SpARvt5WuMyRF6mZyDv/I2rVgyl8d3av5DnchlQWjpXle9lmfw==" + "version": "0.1.38-38", + "resolved": "https://registry.npmjs.org/hangar-alpha/-/hangar-alpha-0.1.38-38.tgz", + "integrity": "sha512-KByBL/xIHdZCPPe9X7nutv53SEJscpqDdUHDWtMFmTvrXC/06CklotwuCFKBOStR2ijVExjfxOYpxdlEjaoTGA==" }, "har-schema": { "version": "1.0.5", @@ -7020,14 +6987,14 @@ "integrity": "sha1-Sz3ToTPRUYuO8NvHCb8qG0gkvIw=" }, "maxmin": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-1.1.0.tgz", - "integrity": "sha1-cTZehKmd2Piz99X94vANHn9zvmE=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-2.1.0.tgz", + "integrity": "sha1-TTsiCQPZXu5+t6x/qGTnLcCaMWY=", "requires": { "chalk": "1.1.3", "figures": "1.7.0", - "gzip-size": "1.0.0", - "pretty-bytes": "1.0.4" + "gzip-size": "3.0.0", + "pretty-bytes": "3.0.1" } }, "mdast-util-compact": { @@ -7810,11 +7777,6 @@ "through2": "2.0.3" } }, - "pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=" - }, "param-case": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", @@ -8152,12 +8114,11 @@ "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" }, "pretty-bytes": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", - "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-3.0.1.tgz", + "integrity": "sha1-J9AAjXeAY6C0gRuzXHnxvV1fvM8=", "requires": { - "get-stdin": "4.0.1", - "meow": "3.7.0" + "number-is-nan": "1.0.1" } }, "pretty-ms": { diff --git a/package.json b/package.json index 1b768a992..023aed275 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "grunt-contrib-concat": "^1.0.1", "grunt-contrib-connect": "^1.0.2", "grunt-contrib-copy": "^1.0.0", - "grunt-contrib-cssmin": "^0.12.2", + "grunt-contrib-cssmin": "^2.2.1", "grunt-contrib-htmlmin": "^3.0.0", "grunt-contrib-uglify": "^3.4.0", "grunt-contrib-watch": "^0.6.1", @@ -29,7 +29,7 @@ "grunt-shell": "^1.3.0", "grunt-string-replace": "^1.3.1", "grunt-usemin": "^3.1.1", - "hangar-alpha": "0.1.38-37", + "hangar-alpha": "0.1.38-38", "jit-grunt": "^0.9.1", "load-grunt-tasks": "^0.6.0", "time-grunt": "~1.1.0" From bd678e8fb25ddca2e8ec0e6fac5bf524f55307e3 Mon Sep 17 00:00:00 2001 From: Alberto Date: Wed, 20 Mar 2019 15:25:58 +0100 Subject: [PATCH 14/19] Added opacity before the transition --- _app/_sass/components/_navbar.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/_app/_sass/components/_navbar.scss b/_app/_sass/components/_navbar.scss index 26d1a6cc3..e90390be6 100644 --- a/_app/_sass/components/_navbar.scss +++ b/_app/_sass/components/_navbar.scss @@ -118,6 +118,7 @@ } .Dropdown--new { + opacity: 0; transition: opacity 0.2s ease-in-out; } From 974e05e5e9329d20b667ada7fc485b6a46bb15bd Mon Sep 17 00:00:00 2001 From: Alberto Date: Wed, 20 Mar 2019 15:45:23 +0100 Subject: [PATCH 15/19] Changed order for stylesheets --- _app/_includes/head.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/_app/_includes/head.html b/_app/_includes/head.html index e55c914cc..64ffd7a53 100644 --- a/_app/_includes/head.html +++ b/_app/_includes/head.html @@ -16,19 +16,19 @@ {% assign technology = site.data | get_tech: page.path %} {% assign tech_info = site.data._data.technologies | where_exp: "tech", "tech.slug == technology" | first %} - + + + + + - - - - From 79c508029ebee9679253312ad350ddb75638241b Mon Sep 17 00:00:00 2001 From: Alberto Date: Wed, 20 Mar 2019 16:01:59 +0100 Subject: [PATCH 16/19] Small change removing one unused line --- _app/_sass/components/_navbar.scss | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/_app/_sass/components/_navbar.scss b/_app/_sass/components/_navbar.scss index e90390be6..d8ba1e701 100644 --- a/_app/_sass/components/_navbar.scss +++ b/_app/_sass/components/_navbar.scss @@ -96,14 +96,14 @@ } /* to fix in hangar */ - .Navbar-list { - padding-right: 40px; - - &> li:last-child { - position: absolute; - right: 0; - } - } + // .Navbar-list { + // padding-right: 40px; + + // &> li:last-child { + // position: absolute; + // right: 0; + // } + // } } .Dropdown--right { From b8afc9bdd61e845d1015ff61339cc5fa4d71e71c Mon Sep 17 00:00:00 2001 From: Alberto Date: Wed, 20 Mar 2019 16:14:34 +0100 Subject: [PATCH 17/19] Reduced to one the links to google fonts --- _app/_includes/head.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/_app/_includes/head.html b/_app/_includes/head.html index 64ffd7a53..b7372092b 100644 --- a/_app/_includes/head.html +++ b/_app/_includes/head.html @@ -16,9 +16,8 @@ {% assign technology = site.data | get_tech: page.path %} {% assign tech_info = site.data._data.technologies | where_exp: "tech", "tech.slug == technology" | first %} - - - + + From 4357c6ca30589a5f463a757fb1b2617b1b529d89 Mon Sep 17 00:00:00 2001 From: Alberto Date: Wed, 20 Mar 2019 16:24:24 +0100 Subject: [PATCH 18/19] Changed the viewport property --- _app/_includes/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_app/_includes/head.html b/_app/_includes/head.html index b7372092b..21c33f3fb 100644 --- a/_app/_includes/head.html +++ b/_app/_includes/head.html @@ -11,7 +11,7 @@ - + {% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %} {% assign technology = site.data | get_tech: page.path %} {% assign tech_info = site.data._data.technologies | where_exp: "tech", "tech.slug == technology" | first %} From 6b61e12c8a5b5dbc0a8b8fd83583139eda2c3d4d Mon Sep 17 00:00:00 2001 From: Alberto Date: Wed, 20 Mar 2019 16:50:36 +0100 Subject: [PATCH 19/19] Removed transition for the navbar --- _app/_sass/components/_navbar.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_app/_sass/components/_navbar.scss b/_app/_sass/components/_navbar.scss index d8ba1e701..5614f82ec 100644 --- a/_app/_sass/components/_navbar.scss +++ b/_app/_sass/components/_navbar.scss @@ -119,7 +119,7 @@ .Dropdown--new { opacity: 0; - transition: opacity 0.2s ease-in-out; + transition: none; } /* search */