diff --git a/src/componets/App.js b/src/componets/App.js index cd7b0f2..ea33eea 100644 --- a/src/componets/App.js +++ b/src/componets/App.js @@ -1,20 +1,15 @@ import React from 'react'; +import Message from './Message'; + import GithubIcon from 'feather-icons/dist/icons/github.svg'; import DownloadIcon from 'feather-icons/dist/icons/download.svg'; import LinkIcon from 'feather-icons/dist/icons/link.svg'; import ChevronsDownIcon from 'feather-icons/dist/icons/chevrons-down.svg'; import ErrorIcon from 'feather-icons/dist/icons/alert-octagon.svg'; -const App = () => -

React App

- -
; +const App = () => +

Placeholder app content

+
; export default App; diff --git a/src/componets/Message/index.js b/src/componets/Message/index.js new file mode 100644 index 0000000..8aca00d --- /dev/null +++ b/src/componets/Message/index.js @@ -0,0 +1,13 @@ +import React from 'react'; + +import style from './style.css'; + +const Message = ({ icon, heading, children }) => { + const IconComponent = icon; + return
+

{ IconComponent ? : '' }{ heading }

+ { children } +
; +}; + +export default Message; diff --git a/src/componets/Message/style.css b/src/componets/Message/style.css new file mode 100644 index 0000000..00892b2 --- /dev/null +++ b/src/componets/Message/style.css @@ -0,0 +1,20 @@ +.message { + background: var(--color-tan); + padding: var(--spacing-margin); + margin: var(--spacing-margin) 0; +} + +.message h2 { + margin: var(--spacing-margin) 0; +} + +.message h2 svg { + margin-right: 0.5rem; + height: 3rem; + width: 3rem; + vertical-align: bottom; +} + +.message p { + margin: var(--spacing-margin) 0; +} diff --git a/src/pages/404.js b/src/pages/404.js index 7e37039..ca825b1 100644 --- a/src/pages/404.js +++ b/src/pages/404.js @@ -1 +1,13 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; + import '../style.css'; + +import Message from '../componets/Message'; +import ErrorIcon from 'feather-icons/dist/icons/alert-octagon.svg'; + +ReactDOM.render( + +

The page you have requested could not be found

+
, + document.getElementById('root')); diff --git a/src/style.css b/src/style.css index 2e67764..f37a115 100644 --- a/src/style.css +++ b/src/style.css @@ -25,7 +25,7 @@ body { font-size: 1.6rem; } -#main { +:global(#main) { background: var(--color-green) linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 100%); box-shadow: 0 0 1rem var(--color-black); padding: 0 var(--content-margin); @@ -33,7 +33,7 @@ body { position: relative; } -#main h1 { +:global(#main) h1 { font-family: 'Bangers', 'cursive'; font-size: 4rem; font-weight: normal; @@ -42,20 +42,20 @@ body { line-height: var(--header-height); } -#main a { +:global(#main) a { text-decoration: none; display: inline-block; } -#main ul { +:global(#main) ul { line-height: var(--header-height); position: absolute; top: 0; right: var(--content-margin); } -#main li a:hover, -#main li a:active { +:global(#main) li a:hover, +:global(#main) li a:active { text-decoration: underline; } @@ -84,15 +84,15 @@ li { display: inline-block; } -.inline-list li { +:global(.inline-list) li { white-space: nowrap; } -.inline-list li:after { +:global(.inline-list) li:after { content: '//'; padding: 0 0.5rem; } -.inline-list li:last-child:after { +:global(.inline-list) li:last-child:after { content: ''; } diff --git a/webpack.common.js b/webpack.common.js index 3deb056..2f2208e 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -88,7 +88,8 @@ module.exports = { options: { importLoaders: 1, minimize: true, - sourceMap: true + sourceMap: true, + modules: true } }, {