Commit 0672241c authored by Robert Knight's avatar Robert Knight Committed by Nick Stenning

Re-implement the logic for showing the browser-appropriate installer

 * Re-implement logic for showing browser-appropriate installation
   option

 * Tweak the border styles on the proxy link form
parent 35aee3bb
// TODO - Make this a CommonJS module and move it into
// the site JS?
if (window.chrome !== undefined) {
var elements = document.getElementsByClassName(
"unhide-in-chrome");
for (var i=0; i<elements.length; i++) {
elements[i].classList.remove("hidden");
}
elements = document.getElementsByClassName(
"hide-in-chrome");
for (var i=0; i<elements.length; i++) {
elements[i].classList.add("hidden");
}
var env = {
browserIsChrome: typeof window.chrome !== 'undefined',
browserIsOther: typeof window.chrome === 'undefined',
};
function hypenate(key) {
// 'camelCase' -> 'camel-case'
return key.replace(/[a-z]+/g, '$&-').toLowerCase().slice(0, -1);
}
Object.keys(env).forEach(function (key) {
var selector = '.js-' + hypenate(key);
var elements = document.querySelectorAll(selector);
for (var i = 0; i < elements.length; i++) {
if (env[key]) {
elements[i].classList.remove('is-hidden');
} else {
elements[i].classList.add('is-hidden');
}
}
});
......@@ -8,9 +8,13 @@
.social-media-link {
display: inline-block;
padding-left: 3px;
padding-right: 3px;
padding-left: 6px;
padding-right: 6px;
font-size: 16px;
text-decoration: none;
}
.social-media-link:not(:hover) {
color: $color-gray;
}
}
......@@ -100,28 +100,30 @@
margin-right: 10px;
}
$proxy-border: 2px solid $color-alto;
$proxy-border: 1px solid $color-alto;
$proxy-border-radius: 4px;
.installer__proxy-form {
display: flex;
}
.installer__proxy-link-field {
border-top-left-radius: 2px;
border-bottom-left-radius: 2px;
border-top-left-radius: $proxy-border-radius;
border-bottom-left-radius: $proxy-border-radius;
border-left: $proxy-border;
border-top: $proxy-border;
border-bottom: $proxy-border;
border-right: none;
padding-left: 10px;
min-width: 200px;
}
.installer__proxy-btn {
font-weight: bold;
background-color: $color-gallery;
border: 2px solid $color-alto;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border: $proxy-border;
border-top-right-radius: $proxy-border-radius;
border-bottom-right-radius: $proxy-border-radius;
}
.home__intro-container {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment