Merge pull request #96 from mirumee/fix/favicon

Add favicons
This commit is contained in:
Dominik Żegleń 2019-08-12 12:01:56 +02:00 committed by GitHub
commit 5a39eebb0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 56 additions and 10 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="/mstile-70x70.png"/>
<square150x150logo src="/mstile-150x150.png"/>
<square310x310logo src="/mstile-310x310.png"/>
<wide310x150logo src="/mstile-310x150.png"/>
<TileColor>#1f1b59</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 877 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/favicons/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -0,0 +1,18 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="513.000000pt" height="513.000000pt" viewBox="0 0 513.000000 513.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.11, written by Peter Selinger 2001-2013
</metadata>
<g transform="translate(0.000000,513.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M430 5123 c-197 -33 -378 -206 -419 -401 -8 -38 -11 -655 -11 -2161
0 -1883 2 -2114 16 -2162 56 -195 221 -349 406 -379 42 -6 765 -10 2158 -10
2313 0 2153 -4 2277 63 74 40 171 136 210 210 67 124 63 -36 63 2293 0 2293 3
2150 -56 2271 -38 76 -151 189 -226 226 -123 59 25 56 -2278 55 -1163 0 -2126
-3 -2140 -5z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 838 B

View file

@ -1,20 +1,33 @@
import React from "react";
import Helmet from "react-helmet";
import appleTouchIcon from "@assets/favicons/apple-touch-icon.png";
import favicon16 from "@assets/favicons/favicon-16x16.png";
import favicon32 from "@assets/favicons/favicon-32x32.png";
import safariPinnedTab from "@assets/favicons/safari-pinned-tab.svg";
import { TypedShopInfoQuery } from "./query";
import { ShopInfo_shop } from "./types/ShopInfo";
type ShopContext = ShopInfo_shop;
export const shopContext = React.createContext<ShopContext>(undefined);
export const ShopContext = React.createContext<ShopContext>(undefined);
export const ShopProvider: React.StatelessComponent<{}> = ({ children }) => (
export const ShopProvider: React.FC = ({ children }) => (
<TypedShopInfoQuery>
{({ data }) => (
<shopContext.Provider value={data ? data.shop : undefined}>
{children}
</shopContext.Provider>
<>
<Helmet>
<link rel="apple-touch-icon" sizes="180x180" href={appleTouchIcon} />
<link rel="icon" type="image/png" sizes="32x32" href={favicon32} />
<link rel="icon" type="image/png" sizes="16x16" href={favicon16} />
<link rel="mask-icon" href={safariPinnedTab} />
</Helmet>
<ShopContext.Provider value={data ? data.shop : undefined}>
{children}
</ShopContext.Provider>
</>
)}
</TypedShopInfoQuery>
);
export const Shop = shopContext.Consumer;
export const Shop = ShopContext.Consumer;
export default Shop;

View file

@ -1,8 +1,8 @@
import { useContext } from "react";
import { shopContext } from "@saleor/components/Shop";
import { ShopContext } from "@saleor/components/Shop";
function useShop() {
return useContext(shopContext);
return useContext(ShopContext);
}
export default useShop;

View file

@ -2,6 +2,8 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>Saleor e-commerce</title>
</head>
<body>

View file

@ -62,7 +62,7 @@ module.exports = (env, argv) => {
entry: {
dashboard: "./src/index.tsx"
},
output: output,
output,
module: {
rules: [
{
@ -85,7 +85,8 @@ module.exports = (env, argv) => {
include: [
resolve("node_modules"),
resolve("assets/fonts"),
resolve("assets/images")
resolve("assets/images"),
resolve("assets/favicons")
]
}
]