Skip to content

Commit 95871f8

Browse files
committed
fixed issue where logo wouldnt be correctly imported into figma when copied as svg
1 parent 08877d0 commit 95871f8

File tree

1 file changed

+51
-38
lines changed

1 file changed

+51
-38
lines changed

exec/publicity.py

Lines changed: 51 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
POST_HEIGHT, POST_WIDTH = 2028, 2028
1818

1919
# logo shennanigans
20-
LOGO_SCALE = 0.35
21-
LOGO_TRANSLATE_X = 1887
22-
LOGO_TRANSLATE_Y = 198
20+
LOGO_TRANSLATE_X = 718
21+
LOGO_TRANSLATE_Y = 80
2322

2423
# space dots can be in
2524
DOTS_X, DOTS_Y = POST_WIDTH, 436
@@ -729,44 +728,58 @@ def create_svg(start: Week, end: Week) -> str:
729728
# uwcs logo
730729
svg.G(
731730
elements=[
732-
svg.SVG(
733-
viewBox=svg.ViewBoxSpec(0, 0, 450, 512),
734-
elements=[
735-
svg.Circle(cx=57, cy=21, r=21, fill=colours["yellow"]),
736-
svg.Circle(cx=21, cy=57, r=21, fill=colours["yellow"]),
737-
svg.Circle(cx=57, cy=95, r=21, fill=colours["blue"]),
738-
svg.Circle(cx=93, cy=131, r=21, fill=colours["blue"]),
739-
# i am so sorry for this
740-
svg.Path(
741-
d=convert_path_to_list(
742-
"M148.879 92.6014c1.222 1.2505 2.691 2.232 4.313 2.8818 1.623.6498 3.362.9535 5.108.8918 1.678.0612 3.35-.2416 4.9-.8875 1.55-.6459 2.943-1.6197 4.082-2.8546 2.404-2.7703 3.643-6.3661 3.455-10.0316V43.7329h17.241V82.6013c.092 5.2481-1.186 10.4294-3.706 15.0316-2.386 4.2821-5.995 7.7531-10.364 9.9691-4.877 2.411-10.264 3.608-15.702 3.49-5.499.12-10.946-1.077-15.89-3.49-4.42-2.212-8.09-5.679-10.552-9.9691-2.549-4.5913-3.828-9.7802-3.706-15.0316V43.7329h17.241V82.6013c-.097 1.8215.169 3.6443.784 5.3614.614 1.7171 1.565 3.2942 2.796 4.6387Z" # noqa: E501
743-
)[0],
744-
fill="white",
745-
),
746-
svg.Path(
747-
d=convert_path_to_list(
748-
"M290.01 43.7329h17.712L285.393 109.771H267.681L255.12 64.7709 242.558 109.771H224.72L202.486 43.7329h18.56l13.002 48.3024L247.08 43.7329h16.864l13.19 48.3024L290.01 43.7329Z" # noqa: E501
749-
)[0],
750-
fill="white",
751-
),
752-
svg.Path(
753-
d=convert_path_to_list(
754-
"M362.46 59.7079c2.913 1.6292 5.466 3.833 7.505 6.4781l9.987-12.0756c-3.431-3.5985-7.569-6.4465-12.154-8.3648-5.185-2.225-10.803-3.2558-16.44-3.0164-5.636.2395-11.147 1.7431-16.126 4.4-5.3 2.8695-9.714 7.1398-12.759 12.3462-3.045 5.2064-4.606 11.1494-4.513 17.1824-.086 6.1487 1.476 12.2081 4.522 17.5474 2.993 5.1817 7.335 9.4528 12.562 12.3588 4.909 2.761 10.405 4.307 16.032 4.509 5.627.202 11.22-.945 16.314-3.346 4.805-2.135 9.147-5.191 12.782-8.9935L370.091 87.8844c-2.272 2.3529-4.954 4.2711-7.914 5.6604-2.639 1.3084-5.535 2.0171-8.479 2.0755-3.211.0285-6.365-.8429-9.107-2.5157-2.672-1.6911-4.841-4.0695-6.281-6.8869-1.549-3.0212-2.356-6.3683-2.356-9.7643 0-3.3959.807-6.743 2.356-9.7642 1.44-2.8174 3.609-5.1959 6.281-6.8869 2.744-1.6634 5.899-2.524 9.107-2.4843 3.075.0445 6.089.8666 8.762 2.3899Z" # noqa: E501
755-
)[0],
756-
fill="white",
757-
),
758-
svg.Path(
759-
d=convert_path_to_list(
760-
"M431.172 58.5447c3.929 1.2914 7.708 2.9992 11.274 5.0944l6.501-13.7737c-3.799-2.3955-7.925-4.2279-12.248-5.4403-4.591-1.3409-9.349-2.0186-14.132-2.0126-4.755-.1015-9.484.7429-13.912 2.4843-3.696 1.4454-6.901 3.923-9.233 7.1385-2.149 3.1652-3.248 6.9284-3.14 10.7548-.196 3.73.915 7.4113 3.14 10.4089 2.019 2.5413 4.628 4.5493 7.6 5.8491 3.645 1.5343 7.391 2.8161 11.212 3.8366 3.014.8176 5.338 1.5094 7.003 2.1069 1.528.5232 2.938 1.3464 4.145 2.4214.534.4703.96 1.0514 1.248 1.7031.287.6517.429 1.3582.416 2.0705.035.8286-.154 1.6511-.546 2.3814-.393.7304-.974 1.3416-1.683 1.7696-1.846 1.0366-3.948 1.5273-6.061 1.4151-4.186-.1487-8.303-1.1099-12.122-2.8302-4.315-1.7424-8.306-4.1979-11.808-7.2642l-6.689 13.4907c4.174 3.454 8.942 6.118 14.069 7.862 5.249 1.89 10.783 2.868 16.361 2.893 4.609.061 9.188-.738 13.504-2.359 3.741-1.411 7.007-3.853 9.421-7.044 2.375-3.2627 3.601-7.2222 3.486-11.2578.194-3.8272-.913-7.6072-3.14-10.7234-2.018-2.6349-4.663-4.7215-7.694-6.0692-3.687-1.5711-7.475-2.8948-11.337-3.9624-3.078-.9434-5.402-1.7295-6.972-2.327-1.456-.5286-2.799-1.3289-3.957-2.3585-.514-.4494-.924-1.0059-1.2-1.6307-.277-.6247-.414-1.3025-.401-1.9857-.034-.6872.117-1.3708.437-1.9794.321-.6086.799-1.1197 1.384-1.4798 1.543-.854 3.295-1.2571 5.056-1.1635 3.422.137 6.801.8053 10.018 1.9811Z" # noqa: E501
761-
)[0],
762-
fill="white",
763-
),
764-
],
765-
)
731+
# i am so sorry for this
732+
svg.Path(
733+
d=convert_path_to_list(
734+
"M74.1765 54.1966C68.8169 54.1966 63.5777 52.6073 59.1214 49.6297C54.6651 46.6521 51.1919 42.42 49.1409 37.4684C47.0899 32.5168 46.5532 27.0683 47.5988 21.8117C48.6444 16.5552 51.2253 11.7267 55.015 7.93693C58.8048 4.14716 63.6333 1.56629 68.8898 0.520697C74.1464 -0.524898 79.595 0.0117467 84.5465 2.06275C89.4981 4.11376 93.7303 7.58702 96.7079 12.0433C99.6855 16.4996 101.275 21.7388 101.275 27.0983C101.269 34.2833 98.4116 41.1723 93.331 46.2529C88.2505 51.3335 81.3615 54.1905 74.1765 54.1966V54.1966Z", # noqa: E501
735+
)[0],
736+
fill=colours["yellow"],
737+
),
738+
svg.Path(
739+
d=convert_path_to_list(
740+
"M27.0983 101.509C42.0643 101.509 54.1966 89.3768 54.1966 74.4108C54.1966 59.4448 42.0643 47.3125 27.0983 47.3125C12.1323 47.3125 0 59.4448 0 74.4108C0 89.3768 12.1323 101.509 27.0983 101.509Z" # noqa: E501
741+
)[0],
742+
fill=colours["yellow"],
743+
),
744+
svg.Path(
745+
d=convert_path_to_list(
746+
"M74.1764 151.06C89.1424 151.06 101.275 138.928 101.275 123.962C101.275 108.996 89.1424 96.8633 74.1764 96.8633C59.2105 96.8633 47.0781 108.996 47.0781 123.962C47.0781 138.928 59.2105 151.06 74.1764 151.06Z" # noqa: E501
747+
)[0],
748+
fill=colours["blue"],
749+
),
750+
svg.Path(
751+
d=convert_path_to_list(
752+
"M121.745 198.626C136.711 198.626 148.843 186.494 148.843 171.528C148.843 156.562 136.711 144.43 121.745 144.43C106.779 144.43 94.6465 156.562 94.6465 171.528C94.6465 186.494 106.779 198.626 121.745 198.626Z" # noqa: E501
753+
)[0],
754+
fill=colours["blue"],
755+
),
756+
svg.Path(
757+
d=convert_path_to_list(
758+
"M196.583 121.433C198.197 123.084 200.136 124.38 202.278 125.238C204.42 126.096 206.717 126.497 209.023 126.416C211.239 126.497 213.446 126.097 215.492 125.244C217.539 124.391 219.378 123.105 220.883 121.475C224.057 117.817 225.692 113.069 225.444 108.229V56.9062H248.209V108.229C248.331 115.158 246.644 122 243.316 128.077C240.165 133.731 235.4 138.314 229.632 141.24C223.192 144.423 216.079 146.004 208.899 145.849C201.638 146.007 194.444 144.427 187.916 141.24C182.081 138.319 177.234 133.741 173.984 128.077C170.619 122.014 168.93 115.163 169.091 108.229V56.9062H191.856V108.229C191.727 110.634 192.079 113.041 192.89 115.308C193.702 117.575 194.958 119.658 196.583 121.433V121.433Z" # noqa: E501
759+
)[0],
760+
fill="white",
761+
),
762+
svg.Path(
763+
d=convert_path_to_list(
764+
"M382.933 56.9062H406.32L376.837 144.105H353.45L336.863 84.6851L320.277 144.105H296.724L267.365 56.9062H291.872L309.039 120.686L326.248 56.9062H348.516L365.932 120.686L382.933 56.9062Z" # noqa: E501
765+
)[0],
766+
fill="white",
767+
),
768+
svg.Path(
769+
d=convert_path_to_list(
770+
"M478.598 77.9989C475.068 75.9875 471.089 74.902 467.028 74.8432C462.793 74.7908 458.627 75.9271 455.003 78.1235C451.475 80.3564 448.611 83.4969 446.71 87.217C444.665 91.2063 443.598 95.6259 443.598 100.11C443.598 104.594 444.665 109.014 446.71 113.003C448.611 116.723 451.475 119.863 455.003 122.096C458.624 124.305 462.789 125.456 467.028 125.418C470.916 125.341 474.739 124.405 478.224 122.678C482.132 120.843 485.674 118.31 488.674 115.204L501.985 129.529C497.185 134.55 491.452 138.585 485.108 141.405C478.381 144.575 470.996 146.089 463.566 145.822C456.137 145.555 448.879 143.514 442.397 139.868C435.496 136.032 429.763 130.392 425.81 123.55C421.788 116.5 419.726 108.499 419.839 100.38C419.716 92.4137 421.777 84.5664 425.799 77.6918C429.82 70.8172 435.647 65.1786 442.646 61.3897C449.22 57.8816 456.496 55.8962 463.939 55.58C471.381 55.2637 478.8 56.6248 485.647 59.5628C491.7 62.0958 497.164 65.8564 501.695 70.6078L488.508 86.5527C485.816 83.06 482.445 80.1501 478.598 77.9989V77.9989Z" # noqa: E501
771+
)[0],
772+
fill="white",
773+
),
774+
svg.Path(
775+
d=convert_path_to_list(
776+
"M569.326 76.4645C565.079 74.9119 560.616 74.0294 556.098 73.8485C553.773 73.7249 551.46 74.2572 549.422 75.3849C548.649 75.8603 548.018 76.5352 547.595 77.3388C547.172 78.1423 546.972 79.0451 547.017 79.9524C547.001 80.8546 547.181 81.7495 547.547 82.5744C547.912 83.3993 548.453 84.1342 549.132 84.7276C550.661 86.0871 552.434 87.1438 554.357 87.8418C556.43 88.6307 559.499 89.6688 563.562 90.9145C568.663 92.3241 573.663 94.072 578.532 96.1464C582.534 97.9259 586.027 100.681 588.691 104.16C591.632 108.275 593.094 113.266 592.838 118.32C592.989 123.648 591.37 128.876 588.235 133.185C585.047 137.398 580.735 140.622 575.795 142.486C570.097 144.625 564.05 145.682 557.964 145.6C550.598 145.568 543.292 144.276 536.36 141.78C529.59 139.477 523.295 135.96 517.783 131.399L526.616 113.586C531.24 117.635 536.51 120.877 542.207 123.178C547.251 125.449 552.687 126.719 558.213 126.915C561.004 127.063 563.779 126.415 566.216 125.046C567.153 124.481 567.92 123.674 568.438 122.71C568.956 121.745 569.206 120.659 569.16 119.565C569.177 118.625 568.99 117.692 568.61 116.831C568.23 115.971 567.668 115.204 566.963 114.583C565.369 113.163 563.508 112.076 561.489 111.385C559.291 110.596 556.223 109.683 552.242 108.603C547.198 107.256 542.251 105.563 537.438 103.537C533.514 101.821 530.069 99.1697 527.403 95.8142C524.465 91.8561 522.999 86.9952 523.257 82.0701C523.114 77.0177 524.565 72.0487 527.403 67.8692C530.482 63.6235 534.714 60.352 539.595 58.4435C545.441 56.1441 551.685 55.0291 557.964 55.1631C564.279 55.1553 570.562 56.0501 576.624 57.8206C582.333 59.4215 587.78 61.8411 592.796 65.0041L584.213 83.1912C579.504 80.4246 574.513 78.1696 569.326 76.4645V76.4645Z" # noqa: E501
777+
)[0],
778+
fill="white",
779+
),
766780
],
767781
# transform and position correctly
768782
transform=[
769-
svg.Scale(LOGO_SCALE),
770783
svg.Translate(LOGO_TRANSLATE_X, LOGO_TRANSLATE_Y),
771784
],
772785
),

0 commit comments

Comments
 (0)