Skip to content

Commit

Permalink
Fix favicon and add icons and manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolalamacchia committed Feb 19, 2020
1 parent 191ac13 commit 3bbc568
Show file tree
Hide file tree
Showing 13 changed files with 192 additions and 14 deletions.
158 changes: 158 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
"scripts": {
"start": "webpack-dev-server --open --mode development --hot",
"format": "prettier --write \"src/**/*.js\"",
"build": "webpack -p --progress && rm dist/main.js"
"build": "rm -rf dist && webpack -p --progress && rm dist/main.js"
},
"devDependencies": {
"@fortawesome/fontawesome-free": "^5.12.0",
"babel-core": "^6.26.3",
"babel-loader": "^7.1.5",
"babel-preset-env": "^1.7.0",
"copy-webpack-plugin": "^5.1.1",
"critters-webpack-plugin": "^2.4.0",
"css-loader": "^3.2.0",
"file-loader": "^5.0.2",
Expand Down
Binary file added public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon.ico
Binary file not shown.
File renamed without changes
Binary file added public/favicon_io.zip
Binary file not shown.
25 changes: 25 additions & 0 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "Powertab",
"name": "Powertab",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type":"image/png"
},
{
"src": "favicon.ico",
"sizes": "48x48 32x32 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#ebdbb2",
"background_color": "#282828"
}
6 changes: 5 additions & 1 deletion src/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
<head>
<title>powertab</title>
<meta charset="utf-8" />
<link rel="icon" type="image/png" href="img/favicon.png" />
<link rel="icon" href="/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/manifest.json" />
<style>
body {
background-color: #282828;
Expand Down
14 changes: 2 additions & 12 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin')
const Critters = require('critters-webpack-plugin')
const CopyPlugin = require('copy-webpack-plugin')

module.exports = {
entry: __dirname + '/src/index.js',
Expand All @@ -27,22 +28,11 @@ module.exports = {
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'fonts/',
},
},
],
},
],
},

plugins: [
new CopyPlugin([{ from: 'public/*', flatten: true }]),
new HtmlWebpackPlugin({
template: './src/template.html',
filename: './index.html',
Expand Down

0 comments on commit 3bbc568

Please sign in to comment.