From f77ecd8288765a86305d2fe0c4326446f3827c22 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Sat, 9 Jun 2018 12:12:43 -0700 Subject: [PATCH] updated the page layouts --- client/build/components/PageLayout/index.js | 2 +- .../components/PageLayoutShowLite/index.js | 4 +- client/build/pages/AboutPage/index.js | 11 +++--- client/build/pages/ErrorPage/index.js | 5 +-- client/build/pages/FourOhFourPage/index.js | 5 +-- client/build/pages/HomePage/index.js | 5 +-- client/build/pages/LoginPage/view.js | 11 +++--- client/build/pages/MultisitePage/index.js | 5 +-- client/build/pages/ShowAssetDetails/view.js | 11 +++--- client/build/pages/ShowAssetLite/view.js | 38 ++++++++++++------- client/build/pages/ShowChannel/view.js | 13 +++---- client/src/components/PageLayout/index.jsx | 2 +- .../components/PageLayoutShowLite/index.jsx | 5 +-- client/src/pages/AboutPage/index.jsx | 13 +++---- client/src/pages/ErrorPage/index.jsx | 7 ++-- client/src/pages/FourOhFourPage/index.jsx | 11 ++---- client/src/pages/HomePage/index.jsx | 5 ++- client/src/pages/LoginPage/view.jsx | 13 +++---- client/src/pages/MultisitePage/index.jsx | 5 ++- client/src/pages/ShowAssetDetails/view.jsx | 17 ++++----- client/src/pages/ShowAssetLite/view.jsx | 31 ++++++++++----- client/src/pages/ShowChannel/view.jsx | 19 ++++------ 22 files changed, 120 insertions(+), 118 deletions(-) diff --git a/client/build/components/PageLayout/index.js b/client/build/components/PageLayout/index.js index 71bb89b9..880a3250 100644 --- a/client/build/components/PageLayout/index.js +++ b/client/build/components/PageLayout/index.js @@ -50,7 +50,7 @@ function (_React$Component) { pageUri: this.props.pageUri }), _react.default.createElement(_NavBar.default, null), _react.default.createElement("div", { className: 'content' - }, this.props.content)); + }, this.props.children)); } }]); diff --git a/client/build/components/PageLayoutShowLite/index.js b/client/build/components/PageLayoutShowLite/index.js index 93db8106..7599aab8 100644 --- a/client/build/components/PageLayoutShowLite/index.js +++ b/client/build/components/PageLayoutShowLite/index.js @@ -53,9 +53,7 @@ function (_React$Component) { asset: this.props.asset }), _react.default.createElement("div", { className: 'content' - }, this.props.content), _react.default.createElement("div", { - className: 'footer' - }, this.props.footer)); + }, this.props.children)); } }]); diff --git a/client/build/pages/AboutPage/index.js b/client/build/pages/AboutPage/index.js index 0e250eaf..d1129e2e 100644 --- a/client/build/pages/AboutPage/index.js +++ b/client/build/pages/AboutPage/index.js @@ -49,12 +49,11 @@ function (_React$Component) { value: function render() { return _react.default.createElement(_PageLayout.default, { pageTitle: 'About', - pageUri: 'about', - content: _react.default.createElement(_HorizontalSplit.default, { - leftSide: _react.default.createElement(_AboutSpeechOverview.default, null), - rightSide: _react.default.createElement(_AboutSpeechDetails.default, null) - }) - }); + pageUri: 'about' + }, _react.default.createElement(_HorizontalSplit.default, { + leftSide: _react.default.createElement(_AboutSpeechOverview.default, null), + rightSide: _react.default.createElement(_AboutSpeechDetails.default, null) + })); } }]); diff --git a/client/build/pages/ErrorPage/index.js b/client/build/pages/ErrorPage/index.js index 3feec401..8036e66c 100644 --- a/client/build/pages/ErrorPage/index.js +++ b/client/build/pages/ErrorPage/index.js @@ -46,9 +46,8 @@ function (_React$Component) { var error = this.props.error; return _react.default.createElement(_PageLayout.default, { pageTitle: 'Error', - pageUri: 'error', - content: _react.default.createElement("p", null, error) - }); + pageUri: 'error' + }, _react.default.createElement("p", null, error)); } }]); diff --git a/client/build/pages/FourOhFourPage/index.js b/client/build/pages/FourOhFourPage/index.js index 31777b01..7ddb792b 100644 --- a/client/build/pages/FourOhFourPage/index.js +++ b/client/build/pages/FourOhFourPage/index.js @@ -43,9 +43,8 @@ function (_React$Component) { value: function render() { return _react.default.createElement(_PageLayout.default, { pageTitle: '404', - pageUri: '/404', - content: _react.default.createElement("div", null, _react.default.createElement("h2", null, "404"), _react.default.createElement("p", null, "That page does not exist")) - }); + pageUri: '/404' + }, _react.default.createElement("h2", null, "404"), _react.default.createElement("p", null, "That page does not exist")); } }]); diff --git a/client/build/pages/HomePage/index.js b/client/build/pages/HomePage/index.js index 8076d4ce..d612a8af 100644 --- a/client/build/pages/HomePage/index.js +++ b/client/build/pages/HomePage/index.js @@ -45,9 +45,8 @@ function (_React$Component) { value: function render() { return _react.default.createElement(_PageLayout.default, { pageTitle: 'Speech', - pageUri: '', - content: _react.default.createElement(_PublishTool.default, null) - }); + pageUri: '' + }, _react.default.createElement(_PublishTool.default, null)); } }]); diff --git a/client/build/pages/LoginPage/view.js b/client/build/pages/LoginPage/view.js index 39e23f53..0f6afe49 100644 --- a/client/build/pages/LoginPage/view.js +++ b/client/build/pages/LoginPage/view.js @@ -59,12 +59,11 @@ function (_React$Component) { value: function render() { return _react.default.createElement(_PageLayout.default, { pageTitle: 'Login', - pageUri: 'login', - content: _react.default.createElement(_HorizontalSplit.default, { - leftSide: _react.default.createElement(_ChannelAbout.default, null), - rightSide: _react.default.createElement(_ChannelTools.default, null) - }) - }); + pageUri: 'login' + }, _react.default.createElement(_HorizontalSplit.default, { + leftSide: _react.default.createElement(_ChannelAbout.default, null), + rightSide: _react.default.createElement(_ChannelTools.default, null) + })); } }]); diff --git a/client/build/pages/MultisitePage/index.js b/client/build/pages/MultisitePage/index.js index fe61ebea..a0fe7d6b 100644 --- a/client/build/pages/MultisitePage/index.js +++ b/client/build/pages/MultisitePage/index.js @@ -82,9 +82,8 @@ function (_React$Component) { value: function render() { return _react.default.createElement(_PageLayout.default, { pageTitle: 'Multisite', - pageUri: '/multisite', - content: _react.default.createElement(MultisiteContent, null) - }); + pageUri: '/multisite' + }, _react.default.createElement(MultisiteContent, null)); } }]); diff --git a/client/build/pages/ShowAssetDetails/view.js b/client/build/pages/ShowAssetDetails/view.js index dcaaf9d2..a1c24b68 100644 --- a/client/build/pages/ShowAssetDetails/view.js +++ b/client/build/pages/ShowAssetDetails/view.js @@ -57,12 +57,11 @@ function (_React$Component) { var name = asset.claimData.name; return _react.default.createElement(_PageLayout.default, { pageTitle: "".concat(name, " - details"), - asset: asset, - content: _react.default.createElement("div", null, _react.default.createElement(_AssetTitle.default, null), _react.default.createElement(_HorizontalSplit.default, { - leftSide: _react.default.createElement(_AssetDisplay.default, null), - rightSide: _react.default.createElement(_AssetInfo.default, null) - })) - }); + asset: asset + }, _react.default.createElement(_AssetTitle.default, null), _react.default.createElement(_HorizontalSplit.default, { + leftSide: _react.default.createElement(_AssetDisplay.default, null), + rightSide: _react.default.createElement(_AssetInfo.default, null) + })); } return _react.default.createElement(_ErrorPage.default, { diff --git a/client/build/pages/ShowAssetLite/view.js b/client/build/pages/ShowAssetLite/view.js index 4affbded..aecfb7a1 100644 --- a/client/build/pages/ShowAssetLite/view.js +++ b/client/build/pages/ShowAssetLite/view.js @@ -15,6 +15,8 @@ var _AssetDisplay = _interopRequireDefault(require("@containers/AssetDisplay")); var _SpaceAround = _interopRequireDefault(require("@components/SpaceAround")); +var _VerticalSplit = _interopRequireDefault(require("@components/VerticalSplit")); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -35,6 +37,21 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); } +var AssetLiteFooter = function AssetLiteFooter(_ref) { + var name = _ref.name, + claimId = _ref.claimId; + return _react.default.createElement(_SpaceAround.default, null, _react.default.createElement("p", { + className: 'text--extra-small' + }, _react.default.createElement(_reactRouterDom.Link, { + className: "link--primary", + to: "/".concat(claimId, "/").concat(name) + }, " hosted on spee.ch"), " via the ", _react.default.createElement("a", { + className: "link--primary", + href: 'https://lbry.io/get', + target: '_blank' + }, "LBRY"), " blockchain")); +}; + var ShowLite = /*#__PURE__*/ function (_React$Component) { @@ -55,19 +72,14 @@ function (_React$Component) { claimId = _asset$claimData.claimId; return _react.default.createElement(_PageLayoutShowLite.default, { pageTitle: name, - asset: asset, - content: _react.default.createElement(_AssetDisplay.default, null), - footer: _react.default.createElement(_SpaceAround.default, null, _react.default.createElement("p", { - className: 'text--extra-small' - }, _react.default.createElement(_reactRouterDom.Link, { - className: "link--primary", - to: "/".concat(claimId, "/").concat(name) - }, " hosted on spee.ch"), " via the ", _react.default.createElement("a", { - className: "link--primary", - href: 'https://lbry.io/get', - target: '_blank' - }, "LBRY"), " blockchain")) - }); + asset: asset + }, _react.default.createElement(_VerticalSplit.default, { + top: _react.default.createElement(_AssetDisplay.default, null), + bottom: _react.default.createElement(AssetLiteFooter, { + name: name, + claimId: claimId + }) + })); } return _react.default.createElement("div", null, _react.default.createElement("p", { diff --git a/client/build/pages/ShowChannel/view.js b/client/build/pages/ShowChannel/view.js index 82fcb6a1..0cb75608 100644 --- a/client/build/pages/ShowChannel/view.js +++ b/client/build/pages/ShowChannel/view.js @@ -55,13 +55,12 @@ function (_React$Component) { shortId = channel.shortId; return _react.default.createElement(_PageLayout.default, { pageTitle: name, - channel: channel, - content: _react.default.createElement("div", null, _react.default.createElement(_ChannelInfoDisplay.default, { - name: name, - longId: longId, - shortId: shortId - }), _react.default.createElement(_ChannelClaimsDisplay.default, null)) - }); + channel: channel + }, _react.default.createElement(_ChannelInfoDisplay.default, { + name: name, + longId: longId, + shortId: shortId + }), _react.default.createElement(_ChannelClaimsDisplay.default, null)); } return _react.default.createElement(_ErrorPage.default, { diff --git a/client/src/components/PageLayout/index.jsx b/client/src/components/PageLayout/index.jsx index 69bceaa0..8ce661e4 100644 --- a/client/src/components/PageLayout/index.jsx +++ b/client/src/components/PageLayout/index.jsx @@ -10,7 +10,7 @@ class PageLayout extends React.Component {
- {this.props.content} + {this.props.children}
); diff --git a/client/src/components/PageLayoutShowLite/index.jsx b/client/src/components/PageLayoutShowLite/index.jsx index 4a9848eb..e60d18c6 100644 --- a/client/src/components/PageLayoutShowLite/index.jsx +++ b/client/src/components/PageLayoutShowLite/index.jsx @@ -11,10 +11,7 @@ class PageLayoutShowLite extends React.Component {
- {this.props.content} -
-
- {this.props.footer} + {this.props.children}
); diff --git a/client/src/pages/AboutPage/index.jsx b/client/src/pages/AboutPage/index.jsx index 2be29caf..887e17f9 100644 --- a/client/src/pages/AboutPage/index.jsx +++ b/client/src/pages/AboutPage/index.jsx @@ -10,13 +10,12 @@ class AboutPage extends React.Component { } - rightSide={} - /> - } - /> + > + } + rightSide={} + /> + ); } } diff --git a/client/src/pages/ErrorPage/index.jsx b/client/src/pages/ErrorPage/index.jsx index dafa6184..6694343f 100644 --- a/client/src/pages/ErrorPage/index.jsx +++ b/client/src/pages/ErrorPage/index.jsx @@ -9,10 +9,9 @@ class ErrorPage extends React.Component { {error}

- } - /> + > +

{error}

+
); } }; diff --git a/client/src/pages/FourOhFourPage/index.jsx b/client/src/pages/FourOhFourPage/index.jsx index 3a8fe484..2c5ef093 100644 --- a/client/src/pages/FourOhFourPage/index.jsx +++ b/client/src/pages/FourOhFourPage/index.jsx @@ -7,13 +7,10 @@ class FourOhForPage extends React.Component { -

404

-

That page does not exist

- - } - /> + > +

404

+

That page does not exist

+
); } }; diff --git a/client/src/pages/HomePage/index.jsx b/client/src/pages/HomePage/index.jsx index d13ac038..8ca1e065 100644 --- a/client/src/pages/HomePage/index.jsx +++ b/client/src/pages/HomePage/index.jsx @@ -9,8 +9,9 @@ class HomePage extends React.Component { } - /> + > + + ); } }; diff --git a/client/src/pages/LoginPage/view.jsx b/client/src/pages/LoginPage/view.jsx index 3aa6f628..f102ec92 100644 --- a/client/src/pages/LoginPage/view.jsx +++ b/client/src/pages/LoginPage/view.jsx @@ -18,13 +18,12 @@ class LoginPage extends React.Component { } - rightSide={} - /> - } - /> + > + } + rightSide={} + /> + ); } }; diff --git a/client/src/pages/MultisitePage/index.jsx b/client/src/pages/MultisitePage/index.jsx index ef35229a..b30bc337 100644 --- a/client/src/pages/MultisitePage/index.jsx +++ b/client/src/pages/MultisitePage/index.jsx @@ -53,8 +53,9 @@ class MultisitePage extends React.Component { } - /> + > + + ); } } diff --git a/client/src/pages/ShowAssetDetails/view.jsx b/client/src/pages/ShowAssetDetails/view.jsx index d48c7e8e..98c09372 100644 --- a/client/src/pages/ShowAssetDetails/view.jsx +++ b/client/src/pages/ShowAssetDetails/view.jsx @@ -16,16 +16,13 @@ class ShowAssetDetails extends React.Component { - - } - rightSide={} - /> - - } - /> + > + + } + rightSide={} + /> + ); } return ( diff --git a/client/src/pages/ShowAssetLite/view.jsx b/client/src/pages/ShowAssetLite/view.jsx index 2eaf6047..1accfdff 100644 --- a/client/src/pages/ShowAssetLite/view.jsx +++ b/client/src/pages/ShowAssetLite/view.jsx @@ -3,6 +3,17 @@ import { Link } from 'react-router-dom'; import PageLayoutShowLite from '@components/PageLayoutShowLite'; import AssetDisplay from '@containers/AssetDisplay'; import SpaceAround from '@components/SpaceAround'; +import VerticalSplit from '@components/VerticalSplit'; + +const AssetLiteFooter = ({ name, claimId }) => { + return ( + +

+ hosted on spee.ch via the LBRY blockchain +

+
+ ) +} class ShowLite extends React.Component { render () { @@ -13,15 +24,17 @@ class ShowLite extends React.Component { } - footer={ - -

- hosted on spee.ch via the LBRY blockchain -

-
- } - /> + > + } + bottom={ + + } + /> +
); } return ( diff --git a/client/src/pages/ShowChannel/view.jsx b/client/src/pages/ShowChannel/view.jsx index 1bf36d8e..3db913c9 100644 --- a/client/src/pages/ShowChannel/view.jsx +++ b/client/src/pages/ShowChannel/view.jsx @@ -13,17 +13,14 @@ class ShowChannel extends React.Component { - - - - } - /> + > + + + ); } return (