PWA
This commit is contained in:
31
favicon.svg
Normal file
31
favicon.svg
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||||
|
<svg fill="#000000" height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
viewBox="0 0 512 512" xml:space="preserve">
|
||||||
|
<g transform="translate(1 1)">
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<path d="M449.207-1H255H60.793C26.366-1-1,26.366-1,60.793V255v194.207C-1,483.635,26.366,511,60.793,511H255h194.207
|
||||||
|
C483.635,511,511,483.635,511,449.207V255V60.793C511,26.366,483.635-1,449.207-1z M493.345,60.793v185.379H263.828V16.655
|
||||||
|
h185.379C473.924,16.655,493.345,36.076,493.345,60.793z M16.655,60.793c0-24.717,19.421-44.138,44.138-44.138h185.379v229.517
|
||||||
|
H16.655V60.793z M16.655,449.207V263.828h229.517v229.517H60.793C36.076,493.345,16.655,473.924,16.655,449.207z
|
||||||
|
M493.345,449.207c0,24.717-19.421,44.138-44.138,44.138H263.828V263.828h229.517V449.207z"/>
|
||||||
|
<path d="M184.379,122.586h-44.138V78.448c0-5.297-3.531-8.828-8.828-8.828c-5.297,0-8.828,3.531-8.828,8.828v44.138H78.448
|
||||||
|
c-5.297,0-8.828,3.531-8.828,8.828c0,5.297,3.531,8.828,8.828,8.828h44.138v44.138c0,5.297,3.531,8.828,8.828,8.828
|
||||||
|
c5.297,0,8.828-3.531,8.828-8.828v-44.138h44.138c5.297,0,8.828-3.531,8.828-8.828
|
||||||
|
C193.207,126.117,189.676,122.586,184.379,122.586z"/>
|
||||||
|
<path d="M181.731,328.269c-3.531-3.531-8.828-3.531-12.359,0l-37.959,37.959l-37.959-37.959c-3.531-3.531-8.828-3.531-12.359,0
|
||||||
|
c-3.531,3.531-3.531,8.828,0,12.359l37.959,37.959l-37.959,37.959c-3.531,3.531-3.531,8.828,0,12.359
|
||||||
|
c1.766,1.766,3.531,2.648,6.179,2.648c2.648,0,4.414-0.883,6.179-2.648l37.959-37.959l37.959,37.959
|
||||||
|
c1.766,1.766,3.531,2.648,6.179,2.648c2.648,0,4.414-0.883,6.179-2.648c3.531-3.531,3.531-8.828,0-12.359l-37.959-37.959
|
||||||
|
l37.959-37.959C185.262,337.097,185.262,331.8,181.731,328.269z"/>
|
||||||
|
<path d="M325.621,140.241h105.931c5.297,0,8.828-3.531,8.828-8.828c0-5.297-3.531-8.828-8.828-8.828H325.621
|
||||||
|
c-5.297,0-8.828,3.531-8.828,8.828C316.793,136.71,320.324,140.241,325.621,140.241z"/>
|
||||||
|
<path d="M325.621,413.897h105.931c5.297,0,8.828-3.531,8.828-8.828c0-5.297-3.531-8.828-8.828-8.828H325.621
|
||||||
|
c-5.297,0-8.828,3.531-8.828,8.828C316.793,410.365,320.324,413.897,325.621,413.897z"/>
|
||||||
|
<path d="M325.621,360.931h105.931c5.297,0,8.828-3.531,8.828-8.828c0-5.297-3.531-8.828-8.828-8.828H325.621
|
||||||
|
c-5.297,0-8.828,3.531-8.828,8.828C316.793,357.4,320.324,360.931,325.621,360.931z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.4 KiB |
@@ -4,7 +4,9 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Vite + React + TS</title>
|
<link rel="icon" type="image/svg" href="./favicon.svg" />
|
||||||
|
<link rel="manifest" href="./manifest.webmanifest" />
|
||||||
|
<title>Calculator</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
15
manifest.webmanifest
Normal file
15
manifest.webmanifest
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"name": "Calculator",
|
||||||
|
"short_name": "Calculator",
|
||||||
|
"display": "standalone",
|
||||||
|
"orientation": "portrait",
|
||||||
|
"background_color": "#fff",
|
||||||
|
"scope": "/",
|
||||||
|
"start_url": "/",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/favicon.svg",
|
||||||
|
"sizes": "any"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -47,20 +47,16 @@ const createDecorations = (view: EditorView) => {
|
|||||||
|
|
||||||
const size = result.size()
|
const size = result.size()
|
||||||
|
|
||||||
switch (size.length) {
|
if (size.length === 2) {
|
||||||
case 1:
|
|
||||||
decoration = Decoration.widget({
|
|
||||||
widget: new MathResult(result.toString()),
|
|
||||||
side: 1,
|
|
||||||
})
|
|
||||||
break
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
decoration = Decoration.widget({
|
decoration = Decoration.widget({
|
||||||
widget: new Matrix(result),
|
widget: new Matrix(result),
|
||||||
side: 1,
|
side: 1,
|
||||||
})
|
})
|
||||||
break
|
} else {
|
||||||
|
decoration = Decoration.widget({
|
||||||
|
widget: new MathResult(result.toString()),
|
||||||
|
side: 1,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user