From fd7f1ce99f35378faee052543a972dcaa8e6f055 Mon Sep 17 00:00:00 2001 From: z0ccc Date: Wed, 23 Jun 2021 19:32:35 -0400 Subject: [PATCH] fixed svg --- src/{App.jsx => components/App.js} | 2 +- src/{ => components}/Navbar.js | 5 +- src/{ => components}/Table.js | 0 src/{popup.jsx => components/popup.js} | 2 +- src/images/logo.svg | 17 +++++ src/logo.svg | 91 -------------------------- src/{ => styles}/App.css | 4 +- src/{ => styles}/popup.css | 0 webpack.config.js | 28 ++++---- 9 files changed, 38 insertions(+), 111 deletions(-) rename src/{App.jsx => components/App.js} (87%) rename src/{ => components}/Navbar.js (81%) rename src/{ => components}/Table.js (100%) rename src/{popup.jsx => components/popup.js} (86%) create mode 100644 src/images/logo.svg delete mode 100644 src/logo.svg rename src/{ => styles}/App.css (93%) rename src/{ => styles}/popup.css (100%) diff --git a/src/App.jsx b/src/components/App.js similarity index 87% rename from src/App.jsx rename to src/components/App.js index f479bbe..deb5b5a 100644 --- a/src/App.jsx +++ b/src/components/App.js @@ -1,7 +1,7 @@ import * as React from 'react'; import Navbar from './Navbar'; import Table from './Table'; -import './App.css'; +import '../styles/App.css'; const App = () => (
diff --git a/src/Navbar.js b/src/components/Navbar.js similarity index 81% rename from src/Navbar.js rename to src/components/Navbar.js index 1399067..354711a 100644 --- a/src/Navbar.js +++ b/src/components/Navbar.js @@ -1,10 +1,13 @@ import * as React from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faExternalLinkAlt, faCog } from '@fortawesome/free-solid-svg-icons'; +import Logo from '../images/logo.svg'; const Navbar = () => (
-
+
+ Vytal logo +
diff --git a/src/Table.js b/src/components/Table.js similarity index 100% rename from src/Table.js rename to src/components/Table.js diff --git a/src/popup.jsx b/src/components/popup.js similarity index 86% rename from src/popup.jsx rename to src/components/popup.js index 7bef5b5..5741818 100644 --- a/src/popup.jsx +++ b/src/components/popup.js @@ -2,7 +2,7 @@ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import App from './App'; -import './popup.css'; +import '../styles/popup.css'; const mountNode = document.getElementById('popup'); ReactDOM.render(, mountNode); diff --git a/src/images/logo.svg b/src/images/logo.svg new file mode 100644 index 0000000..f88f548 --- /dev/null +++ b/src/images/logo.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/logo.svg b/src/logo.svg deleted file mode 100644 index 308107c..0000000 --- a/src/logo.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/src/App.css b/src/styles/App.css similarity index 93% rename from src/App.css rename to src/styles/App.css index 093408b..3638b30 100644 --- a/src/App.css +++ b/src/styles/App.css @@ -36,9 +36,7 @@ a:hover { border-bottom: var(--border) solid 1px; } -.logoImage { - background: url('logo.svg') no-repeat; - background-size: 100%; +.logo { width: 100px; height: 24px; } diff --git a/src/popup.css b/src/styles/popup.css similarity index 100% rename from src/popup.css rename to src/styles/popup.css diff --git a/webpack.config.js b/webpack.config.js index 6d9813d..7366162 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,32 +4,32 @@ const CopyPlugin = require("copy-webpack-plugin"); const config = { entry: { - popup: path.join(__dirname, "src/popup.jsx"), + popup: path.join(__dirname, 'src/components/popup.js'), }, - output: { path: path.join(__dirname, "dist"), filename: "[name].js" }, + output: { path: path.join(__dirname, 'dist'), filename: '[name].js' }, module: { rules: [ { test: /\.(js|jsx)$/, - use: "babel-loader", + use: 'babel-loader', exclude: /node_modules/, }, { test: /\.css$/, - use: ["style-loader", "css-loader"], + use: ['style-loader', 'css-loader'], exclude: /\.module\.css$/, }, { test: /\.ts(x)?$/, - loader: "ts-loader", + loader: 'ts-loader', exclude: /node_modules/, }, { test: /\.css$/, use: [ - "style-loader", + 'style-loader', { - loader: "css-loader", + loader: 'css-loader', options: { importLoaders: 1, modules: true, @@ -40,15 +40,15 @@ const config = { }, { test: /\.svg$/, - use: "file-loader", + use: 'file-loader', }, { test: /\.png$/, use: [ { - loader: "url-loader", + loader: 'url-loader', options: { - mimetype: "image/png", + mimetype: 'image/png', }, }, ], @@ -56,17 +56,17 @@ const config = { ], }, resolve: { - extensions: [".js", ".jsx", ".tsx", ".ts"], + extensions: ['.js', '.jsx', '.tsx', '.ts'], alias: { - "react-dom": "@hot-loader/react-dom", + 'react-dom': '@hot-loader/react-dom', }, }, devServer: { - contentBase: "./dist", + contentBase: './dist', }, plugins: [ new CopyPlugin({ - patterns: [{ from: "public", to: "." }], + patterns: [{ from: 'public', to: '.' }], }), ], };