mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
some more cleaning
This commit is contained in:
parent
8b13a21f9c
commit
15460ebc2a
@ -68,7 +68,7 @@ let Header = React.createClass({
|
|||||||
setTitle(whitelabel.title)
|
setTitle(whitelabel.title)
|
||||||
constructHead(whitelabel.head);
|
constructHead(whitelabel.head);
|
||||||
if (whitelabel.subdomain !== 'www'){
|
if (whitelabel.subdomain !== 'www'){
|
||||||
return <img className="img-brand" src={whitelabel.logo}/>;
|
return(<img className="img-brand" src={whitelabel.logo}/>);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return (
|
return (
|
||||||
|
@ -1,13 +1,10 @@
|
|||||||
/**
|
|
||||||
* Created by cevo on 06.10.15.
|
|
||||||
*/
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// elementType: string, is the type of the element, such as link, meta, etc.
|
// elementType: string, is the type of the element, such as link, meta, etc.
|
||||||
// elementId id of the element
|
// elementId id of the element
|
||||||
// elementAttributes: hash table containing the attributes of the relevant 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 head = (document.head || document.getElementsByTagName('head')[0]);
|
||||||
let element = document.createElement(elementType);
|
let element = document.createElement(elementType);
|
||||||
let oldElement = document.getElementById(elementId);
|
let oldElement = document.getElementById(elementId);
|
||||||
@ -26,7 +23,7 @@ let constructHeadElement = function(elementType, elementId, elementAttributes) {
|
|||||||
}
|
}
|
||||||
head.appendChild(element);
|
head.appendChild(element);
|
||||||
return this;
|
return this;
|
||||||
};
|
}
|
||||||
|
|
||||||
// Accepts a dictionary of dictionaries which comprises a part or all of html head part
|
// Accepts a dictionary of dictionaries which comprises a part or all of html head part
|
||||||
// {link : {id1: {rel: ... }}}
|
// {link : {id1: {rel: ... }}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user