Skip to content

Commit

Permalink
Update svg and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic committed Oct 26, 2022
1 parent 16c94df commit a744d0c
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 17 deletions.
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,21 @@ example below for more details.

## Examples

- Embed SVG Image · [_source_](/netlify/edge-functions/image-svg.tsx) ·
[_demo_](https://og-examples.netlify.app/api/image-svg)
- Embed SVG Image ·
[_source_](https://github.com/ascorbic/og-edge/blob/main//netlify/edge-functions/image-svg.tsx)
· [_demo_](https://og-examples.netlify.app/og/image-svg)
- Dynamic PNG Image Based on URL Queries ·
[_source_](/netlify/edge-functions/dynamic-image.tsx) ·
[_demo_](https://og-examples.netlify.app/api/dynamic-image?username=ascorbic)
- Custom Font · [_source_](/netlify/edge-functions/custom-font.tsx) ·
[_demo_](https://og-examples.netlify.app/api/custom-font)
- Emoji · [_source_](/netlify/edge-functions/emoji.tsx) ·
[_demo_](https://og-examples.netlify.app/api/emoji)
- Languages · [_source_](/netlify/edge-functions/language.tsx) ·
[_demo_](https://og-examples.netlify.app/api/language)
[_source_](https://github.com/ascorbic/og-edge/blob/main//netlify/edge-functions/dynamic-image.tsx)
· [_demo_](https://og-examples.netlify.app/og/dynamic-image?username=ascorbic)
- Custom Font ·
[_source_](https://github.com/ascorbic/og-edge/blob/main//netlify/edge-functions/custom-font.tsx)
· [_demo_](https://og-examples.netlify.app/og/custom-font)
- Emoji ·
[_source_](https://github.com/ascorbic/og-edge/blob/main//netlify/edge-functions/emoji.tsx)
· [_demo_](https://og-examples.netlify.app/og/emoji)
- Languages ·
[_source_](https://github.com/ascorbic/og-edge/blob/main//netlify/edge-functions/language.tsx)
· [_demo_](https://og-examples.netlify.app/og/language)

## Development / Contributing

Expand Down
49 changes: 42 additions & 7 deletions netlify/edge-functions/image-svg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,51 @@ export default function handler() {
alignItems: "center",
}}
>
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40">
<path
fill="#0E1E25"
d="M28.589 14.135l-.014-.006c-.008-.003-.016-.006-.023-.013a.11.11 0 0 1-.028-.093l.773-4.726 3.625 3.626-3.77 1.604a.083.083 0 0 1-.033.006h-.015c-.005-.003-.01-.007-.02-.017a1.716 1.716 0 0 0-.495-.381zm5.258-.288l3.876 3.876c.805.806 1.208 1.208 1.355 1.674.022.069.04.138.054.209l-9.263-3.923a.728.728 0 0 0-.015-.006c-.037-.015-.08-.032-.08-.07 0-.038.044-.056.081-.071l.012-.005 3.98-1.684zm5.127 7.003c-.2.376-.59.766-1.25 1.427l-4.37 4.369-5.652-1.177-.03-.006c-.05-.008-.103-.017-.103-.062a1.706 1.706 0 0 0-.655-1.193c-.023-.023-.017-.059-.01-.092 0-.005 0-.01.002-.014l1.063-6.526.004-.022c.006-.05.015-.108.06-.108a1.73 1.73 0 0 0 1.16-.665c.009-.01.015-.021.027-.027.032-.015.07 0 .103.014l9.65 4.082zm-6.625 6.801l-7.186 7.186 1.23-7.56.002-.01c.001-.01.003-.02.006-.029.01-.024.036-.034.061-.044l.012-.005a1.85 1.85 0 0 0 .695-.517c.024-.028.053-.055.09-.06a.09.09 0 0 1 .029 0l5.06 1.04zm-8.707 8.707l-.81.81-8.955-12.942a.424.424 0 0 0-.01-.014c-.014-.019-.029-.038-.026-.06.001-.016.011-.03.022-.042l.01-.013c.027-.04.05-.08.075-.123l.02-.035.003-.003c.014-.024.027-.047.051-.06.021-.01.05-.006.073-.001l9.921 2.046a.164.164 0 0 1 .076.033c.013.013.016.027.019.043a1.757 1.757 0 0 0 1.028 1.175c.028.014.016.045.003.078a.238.238 0 0 0-.015.045c-.125.76-1.197 7.298-1.485 9.063zm-1.692 1.691c-.597.591-.949.904-1.347 1.03a2 2 0 0 1-1.206 0c-.466-.148-.869-.55-1.674-1.356L8.73 28.73l2.349-3.643c.011-.018.022-.034.04-.047.025-.018.061-.01.091 0a2.434 2.434 0 0 0 1.638-.083c.027-.01.054-.017.075.002a.19.19 0 0 1 .028.032L21.95 38.05zM7.863 27.863L5.8 25.8l4.074-1.738a.084.084 0 0 1 .033-.007c.034 0 .054.034.072.065a2.91 2.91 0 0 0 .13.184l.013.016c.012.017.004.034-.008.05l-2.25 3.493zm-2.976-2.976l-2.61-2.61c-.444-.444-.766-.766-.99-1.043l7.936 1.646a.84.84 0 0 0 .03.005c.049.008.103.017.103.063 0 .05-.059.073-.109.092l-.023.01-4.337 1.837zM.831 19.892a2 2 0 0 1 .09-.495c.148-.466.55-.868 1.356-1.674l3.34-3.34a2175.525 2175.525 0 0 0 4.626 6.687c.027.036.057.076.026.106-.146.161-.292.337-.395.528a.16.16 0 0 1-.05.062c-.013.008-.027.005-.042.002H9.78L.831 19.891zm5.68-6.403l4.491-4.491c.422.185 1.958.834 3.332 1.414 1.04.44 1.988.84 2.286.97.03.012.057.024.07.054.008.018.004.041 0 .06a2.003 2.003 0 0 0 .523 1.828c.03.03 0 .073-.026.11l-.014.021-4.56 7.063c-.012.02-.023.037-.043.05-.024.015-.058.008-.086.001a2.274 2.274 0 0 0-.543-.074c-.164 0-.342.03-.522.063h-.001c-.02.003-.038.007-.054-.005a.21.21 0 0 1-.045-.051l-4.808-7.013zm5.398-5.398l5.814-5.814c.805-.805 1.208-1.208 1.674-1.355a2 2 0 0 1 1.206 0c.466.147.869.55 1.674 1.355l1.26 1.26-4.135 6.404a.155.155 0 0 1-.041.048c-.025.017-.06.01-.09 0a2.097 2.097 0 0 0-1.92.37c-.027.028-.067.012-.101-.003-.54-.235-4.74-2.01-5.341-2.265zm12.506-3.676l3.818 3.818-.92 5.698v.015a.135.135 0 0 1-.008.038c-.01.02-.03.024-.05.03a1.83 1.83 0 0 0-.548.273.154.154 0 0 0-.02.017c-.011.012-.022.023-.04.025a.114.114 0 0 1-.043-.007l-5.818-2.472-.011-.005c-.037-.015-.081-.033-.081-.071a2.198 2.198 0 0 0-.31-.915c-.028-.046-.059-.094-.035-.141l4.066-6.303zm-3.932 8.606l5.454 2.31c.03.014.063.027.076.058a.106.106 0 0 1 0 .057c-.016.08-.03.171-.03.263v.153c0 .038-.039.054-.075.069l-.011.004c-.864.369-12.13 5.173-12.147 5.173-.017 0-.035 0-.052-.017-.03-.03 0-.072.027-.11a.76.76 0 0 0 .014-.02l4.482-6.94.008-.012c.026-.042.056-.089.104-.089l.045.007c.102.014.192.027.283.027.68 0 1.31-.331 1.69-.897a.16.16 0 0 1 .034-.04c.027-.02.067-.01.098.004zm-6.246 9.185l12.28-5.237s.018 0 .035.017c.067.067.124.112.179.154l.027.017c.025.014.05.03.052.056 0 .01 0 .016-.002.025L25.756 23.7l-.004.026c-.007.05-.014.107-.061.107a1.729 1.729 0 0 0-1.373.847l-.005.008c-.014.023-.027.045-.05.057-.021.01-.048.006-.07.001l-9.793-2.02c-.01-.002-.152-.519-.163-.52z"
/>
<svg
version="1.0"
xmlns="http://www.w3.org/2000/svg"
width="892.000000pt"
height="1280.000000pt"
viewBox="0 0 892.000000 1280.000000"
preserveAspectRatio="xMidYMid meet"
>
<g
transform="translate(0.000000,1280.000000) scale(0.100000,-0.100000)"
fill="#000000"
stroke="none"
>
<path d="M891 12790 c-140 -30 -196 -95 -302 -354 -44 -107 -120 -218 -289
-421 -202 -242 -253 -336 -286 -528 -23 -134 -16 -215 23 -269 54 -76 209
-166 354 -205 86 -24 260 -23 349 1 88 24 210 72 356 140 142 66 156 65 204
-11 40 -63 65 -132 90 -250 29 -133 39 -512 19 -699 -7 -71 -12 -149 -12 -174
5 -120 -68 -625 -252 -1750 -150 -919 -208 -1361 -250 -1925 -35 -478 -18
-1136 41 -1545 35 -244 119 -521 316 -1040 66 -173 146 -389 177 -480 l56
-165 0 -135 c-1 -158 -16 -257 -91 -610 -111 -517 -136 -681 -137 -895 0 -173
16 -261 68 -370 38 -79 116 -164 180 -195 108 -52 319 -82 434 -60 84 15 127
38 178 93 113 122 178 363 218 802 35 379 65 559 112 669 l17 39 78 -6 c185
-12 219 -75 219 -402 0 -104 -5 -290 -12 -412 -14 -269 -7 -576 14 -650 37
-127 118 -192 289 -233 185 -43 406 -33 503 25 198 115 319 640 361 1564 l7
153 42 18 c45 19 136 42 335 85 138 30 220 55 293 92 39 19 51 21 69 12 20
-11 21 -15 14 -153 -8 -177 -9 -616 -1 -676 22 -166 51 -256 93 -293 11 -10
53 -30 94 -45 68 -25 84 -27 228 -26 142 0 162 3 235 28 183 63 305 177 344
321 10 38 16 106 41 475 28 411 103 652 248 799 146 148 314 185 662 146 416
-47 851 -139 1009 -215 174 -83 374 -236 499 -382 130 -151 237 -435 258 -683
8 -103 -10 -246 -46 -352 -97 -290 -351 -530 -785 -739 -267 -129 -480 -205
-1080 -384 -394 -118 -510 -158 -631 -214 -168 -80 -243 -180 -183 -245 75
-80 257 -80 729 0 657 111 1092 254 1695 556 312 156 470 249 528 312 96 104
217 378 263 596 10 50 17 137 19 235 1 85 8 207 15 270 27 246 -9 523 -100
787 -101 290 -201 457 -393 651 -239 243 -591 448 -1018 592 -68 24 -146 54
-174 68 -92 46 -588 417 -704 527 -191 180 -351 383 -671 845 -308 447 -459
638 -646 822 -441 431 -971 533 -1629 313 -150 -50 -281 -106 -553 -234 -393
-185 -504 -208 -587 -125 -147 146 -205 544 -206 1404 0 445 6 671 36 1330 32
719 37 892 31 1045 -30 706 -226 1586 -456 2045 -62 124 -199 330 -252 380
-43 40 -50 46 -134 133 -67 69 -165 127 -268 159 -71 21 -231 31 -295 18z" />
</g>
</svg>
</div>,
{
width: 1200,
height: 630,
width: 892,
height: 1280,
},
);
}

0 comments on commit a744d0c

Please sign in to comment.