@@ -26,6 +26,16 @@ const Page = React.createClass({
2626 title : React . PropTypes . string ,
2727 } ,
2828
29+ renderFavicon ( ) {
30+ if ( ! options . faviconUrl ) {
31+ return null ;
32+ }
33+
34+ return < link rel = "icon" type = "image/x-icon"
35+ href = { URL ( options . faviconUrl ) }
36+ /> ;
37+ } ,
38+
2939 renderHead ( ) {
3040 const URL = this . props . URL ;
3141 let title = this . props . getTitle ( options ) ;
@@ -45,9 +55,7 @@ const Page = React.createClass({
4555 content = "width=device-width, initial-scale=1.0"
4656 />
4757 { noIndex && < meta name = "robots" content = "noindex" /> }
48- < link rel = "icon" type = "image/x-icon"
49- href = { URL ( "/images/favicon.png" ) }
50- />
58+ { this . renderFavicon ( ) }
5159 < title > { title } </ title >
5260 { this . props . social && this . renderSocialMeta ( ) }
5361 < link rel = "stylesheet" href = { URL ( "/css/bootstrap.min.css" ) } />
@@ -75,6 +83,20 @@ const Page = React.createClass({
7583 ] ;
7684 } ,
7785
86+ renderLogo ( ) {
87+ if ( ! options . logoUrl ) {
88+ return null ;
89+ }
90+
91+ return < span >
92+ < img alt = { this . props . getTitle ( options ) }
93+ src = { URL ( options . logoUrl ) }
94+ height = "40" width = "40"
95+ />
96+ { " " }
97+ </ span > ;
98+ } ,
99+
78100 renderHeader ( ) {
79101 const gettext = this . props . gettext ;
80102 const URL = this . props . URL ;
@@ -92,11 +114,7 @@ const Page = React.createClass({
92114 < span className = "icon-bar" > </ span >
93115 </ button >
94116 < a className = "navbar-brand" href = { URL ( "/" ) } >
95- < img alt = { this . props . getTitle ( options ) }
96- src = { URL ( "/images/lighthouse.sm.png" ) }
97- height = "40" width = "40"
98- />
99- { " " }
117+ { this . renderLogo ( ) }
100118 { this . props . getShortTitle ( options ) }
101119 </ a >
102120 </ div >
0 commit comments