Add favicons
BIN
assets/favicons/android-chrome-192x192.png
Normal file
After Width: | Height: | Size: 6.9 KiB |
BIN
assets/favicons/android-chrome-512x512.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
assets/favicons/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
12
assets/favicons/browserconfig.xml
Normal 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>
|
BIN
assets/favicons/favicon-16x16.png
Normal file
After Width: | Height: | Size: 877 B |
BIN
assets/favicons/favicon-32x32.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
assets/favicons/favicon.ico
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
assets/favicons/mstile-144x144.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
assets/favicons/mstile-150x150.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
assets/favicons/mstile-310x150.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
assets/favicons/mstile-310x310.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
assets/favicons/mstile-70x70.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
18
assets/favicons/safari-pinned-tab.svg
Normal 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 |
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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")
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|