|
| 1 | +#requires -Module PSSVG |
| 2 | + |
| 3 | +$AssetsPath = $PSScriptRoot | Split-Path | Join-Path -ChildPath "Assets" |
| 4 | + |
| 5 | +if (-not (Test-Path $AssetsPath)) { |
| 6 | + New-Item -ItemType Directory -Path $AssetsPath | Out-Null |
| 7 | +} |
| 8 | + |
| 9 | +$fontName = 'Anta' |
| 10 | +$fontName = 'Heebo' |
| 11 | +$fontName = 'Noto Sans' |
| 12 | +$strokeWidth = '0.5%' |
| 13 | +foreach ($variant in '','Animated') { |
| 14 | + $outputPath = if (-not $variant) { |
| 15 | + Join-Path $assetsPath "PowerShellWeb.svg" |
| 16 | + } else { |
| 17 | + Join-Path $assetsPath "PowerShellWeb-$variant.svg" |
| 18 | + } |
| 19 | + svg -content $( |
| 20 | + $fillParameters = [Ordered]@{ |
| 21 | + Fill = '#4488FF' |
| 22 | + Class = 'foreground-fill' |
| 23 | + } |
| 24 | + |
| 25 | + $strokeParameters = [Ordered]@{ |
| 26 | + Stroke = '#4488FF' |
| 27 | + Class = 'foreground-stroke' |
| 28 | + StrokeWidth = $strokeWidth |
| 29 | + } |
| 30 | + |
| 31 | + $transparentFill = [Ordered]@{Fill='transparent'} |
| 32 | + $animationDuration = [Ordered]@{ |
| 33 | + Dur = "4.2s" |
| 34 | + RepeatCount = "indefinite" |
| 35 | + } |
| 36 | + |
| 37 | + SVG.GoogleFont -FontName $fontName |
| 38 | + |
| 39 | + svg.symbol -Id psChevron -Content @( |
| 40 | + svg.polygon -Points (@( |
| 41 | + "40,20" |
| 42 | + "45,20" |
| 43 | + "60,50" |
| 44 | + "35,80" |
| 45 | + "32.5,80" |
| 46 | + "55,50" |
| 47 | + ) -join ' ') |
| 48 | + ) -ViewBox 100, 100 |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + SVG.circle -CX 50% -Cy 50% -R 42% @transparentFill @strokeParameters -Content @( |
| 53 | + ) |
| 54 | + SVG.ellipse -Cx 50% -Cy 50% -Rx 23% -Ry 42% @transparentFill @strokeParameters -Content @( |
| 55 | + if ($variant -match 'animate') { |
| 56 | + svg.animate -Values '23%;16%;23%' -AttributeName rx @animationDuration |
| 57 | + } |
| 58 | + ) |
| 59 | + SVG.ellipse -Cx 50% -Cy 50% -Rx 16% -Ry 42% @transparentFill @strokeParameters -Content @( |
| 60 | + if ($variant -match 'animate') { |
| 61 | + svg.animate -Values '16%;23%;16%' -AttributeName rx @animationDuration |
| 62 | + } |
| 63 | + ) -Opacity .9 |
| 64 | + SVG.ellipse -Cx 50% -Cy 50% -Rx 15% -Ry 42% @transparentFill @strokeParameters -Content @( |
| 65 | + if ($variant -match 'animate') { |
| 66 | + svg.animate -Values '15%;16%;15%' -AttributeName rx @animationDuration |
| 67 | + } |
| 68 | + ) -Opacity .8 |
| 69 | + SVG.ellipse -Cx 50% -Cy 50% -Rx 42% -Ry 23% @transparentFill @strokeParameters -Content @( |
| 70 | + if ($variant -match 'animate') { |
| 71 | + svg.animate -Values '23%;16%;23%' -AttributeName ry @animationDuration |
| 72 | + } |
| 73 | + ) |
| 74 | + SVG.ellipse -Cx 50% -Cy 50% -Rx 42% -Ry 16% @transparentFill @strokeParameters -Content @( |
| 75 | + if ($variant -match 'animate') { |
| 76 | + svg.animate -Values '16%;23%;16%' -AttributeName ry @animationDuration |
| 77 | + } |
| 78 | + ) -Opacity .9 |
| 79 | + SVG.ellipse -Cx 50% -Cy 50% -Rx 42% -Ry 15% @transparentFill @strokeParameters -Content @( |
| 80 | + if ($variant -match 'animate') { |
| 81 | + svg.animate -Values '15%;16%;15%' -AttributeName ry @animationDuration |
| 82 | + } |
| 83 | + ) -Opacity .8 |
| 84 | + |
| 85 | + svg.use -Href '#psChevron' -Y 29% @fillParameters -Height 42% |
| 86 | + ) -ViewBox 0, 0, 200, 200 -OutputPath $outputPath |
| 87 | +} |
0 commit comments