Mobile UI redesign and size fixes
All checks were successful
Verify and publish Calio container / build-and-push (push) Successful in 28s
All checks were successful
Verify and publish Calio container / build-and-push (push) Successful in 28s
This commit is contained in:
parent
ddea7fc512
commit
b19de6f9ea
17 changed files with 1292 additions and 131 deletions
|
|
@ -7,6 +7,7 @@ const shell = [
|
|||
"/icon.svg",
|
||||
"/manifest.webmanifest",
|
||||
"/icons/apple-touch-icon.png",
|
||||
"/icons/apple-touch-icon-v2.png",
|
||||
"/icons/icon-192.png",
|
||||
"/icons/icon-512.png",
|
||||
"/icons/maskable-512.png",
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ try {
|
|||
"/sw.js",
|
||||
"/manifest.webmanifest",
|
||||
"/icons/apple-touch-icon.png",
|
||||
"/icons/apple-touch-icon-v2.png",
|
||||
])
|
||||
assert.equal((await request(path)).status, 200, path);
|
||||
const html = await (await request("/")).text();
|
||||
|
|
|
|||
|
|
@ -1,21 +1,25 @@
|
|||
Add-Type -AssemblyName System.Drawing
|
||||
$iconRoot = Join-Path $PSScriptRoot '../public/icons'
|
||||
New-Item -ItemType Directory -Force -Path $iconRoot | Out-Null
|
||||
foreach ($iconSpec in @(@('icon-192.png',192), @('icon-512.png',512), @('maskable-512.png',512), @('apple-touch-icon.png',180))) {
|
||||
foreach ($iconSpec in @(@('icon-192.png',192), @('icon-512.png',512), @('maskable-512.png',512), @('apple-touch-icon.png',180), @('apple-touch-icon-v2.png',180))) {
|
||||
$iconSize = [int]$iconSpec[1]
|
||||
$bitmap = New-Object System.Drawing.Bitmap($iconSize,$iconSize)
|
||||
$graphics = [System.Drawing.Graphics]::FromImage($bitmap)
|
||||
$graphics.SmoothingMode = [System.Drawing.Drawing2D.SmoothingMode]::AntiAlias
|
||||
$graphics.ScaleTransform($iconSize / 192.0, $iconSize / 192.0)
|
||||
$graphics.Clear([System.Drawing.ColorTranslator]::FromHtml('#8391ed'))
|
||||
$cream = New-Object System.Drawing.SolidBrush([System.Drawing.ColorTranslator]::FromHtml('#f5f5ef'))
|
||||
$isAppleIcon = $iconSpec[0].StartsWith('apple-touch-icon')
|
||||
$backgroundColor = if ($isAppleIcon) { '#121318' } else { '#8391ed' }
|
||||
$glyphColor = if ($isAppleIcon) { '#f4f4f8' } else { '#f5f5ef' }
|
||||
$leafColor = if ($isAppleIcon) { '#f4f4f8' } else { '#cad1ff' }
|
||||
$graphics.Clear([System.Drawing.ColorTranslator]::FromHtml($backgroundColor))
|
||||
$cream = New-Object System.Drawing.SolidBrush([System.Drawing.ColorTranslator]::FromHtml($glyphColor))
|
||||
$ringPen = New-Object System.Drawing.Pen($cream,8)
|
||||
$graphics.DrawEllipse($ringPen,48,54,96,96)
|
||||
foreach ($point in @(@(72,112),@(95,122),@(118,112),@(96,99))) { $graphics.FillEllipse($cream,($point[0]-8),($point[1]-8),16,16) }
|
||||
$leaf = New-Object System.Drawing.Drawing2D.GraphicsPath
|
||||
$leaf.AddBezier(96,50,94,27,119,26,120,27)
|
||||
$leaf.AddBezier(120,27,120,44,105,51,96,50)
|
||||
$green = New-Object System.Drawing.SolidBrush([System.Drawing.ColorTranslator]::FromHtml('#cad1ff'))
|
||||
$green = New-Object System.Drawing.SolidBrush([System.Drawing.ColorTranslator]::FromHtml($leafColor))
|
||||
$graphics.FillPath($green,$leaf)
|
||||
$bitmap.Save((Join-Path $iconRoot $iconSpec[0]),[System.Drawing.Imaging.ImageFormat]::Png)
|
||||
$graphics.Dispose(); $bitmap.Dispose(); $cream.Dispose(); $ringPen.Dispose(); $leaf.Dispose(); $green.Dispose()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue