diff --git a/src/assets/stylesheets/link.scss b/src/assets/stylesheets/link.scss new file mode 100644 index 0000000000000000000000000000000000000000..452893f41f54ffa545171507fe48f40e8f75d52f --- /dev/null +++ b/src/assets/stylesheets/link.scss @@ -0,0 +1,22 @@ +@import 'shared'; +@import 'loader'; + +* { + box-sizing: border-box; +} + +body { + margin: 0; + padding: 0; + background-color: black; + color: white; +} + +.link-root { + @extend %default-font; + + width: 100%; + height: 100%; + margin: 0; + padding: 0; +} diff --git a/src/link.html b/src/link.html new file mode 100644 index 0000000000000000000000000000000000000000..8f44654c0562b9ce2afd5b3bb95f482fffc213ab --- /dev/null +++ b/src/link.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> + +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="shortcut icon" type="image/png" href="/favicon.ico"/> + <title>Enter Code | Hubs by Mozilla</title> + <link href="https://fonts.googleapis.com/css?family=Zilla+Slab:300,300i,400,400i,700" rel="stylesheet"> +</head> + +<body> + <div id="link-root" class="link-root"></div> +</body> + +</html> diff --git a/src/link.js b/src/link.js new file mode 100644 index 0000000000000000000000000000000000000000..908f7f64d4fadd8f906b09a7874e8e882c93b81d --- /dev/null +++ b/src/link.js @@ -0,0 +1,9 @@ +import "./assets/stylesheets/link.scss"; +import React from "react"; +import ReactDOM from "react-dom"; +import registerTelemetry from "./telemetry"; +import LinkRoot from "./react-components/link-root"; + +registerTelemetry(); + +ReactDOM.render(<LinkRoot />, document.getElementById("link-root")); diff --git a/src/react-components/link-root.js b/src/react-components/link-root.js new file mode 100644 index 0000000000000000000000000000000000000000..e5bc05cccdca3daca0506a4885483f58b8a60d6a --- /dev/null +++ b/src/react-components/link-root.js @@ -0,0 +1,30 @@ +import React, { Component } from "react"; +import PropTypes from "prop-types"; +import { IntlProvider, FormattedMessage, addLocaleData } from "react-intl"; +import en from "react-intl/locale-data/en"; + +import { lang, messages } from "../utils/i18n"; +import classNames from "classnames"; +import styles from "../assets/stylesheets/link.scss"; + +addLocaleData([...en]); + +class LinkRoot extends Component { + static propTypes = { + intl: PropTypes.object + }; + + state = {}; + + componentDidMount() {} + + render() { + return ( + <IntlProvider locale={lang} messages={messages}> + <div className="link">Hello</div> + </IntlProvider> + ); + } +} + +export default LinkRoot; diff --git a/webpack.config.js b/webpack.config.js index b77adbc4c7b14e8a1acd5ed4dfa0ba271c143734..e7ca7d57a0f71e1ee5f4a028324c40f35da56bbd 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -78,6 +78,7 @@ const config = { entry: { index: path.join(__dirname, "src", "index.js"), hub: path.join(__dirname, "src", "hub.js"), + link: path.join(__dirname, "src", "link.js"), "avatar-selector": path.join(__dirname, "src", "avatar-selector.js") }, output: { @@ -194,6 +195,12 @@ const config = { chunks: ["hub"], inject: "head" }), + new HTMLWebpackPlugin({ + filename: "link.html", + template: path.join(__dirname, "src", "link.html"), + chunks: ["link"], + inject: "head" + }), new HTMLWebpackPlugin({ filename: "avatar-selector.html", template: path.join(__dirname, "src", "avatar-selector.html"),