Unverified Commit 93b141e5 authored by Tamika Tannis's avatar Tamika Tannis Committed by GitHub

Add support for a logo in the NavBar (#9)

* Add support for a logo in the NavBar

* Add a max height/width to the logo
parent bc87e0f6
...@@ -22,6 +22,7 @@ const configDefault: AppConfig = { ...@@ -22,6 +22,7 @@ const configDefault: AppConfig = {
}, },
iconPath: 'PATH_TO_ICON' iconPath: 'PATH_TO_ICON'
}, },
logoPath: null,
navLinks: [ navLinks: [
{ {
label: "Announcements", label: "Announcements",
......
...@@ -9,6 +9,7 @@ export interface AppConfig { ...@@ -9,6 +9,7 @@ export interface AppConfig {
exploreSql: ExploreSqlConfig; exploreSql: ExploreSqlConfig;
google: GoogleAnalyticsConfig; google: GoogleAnalyticsConfig;
lineage: LineageConfig; lineage: LineageConfig;
logoPath: string | null;
navLinks: Array<LinkConfig>; navLinks: Array<LinkConfig>;
} }
...@@ -17,6 +18,7 @@ export interface AppConfigCustom { ...@@ -17,6 +18,7 @@ export interface AppConfigCustom {
exploreSql?: ExploreSqlConfig; exploreSql?: ExploreSqlConfig;
google?: GoogleAnalyticsConfig google?: GoogleAnalyticsConfig
lineage?: LineageConfig; lineage?: LineageConfig;
logoPath?: string;
navLinks?: Array<LinkConfig>; navLinks?: Array<LinkConfig>;
} }
......
...@@ -51,6 +51,10 @@ class NavBar extends React.Component<NavBarProps, NavBarState> { ...@@ -51,6 +51,10 @@ class NavBar extends React.Component<NavBarProps, NavBarState> {
<div className="row"> <div className="row">
<div className="nav-bar"> <div className="nav-bar">
<div className="nav-bar-left"> <div className="nav-bar-left">
{
AppConfig.logoPath &&
<img className="logo-icon" src={AppConfig.logoPath} />
}
<Link to={`/`}> <Link to={`/`}>
AMUNDSEN AMUNDSEN
</Link> </Link>
......
...@@ -34,9 +34,13 @@ ...@@ -34,9 +34,13 @@
margin-left: auto; margin-left: auto;
display: flex; display: flex;
} }
.nav-bar-left > *,
.nav-bar-right > * { .nav-bar-right > * {
margin: auto 10px; margin: auto 10px;
} }
.nav-bar-left > *:first-child {
margin-left: 0px;
}
.nav-bar-right > *:last-child { .nav-bar-right > *:last-child {
margin-right: 0px; margin-right: 0px;
} }
...@@ -50,3 +54,8 @@ ...@@ -50,3 +54,8 @@
.sb-avatar > div { .sb-avatar > div {
border: 1px solid white; border: 1px solid white;
} }
.logo-icon {
max-height: 48px;
max-width: 144px;
}
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