From e99859edcb42730f178b23095e1aac117f014c4d Mon Sep 17 00:00:00 2001 From: Tom Clift Date: Mon, 25 May 2020 13:04:16 +1000 Subject: [PATCH] feat: configurable radar name --- common/config.js | 3 +++ js/client.js | 4 ++-- js/components/Header.js | 3 ++- js/components/LogoLink.js | 4 ++-- js/components/PageHelp.js | 7 ++++--- js/components/PageIndex.js | 6 +++--- js/server.js | 6 +++--- 7 files changed, 19 insertions(+), 14 deletions(-) diff --git a/common/config.js b/common/config.js index db7f3b8..0d7d556 100644 --- a/common/config.js +++ b/common/config.js @@ -1,3 +1,6 @@ +export const radarName = 'AOE Technology Radar'; +export const radarNameShort = 'Technology Radar'; + export const quadrants = [ 'languages-and-frameworks', 'methods-and-patterns', diff --git a/js/client.js b/js/client.js index 7b9e2b6..a853970 100644 --- a/js/client.js +++ b/js/client.js @@ -7,7 +7,7 @@ import createHistory from 'history/createBrowserHistory'; import App from './components/App'; import appReducer from './reducer'; import actions, { NAVIGATE } from './actions'; -import { isMobileViewport } from '../common/config'; +import { isMobileViewport, radarName } from '../common/config'; import { track } from './analytics'; // Remove .html and map / to index @@ -63,7 +63,7 @@ const store = createStore( ); const handleSetTitle = title => { - document.title = `${title} | AOE Technology Radar`; + document.title = `${title} | ${radarName}`; track(); }; diff --git a/js/components/Header.js b/js/components/Header.js index 1d07e1e..3f550b4 100644 --- a/js/components/Header.js +++ b/js/components/Header.js @@ -7,6 +7,7 @@ import Link from './Link'; import LogoLink from './LogoLink'; import Search from './Search'; import actions from '../actions'; +import { radarNameShort } from '../../common/config'; class Header extends React.Component { constructor(...args) { @@ -66,7 +67,7 @@ class Header extends React.Component {
- How to Use Technology Radar? + How to Use {radarNameShort}?
diff --git a/js/components/LogoLink.js b/js/components/LogoLink.js index f5b55c8..d685c5a 100644 --- a/js/components/LogoLink.js +++ b/js/components/LogoLink.js @@ -1,7 +1,7 @@ import React from 'react'; import classNames from 'classnames'; import Link from './Link'; -import { assetUrl } from '../../common/config'; +import { assetUrl, radarNameShort } from '../../common/config'; export default function LogoLink({ small=false }) { return ( @@ -10,7 +10,7 @@ export default function LogoLink({ small=false }) { - Technology Radar + {radarNameShort} diff --git a/js/components/PageHelp.js b/js/components/PageHelp.js index d251ffe..bae8242 100644 --- a/js/components/PageHelp.js +++ b/js/components/PageHelp.js @@ -2,19 +2,20 @@ import React from 'react'; import HeroHeadline from './HeroHeadline'; import Fadeable from './Fadeable'; import SetTitle from './SetTitle'; +import { radarName } from '../../common/config'; export default function PageHelp({ leaving, onLeave, ...props }) { return ( - - How to use AOE Technology Radar + + How to use the {radarName}

Introduction

Technology is moving fast and new technologies and innovations appear continuously.

It's essential for a development and technology company such as AOE to constantly improve and keep track with the latest useful innovations. It is important to openly look for innovations and new technologies and to question established technologies and methods every now and then.

But, it is also important to wisely choose which technologies to use in our daily work and in the different projects we are carrying out. As we all know: There is no silver bullet.

-

What is the AOE Tech Radar

+

What is the {radarName}

The Tech Radar is an overview of different technologies - from languages, frameworks, tools and patterns to platforms - that we consider "new or mentionable". The radar therefore doesn't provide an overview of all established technologies - but it focuses on items that have recently gained in importance or changed.

diff --git a/js/components/PageIndex.js b/js/components/PageIndex.js index 9cefe3d..abe6412 100644 --- a/js/components/PageIndex.js +++ b/js/components/PageIndex.js @@ -1,11 +1,11 @@ import React from 'react'; import { formatRelease } from '../date'; - import { featuredOnly } from '../../common/model'; import HeroHeadline from './HeroHeadline'; import QuadrantGrid from './QuadrantGrid'; import Fadeable from './Fadeable'; import SetTitle from './SetTitle'; +import { radarName, radarNameShort } from '../../common/config'; export default function PageIndex({ leaving, @@ -18,10 +18,10 @@ export default function PageIndex({ const numberOfReleases = props.releases.length; return ( - +
- AOE Technology Radar + {radarName}
diff --git a/js/server.js b/js/server.js index 32450c5..0139fd4 100644 --- a/js/server.js +++ b/js/server.js @@ -2,7 +2,7 @@ import React from 'react'; import { renderToString } from 'react-dom/server'; import { createStore } from 'redux'; import { Provider } from 'react-redux'; -import {assetUrl} from '../common/config' +import { assetUrl, radarName } from '../common/config' import App from './components/App'; import appReducer from './reducer'; @@ -36,13 +36,13 @@ const renderFullPage = (html, pageTitle, preloadedState) => { - ${pageTitle} | AOE Technology Radar + ${pageTitle} | ${radarName} - +