@@ -12,6 +12,12 @@ if (-not (Test-Path $docsRoot)) {
1212 $null = New-Item - ItemType Directory - Path $docsRoot
1313}
1414
15+ $fontSettings = [Ordered ]@ {
16+ TextAnchor = ' middle'
17+ AlignmentBaseline = ' middle'
18+ Style = " font-family: 'Abel';"
19+ }
20+
1521$assetFile =
1622
1723= < svg> - ViewBox 400 , 400 @ (
@@ -22,15 +28,11 @@ $assetFile =
2228
2329 )
2430
25- $fontSettings = @ {
26- TextAnchor = ' middle'
27- AlignmentBaseline = ' middle'
28- Style = " font-family: 'Abel';"
29- }
31+
3032 = < svg.ellipse> - StrokeWidth 1.25 - Fill transparent - Cx 50 % - Cy 50 % - Stroke ' #4488ff' - Ry 75 - Rx 50 - Class foreground- stroke
31- = < svg.text> - FontSize 28 - Content 4bit - X 50 % - Y 47.5 % @fontSettings - Class foreground- fill - Fill ' #4488ff'
32- = < svg.text> - FontSize 28 - Content ' ⋅⋅⋅⋅' - X 50 % - Y 52 % @fontSettings - Class foreground- fill - Fill ' #4488ff'
33- = < svg.text> - FontSize 24 - Content ' css' - X 50 % - Y 57.5 % @fontSettings - Class foreground- fill - Fill ' #4488ff'
33+ = < svg.text> - FontSize 28 - Content 4bit - X 50 % - Y 45 % @fontSettings - Class foreground- fill - Fill ' #4488ff'
34+ = < svg.text> - FontSize 28 - Content ' ⋅⋅⋅⋅' - X 50 % - Y 50 % @fontSettings - Class foreground- fill - Fill ' #4488ff'
35+ = < svg.text> - FontSize 28 - Content ' css' - X 50 % - Y 55 % @fontSettings - Class foreground- fill - Fill ' #4488ff'
3436) - OutputPath (Join-Path $assetsRoot .\4bitcss.svg)
3537
3638
@@ -47,9 +49,43 @@ $assetFile =
4749 640 - ((16 - $n - 1 ) * 40 )
4850 )
4951 }
50- ) - OutputPath (Join-Path $docsRoot .\4bitpreview.svg) - Width 100 %
52+ ) - OutputPath (Join-Path $docsRoot .\4bitpreview.svg) - Width 320
53+
54+ $boxSize = [Ordered ]@ {Width = 80 ; Height = 80 }
55+ = < svg> - ViewBox 640 , 160 @ (
56+ foreach ($n in 0 .. 7 ) {
57+ = < svg.rect> - X ($boxSize.Width * $n ) - Y 0 - Class " ansi$n -fill" @boxSize
58+ }
59+ foreach ($n in 8 .. 15 ) {
60+ = < svg.rect> - X ($boxSize.Width * ($n - 8 )) - Y 79 - Class " ansi$n -fill" @boxSize
61+ }
62+ ) - OutputPath (Join-Path $docsRoot .\4bitpreview.svg) - Width 320
63+
64+ $colors = ' Black' , ' Red' , ' Green' , ' Yellow' , ' Blue' , ' Purple' , ' Cyan' , ' White' ,
65+ ' BrightBlack' , ' BrightRed' , ' BrightGreen' , ' BrightYellow' , ' BrightBlue' , ' BrightPurple' , ' BrightCyan' , ' BrightWhite'
66+
67+ = < svg> - ViewBox 640 , 240 @ (
68+ = < svg.defs> @ (
69+ = < svg.style> - Type ' text/css' @'
70+ @import url('https://4bitcss.com/$ColorSchemeFileName.css')
71+ '@
72+ = < svg.style> - Type ' text/css' @'
73+ @import url('https://fonts.googleapis.com/css?family=Abel')
74+ '@
75+ )
76+ = < svg.rect> - Width 640 - Height 80 - X 0 - Y 0 - Class ' background-fill'
77+ = < svg.text> - X 50 % - Y 16.5 % - Class ' foreground-fill' - Content @ (
78+ ' $ColorSchemeName'
79+ ) @fontSettings
80+ foreach ($n in 0 .. 7 ) {
81+ = < svg.rect> - X ($boxSize.Width * $n ) - Y 79 - Class " ansi$n -fill" @boxSize - Fill $ ($colors [$n ])
82+ }
83+ foreach ($n in 8 .. 15 ) {
84+ = < svg.rect> - X ($boxSize.Width * ($n - 8 )) - Y 159 - Class " ansi$n -fill" @boxSize - Fill $ ($colors [$n ])
85+ }
86+ ) - OutputPath (Join-Path $docsRoot .\4bitpreviewtemplate.svg) - Class background- fill
5187
5288$assetFile
53- $assetFile | Copy-Item - Destination (Join-Path $docsRoot .\4bitcss.svg) - PassThru
89+ $assetFile | Copy-Item - Destination (Join-Path $docsRoot .\4bitcss.svg)
5490
5591Pop-Location
0 commit comments