1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 01:25:17 +01:00

some more cleaning

This commit is contained in:
Cevo 2015-10-08 12:04:40 +02:00
parent 8b13a21f9c
commit 15460ebc2a
2 changed files with 3 additions and 6 deletions

View File

@ -68,7 +68,7 @@ let Header = React.createClass({
setTitle(whitelabel.title)
constructHead(whitelabel.head);
if (whitelabel.subdomain !== 'www'){
return <img className="img-brand" src={whitelabel.logo}/>;
return(<img className="img-brand" src={whitelabel.logo}/>);
}
else {
return (

View File

@ -1,13 +1,10 @@
/**
* Created by cevo on 06.10.15.
*/
'use strict';
// elementType: string, is the type of the element, such as link, meta, etc.
// elementId id of the element
// elementAttributes: hash table containing the attributes of the relevant element
let constructHeadElement = function(elementType, elementId, elementAttributes) {
function constructHeadElement(elementType, elementId, elementAttributes) {
let head = (document.head || document.getElementsByTagName('head')[0]);
let element = document.createElement(elementType);
let oldElement = document.getElementById(elementId);
@ -26,7 +23,7 @@ let constructHeadElement = function(elementType, elementId, elementAttributes) {
}
head.appendChild(element);
return this;
};
}
// Accepts a dictionary of dictionaries which comprises a part or all of html head part
// {link : {id1: {rel: ... }}}