master
km0 2 years ago
parent df994f6d92
commit 69f0dcc227

@ -0,0 +1,66 @@
cables: '<svg class="cables" width="1013" height="860" viewBox="0 0 1013 860" fill="none"
style="pointer-events: none; position: absolute; left: 0px; top: 0px;"><path fill="none"
stroke="hsl(308, 71%, 75%)" stroke-width="10" stroke-linecap="round" d="M323 423
L333.6666666666667 410.6666666666667 L345.6 401.4 L353 396.7142857142857 L360.44444444444446
398.8888888888889 L370 408 L379 418.2307692307692 L387.06666666666666 428.4 L394.70588235294116
438.5882352941176 L402.57894736842104 448.7894736842105 L406.65 454.25 L414.7 461.05
L423.1111111111111 467.3333333333333 L430.5625 477.3125 L439 490.5 L447.75 504.5
L454.7 515.6 L461.25 525.875 L468.5 536.3333333333334 L476.75 547 L484 558.5" style="pointer-events:
stroke;"></path><path fill="none" stroke="hsl(53, 94%, 75%)" stroke-width="10" stroke-linecap="round"
d="M544 555 L558.3333333333334 532 L569.2 511.4 L578 491.2857142857143 L584.5555555555555
474.55555555555554 L589.8181818181819 460.90909090909093 L594.6153846153846 449
L599.1333333333333 438.6 L604.0588235294117 428.8235294117647 L608.6842105263158
420.2105263157895 L610.95 416.7 L616.5 406.7 L621.55 397.75 L625.7 390.65 L629.55
384.6 L633.1 379.55 L636.2 376.2 L639.1 373.9 L641.65 372.55 L643.95 372.1 L646.05
372.15 L647.85 372.6 L649.35 373.7 L652.1111111111111 373.3333333333333 L654.25
374.625 L655.5 378.07142857142856 L656.25 383.0833333333333 L656.3 388.5 L655.75
394.375 L654.3333333333334 400.3333333333333 L652.25 404.5 L650 407.5" style="pointer-events:
stroke;"></path><path fill="none" stroke="hsl(211, 61%, 75%)" stroke-width="10"
stroke-linecap="round" d="M628 610 L613.6666666666666 614 L597.8 619.8 L582.7142857142857
626.8571428571429 L569.8888888888889 632.5555555555555 L558.5454545454545 636.7272727272727
L548.3076923076923 639.8461538461538 L537.8 642.2666666666667 L527.5294117647059
644.1176470588235 L517.7894736842105 645.578947368421 L513.15 646.1 L502.75 648.35
L492.5 650.45 L483.4 652 L474.8 653 L466.6 653.4 L459.2 653.05 L452.3 652.3 L445.75
651.15 L439.65 649.65 L433.85 647.95 L426.55555555555554 647 L419.75 645.6875 L413.85714285714283
643.9285714285714 L409.1666666666667 641.5833333333334 L405.4 638.5 L402.5 634.625
L400 629.8333333333334 L398.5 626.25 L396 622.5" style="pointer-events: stroke;"></path><path
fill="none" stroke="hsl(187, 71%, 75%)" stroke-width="10" stroke-linecap="round"
d="M307 613 L297.3333333333333 609.6666666666666 L282.6 601.4 L266 585.2857142857143
L253.55555555555554 557.5555555555555 L246.9090909090909 524.5454545454545 L245.23076923076923
485.84615384615387 L246.8 447.26666666666665 L251.11764705882354 411.8235294117647
L258.7894736842105 379.10526315789474 L266.95 361.45 L285.7 331.2 L305.6 302.2 L326.05
273.55 L347.3 245.5 L370.25 218.95 L394.05 193.65 L418.6 170.65 L443.6 150.8 L468.75
133.3 L493.8 118.15 L518.45 107.05 L542.55 99.15 L566.35 93.35 L589.5 90.5 L611.95
89.25 L633.75 89.5 L654.65 91.6 L674.7 94.8 L692.9 99.6 L707 107.9 L708 117.45 L708.3
126.55 L708.3 136 L708.1 145.8 L707.65 155.65 L706.85 165.75 L705.8 175.65 L704.55
185.05 L703.1 194.6 L701.5 203.95 L699.7 212.85 L697.75 222 L695.8 231.15 L693.9
240.2 L692.1 249.6 L690.3 259 L688.7 268.1 L687.3 277.15 L686.1 286.15 L685.2 295
L684.65 303.9 L684.25 312.35 L683.95 320.4 L683.7 328 L683.45 335.35 L683.3 342.15
L683.25 348.75 L683.2 355.25 L683.2 361.4 L683.2 367.4 L683.8333333333334 374 L684.8125
379.75 L686.0714285714286 384 L687.4166666666666 388.3333333333333 L688.1 392.8
L687.25 396.375 L685.6666666666666 400 L684 403.75 L682 408" style="pointer-events:
stroke;"></path><path fill="none" stroke="hsl(82, 88%, 75%)" stroke-width="10" stroke-linecap="round"
d="M702 537 L701.3333333333334 520 L695.2 479.8 L686 422.2857142857143 L677.2222222222222
374.3333333333333 L666.5454545454545 334.1818181818182 L654.4615384615385 303.61538461538464
L641.7333333333333 281.1333333333333 L628.3529411764706 264.52941176470586 L614.0526315789474
252.47368421052633 L607.45 247.65 L595.85 229.2 L583.9 212.25 L571.6 196.8 L559.05
184.15 L547.3 178.5 L535.9 176.4 L524.85 178.9 L514.15 183.4 L503.75 189.65 L494.2
198.8 L485.3 209.15 L477.25 220.55 L469.95 233.15 L463.45 246.5 L457.7 260.25 L452.8
274.4 L448.9 288.8 L446.1 303.3 L443.5 317.65 L441.15 332.1 L439.3 346.2 L437.45
360.35 L435.1 375.55 L432.5 390.55 L428.95 406.55 L425.15 422.3 L421.35 437.3 L417.1
453.15 L412.9 468.7 L408.6 483.4 L404.25 497.7 L399.85 511.7 L395.35 524.95 L390.75
537.55 L386.05 549.95 L381.1 562.1 L376.05 573.95 L371 585.65 L363.72222222222223
601.6111111111111 L355.5 619.75 L349.2142857142857 635.2142857142857 L346.0833333333333
645.0833333333334 L344.2 651.8 L342.875 656.375 L341.6666666666667 661 L340.25 665.5
L339 669.5" style="pointer-events: stroke;"></path></svg>'
date: '2022-06-26'
description: "\U0001F3B5"
lfo_rate: '100'
name: For Pongi
osc_pitch: '0'
osc_timbre: '25'
pitch_mod: '50'
rate_mod: '20'
slug: For_Pongi
timbre_mod: '50'
waveshape: '74'

@ -0,0 +1,58 @@
cables: '<svg class="cables" width="1013" height="860" viewBox="0 0 1013 860" fill="none"
style="pointer-events: none; position: absolute; left: 0px; top: 0px;"><path fill="none"
stroke="hsl(43, 50%, 75%)" stroke-width="10" stroke-linecap="round" d="M321 428
L331.6666666666667 408.6666666666667 L340.8 390.2 L352.2857142857143 368.14285714285717
L367.8888888888889 345.3333333333333 L384.8181818181818 325.54545454545456 L402
308.38461538461536 L420.73333333333335 293 L439.47058823529414 279.47058823529414
L458.05263157894734 267.8421052631579 L467.55 262.65 L484.45 249.45 L501.35 237.55
L519.05 226.55 L537.25 216.75 L555.75 209.1 L574.6 203.2 L593.2 198.65 L610.85 196.1
L628.15 195 L644.65 195.25 L660 197.1 L674.45 201.45 L687.7 207.6 L699.1 215.35
L709.35 223.7 L718.45 232.5 L725.85 242.2 L731.9 252.8 L736.4 264.3 L738.1 278.1
L738.7 292.85 L738.05 308.4 L735.75 324.4 L732.2 340.65 L726.25 358.15 L718.75 375.65
L709.75 393.85 L699.5 412.1 L688.05 430.15 L675.05 448.35 L661.2 466.3 L646.75 482.65
L631.3 498.3 L615.45 513.2 L599.2 528.1 L582.05 543.25 L564.75 558.1 L547.1 572.55
L529.4 586.35 L511.75 598.2 L492.45 608.95 L473.2 618.7 L453.8 627.35 L433.6 635
L414.25 640.7 L395 645.65 L375.8 648.95 L356.9 650.95 L338.3 651.65 L320.75 650.5
L303.75 647.85 L287.4 643.65 L272.2 637.5 L257.85 630.05 L244.25 621.45 L232.05
610.65 L220.9 598.55 L211.2 584.8 L203 569.2 L197.05 552.4 L194.1 534.65 L193.9
515 L195.35 494.75 L199.6 473.6 L206.2 451.5 L215.2 428.45 L226.35 405.35 L240.05
382.1 L255.8 359.15 L273.45 336.65 L293.2 314.55 L314.15 293.3 L336.2 273.05 L359.35
253.65 L383.55 235.2 L408.5 218.55 L434.55 203.05 L460.85 188.95 L487.65 176.75
L514.65 165.9 L541.8 156.4 L567.9 149.45 L593.9 143.85 L619.2 140 L643.4 137.95
L667.1 138.35 L690.15 140.05 L711.8 143.75 L732.05 148.85 L750.8 155.5 L767.6 164.35
L783.2 174.15 L797.45 185.65 L810 198.9 L820.85 213.55 L830.05 229.45 L837.05 246.75
L842.7 264.9 L846.45 283.7 L848.6 303.25 L849.35 323.15 L848.45 343.1 L845.75 363.25
L841.55 383.3 L835.8 403.3 L827.1 423.05 L814.45 444.05 L800.25 464.5 L784.8 484.6
L767.85 504.2 L750.1 522.6 L731.55 540.6 L712.1 557.65 L692.3 573.3 L672.25 587.75
L651.75 601.25 L631.1 613.5 L609.7 625.15 L588.35 636 L566.95 645.95 L545.25 655.3
L523.35 664.05 L501.85 672.05 L480.35 679.6 L458.6 686.55 L437.75 692.35 L418.9
696.2 L400.35 699.4 L382.35 702 L364.7 704.05 L347.35 705.65 L330.4 706.9 L314.25
707.75 L298.7 708.35 L283.8 708.7 L269.65 708.65 L256.15 708.25 L243.65 707.45 L231.3
706.35 L219.5 704.65 L208.15 702.5 L197.3 699.75 L187 696.75 L177.15 693.55 L168.35
690.15 L160.1 686.5 L153.2 682.35 L146.75 677.25 L140.75 671.55 L135.8 665.15 L131.3
657.4 L127.3 649.05 L123.8 639.75 L120.8 629.5 L118.2 618.8 L116.1 607.6 L114.55
595.4 L113.45 582.65 L112.9 569.6 L113 556.05 L113.8 542.25 L115.6 528.3 L119 514.1
L123.3 499.75 L128.35 485.3 L134.3 470.7 L140.65 456.5 L147.3 443.3 L154.35 430.35
L161.7 417.75 L169.45 406.2 L177.7 394.9 L186.5 384.05 L195.55 373.9 L204.85 363.8
L214.25 354.2 L223.95 345.5 L233.8 337.35 L243.8 329.75 L254.75 323.15 L265.6 317.25
L276.1 312.3 L285.65 308.1 L295.05 304.65 L304.15 301.8 L313.35 299.95 L322.6 298.45
L332.5 297.55 L342.8 297.55 L353.4 298.45 L364.2 300.35 L374.65 302.85 L384.55 306
L394.15 309.65 L403.4 314 L412.45 318.8 L421 324.3 L429.25 330.2 L437.25 336.4 L444
343 L450.55 349.95 L456.8 357.1 L462.55 364.65 L467.85 372.2 L472.75 379.85 L476.8
387.15 L480.5 394.55 L483.4 401.9 L485.6 409 L487.15 415.9 L488.2 422.45 L489.1
428.9 L489.85 435.65 L490.4 442.5 L490.8 449.3 L491.05 456.15 L491.2 462.75 L491.3
469.3 L491.25 475.75 L491 481.9 L490.5 487.95 L489.75 493.7 L488.7 499 L487.8333333333333
504.6666666666667 L486.5625 510.375 L485.07142857142856 515.5 L483.5 520.4166666666666
L481.8 525.4 L480.125 530 L478.3333333333333 534 L476 537.5 L473.5 540.5" style="pointer-events:
stroke;"></path></svg>'
date: '2022-06-26'
description: Eheheh
lfo_rate: '50'
name: '@@ uzumaki'
osc_pitch: '50'
osc_timbre: '50'
pitch_mod: '100'
rate_mod: '50'
slug: uzumaki
timbre_mod: '50'
waveshape: '50'

@ -1,6 +1,6 @@
name: Sample Demo Dinner name: Test Panel
slug: Sample_Demo_Dinner slug: Test_Panel
description: A test panel just for fun description: it's another test
params: params:
- soup - soup
- goat_cheese - goat_cheese

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

@ -0,0 +1,69 @@
cables: '<svg class="cables" width="959" height="864" viewBox="0 0 959 864" fill="none"
style="pointer-events: none; position: absolute; left: 0px; top: 0px;"><path fill="none"
stroke="hsl(101, 91%, 75%)" stroke-width="10" stroke-linecap="round" d="M464 133
L394.3333333333333 156.66666666666666 L333.4 174.4 L297.14285714285717 184.57142857142858
L271.22222222222223 194.11111111111111 L247.54545454545453 207.9090909090909 L227.30769230769232
224.6153846153846 L210.46666666666667 241.2 L197.35294117647058 256.5882352941176
L187.10526315789474 269.8421052631579 L182.9 275.95 L164.95 289.2 L150.85 301.55
L140 313.3 L132.95 324.25 L127.45 335.35 L123.1 346.7 L119.7 358.25 L117.55 370.05
L117.1 381.6 L118.4 392.15 L121.05 402.45 L124.65 411.6 L128.95 419.75 L133.85 427.3
L139.1 434.2 L144.6 440 L150.25 445.4 L156.25 449.8 L162.9 453.05 L170.2 455.3 L178.15
456.75 L186.15 457.55 L194.4 457.9 L203.25 457.7 L212.3 456.8 L221.35 455.25 L230.4
452.95 L239 449.75 L247.15 445.7 L254.9 441.1 L262 435.75 L268.95 430 L276 423.75
L283 417.05 L289.85 410.25 L298.6666666666667 402.05555555555554 L307.6875 394.9375
L315 389.64285714285717 L322.0833333333333 384.4166666666667 L327.4 379.2 L331.75
373.875 L335 369 L338 364 L341 358.5" style="pointer-events: stroke;"></path><path
fill="none" stroke="hsl(101, 98%, 75%)" stroke-width="10" stroke-linecap="round"
d="M355 335 L389.6666666666667 306.6666666666667 L417.2 282.4 L435.7142857142857
266 L451.8888888888889 255.11111111111111 L466.09090909090907 250 L480.3076923076923
249.6153846153846 L494.53333333333336 251.53333333333333 L510.8235294117647 255.88235294117646
L527.1052631578947 261.94736842105266 L535.15 265.35 L552.45 265.75 L569 268.55
L583.8 274.05 L597.9 281.55 L611.1 291.65 L623.95 302.5 L636.35 314.1 L647.9 326.2
L658.85 338.55 L668.95 351 L678.1 364.1 L685.95 377.55 L692.4 390.95 L698.1 404.35
L702.55 418 L705.25 431.1 L706.95 444.15 L707.75 456.7 L707 468.85 L705.25 481.2
L702.55 493.5 L698.35 505.35 L693.35 516.8 L687.7 527.4 L681.55 536.7 L674.95 545.9
L668 554.9 L660.55 563.9 L653 572.75 L645.5 581.3 L638.15 588.95 L631.35 595.8 L624.65
602.1 L617.95 608.1 L611.45 613.5 L604.1666666666666 620.5555555555555 L596.4375
628.0625 L588.7857142857143 634.5 L582.1666666666666 638.8333333333334 L575.9 642.4
L570.125 645.125 L565.6666666666666 646.8333333333334 L561.5 648 L556.5 648.5" style="pointer-events:
stroke;"></path><path fill="none" stroke="hsl(121, 63%, 75%)" stroke-width="10"
stroke-linecap="round" d="M532 652 L502 659.6666666666666 L476.8 668.6 L452.2857142857143
677.7142857142857 L428.8888888888889 685.5555555555555 L405.72727272727275 692.3636363636364
L383.7692307692308 698.2307692307693 L362.46666666666664 703 L343.6470588235294
706 L328.05263157894734 707.1578947368421 L321.35 706.95 L304.6 708.7 L289.75 709.45
L276.15 709.3 L264.15 707.45 L253.35 704.25 L243.95 700 L236.1 694.45 L229.5 688.05
L224.2 681.1 L220.6 673.25 L218.3 664.75 L217.2 655.65 L217.7 645.95 L219.7 635.85
L222.7 625.55 L226.85 615.15 L231.5 604.7 L236.6 594.25 L242 584.2 L247.65 574.2
L253.6 564.45 L259.9 554.6 L266.95 543.4 L274.1 532.15 L281.3 520.55 L288.6 508.55
L295.8333333333333 499.72222222222223 L303.4375 490.9375 L311.14285714285717 482.35714285714283
L318.6666666666667 473.5833333333333 L326 463.3 L333.375 450.125 L343 431.3333333333333
L353.75 404.5 L358.5 382" style="pointer-events: stroke;"></path><path fill="none"
stroke="hsl(292, 90%, 75%)" stroke-width="10" stroke-linecap="round" d="M365 349
L362 318 L358.2 299 L356.57142857142856 280 L358.22222222222223 259 L361.72727272727275
238.36363636363637 L366.46153846153845 219.23076923076923 L371.93333333333334 202.8
L377.47058823529414 188.64705882352942 L382.57894736842104 176.78947368421052 L385.15
171.5 L388.8 157.5 L392.85 145.45 L397.35 134.05 L402.3 123.6 L407.5 113.8 L412.85
105.15 L418.15 97.95 L423.3 91.9 L428 87.5 L432.45 84.2 L436.7 81.8 L440.45 80.7
L443.95 80.2 L447.1 80.4 L449.7 81.45 L453.1111111111111 81.33333333333333 L456.5
82 L459.42857142857144 83.71428571428571 L461.6666666666667 86.33333333333333 L463.2
90 L464.25 94 L464.8333333333333 98.33333333333333 L465 103.25 L465 108.5" style="pointer-events:
stroke;"></path></svg>'
date: '2022-06-26'
description: just for fun
goat_cheese: '50'
kikkerverten: '50'
kip: '50'
leek: '50'
lemon: '50'
linzen: '50'
name: A test patch
pasta: '50'
pizza: '50'
rice_rolls: '50'
salt: '50'
shot_rate: '50'
slug: A_test_patch
soup: '50'
stuffed_peppers: '50'
tequila: '50'
thai_curry: '50'

@ -1,123 +1,113 @@
* { * {
box-sizing: border-box; box-sizing: border-box;
} }
html, body { html,
font-family: sans-serif; body {
font-family: sans-serif;
} }
a { a {
color: currentColor; color: currentColor;
text-decoration: none; text-decoration: none;
} }
main { main {
padding: 0 8px; padding: 0 8px;
} }
.list { .list {
padding: 0; padding: 0;
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 16px; gap: 16px;
} }
.card { .card {
/* transform: skew(14deg); */ /* transform: skew(14deg); */
aspect-ratio: 1; aspect-ratio: 1;
border: 1px solid currentColor; border: 1px solid currentColor;
padding: 32px; padding: 32px;
font-stretch: 50%; font-stretch: 50%;
display: flex;
justify-content: center;
align-items: center;
position: relative;
display: flex;
justify-content: center;
align-items: center;
position: relative;
font-size: 32px;
font-size: 32px; text-align: center;
text-align: center;
} }
.card:hover { .card:hover {
background-color: grey; background-color: grey;
} }
.card > * { .card > * {
/* transform: skew(-28deg); */ /* transform: skew(-28deg); */
} }
.card svg { .card svg {
width: 32px; width: 32px;
height: 32px; height: 32px;
}
.card .instrument svg {
padding: 32px;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
} }
.card img { .card img {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: contain; object-fit: contain;
} }
.card .overlay { .card .overlay {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
top: 0; top: 0;
left: 0; left: 0;
vertical-align: middle; vertical-align: middle;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background-color: grey; background-color: grey;
opacity: 0; opacity: 0;
} }
.card .overlay:hover { .card .overlay:hover {
opacity: 1; opacity: 1;
} }
.card .title { .card .title {
font-weight: normal; font-weight: normal;
} }
@media (max-width: 767px) {
header {
display: block;
font-size: 28px;
}
header .title {
display: inline;
font-size: 28px;
}
@media (max-width: 767px){ .search {
margin-top: 16px;
display: block;
}
header { .search input {
display: block; font-size: 28px;
font-size: 28px; }
} }
header .title {
display: inline;
font-size: 28px;
}
.search {
margin-top: 16px;
display: block;
}
.search input {
font-size: 28px;
}
}

@ -135,6 +135,7 @@ class Panel {
} }
createParams() { createParams() {
// this.svg.querySelector("#params").style.visibility = "hidden";
this.params = this.svg.querySelectorAll("#params [fill='#FF0000']"); this.params = this.svg.querySelectorAll("#params [fill='#FF0000']");
this.model.params = []; this.model.params = [];
@ -178,6 +179,7 @@ class Panel {
} }
createSockets() { createSockets() {
// this.svg.querySelector("#sockets").style.visibility = "hidden";
this.sockets = this.svg.querySelectorAll("#sockets [fill='#00FF00']"); this.sockets = this.svg.querySelectorAll("#sockets [fill='#00FF00']");
this.model.sockets = []; this.model.sockets = [];
for (const socket of this.sockets) { for (const socket of this.sockets) {

@ -74,10 +74,7 @@
{% for patch in patches %} {% for patch in patches %}
<li class="card"> <li class="card">
<a href="{{url_for('patch', name=patch['slug'], instrument=instrument)}}"> <a href="{{url_for('patch', name=patch['slug'], instrument=instrument)}}">
<img <figure class="instrument">{{panel|safe}}{{patch['cables'] |safe}}</figure>
src="{{url_for('static', filename='img/kastle-v1.5.svg')}}"
alt="Patch 1"
/>
<div class="overlay"> <div class="overlay">
<h3 class="title">{{patch['name']}}</h3> <h3 class="title">{{patch['name']}}</h3>
</div> </div>

@ -1,53 +1,79 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>Workbook</title> <title>Workbook</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/global.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='css/global.css') }}" />
<link rel="stylesheet" href="{{ url_for('static', filename='css/workbook.css') }}" /> <link rel="stylesheet" href="{{ url_for('static', filename='css/workbook.css') }}" />
</head>
</head> <body>
<body> <header>
<a href="{{url_for('home')}}" class="parent">Home</a>
<span class="path-slash"> / </span>
<h2 class="title">Workbook</h2>
<header> <div class="search">
<a href="{{url_for('home')}}" class="parent">Home</a> <svg
<span class="path-slash"> class="icon"
/ width="31"
</span> height="33"
<h2 class="title">Workbook</h2> viewBox="0 0 31 33"
<div class="search"> fill="none"
<svg class="icon" width="31" height="33" viewBox="0 0 31 33" fill="none" xmlns="http://www.w3.org/2000/svg"> xmlns="http://www.w3.org/2000/svg"
<line x1="20.0607" y1="22.9393" x2="29.0607" y2="31.9393" stroke="currentColor" stroke-width="3"/> >
<circle cx="13" cy="13" r="11.5" stroke="currentColor" stroke-width="3"/> <line
</svg> x1="20.0607"
<input type="text" name="search" id="search" /> y1="22.9393"
</div> x2="29.0607"
</header> y2="31.9393"
stroke="currentColor"
<main> stroke-width="3"
<ul class="instruments list"> />
<li class="card"><a href="{{url_for('add_instrument')}}"> <circle cx="13" cy="13" r="11.5" stroke="currentColor" stroke-width="3" />
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"> </svg>
<line x1="25" y1="4.37114e-08" x2="25" y2="48" stroke="currentColor" stroke-width="3"/> <input type="text" name="search" id="search" />
<line x1="48" y1="25" x2="-8.74228e-08" y2="25" stroke="currentColor" stroke-width="3"/> </div>
</svg> </header>
</a>
</li>
<li class="card"><a href="{{url_for('patches', instrument='all')}}">All</a></li>
{% for instrument in instruments %}
<li class="card"><a href="{{url_for('patches', instrument=instrument['slug'])}}">{{instrument['name']}}</a></li>
{% endfor %}
</ul>
</main>
</body>
<main>
<ul class="instruments list">
<li class="card">
<a href="{{url_for('add_instrument')}}">
<svg
width="48"
height="48"
viewBox="0 0 48 48"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<line
x1="25"
y1="4.37114e-08"
x2="25"
y2="48"
stroke="currentColor"
stroke-width="3"
/>
<line
x1="48"
y1="25"
x2="-8.74228e-08"
y2="25"
stroke="currentColor"
stroke-width="3"
/>
</svg>
</a>
</li>
{% for instrument in instruments %}
<li class="card">
<a href="{{url_for('patches', instrument=instrument['slug'])}}"
>{{instrument['name']}}</a
>
</li>
{% endfor %}
</ul>
</main>
</body>
</html> </html>

@ -48,15 +48,18 @@ def workbook():
@app.route("/workbook/<instrument>") @app.route("/workbook/<instrument>")
def patches(instrument): def patches(instrument):
patches = []
with open(f'instruments/{instrument}/panel.svg') as f:
panel = f.read()
patches = []
for filename in os.listdir(f'instruments/{instrument}/patches'): for filename in os.listdir(f'instruments/{instrument}/patches'):
with open(f'instruments/{instrument}/patches/{filename}') as f: with open(f'instruments/{instrument}/patches/{filename}') as f:
patch = yaml.load(f, Loader=SafeLoader) patch = yaml.load(f, Loader=SafeLoader)
patches.append(patch) patches.append(patch)
return render_template('patches.html', instrument=instrument, patches=patches) return render_template('patches.html', instrument=instrument, patches=patches, panel=panel)
@app.route("/workbook/add", methods=['GET', 'POST']) @app.route("/workbook/add", methods=['GET', 'POST'])

Loading…
Cancel
Save