From 9fb45c0588306c5901a552fd6cdb0f88e8adc6f8 Mon Sep 17 00:00:00 2001 From: ChaotiCryptidz Date: Tue, 31 May 2022 22:22:46 +0100 Subject: [PATCH] add opengraph info maybe --- src/mainPage.tsx | 2 + src/theme.scss | 3 + webpack-dev.config.js | 141 ++++++++++++++++++++++-------------------- webpack.config.js | 9 ++- 4 files changed, 87 insertions(+), 68 deletions(-) diff --git a/src/mainPage.tsx b/src/mainPage.tsx index 277b7f2..a9e9847 100644 --- a/src/mainPage.tsx +++ b/src/mainPage.tsx @@ -5,6 +5,8 @@ import { FoodExcludeTypes } from "./types"; const FONT_TYPES = [ ["default", "Default (Comic Sans, Comic Neue or Default)"], + ["system", "System Sans Font (as picked by Bootstrap Defaults)"], + ["comicneue", "Comic Neue"], ["opendyslexic", "Open Dyslexic"] ]; diff --git a/src/theme.scss b/src/theme.scss index a9837a2..ab22216 100644 --- a/src/theme.scss +++ b/src/theme.scss @@ -63,6 +63,9 @@ body { html [data-font="default"] { font-family: $fonts-comic-sans-neue; } +html [data-font="system"] { + font-family: $default-fonts; +} html [data-font="comicneue"] { font-family: $fonts-comic-neue; } diff --git a/webpack-dev.config.js b/webpack-dev.config.js index f3f5847..631fbd9 100644 --- a/webpack-dev.config.js +++ b/webpack-dev.config.js @@ -5,73 +5,80 @@ const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { - mode: "production", - cache: false, - entry: './src/main.tsx', - output: { - path: path.resolve(__dirname, 'dist'), - filename: 'bundle.js', - publicPath: '/', - }, - stats: { - colors: true, - timings: true, - }, - performance: { - hints: false, - }, - devtool: "eval-source-map", - plugins: [ - new HtmlWebpackPlugin({ title: "Chaos's Food Likes/Dislikes" }) - ], - devServer: { - historyApiFallback: true, - }, - resolve: { - modules: ['node_modules'], - extensions: ['.tsx', '.ts', '.js', ".mjs"], - alias: { os: false } - }, - - module: { - rules: [ - { - test: /\.(scss)$/, - use: [{ - loader: 'style-loader', - }, { - loader: 'css-loader', - }, { - loader: 'postcss-loader', - options: { - postcssOptions: { - options: function () { - return [ - require('precss'), - require('autoprefixer') - ]; - } - } - } - }, { - loader: 'sass-loader' - }] - }, - { - test: /\.ts(x?)$/, - exclude: /node_modules/, - use: [ - { - loader: 'ts-loader' - } - ] - }, + mode: "production", + cache: false, + entry: './src/main.tsx', + output: { + path: path.resolve(__dirname, 'dist'), + filename: 'bundle.js', + publicPath: '/', + }, + stats: { + colors: true, + timings: true, + }, + performance: { + hints: false, + }, + devtool: "eval-source-map", + plugins: [ + new HtmlWebpackPlugin({ + title: "Chaos's Food Likes/Dislikes", + aseUrl: './', + meta: { + 'og:title': { property: 'og:title', content: "Chaos's Food Likes/Dislikes" }, + 'og:description': { property: 'og:description', content: "A list for all the foods we like, dislike and find unable to eat due to sensory difficulties." }, + }, + }) ], - }, + devServer: { + historyApiFallback: true, + }, + resolve: { + modules: ['node_modules'], + extensions: ['.tsx', '.ts', '.js', ".mjs"], + alias: { os: false } + }, - optimization: { - minimize: false, - minimizer: [ - ], - }, + module: { + rules: [ + { + test: /\.(scss)$/, + use: [{ + loader: 'style-loader', + }, { + loader: 'css-loader', + }, { + loader: 'postcss-loader', + options: { + postcssOptions: { + options: function () { + return [ + require('precss'), + require('autoprefixer') + ]; + } + } + } + }, { + loader: 'sass-loader' + }] + }, + { + test: /\.ts(x?)$/, + exclude: /node_modules/, + use: [ + { + loader: 'ts-loader' + } + ] + }, + ], + }, + + optimization: { + minimize: false, + minimizer: [ + ], + }, }; diff --git a/webpack.config.js b/webpack.config.js index f3ae154..80bb7ce 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -20,7 +20,14 @@ module.exports = { hints: false, }, plugins: [ - new HtmlWebpackPlugin({ title: "Chaos's Food Likes/Dislikes", baseUrl: './' }) + new HtmlWebpackPlugin({ + title: "Chaos's Food Likes/Dislikes", + aseUrl: './', + meta: { + 'og:title': { property: 'og:title', content: "Chaos's Food Likes/Dislikes" }, + 'og:description': { property: 'og:description', content: "A list for all the foods we like, dislike and find unable to eat due to sensory difficulties." }, + }, + }) ], devServer: { historyApiFallback: true,