Skip to content

Commit

Permalink
Stubbed out spoke landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
gfodor committed Oct 4, 2018
1 parent 0814f7a commit a10c72d
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/assets/stylesheets/spoke.scss
@@ -0,0 +1,2 @@
@import 'shared';
@import 'loader';
26 changes: 26 additions & 0 deletions src/spoke.html
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta property="og:url" content="https://hubs.mozilla.com/spoke">
<meta property="og:title" content="Spoke by Mozilla">
<meta property="og:description" content="Create custom social VR scenes, right in your browser.">
<meta property="og:image" content="https://hubs.mozilla.com/spoke-preview.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:domain" value="hubs.mozilla.com">
<meta name="twitter:title" value="Spoke by Mozilla">
<meta name="twitter:description" content="Create custom social VR scenes, right in your browser.">
<meta property="twitter:image" content="https://hubs.mozilla.com/spoke-preview.png">
<meta name="twitter:url" value="https://hubs.mozilla.com/spoke">
<link rel="shortcut icon" type="image/png" href="/favicon-spoke.ico">
<title>Spoke by Mozilla</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,700" rel="stylesheet">
</head>

<body>
<div id="ui-root"></div>
</body>

</html>
39 changes: 39 additions & 0 deletions src/spoke.js
@@ -0,0 +1,39 @@
import ReactDOM from "react-dom";
import React, { Component } from "react";
//import PropTypes from "prop-types";
//import classNames from "classnames";
import { IntlProvider, /*FormattedMessage, */ addLocaleData } from "react-intl";
import styles from "./assets/stylesheets/spoke.scss";

//const qs = new URLSearchParams(location.search);

import registerTelemetry from "./telemetry";

registerTelemetry();

import en from "react-intl/locale-data/en";
import { lang, messages } from "./utils/i18n";

addLocaleData([...en]);

class SpokeLanding extends Component {
static propTypes = {};

state = {};

constructor(props) {
super(props);
}

render() {
return (
<IntlProvider locale={lang} messages={messages}>
<div className={styles.ui}>HI</div>
</IntlProvider>
);
}
}

document.addEventListener("DOMContentLoaded", () => {
ReactDOM.render(<SpokeLanding />, document.getElementById("ui-root"));
});
6 changes: 6 additions & 0 deletions webpack.config.js
Expand Up @@ -66,6 +66,7 @@ module.exports = (env, argv) => ({
hub: path.join(__dirname, "src", "hub.js"),
scene: path.join(__dirname, "src", "scene.js"),
link: path.join(__dirname, "src", "link.js"),
spoke: path.join(__dirname, "src", "spoke.js"),
"avatar-selector": path.join(__dirname, "src", "avatar-selector.js")
},
output: {
Expand Down Expand Up @@ -216,6 +217,11 @@ module.exports = (env, argv) => ({
template: path.join(__dirname, "src", "link.html"),
chunks: ["vendor", "link"]
}),
new HTMLWebpackPlugin({
filename: "spoke.html",
template: path.join(__dirname, "src", "spoke.html"),
chunks: ["vendor", "spoke"]
}),
new HTMLWebpackPlugin({
filename: "avatar-selector.html",
template: path.join(__dirname, "src", "avatar-selector.html"),
Expand Down

0 comments on commit a10c72d

Please sign in to comment.