Refactor techradar to subfolder

This commit is contained in:
Mathias Schopmans
2017-04-04 18:10:44 +02:00
parent 461c4e7dda
commit 1323610982
11 changed files with 23 additions and 14 deletions

View File

@@ -18,7 +18,9 @@ const getPageNameFromPath = (path) => {
}
const historyManager = store => {
const history = createHistory();
const history = createHistory({
basename: '/techradar'
});
// If browser-back button is pressed, provide new pageName to store
history.listen((location, action) => {

View File

@@ -1,14 +1,14 @@
import React from 'react';
import classNames from 'classnames';
import Branding from './Branding';
import { getItemPageNames, isMobileViewport } from '../../common/config';
import { assetUrl, getItemPageNames, isMobileViewport } from '../../common/config';
export default function Footer({ items, pageName }) {
return (
<div className={classNames('footer', {'is-hidden': !isMobileViewport() && getItemPageNames(items).includes(pageName)})}>
<Branding
modifier="footer"
logoContent={<img src="/assets/logo.svg" width="150px" height="60px" />}
logoContent={<img src={assetUrl('logo.svg')} width="150px" height="60px" />}
>
<span className="footnote">
AOE is a leading global provider of services for digital transformation and digital business models. AOE relies exclusively on established Enterprise Open Source technologies. This leads to innovative solutions, digital products and portals in agile software projects, and helps build long-lasting, strategic partnerships with our customers.

View File

@@ -9,7 +9,7 @@ function Link({ pageName, children, navigate, className, style = {}}) {
};
return (
<a href={`/${pageName}.html`} onClick={handleClick} style={style} {...{ className }}>
<a href={`/techradar/${pageName}.html`} onClick={handleClick} style={style} {...{ className }}>
{children}
</a>
);

View File

@@ -1,13 +1,14 @@
import React from 'react';
import classNames from 'classnames';
import Link from './Link';
import { assetUrl } from '../../common/config';
export default function LogoLink({ small=false }) {
return (
<Link pageName="index" className={classNames('logo-link', { 'logo-link--small': small })}>
<span className="logo-link__icon icon icon--back"></span>
<span className="logo-link__slide">
<img className="logo-link__img" src="/assets/logo.svg" width="150px" height="60px" />
<img className="logo-link__img" src={assetUrl('logo.svg')} width="150px" height="60px" />
<span className="logo-link__text">
Technology Radar
</span>

View File

@@ -2,6 +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 App from './components/App';
import appReducer from './reducer';
@@ -36,20 +37,20 @@ const renderFullPage = (html, pageTitle, preloadedState) => {
<head>
<meta charset="utf-8">
<title>${pageTitle} | AOE Technology Radar</title>
<link rel="stylesheet" href="/assets/css/styles.css"/>
<link rel="stylesheet" href="${assetUrl('css/styles.css')}"/>
<link rel="stylesheet" href="https://d1azc1qln24ryf.cloudfront.net/114779/Socicon/style-cf.css?c2sn1i">
<link rel="shortcut icon" href="/assets/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="${assetUrl('favicon.ico')}" type="image/x-icon">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, maximum-scale=1.0, initial-scale=1.0, user-scalable=0">
<meta property="og:title" content="${pageTitle} | AOE Technology Radar" />
<meta property="og:image" content="/assets/logo.svg" />
<meta property="og:image" content="${assetUrl('logo.svg')}" />
</head>
<body>
<div id="root">${html}</div>
<script>
window.__TECHRADAR__ = ${JSON.stringify(preloadedState)}
</script>
<script src="/bundle.js"></script>
<script src="${assetUrl('js/bundle.js')}"></script>
</body>
</html>
`