sevgi-showcase 0.95.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +221 -2
  3. data/README.md +10 -17
  4. data/lib/sevgi/showcase/dark.rb +4 -0
  5. data/lib/sevgi/showcase/minitest/script.rb +59 -57
  6. data/lib/sevgi/showcase/minitest/suite.rb +48 -46
  7. data/lib/sevgi/showcase/minitest.rb +8 -1
  8. data/lib/sevgi/showcase/version.rb +1 -1
  9. data/lib/sevgi/showcase.rb +0 -3
  10. data/srv/arc.sevgi +29 -0
  11. data/srv/arc.svg +32 -0
  12. data/srv/arc.yml +4 -0
  13. data/srv/checkers.sevgi +78 -0
  14. data/srv/checkers.svg +118 -0
  15. data/srv/clover.sevgi +19 -0
  16. data/srv/clover.svg +12 -0
  17. data/srv/clover.yml +3 -0
  18. data/srv/copperplate.sevgi +50 -0
  19. data/srv/copperplate.svg +99 -0
  20. data/srv/copperplate.yml +5 -0
  21. data/srv/gear.sevgi +25 -0
  22. data/srv/gear.svg +12 -0
  23. data/srv/gear.yml +2 -0
  24. data/srv/grid.sevgi +23 -0
  25. data/srv/{grid-cells.svg → grid.svg} +14 -1
  26. data/srv/hatch.sevgi +9 -0
  27. data/srv/hatch.svg +30 -0
  28. data/srv/hatch.yml +4 -0
  29. data/srv/heart.sevgi +17 -0
  30. data/srv/heart.svg +9 -0
  31. data/srv/heart.yml +3 -0
  32. data/srv/logo.sevgi +39 -0
  33. data/srv/logo.svg +30 -0
  34. data/srv/logo.yml +4 -0
  35. data/srv/logos.sevgi +34 -0
  36. data/srv/logos.svg +39 -0
  37. data/srv/logos.yml +4 -0
  38. data/srv/meter.sevgi +20 -0
  39. data/srv/meter.svg +19 -0
  40. data/srv/orb.sevgi +14 -0
  41. data/srv/orb.svg +11 -0
  42. data/srv/orb.yml +4 -0
  43. data/srv/pacman.sevgi +18 -0
  44. data/srv/pacman.svg +16 -0
  45. data/srv/pokey.sevgi +14 -0
  46. data/srv/{pacman-pokey.svg → pokey.svg} +1 -3
  47. data/srv/protractor.sevgi +40 -0
  48. data/srv/protractor.svg +605 -0
  49. data/srv/ruler.sevgi +61 -0
  50. data/srv/ruler.svg +445 -0
  51. data/srv/{snow-flake.sevgi → snowflake.sevgi} +3 -3
  52. data/srv/{snow-flake.svg → snowflake.svg} +3 -2
  53. data/srv/snowflake.yml +2 -0
  54. data/srv/squared.sevgi +42 -0
  55. data/srv/squared.svg +71 -0
  56. data/srv/squared.yml +4 -0
  57. data/srv/stars.sevgi +19 -0
  58. data/srv/stars.svg +31 -0
  59. data/srv/stars.yml +3 -0
  60. data/srv/tulips.sevgi +27 -0
  61. data/srv/tulips.svg +20 -0
  62. data/srv/tulips.yml +3 -0
  63. metadata +66 -37
  64. data/lib/sevgi/showcase/minitest/shell.rb +0 -166
  65. data/srv/checker-board.sevgi +0 -96
  66. data/srv/checker-board.svg +0 -117
  67. data/srv/gear-wheel.sevgi +0 -27
  68. data/srv/gear-wheel.svg +0 -12
  69. data/srv/gear-wheel.yml +0 -3
  70. data/srv/grid-cells.sevgi +0 -24
  71. data/srv/heart-mask.sevgi +0 -17
  72. data/srv/heart-mask.svg +0 -8
  73. data/srv/heart-mask.yml +0 -3
  74. data/srv/meter-face.sevgi +0 -20
  75. data/srv/meter-face.svg +0 -13
  76. data/srv/pacman-pokey.sevgi +0 -17
  77. data/srv/pacman-single.sevgi +0 -17
  78. data/srv/pacman-single.svg +0 -14
  79. data/srv/ruler-hline.sevgi +0 -55
  80. data/srv/ruler-hline.svg +0 -443
  81. data/srv/ruler-line.sevgi +0 -52
  82. data/srv/ruler-line.svg +0 -443
  83. data/srv/snow-flake.yml +0 -1
  84. /data/srv/{checker-board.yml → checkers.yml} +0 -0
  85. /data/srv/{grid-cells.yml → grid.yml} +0 -0
  86. /data/srv/{meter-face.yml → meter.yml} +0 -0
  87. /data/srv/{pacman-pokey.yml → pacman.yml} +0 -0
  88. /data/srv/{pacman-single.yml → pokey.yml} +0 -0
  89. /data/srv/{ruler-hline.yml → protractor.yml} +0 -0
  90. /data/srv/{ruler-line.yml → ruler.yml} +0 -0
data/srv/arc.yml ADDED
@@ -0,0 +1,4 @@
1
+ dark:
2
+ black: white
3
+ purple: "#e5c39c"
4
+ slategray: silver
@@ -0,0 +1,78 @@
1
+ #!/usr/bin/env -S ruby -S sevgi
2
+ # frozen_string_literal: true
3
+
4
+ module CheckerBoard
5
+ extend SVG::Module
6
+
7
+ BOARD_MARGIN = 50
8
+ CELL_SIZE = 100
9
+ PIECE_SIZE = 80
10
+ SIZE = (CELL_SIZE * 8) + (BOARD_MARGIN * 2)
11
+
12
+ STYLE = {
13
+ ".board-frame" => { fill: "#d1bfa7", stroke: "#6a3f2b" },
14
+ ".inner-frame" => {
15
+ fill: "#6a3f2b",
16
+ stroke: "#6a3f2b",
17
+ "stroke-width": (BOARD_MARGIN * 0.7).round
18
+ },
19
+ ".cell" => { stroke: "white", "stroke-width": 1 },
20
+ ".light.cell" => { fill: "#d4a76f" },
21
+ ".dark.cell" => { fill: "#6a3f2b" },
22
+ ".piece" => {
23
+ filter: "drop-shadow(8px 8px 8px rgba(0, 0, 0, 0.5))",
24
+ stroke: "none"
25
+ },
26
+ ".light.piece" => { fill: "#f5f5f5" },
27
+ ".dark.piece" => { fill: "#333" }
28
+ }.freeze
29
+
30
+ base do # Draw the board.
31
+ css STYLE
32
+
33
+ square class: "board-frame", length: SIZE
34
+ square class: "inner-frame", x: BOARD_MARGIN, y: BOARD_MARGIN,
35
+ length: SIZE - (BOARD_MARGIN * 2)
36
+
37
+ 8.times do |row|
38
+ 8.times do |col|
39
+ square class: "#{(row + col).even? ? "dark" : "light"} cell",
40
+ x: (col * CELL_SIZE) + BOARD_MARGIN,
41
+ y: (row * CELL_SIZE) + BOARD_MARGIN,
42
+ length: CELL_SIZE
43
+ end
44
+ end
45
+ end
46
+
47
+ def call(placement)
48
+ center = BOARD_MARGIN + (CELL_SIZE / 2)
49
+
50
+ placement.each do |tone, rows|
51
+ rows.each do |row, cols|
52
+ cols.each do |col|
53
+ circle class: "#{tone} piece",
54
+ cx: (col * CELL_SIZE) + center,
55
+ cy: (row * CELL_SIZE) + center,
56
+ r: PIECE_SIZE / 2
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
62
+
63
+ placement = {
64
+ dark: {
65
+ 0 => [1, 3, 5, 7],
66
+ 1 => [0, 2, 4, 6]
67
+ },
68
+ light: {
69
+ 6 => [1, 3, 5, 7],
70
+ 7 => [0, 2, 4, 6]
71
+ }
72
+ }
73
+
74
+ SVG width: CheckerBoard::SIZE,
75
+ height: CheckerBoard::SIZE,
76
+ viewBox: "0 0 #{CheckerBoard::SIZE} #{CheckerBoard::SIZE}" do
77
+ Call CheckerBoard, placement
78
+ end.Save
data/srv/checkers.svg ADDED
@@ -0,0 +1,118 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="900" height="900" viewBox="0 0 900 900">
3
+ <style type="text/css">
4
+ <![CDATA[
5
+ .board-frame {
6
+ fill: #d1bfa7;
7
+ stroke: #6a3f2b;
8
+ }
9
+ .inner-frame {
10
+ fill: #6a3f2b;
11
+ stroke: #6a3f2b;
12
+ stroke-width: 35;
13
+ }
14
+ .cell {
15
+ stroke: white;
16
+ stroke-width: 1;
17
+ }
18
+ .light.cell {
19
+ fill: #d4a76f;
20
+ }
21
+ .dark.cell {
22
+ fill: #6a3f2b;
23
+ }
24
+ .piece {
25
+ filter: drop-shadow(8px 8px 8px rgba(0, 0, 0, 0.5));
26
+ stroke: none;
27
+ }
28
+ .light.piece {
29
+ fill: #f5f5f5;
30
+ }
31
+ .dark.piece {
32
+ fill: #333;
33
+ }
34
+ ]]>
35
+ </style>
36
+ <rect width="900" height="900" class="board-frame"/>
37
+ <rect width="800" height="800" class="inner-frame" x="50" y="50"/>
38
+ <rect width="100" height="100" class="dark cell" x="50" y="50"/>
39
+ <rect width="100" height="100" class="light cell" x="150" y="50"/>
40
+ <rect width="100" height="100" class="dark cell" x="250" y="50"/>
41
+ <rect width="100" height="100" class="light cell" x="350" y="50"/>
42
+ <rect width="100" height="100" class="dark cell" x="450" y="50"/>
43
+ <rect width="100" height="100" class="light cell" x="550" y="50"/>
44
+ <rect width="100" height="100" class="dark cell" x="650" y="50"/>
45
+ <rect width="100" height="100" class="light cell" x="750" y="50"/>
46
+ <rect width="100" height="100" class="light cell" x="50" y="150"/>
47
+ <rect width="100" height="100" class="dark cell" x="150" y="150"/>
48
+ <rect width="100" height="100" class="light cell" x="250" y="150"/>
49
+ <rect width="100" height="100" class="dark cell" x="350" y="150"/>
50
+ <rect width="100" height="100" class="light cell" x="450" y="150"/>
51
+ <rect width="100" height="100" class="dark cell" x="550" y="150"/>
52
+ <rect width="100" height="100" class="light cell" x="650" y="150"/>
53
+ <rect width="100" height="100" class="dark cell" x="750" y="150"/>
54
+ <rect width="100" height="100" class="dark cell" x="50" y="250"/>
55
+ <rect width="100" height="100" class="light cell" x="150" y="250"/>
56
+ <rect width="100" height="100" class="dark cell" x="250" y="250"/>
57
+ <rect width="100" height="100" class="light cell" x="350" y="250"/>
58
+ <rect width="100" height="100" class="dark cell" x="450" y="250"/>
59
+ <rect width="100" height="100" class="light cell" x="550" y="250"/>
60
+ <rect width="100" height="100" class="dark cell" x="650" y="250"/>
61
+ <rect width="100" height="100" class="light cell" x="750" y="250"/>
62
+ <rect width="100" height="100" class="light cell" x="50" y="350"/>
63
+ <rect width="100" height="100" class="dark cell" x="150" y="350"/>
64
+ <rect width="100" height="100" class="light cell" x="250" y="350"/>
65
+ <rect width="100" height="100" class="dark cell" x="350" y="350"/>
66
+ <rect width="100" height="100" class="light cell" x="450" y="350"/>
67
+ <rect width="100" height="100" class="dark cell" x="550" y="350"/>
68
+ <rect width="100" height="100" class="light cell" x="650" y="350"/>
69
+ <rect width="100" height="100" class="dark cell" x="750" y="350"/>
70
+ <rect width="100" height="100" class="dark cell" x="50" y="450"/>
71
+ <rect width="100" height="100" class="light cell" x="150" y="450"/>
72
+ <rect width="100" height="100" class="dark cell" x="250" y="450"/>
73
+ <rect width="100" height="100" class="light cell" x="350" y="450"/>
74
+ <rect width="100" height="100" class="dark cell" x="450" y="450"/>
75
+ <rect width="100" height="100" class="light cell" x="550" y="450"/>
76
+ <rect width="100" height="100" class="dark cell" x="650" y="450"/>
77
+ <rect width="100" height="100" class="light cell" x="750" y="450"/>
78
+ <rect width="100" height="100" class="light cell" x="50" y="550"/>
79
+ <rect width="100" height="100" class="dark cell" x="150" y="550"/>
80
+ <rect width="100" height="100" class="light cell" x="250" y="550"/>
81
+ <rect width="100" height="100" class="dark cell" x="350" y="550"/>
82
+ <rect width="100" height="100" class="light cell" x="450" y="550"/>
83
+ <rect width="100" height="100" class="dark cell" x="550" y="550"/>
84
+ <rect width="100" height="100" class="light cell" x="650" y="550"/>
85
+ <rect width="100" height="100" class="dark cell" x="750" y="550"/>
86
+ <rect width="100" height="100" class="dark cell" x="50" y="650"/>
87
+ <rect width="100" height="100" class="light cell" x="150" y="650"/>
88
+ <rect width="100" height="100" class="dark cell" x="250" y="650"/>
89
+ <rect width="100" height="100" class="light cell" x="350" y="650"/>
90
+ <rect width="100" height="100" class="dark cell" x="450" y="650"/>
91
+ <rect width="100" height="100" class="light cell" x="550" y="650"/>
92
+ <rect width="100" height="100" class="dark cell" x="650" y="650"/>
93
+ <rect width="100" height="100" class="light cell" x="750" y="650"/>
94
+ <rect width="100" height="100" class="light cell" x="50" y="750"/>
95
+ <rect width="100" height="100" class="dark cell" x="150" y="750"/>
96
+ <rect width="100" height="100" class="light cell" x="250" y="750"/>
97
+ <rect width="100" height="100" class="dark cell" x="350" y="750"/>
98
+ <rect width="100" height="100" class="light cell" x="450" y="750"/>
99
+ <rect width="100" height="100" class="dark cell" x="550" y="750"/>
100
+ <rect width="100" height="100" class="light cell" x="650" y="750"/>
101
+ <rect width="100" height="100" class="dark cell" x="750" y="750"/>
102
+ <circle class="dark piece" cx="200" cy="100" r="40"/>
103
+ <circle class="dark piece" cx="400" cy="100" r="40"/>
104
+ <circle class="dark piece" cx="600" cy="100" r="40"/>
105
+ <circle class="dark piece" cx="800" cy="100" r="40"/>
106
+ <circle class="dark piece" cx="100" cy="200" r="40"/>
107
+ <circle class="dark piece" cx="300" cy="200" r="40"/>
108
+ <circle class="dark piece" cx="500" cy="200" r="40"/>
109
+ <circle class="dark piece" cx="700" cy="200" r="40"/>
110
+ <circle class="light piece" cx="200" cy="700" r="40"/>
111
+ <circle class="light piece" cx="400" cy="700" r="40"/>
112
+ <circle class="light piece" cx="600" cy="700" r="40"/>
113
+ <circle class="light piece" cx="800" cy="700" r="40"/>
114
+ <circle class="light piece" cx="100" cy="800" r="40"/>
115
+ <circle class="light piece" cx="300" cy="800" r="40"/>
116
+ <circle class="light piece" cx="500" cy="800" r="40"/>
117
+ <circle class="light piece" cx="700" cy="800" r="40"/>
118
+ </svg>
data/srv/clover.sevgi ADDED
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env -S ruby -S sevgi
2
+ # frozen_string_literal: true
3
+
4
+ CLOVER = <<~PATH
5
+ m 0,10 c 5.53264,0 10,-4.479747 10,-10 -5.52589,0 -10,4.488702 -10,10
6
+ PATH
7
+
8
+ CENTER = 13
9
+ SIZE = 26
10
+
11
+ SVG width: SIZE, height: SIZE do
12
+ rect width: SIZE, height: SIZE, rx: 0.75, fill: "white"
13
+ defs { path id: "Clover", d: CLOVER, fill: "purple" }
14
+
15
+ 4.times do |quarter|
16
+ leaf = use href: "#Clover", x: CENTER, y: CENTER - 10
17
+ leaf.Rotate quarter * 90, CENTER, CENTER
18
+ end
19
+ end.Save
data/srv/clover.svg ADDED
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="26" height="26">
3
+ <rect width="26" height="26" rx="0.75" fill="white"/>
4
+ <defs>
5
+ <path id="Clover" d="m 0,10 c 5.53264,0 10,-4.479747 10,-10 -5.52589,0 -10,4.488702 -10,10
6
+ " fill="purple"/>
7
+ </defs>
8
+ <use href="#Clover" x="13" y="3"/>
9
+ <use href="#Clover" x="13" y="3" transform="rotate(90, 13, 13)"/>
10
+ <use href="#Clover" x="13" y="3" transform="rotate(180, 13, 13)"/>
11
+ <use href="#Clover" x="13" y="3" transform="rotate(270, 13, 13)"/>
12
+ </svg>
data/srv/clover.yml ADDED
@@ -0,0 +1,3 @@
1
+ dark:
2
+ purple: "#e5c39c"
3
+ white: "#222222"
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env -S ruby -S sevgi
2
+ # frozen_string_literal: true
3
+
4
+ COLS = 15
5
+ MULTIPLE = 5
6
+ ROWS = 10
7
+ SLANT = 55
8
+ UNIT = 6
9
+
10
+ canvas = SVG.Canvas width: COLS * UNIT, height: ROWS * UNIT
11
+ grid = Grid canvas, unit: UNIT, multiple: MULTIPLE
12
+
13
+ module Guidesheet
14
+ extend SVG::Module
15
+
16
+ FRAME = 0.6
17
+
18
+ STYLE = {
19
+ ".angle" => { fill: "none", stroke: "green", "stroke-width": 0.12 },
20
+ ".frame" => { fill: "none", stroke: "blue", "stroke-width": FRAME },
21
+ ".major" => { fill: "none", stroke: "blue", "stroke-width": 0.4 },
22
+ ".minor" => { fill: "none", stroke: "magenta", "stroke-width": 0.12 }
23
+ }.freeze
24
+
25
+ base { css STYLE }
26
+
27
+ def call(grid)
28
+ layer id: "Slants" do
29
+ TileY "slant-row", n: grid.y.n, d: grid.y.u do
30
+ Hatch grid.rowbox, angle: -SLANT, step: grid.x.su, class: %w[angle slant]
31
+ end
32
+ end
33
+
34
+ layer id: "Squares" do
35
+ Draw grid.x.minor.lines, class: %w[rule minor horizontal]
36
+ Draw grid.y.minor.lines, class: %w[rule minor vertical]
37
+ Draw grid.x.major.lines, class: %w[rule major horizontal]
38
+ Draw grid.y.major.lines, class: %w[rule major vertical]
39
+ end
40
+
41
+ rect x: FRAME / 2, y: FRAME / 2,
42
+ width: grid.width - FRAME, height: grid.height - FRAME,
43
+ class: %w[frame rule]
44
+ end
45
+ end
46
+
47
+ SVG :inkscape, canvas, "shape-rendering": "geometricPrecision" do
48
+ rect width: "100%", height: "100%", fill: "white"
49
+ Layer! Guidesheet, grid, attributes: { id: "Guides" }
50
+ end.Save
@@ -0,0 +1,99 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ xmlns:_="http://sevgi.roktas.dev"
5
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
6
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
7
+ shape-rendering="geometricPrecision"
8
+ width="90.0mm"
9
+ height="60.0mm"
10
+ viewBox="0 0 90 60"
11
+ >
12
+ <rect width="100%" height="100%" fill="white"/>
13
+ <g id="Guides" inkscape:groupmode="layer" sodipodi:insensitive="true">
14
+ <style type="text/css">
15
+ <![CDATA[
16
+ .angle {
17
+ fill: none;
18
+ stroke: green;
19
+ stroke-width: 0.12;
20
+ }
21
+ .frame {
22
+ fill: none;
23
+ stroke: blue;
24
+ stroke-width: 0.6;
25
+ }
26
+ .major {
27
+ fill: none;
28
+ stroke: blue;
29
+ stroke-width: 0.4;
30
+ }
31
+ .minor {
32
+ fill: none;
33
+ stroke: magenta;
34
+ stroke-width: 0.12;
35
+ }
36
+ ]]>
37
+ </style>
38
+ <g id="Slants" inkscape:groupmode="layer">
39
+ <defs>
40
+ <g id="slant-row">
41
+ <path d="M 90 28.376891 L 88.863487 30" class="angle slant"/>
42
+ <path d="M 90 17.91621 L 81.538839 30" class="angle slant"/>
43
+ <path d="M 90 7.455529 L 74.214192 30" class="angle slant"/>
44
+ <path d="M 87.89577 0 L 66.889544 30" class="angle slant"/>
45
+ <path d="M 80.571123 0 L 59.564897 30" class="angle slant"/>
46
+ <path d="M 73.246475 0 L 52.240249 30" class="angle slant"/>
47
+ <path d="M 65.921828 0 L 44.915602 30" class="angle slant"/>
48
+ <path d="M 58.59718 0 L 37.590954 30" class="angle slant"/>
49
+ <path d="M 51.272533 0 L 30.266307 30" class="angle slant"/>
50
+ <path d="M 43.947885 0 L 22.941659 30" class="angle slant"/>
51
+ <path d="M 36.623238 0 L 15.617012 30" class="angle slant"/>
52
+ <path d="M 29.29859 0 L 8.292364 30" class="angle slant"/>
53
+ <path d="M 21.973943 0 L 0.967716 30" class="angle slant"/>
54
+ <path d="M 14.649295 0 L 0 20.921362" class="angle slant"/>
55
+ <path d="M 7.324648 0 L 0 10.460681" class="angle slant"/>
56
+ </g>
57
+ </defs>
58
+ <use id="slant-row-1" href="#slant-row" class="tile-row-1 tile-row-first"/>
59
+ <use id="slant-row-2" href="#slant-row" class="tile-row-2 tile-row-last" y="30"/>
60
+ </g>
61
+ <g id="Squares" inkscape:groupmode="layer">
62
+ <path d="M 0 0 L 90 0" class="rule minor horizontal"/>
63
+ <path d="M 0 6 L 90 6" class="rule minor horizontal"/>
64
+ <path d="M 0 12 L 90 12" class="rule minor horizontal"/>
65
+ <path d="M 0 18 L 90 18" class="rule minor horizontal"/>
66
+ <path d="M 0 24 L 90 24" class="rule minor horizontal"/>
67
+ <path d="M 0 30 L 90 30" class="rule minor horizontal"/>
68
+ <path d="M 0 36 L 90 36" class="rule minor horizontal"/>
69
+ <path d="M 0 42 L 90 42" class="rule minor horizontal"/>
70
+ <path d="M 0 48 L 90 48" class="rule minor horizontal"/>
71
+ <path d="M 0 54 L 90 54" class="rule minor horizontal"/>
72
+ <path d="M 0 60 L 90 60" class="rule minor horizontal"/>
73
+ <path d="M 0 0 L 0 60" class="rule minor vertical"/>
74
+ <path d="M 6 0 L 6 60" class="rule minor vertical"/>
75
+ <path d="M 12 0 L 12 60" class="rule minor vertical"/>
76
+ <path d="M 18 0 L 18 60" class="rule minor vertical"/>
77
+ <path d="M 24 0 L 24 60" class="rule minor vertical"/>
78
+ <path d="M 30 0 L 30 60" class="rule minor vertical"/>
79
+ <path d="M 36 0 L 36 60" class="rule minor vertical"/>
80
+ <path d="M 42 0 L 42 60" class="rule minor vertical"/>
81
+ <path d="M 48 0 L 48 60" class="rule minor vertical"/>
82
+ <path d="M 54 0 L 54 60" class="rule minor vertical"/>
83
+ <path d="M 60 0 L 60 60" class="rule minor vertical"/>
84
+ <path d="M 66 0 L 66 60" class="rule minor vertical"/>
85
+ <path d="M 72 0 L 72 60" class="rule minor vertical"/>
86
+ <path d="M 78 0 L 78 60" class="rule minor vertical"/>
87
+ <path d="M 84 0 L 84 60" class="rule minor vertical"/>
88
+ <path d="M 90 0 L 90 60" class="rule minor vertical"/>
89
+ <path d="M 0 0 L 90 0" class="rule major horizontal"/>
90
+ <path d="M 0 30 L 90 30" class="rule major horizontal"/>
91
+ <path d="M 0 60 L 90 60" class="rule major horizontal"/>
92
+ <path d="M 0 0 L 0 60" class="rule major vertical"/>
93
+ <path d="M 30 0 L 30 60" class="rule major vertical"/>
94
+ <path d="M 60 0 L 60 60" class="rule major vertical"/>
95
+ <path d="M 90 0 L 90 60" class="rule major vertical"/>
96
+ </g>
97
+ <rect x="0.3" y="0.3" width="89.4" height="59.4" class="frame rule"/>
98
+ </g>
99
+ </svg>
@@ -0,0 +1,5 @@
1
+ dark:
2
+ blue: "#60a5fa"
3
+ green: "#4ade80"
4
+ magenta: "#f472b6"
5
+ white: "#222222"
data/srv/gear.sevgi ADDED
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env -S ruby -S sevgi
2
+ # frozen_string_literal: true
3
+
4
+ STYLE = {
5
+ fill: "purple",
6
+ mask: "url(#hole)",
7
+ stroke: "none"
8
+ }.freeze
9
+
10
+ SVG width: 100, height: 100, viewBox: "0 0 100 100" do
11
+ mask id: "hole",
12
+ maskUnits: "userSpaceOnUse",
13
+ maskContentUnits: "userSpaceOnUse",
14
+ x: 0, y: 0, width: 100, height: 100 do
15
+ square length: 100, fill: "white"
16
+ circle cx: 50, cy: 50, r: 15, fill: "black"
17
+ end
18
+
19
+ circle cx: 50, cy: 50, r: 30, **STYLE
20
+
21
+ [0, 45, 90, 135].each do |angle|
22
+ tooth = rect x: 45, y: 10, width: 10, height: 80, **STYLE
23
+ tooth.Rotate angle, 50, 50
24
+ end
25
+ end.Save
data/srv/gear.svg ADDED
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
3
+ <mask id="hole" maskUnits="userSpaceOnUse" maskContentUnits="userSpaceOnUse" x="0" y="0" width="100" height="100">
4
+ <rect width="100" height="100" fill="white"/>
5
+ <circle cx="50" cy="50" r="15" fill="black"/>
6
+ </mask>
7
+ <circle cx="50" cy="50" r="30" fill="purple" mask="url(#hole)" stroke="none"/>
8
+ <rect x="45" y="10" width="10" height="80" fill="purple" mask="url(#hole)" stroke="none"/>
9
+ <rect x="45" y="10" width="10" height="80" fill="purple" mask="url(#hole)" stroke="none" transform="rotate(45, 50, 50)"/>
10
+ <rect x="45" y="10" width="10" height="80" fill="purple" mask="url(#hole)" stroke="none" transform="rotate(90, 50, 50)"/>
11
+ <rect x="45" y="10" width="10" height="80" fill="purple" mask="url(#hole)" stroke="none" transform="rotate(135, 50, 50)"/>
12
+ </svg>
data/srv/gear.yml ADDED
@@ -0,0 +1,2 @@
1
+ dark:
2
+ purple: "#e5c39c"
data/srv/grid.sevgi ADDED
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env -S ruby -S sevgi
2
+ # frozen_string_literal: true
3
+
4
+ SIZE = 20
5
+ COLORS = %w[#FF6961 #77DD77 #FFD700].freeze
6
+ COLS = 9
7
+ ROWS = 4
8
+
9
+ SVG width: COLS * SIZE,
10
+ height: ROWS * SIZE,
11
+ viewBox: "0 0 #{COLS * SIZE} #{ROWS * SIZE}" do
12
+ css ".cell" => { stroke: "white" }
13
+
14
+ COLS.times do |col|
15
+ ROWS.times do |row|
16
+ rect class: "cell",
17
+ x: col * SIZE, y: row * SIZE,
18
+ width: SIZE, height: SIZE,
19
+ rx: (SIZE * 0.1).round,
20
+ fill: COLORS[(col + row) % COLORS.length]
21
+ end
22
+ end
23
+ end.Save
@@ -1,4 +1,5 @@
1
- <svg width="160" height="60" viewBox="0 0 160 60">
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="180" height="80" viewBox="0 0 180 80">
2
3
  <style type="text/css">
3
4
  <![CDATA[
4
5
  .cell {
@@ -9,25 +10,37 @@
9
10
  <rect class="cell" x="0" y="0" width="20" height="20" rx="2" fill="#FF6961"/>
10
11
  <rect class="cell" x="0" y="20" width="20" height="20" rx="2" fill="#77DD77"/>
11
12
  <rect class="cell" x="0" y="40" width="20" height="20" rx="2" fill="#FFD700"/>
13
+ <rect class="cell" x="0" y="60" width="20" height="20" rx="2" fill="#FF6961"/>
12
14
  <rect class="cell" x="20" y="0" width="20" height="20" rx="2" fill="#77DD77"/>
13
15
  <rect class="cell" x="20" y="20" width="20" height="20" rx="2" fill="#FFD700"/>
14
16
  <rect class="cell" x="20" y="40" width="20" height="20" rx="2" fill="#FF6961"/>
17
+ <rect class="cell" x="20" y="60" width="20" height="20" rx="2" fill="#77DD77"/>
15
18
  <rect class="cell" x="40" y="0" width="20" height="20" rx="2" fill="#FFD700"/>
16
19
  <rect class="cell" x="40" y="20" width="20" height="20" rx="2" fill="#FF6961"/>
17
20
  <rect class="cell" x="40" y="40" width="20" height="20" rx="2" fill="#77DD77"/>
21
+ <rect class="cell" x="40" y="60" width="20" height="20" rx="2" fill="#FFD700"/>
18
22
  <rect class="cell" x="60" y="0" width="20" height="20" rx="2" fill="#FF6961"/>
19
23
  <rect class="cell" x="60" y="20" width="20" height="20" rx="2" fill="#77DD77"/>
20
24
  <rect class="cell" x="60" y="40" width="20" height="20" rx="2" fill="#FFD700"/>
25
+ <rect class="cell" x="60" y="60" width="20" height="20" rx="2" fill="#FF6961"/>
21
26
  <rect class="cell" x="80" y="0" width="20" height="20" rx="2" fill="#77DD77"/>
22
27
  <rect class="cell" x="80" y="20" width="20" height="20" rx="2" fill="#FFD700"/>
23
28
  <rect class="cell" x="80" y="40" width="20" height="20" rx="2" fill="#FF6961"/>
29
+ <rect class="cell" x="80" y="60" width="20" height="20" rx="2" fill="#77DD77"/>
24
30
  <rect class="cell" x="100" y="0" width="20" height="20" rx="2" fill="#FFD700"/>
25
31
  <rect class="cell" x="100" y="20" width="20" height="20" rx="2" fill="#FF6961"/>
26
32
  <rect class="cell" x="100" y="40" width="20" height="20" rx="2" fill="#77DD77"/>
33
+ <rect class="cell" x="100" y="60" width="20" height="20" rx="2" fill="#FFD700"/>
27
34
  <rect class="cell" x="120" y="0" width="20" height="20" rx="2" fill="#FF6961"/>
28
35
  <rect class="cell" x="120" y="20" width="20" height="20" rx="2" fill="#77DD77"/>
29
36
  <rect class="cell" x="120" y="40" width="20" height="20" rx="2" fill="#FFD700"/>
37
+ <rect class="cell" x="120" y="60" width="20" height="20" rx="2" fill="#FF6961"/>
30
38
  <rect class="cell" x="140" y="0" width="20" height="20" rx="2" fill="#77DD77"/>
31
39
  <rect class="cell" x="140" y="20" width="20" height="20" rx="2" fill="#FFD700"/>
32
40
  <rect class="cell" x="140" y="40" width="20" height="20" rx="2" fill="#FF6961"/>
41
+ <rect class="cell" x="140" y="60" width="20" height="20" rx="2" fill="#77DD77"/>
42
+ <rect class="cell" x="160" y="0" width="20" height="20" rx="2" fill="#FFD700"/>
43
+ <rect class="cell" x="160" y="20" width="20" height="20" rx="2" fill="#FF6961"/>
44
+ <rect class="cell" x="160" y="40" width="20" height="20" rx="2" fill="#77DD77"/>
45
+ <rect class="cell" x="160" y="60" width="20" height="20" rx="2" fill="#FFD700"/>
33
46
  </svg>
data/srv/hatch.sevgi ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env -S ruby -S sevgi
2
+ # frozen_string_literal: true
3
+
4
+ SVG :inkscape, width: 150, height: 100, viewBox: "0 0 150 100" do
5
+ ellipse = Geometry::Ellipse[70, 40, position: [75, 50]]
6
+
7
+ Draw ellipse, fill: "#f8e6f8", stroke: "blue", "stroke-width": 1.5
8
+ Hatch ellipse, angle: 35, step: 6, stroke: "purple", "stroke-width": 0.5
9
+ end.Save
data/srv/hatch.svg ADDED
@@ -0,0 +1,30 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ xmlns:_="http://sevgi.roktas.dev"
5
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
6
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
7
+ shape-rendering="crispEdges"
8
+ width="150"
9
+ height="100"
10
+ viewBox="0 0 150 100"
11
+ >
12
+ <ellipse cx="75.0" cy="50.0" rx="70.0" ry="40.0" fill="#f8e6f8" stroke="blue" stroke-width="1.5"/>
13
+ <path d="M 8.083983 61.742081 L 41.452937 85.107274" stroke="purple" stroke-width="0.5"/>
14
+ <path d="M 5.120097 52.342098 L 56.974708 88.651087" stroke="purple" stroke-width="0.5"/>
15
+ <path d="M 5.489812 45.276328 L 69.162877 89.860688" stroke="purple" stroke-width="0.5"/>
16
+ <path d="M 7.516638 39.370879 L 79.693937 89.909968" stroke="purple" stroke-width="0.5"/>
17
+ <path d="M 10.657929 34.245787 L 89.110531 89.17889" stroke="purple" stroke-width="0.5"/>
18
+ <path d="M 14.660149 29.723524 L 97.666196 87.844984" stroke="purple" stroke-width="0.5"/>
19
+ <path d="M 19.386506 25.708308 L 105.497723 86.004031" stroke="purple" stroke-width="0.5"/>
20
+ <path d="M 24.76021 22.146368 L 112.681905 83.709801" stroke="purple" stroke-width="0.5"/>
21
+ <path d="M 30.741521 19.009879 L 119.258479 80.990121" stroke="purple" stroke-width="0.5"/>
22
+ <path d="M 37.318095 16.290199 L 125.23979 77.853632" stroke="purple" stroke-width="0.5"/>
23
+ <path d="M 44.502277 13.995969 L 130.613494 74.291692" stroke="purple" stroke-width="0.5"/>
24
+ <path d="M 52.333804 12.155016 L 135.339851 70.276476" stroke="purple" stroke-width="0.5"/>
25
+ <path d="M 60.889469 10.82111 L 139.342071 65.754213" stroke="purple" stroke-width="0.5"/>
26
+ <path d="M 70.306063 10.090032 L 142.483362 60.629121" stroke="purple" stroke-width="0.5"/>
27
+ <path d="M 80.837123 10.139312 L 144.510188 54.723672" stroke="purple" stroke-width="0.5"/>
28
+ <path d="M 93.025292 11.348913 L 144.879903 47.657902" stroke="purple" stroke-width="0.5"/>
29
+ <path d="M 108.547063 14.892726 L 141.916017 38.257919" stroke="purple" stroke-width="0.5"/>
30
+ </svg>
data/srv/hatch.yml ADDED
@@ -0,0 +1,4 @@
1
+ dark:
2
+ "#f8e6f8": "#2c251e"
3
+ blue: "#60a5fa"
4
+ purple: "#e5c39c"
data/srv/heart.sevgi ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env -S ruby -S sevgi
2
+ # frozen_string_literal: true
3
+
4
+ HEART = "M10,35 A20,20,0,0,1,50,35 A20,20,0,0,1,90,35 Q90,65,50,95 Q10,65,10,35 Z"
5
+
6
+ SVG width: 120, height: 120, viewBox: "-10 -10 120 120" do
7
+ mask id: "heart",
8
+ maskUnits: "userSpaceOnUse",
9
+ maskContentUnits: "userSpaceOnUse",
10
+ x: 0, y: 0, width: 100, height: 100 do
11
+ square length: 100, fill: "white"
12
+ path d: HEART, fill: "black"
13
+ end
14
+
15
+ polygon points: %w[-10,120 120,120 120,-10], fill: "#e5c39c"
16
+ circle cx: 50, cy: 50, r: 50, mask: "url(#heart)", fill: "purple"
17
+ end.Save
data/srv/heart.svg ADDED
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="-10 -10 120 120">
3
+ <mask id="heart" maskUnits="userSpaceOnUse" maskContentUnits="userSpaceOnUse" x="0" y="0" width="100" height="100">
4
+ <rect width="100" height="100" fill="white"/>
5
+ <path d="M10,35 A20,20,0,0,1,50,35 A20,20,0,0,1,90,35 Q90,65,50,95 Q10,65,10,35 Z" fill="black"/>
6
+ </mask>
7
+ <polygon points="-10,120 120,120 120,-10" fill="#e5c39c"/>
8
+ <circle cx="50" cy="50" r="50" mask="url(#heart)" fill="purple"/>
9
+ </svg>
data/srv/heart.yml ADDED
@@ -0,0 +1,3 @@
1
+ dark:
2
+ "#e5c39c": "#800080"
3
+ purple: "#e5c39c"
data/srv/logo.sevgi ADDED
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env -S ruby -S sevgi
2
+ # frozen_string_literal: true
3
+
4
+ module Logo
5
+ extend SVG::Module
6
+
7
+ LOGO = <<~PATH
8
+ m 30,30 c 0,0 18.39,7.089444 18.39,15 C 48.39,52.910556 30,60 30,60
9
+ M 30,0 C 30,0 11.61,7.089442 11.61,14.999998 C 11.61,22.910556 30,30 30,30
10
+ PATH
11
+
12
+ STYLE = {
13
+ ".active" => {
14
+ fill: "none", stroke: "purple", "stroke-linecap": "round", "stroke-width": 1.5
15
+ },
16
+ ".passive" => {
17
+ fill: "none", stroke: "lightgrey", "stroke-linecap": "round", "stroke-width": 1.5
18
+ }
19
+ }.freeze
20
+
21
+ base do
22
+ css STYLE
23
+ defs { path id: "Logo", d: LOGO }
24
+ end
25
+
26
+ def call
27
+ negative = use id: "SCVN", href: "#Logo"
28
+ negative.Classify :passive
29
+ negative.Matrix(-1, 0, 0, 1, 60, 0)
30
+
31
+ positive = use id: "SCVP", href: "#Logo"
32
+ positive.Classify :active
33
+ end
34
+ end
35
+
36
+ SVG width: 120, height: 120, viewBox: "-1 -1 62 62" do
37
+ rect x: -1, y: -1, width: 62, height: 62, fill: "white"
38
+ Call Logo
39
+ end.Save