From a28c44e5091b4057a6724b5db3d469a1b03c889f Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Mon, 23 Nov 2020 11:54:28 -0500 Subject: [PATCH] Source header logo from static files --- .../public/static/media/logo-header.svg | 232 +++++++++++ .../components/AppContainer/AppContainer.jsx | 4 - .../src/components/AppContainer/BrandLogo.jsx | 380 +----------------- .../AppContainer/BrandLogo.test.jsx | 6 +- 4 files changed, 247 insertions(+), 375 deletions(-) create mode 100644 awx/ui_next/public/static/media/logo-header.svg diff --git a/awx/ui_next/public/static/media/logo-header.svg b/awx/ui_next/public/static/media/logo-header.svg new file mode 100644 index 0000000000..6d80915fb6 --- /dev/null +++ b/awx/ui_next/public/static/media/logo-header.svg @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/awx/ui_next/src/components/AppContainer/AppContainer.jsx b/awx/ui_next/src/components/AppContainer/AppContainer.jsx index 1d968906d8..b107fd0f40 100644 --- a/awx/ui_next/src/components/AppContainer/AppContainer.jsx +++ b/awx/ui_next/src/components/AppContainer/AppContainer.jsx @@ -27,10 +27,6 @@ const PageHeader = styled(PFPageHeader)` &:hover { color: inherit; } - - & svg { - height: 76px; - } } `; diff --git a/awx/ui_next/src/components/AppContainer/BrandLogo.jsx b/awx/ui_next/src/components/AppContainer/BrandLogo.jsx index 7943d1c287..be15af6773 100644 --- a/awx/ui_next/src/components/AppContainer/BrandLogo.jsx +++ b/awx/ui_next/src/components/AppContainer/BrandLogo.jsx @@ -1,374 +1,18 @@ -import React, { Component } from 'react'; -import { withI18n } from '@lingui/react'; -import { t } from '@lingui/macro'; +import React from 'react'; import styled from 'styled-components'; -const ST0 = styled.g` - display: none; +const BrandImg = styled.img` + flex: initial; + height: 76px; + width: initial; + padding-left: 0px; + margin: 0px 0px 0px 0px; + max-width: 100px; + max-height: initial; + pointer-events: none; `; -const ST1 = styled.path` - display: inline; - fill: #ed1c24; -`; +const BrandLogo = () => ; -const ST2 = styled.path` - fill: #42210b; -`; - -const ST3 = styled.path` - fill: #ffffff; -`; - -const ST4 = styled.path` - fill: #c69c6d; - stroke: #8c6239; - stroke-width: 5; - stroke-miterlimit: 10; -`; - -const ST5 = styled.path` - fill: #ffffff; - stroke: #42210b; - stroke-width: 3; - stroke-miterlimit: 10; -`; - -const ST6 = styled.ellipse` - fill: #ed1c24; - stroke: #8c6239; - stroke-width: 5; - stroke-miterlimit: 10; -`; - -const ST7 = styled.path` - fill: #a67c52; -`; - -const ST8 = styled.path` - fill: #ed1c24; -`; - -const ST9 = styled.ellipse` - fill: #42210b; -`; - -class BrandLogo extends Component { - render() { - const { i18n } = this.props; - return ( - - {i18n._(t`AWX Logo`)} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ); - } -} - -export default withI18n()(BrandLogo); +export default BrandLogo; diff --git a/awx/ui_next/src/components/AppContainer/BrandLogo.test.jsx b/awx/ui_next/src/components/AppContainer/BrandLogo.test.jsx index 02ba644586..641332be66 100644 --- a/awx/ui_next/src/components/AppContainer/BrandLogo.test.jsx +++ b/awx/ui_next/src/components/AppContainer/BrandLogo.test.jsx @@ -4,11 +4,11 @@ import BrandLogo from './BrandLogo'; let logoWrapper; let brandLogoElem; -let svgElem; +let imgElem; const findChildren = () => { brandLogoElem = logoWrapper.find('BrandLogo'); - svgElem = logoWrapper.find('svg'); + imgElem = logoWrapper.find('img'); }; describe('', () => { @@ -17,6 +17,6 @@ describe('', () => { findChildren(); expect(logoWrapper.length).toBe(1); expect(brandLogoElem.length).toBe(1); - expect(svgElem.length).toBe(1); + expect(imgElem.length).toBe(1); }); });