Skip to content

Commit 129539f

Browse files
Merge pull request #37 from PowerShellWeb/Init-GQL
GQL 0.1
2 parents 367aeb1 + 368b2bb commit 129539f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+7738
-1
lines changed

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [StartAutomating]

.github/workflows/BuildGQL.yml

+552
Large diffs are not rendered by default.

Assets/GQL-Animated.svg

+37
Loading

Assets/GQL.svg

+25
Loading

Build/GQL.GitHubAction.PSDevOps.ps1

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#requires -Module PSDevOps
2+
Import-BuildStep -SourcePath (
3+
Join-Path $PSScriptRoot 'GitHub'
4+
) -BuildSystem GitHubAction
5+
6+
$PSScriptRoot | Split-Path | Push-Location
7+
8+
New-GitHubAction -Name "GetGQL" -Description 'Get GraphQL with PowerShell' -Action GQLAction -Icon chevron-right -OutputPath .\action.yml
9+
10+
Pop-Location

Build/GQL.GitHubWorkflow.PSDevOps.ps1

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#requires -Module PSDevOps
2+
Import-BuildStep -SourcePath (
3+
Join-Path $PSScriptRoot 'GitHub'
4+
) -BuildSystem GitHubWorkflow
5+
6+
Push-Location ($PSScriptRoot | Split-Path)
7+
New-GitHubWorkflow -Name "Build GQL" -On Push,
8+
PullRequest,
9+
Demand -Job TestPowerShellOnLinux,
10+
TagReleaseAndPublish, BuildGQL -OutputPath .\.github\workflows\BuildGQL.yml
11+
12+
Pop-Location

Build/GQL.HelpOut.ps1

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#requires -Module HelpOut
2+
3+
#region Load the Module
4+
Push-Location ($PSScriptRoot | Split-Path)
5+
$importedModule = Import-Module .\ -Global -PassThru
6+
#endregion Load the Module
7+
8+
# This will save the MarkdownHelp to the docs folder, and output all of the files created.
9+
Save-MarkdownHelp -PassThru -Module $importedModule.Name -ExcludeCommandType Alias
10+
11+
Pop-Location

Build/GQL.PSSVG.ps1

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
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+
$myName = $MyInvocation.MyCommand.Name -replace '\.PSSVG\.ps1$'
9+
10+
$strokeWidth = '0.5%'
11+
$fontName = 'Noto Sans'
12+
foreach ($variant in '','Animated') {
13+
$outputPath = if (-not $variant) {
14+
Join-Path $assetsPath "$myName.svg"
15+
} else {
16+
Join-Path $assetsPath "$myName-$variant.svg"
17+
}
18+
$symbolDefinition = SVG.symbol -Id 'PowerShellWeb' @(
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 39% @fillParameters -Height 23%
86+
) -ViewBox 0, 0, 200, 200 -TransformOrigin 50%, 50%
87+
)
88+
89+
$shapeSplat = [Ordered]@{
90+
CenterX=(1080/2)
91+
CenterY=(1080/2)
92+
Radius=((1080 * .15) /2)
93+
}
94+
95+
96+
svg -Content @(
97+
SVG.GoogleFont -FontName $fontName
98+
$symbolDefinition
99+
SVG.Use -Href '#PowerShellWeb' -Height 60% -Width 60% -X 20% -Y 20%
100+
# svg.use -Href '#psChevron' -Y 75.75% -X 14% @fillParameters -Height 7.5%
101+
# svg.use -Href '#psChevron' -Y 75.75% -X 14% @fillParameters -Height 7.5% -TransformOrigin '50% 50%' -Transform 'scale(-1 1)'
102+
SVG.Hexagon @shapeSplat -StrokeWidth .5em -Stroke '#4488FF' -Fill 'transparent' -Class 'foreground-stroke'
103+
# SVG.ConvexPolygon -SideCount 3 @shapeSplat -Rotate 180 -StrokeWidth .25em -Stroke '#4488FF' -Fill 'transparent' -Class 'foreground-stroke' -Opacity .3
104+
SVG.text -X 50% -Y 80% -TextAnchor middle -FontFamily $fontName -Style "font-family:`"$fontName`",sans-serif" -FontSize 4.2em -Fill '#4488FF' -Content 'GQL' -Class 'foreground-fill' -DominantBaseline middle
105+
) -OutputPath $outputPath -ViewBox 0, 0, 1080, 1080
106+
}

0 commit comments

Comments
 (0)