From 49d29bc9370e5bed336e296376d7a60067b0868a Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Tue, 30 Dec 2014 13:18:25 -0500 Subject: [PATCH 1/4] Update titles to be consistent with other sites --- ui/index.html | 2 +- website/config.rb | 13 +++++++++++++ website/source/layouts/_header.erb | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ui/index.html b/ui/index.html index 2200e992dd..ba9e9e02ea 100644 --- a/ui/index.html +++ b/ui/index.html @@ -4,7 +4,7 @@ - Consul + Consul by HashiCorp diff --git a/website/config.rb b/website/config.rb index 5bb6a8574e..a12948017c 100644 --- a/website/config.rb +++ b/website/config.rb @@ -31,4 +31,17 @@ helpers do return "" end end + + # Get the title for the page. + # + # @param [Middleman::Page] page + # + # @return [String] + def title_for(page) + if page && page.data.page_title + return "#{page.data.page_title} - Consul by HashiCorp" + end + + "Consul by HashiCorp" + end end diff --git a/website/source/layouts/_header.erb b/website/source/layouts/_header.erb index c364b42555..1f480dd019 100644 --- a/website/source/layouts/_header.erb +++ b/website/source/layouts/_header.erb @@ -4,7 +4,7 @@ - <%= current_page.data.page_title ? "#{current_page.data.page_title} - " : "" %>Consul + <%= title_for(current_page) %> <%= stylesheet_link_tag "application" %> From 6b9e1a818af7121544f47cf225abf5c633989b1b Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Tue, 30 Dec 2014 13:18:33 -0500 Subject: [PATCH 2/4] Update gems to latest versions --- website/Gemfile.lock | 46 ++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/website/Gemfile.lock b/website/Gemfile.lock index 170034efcb..04a3e674d0 100644 --- a/website/Gemfile.lock +++ b/website/Gemfile.lock @@ -20,13 +20,13 @@ GIT GEM remote: https://rubygems.org/ specs: - activesupport (4.1.6) + activesupport (4.1.8) i18n (~> 0.6, >= 0.6.9) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.1) tzinfo (~> 1.1) - bootstrap-sass (3.2.0.2) + bootstrap-sass (3.3.1.0) sass (~> 3.2) builder (3.2.2) celluloid (0.16.0) @@ -54,10 +54,10 @@ GEM eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) erubis (2.7.0) - eventmachine (1.0.3) + eventmachine (1.0.4) execjs (2.2.2) ffi (1.9.6) - haml (4.0.5) + haml (4.0.6) tilt hike (1.2.3) hitimes (1.2.2) @@ -71,22 +71,22 @@ GEM less (2.6.0) commonjs (~> 0.2.7) libv8 (3.16.14.7) - listen (2.7.11) + listen (2.8.4) celluloid (>= 0.15.2) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9) - middleman (3.3.6) + middleman (3.3.7) coffee-script (~> 2.2) compass (>= 1.0.0, < 2.0.0) compass-import-once (= 1.0.5) execjs (~> 2.0) haml (>= 4.0.5) kramdown (~> 1.2) - middleman-core (= 3.3.6) + middleman-core (= 3.3.7) middleman-sprockets (>= 3.1.2) sass (>= 3.4.0, < 4.0) uglifier (~> 2.5) - middleman-core (3.3.6) + middleman-core (3.3.7) activesupport (~> 4.1.0) bundler (~> 1.1) erubis @@ -98,22 +98,22 @@ GEM rack-test (~> 0.6.2) thor (>= 0.15.2, < 2.0) tilt (~> 1.4.1, < 2.0) - middleman-livereload (3.3.4) + middleman-livereload (3.4.2) em-websocket (~> 0.5.1) - middleman-core (~> 3.2) + middleman-core (>= 3.3) rack-livereload (~> 0.3.15) middleman-minify-html (3.4.0) htmlcompressor (~> 0.1.0) middleman-core (>= 3.2) - middleman-sprockets (3.3.10) - middleman-core (~> 3.3) + middleman-sprockets (3.4.1) + middleman-core (>= 3.3) sprockets (~> 2.12.1) sprockets-helpers (~> 1.1.0) - sprockets-sass (~> 1.2.0) + sprockets-sass (~> 1.3.0) middleman-syntax (2.0.0) middleman-core (~> 3.2) rouge (~> 1.0) - minitest (5.4.2) + minitest (5.5.0) multi_json (1.10.1) padrino-helpers (0.12.4) i18n (~> 0.6, >= 0.6.7) @@ -121,8 +121,8 @@ GEM tilt (~> 1.4.1) padrino-support (0.12.4) activesupport (>= 3.1) - rack (1.5.2) - rack-contrib (1.1.0) + rack (1.6.0) + rack-contrib (1.2.0) rack (>= 0.9.1) rack-livereload (0.3.15) rack @@ -133,18 +133,18 @@ GEM rb-fsevent (0.9.4) rb-inotify (0.9.5) ffi (>= 0.5.0) - redcarpet (3.2.0) + redcarpet (3.2.2) ref (1.0.5) - rouge (1.7.2) - sass (3.4.6) - sprockets (2.12.2) + rouge (1.7.7) + sass (3.4.9) + sprockets (2.12.3) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) sprockets-helpers (1.1.0) sprockets (~> 2.0) - sprockets-sass (1.2.0) + sprockets-sass (1.3.0) sprockets (~> 2.0) tilt (~> 1.1) therubyracer (0.12.1) @@ -161,8 +161,8 @@ GEM hitimes tzinfo (1.2.2) thread_safe (~> 0.1) - uber (0.0.10) - uglifier (2.5.3) + uber (0.0.12) + uglifier (2.6.0) execjs (>= 0.3.0) json (>= 1.8.0) From 9f8b46b82886603bf80f0ab9cc5073415e03e503 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Tue, 30 Dec 2014 13:45:15 -0500 Subject: [PATCH 3/4] Move IE compat into middleman-hashicorp --- website/Gemfile.lock | 2 +- website/source/assets/javascripts/html5shiv.js | 8 -------- website/source/assets/javascripts/respond.min.js | 6 ------ website/source/layouts/_footer.erb | 2 +- 4 files changed, 2 insertions(+), 16 deletions(-) delete mode 100755 website/source/assets/javascripts/html5shiv.js delete mode 100755 website/source/assets/javascripts/respond.min.js diff --git a/website/Gemfile.lock b/website/Gemfile.lock index 04a3e674d0..dcb527717f 100644 --- a/website/Gemfile.lock +++ b/website/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: git://github.com/hashicorp/middleman-hashicorp.git - revision: b82c2c2fdc244cd0bd529ff27cfab24e43f07708 + revision: 30c15f93fb501041cff97c490b60ddc96c8314c9 specs: middleman-hashicorp (0.1.0) bootstrap-sass (~> 3.2) diff --git a/website/source/assets/javascripts/html5shiv.js b/website/source/assets/javascripts/html5shiv.js deleted file mode 100755 index 784f221caf..0000000000 --- a/website/source/assets/javascripts/html5shiv.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - HTML5 Shiv v3.6.2pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed -*/ -(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); -a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; -c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| -"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",version:"3.6.2pre",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment(); -for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d #mq-test-1 { width: 42px; }',d.insertBefore(f,e),c=42===g.offsetWidth,d.removeChild(f),{matches:c,media:a}}}(document); - -/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ -(function(a){"use strict";function x(){u(!0)}var b={};a.respond=b,b.update=function(){},b.mediaQueriesSupported=a.matchMedia&&a.matchMedia("only all").matches,b.mediaQueriesSupported;var q,r,t,c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=c.getElementsByTagName("base")[0],l=j.getElementsByTagName("link"),m=[],n=function(){for(var b=0;l.length>b;b++){var c=l[b],d=c.href,e=c.media,f=c.rel&&"stylesheet"===c.rel.toLowerCase();d&&f&&!h[d]&&(c.styleSheet&&c.styleSheet.rawCssText?(p(c.styleSheet.rawCssText,d,e),h[d]=!0):(!/^([a-zA-Z:]*\/\/)/.test(d)&&!k||d.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&m.push({href:d,media:e}))}o()},o=function(){if(m.length){var a=m.shift();v(a.href,function(b){p(b,a.href,a.media),h[a.href]=!0,setTimeout(function(){o()},0)})}},p=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),g=d&&d.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c;b.length&&(b+="/"),i&&(g=1);for(var j=0;g>j;j++){var k,l,m,n;i?(k=c,f.push(h(a))):(k=d[j].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),m=k.split(","),n=m.length;for(var o=0;n>o;o++)l=m[o],e.push({media:l.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:f.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},s=function(){var a,b=c.createElement("div"),e=c.body,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",e||(e=f=c.createElement("body"),e.style.background="none"),e.appendChild(b),d.insertBefore(e,d.firstChild),a=b.offsetWidth,f?d.removeChild(e):e.removeChild(b),a=t=parseFloat(a)},u=function(a){var b="clientWidth",h=d[b],k="CSS1Compat"===c.compatMode&&h||c.body[b]||h,m={},n=l[l.length-1],o=(new Date).getTime();if(a&&q&&i>o-q)return clearTimeout(r),r=setTimeout(u,i),void 0;q=o;for(var p in e)if(e.hasOwnProperty(p)){var v=e[p],w=v.minw,x=v.maxw,y=null===w,z=null===x,A="em";w&&(w=parseFloat(w)*(w.indexOf(A)>-1?t||s():1)),x&&(x=parseFloat(x)*(x.indexOf(A)>-1?t||s():1)),v.hasquery&&(y&&z||!(y||k>=w)||!(z||x>=k))||(m[v.media]||(m[v.media]=[]),m[v.media].push(f[v.rules]))}for(var B in g)g.hasOwnProperty(B)&&g[B]&&g[B].parentNode===j&&j.removeChild(g[B]);for(var C in m)if(m.hasOwnProperty(C)){var D=c.createElement("style"),E=m[C].join("\n");D.type="text/css",D.media=C,j.insertBefore(D,n.nextSibling),D.styleSheet?D.styleSheet.cssText=E:D.appendChild(c.createTextNode(E)),g.push(D)}},v=function(a,b){var c=w();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},w=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}();n(),b.update=n,a.addEventListener?a.addEventListener("resize",x,!1):a.attachEvent&&a.attachEvent("onresize",x)})(this); diff --git a/website/source/layouts/_footer.erb b/website/source/layouts/_footer.erb index 222d5b36a8..ef25a8fa26 100644 --- a/website/source/layouts/_footer.erb +++ b/website/source/layouts/_footer.erb @@ -37,7 +37,7 @@