add fxA ui elements
This commit is contained in:
parent
4c64593262
commit
894545a6f0
29 changed files with 612 additions and 370 deletions
|
@ -3,95 +3,7 @@
|
|||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20px;
|
||||
height: 32px;
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.logo {
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logo__link {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.logo__title {
|
||||
color: #3e3d40;
|
||||
font-size: 32px;
|
||||
font-weight: 500;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
letter-spacing: 1px;
|
||||
margin-left: 8px;
|
||||
transition: color 50ms;
|
||||
}
|
||||
|
||||
.logo__title:hover {
|
||||
color: var(--primaryControlBGColor);
|
||||
}
|
||||
|
||||
.logo__subtitle {
|
||||
color: #3e3d40;
|
||||
font-size: 12px;
|
||||
margin: 0 8px;
|
||||
}
|
||||
|
||||
.logo__subtitle-link {
|
||||
font-weight: bold;
|
||||
color: #3e3d40;
|
||||
transition: color 50ms;
|
||||
}
|
||||
|
||||
.logo__subtitle-link:hover {
|
||||
color: var(--primaryControlBGColor);
|
||||
}
|
||||
|
||||
.feedback {
|
||||
background-color: var(--primaryControlBGColor);
|
||||
background-image: url('../assets/feedback.svg');
|
||||
background-position: 2px 4px;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 18px;
|
||||
border-radius: 3px;
|
||||
border: 1px solid var(--primaryControlBGColor);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||
color: var(--primaryControlFGColor);
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
float: left;
|
||||
font-size: 12px;
|
||||
line-height: 12px;
|
||||
opacity: 0.9;
|
||||
padding: 5px;
|
||||
overflow: hidden;
|
||||
min-width: 12px;
|
||||
max-width: 12px;
|
||||
text-indent: 17px;
|
||||
transition: all 250ms ease-in-out;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.feedback:hover,
|
||||
.feedback:focus {
|
||||
min-width: 30px;
|
||||
max-width: 300px;
|
||||
text-indent: 2px;
|
||||
padding: 5px 5px 5px 20px;
|
||||
background-color: var(--primaryControlHoverColor);
|
||||
}
|
||||
|
||||
.feedback:active {
|
||||
background-color: var(--primaryControlHoverColor);
|
||||
}
|
||||
|
||||
@media (max-device-width: 750px), (max-width: 750px) {
|
||||
.header {
|
||||
padding-top: 60px;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,8 @@
|
|||
const html = require('choo/html');
|
||||
const version = require('../../../package.json').version;
|
||||
const browser = browserName();
|
||||
|
||||
module.exports = function(state) {
|
||||
const feedbackUrl = `https://qsurvey.mozilla.com/s3/txp-firefox-send?ver=${version}&browser=${browser}`;
|
||||
module.exports = function() {
|
||||
const header = html`
|
||||
<header class="header">
|
||||
<a href="${feedbackUrl}"
|
||||
rel="noreferrer noopener"
|
||||
class="feedback"
|
||||
target="_blank">${state.translate('siteFeedback')}</a>
|
||||
</header>`;
|
||||
// HACK
|
||||
// We only want to render this once because we
|
||||
|
@ -19,26 +12,3 @@ module.exports = function(state) {
|
|||
};
|
||||
return header;
|
||||
};
|
||||
|
||||
function browserName() {
|
||||
try {
|
||||
if (/firefox/i.test(navigator.userAgent)) {
|
||||
return 'firefox';
|
||||
}
|
||||
if (/edge/i.test(navigator.userAgent)) {
|
||||
return 'edge';
|
||||
}
|
||||
if (/trident/i.test(navigator.userAgent)) {
|
||||
return 'ie';
|
||||
}
|
||||
if (/chrome/i.test(navigator.userAgent)) {
|
||||
return 'chrome';
|
||||
}
|
||||
if (/safari/i.test(navigator.userAgent)) {
|
||||
return 'safari';
|
||||
}
|
||||
return 'other';
|
||||
} catch (e) {
|
||||
return 'unknown';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue