Skip to content

Commit

Permalink
added macroses and srl icon (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
hellt authored Nov 9, 2023
1 parent 8fecd33 commit 5a28a7f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/blog/posts/2023/srlgpt.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Additionally, in today's release we only support using OpenAI's LLM and you must

[[[% import 'macros.html' as macros %]]]
[[[ macros.srl_version('23.7.1') ]]]
[[[ macros.clab_version('0.47.2') ]]]

OK, so to demonstrate SR Linux GPT app we will use Containerlab (min version 0.47.1) and spin up a very simple single node SR Linux topology:

Expand Down
5 changes: 5 additions & 0 deletions docs/images/srl-icong-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 26 additions & 4 deletions macros/macros.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
[[[% macro srl_version(version) -%]]]
<span class="mdx-badge"><span class="mdx-badge__icon"><a href="#" title="Minimum SR Linux version"><span
class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
[[[% macro srl_version(version, title='Minimum SR Linux version') -%]]]
<span class="mdx-badge"><span class="mdx-badge__icon"><a href="#"><span class="twemoji"><svg viewBox="0 0 512 512"
width="512" height="512" xmlns="http://www.w3.org/2000/svg">
<path d="M 0 0 L 512 0 L 512 512 L 0 512 Z M 373.376 154.9 C 387.38 150.322 398.339 143.456 406.255 134.3 C 414.17 125.145 417.823 113.128 417.823 98.822 C 417.823 92.528 417.214 85.661 414.779 78.795 C 412.343 71.928 408.69 65.633 403.21 59.339 C 397.731 53.044 391.033 48.467 381.9 44.461 C 373.376 40.456 362.417 38.739 349.022 38.739 L 286.919 38.739 L 286.919 239.589 L 314.317 239.589 L 314.317 158.333 L 345.978 158.333 L 397.122 239.589 L 430 239.589 Z M 346.587 135.445 L 314.926 135.445 L 314.926 61.056 L 348.413 61.056 C 361.808 61.056 372.159 64.489 379.465 71.356 C 386.771 78.222 390.424 87.378 390.424 98.822 C 390.424 110.839 386.771 119.422 379.465 126.289 C 372.159 132.583 361.26 135.393 346.648 135.393 Z M 100 226.428 C 101.827 227.572 104.262 228.717 108.524 231.006 C 112.177 233.295 117.657 235.584 123.745 237.3 C 129.834 239.017 137.14 240.734 145.664 242.45 C 154.188 244.167 163.321 244.739 173.672 244.739 C 185.24 244.739 195.59 243.595 204.723 240.734 C 213.856 237.872 221.771 233.867 227.86 228.717 C 233.948 223.567 238.819 217.272 241.864 210.406 C 244.908 203.539 246.734 195.528 246.734 186.945 C 246.734 171.495 242.472 158.906 233.34 150.322 C 224.207 141.739 210.203 134.872 192.546 130.295 L 167.583 123.428 C 154.188 119.995 145.055 115.989 139.576 110.839 C 134.096 105.689 131.052 98.822 131.052 90.239 C 131.052 80.511 134.705 72.5 142.011 66.778 C 149.317 61.056 160.277 58.194 173.672 58.194 C 179.151 58.194 185.24 58.194 190.72 59.339 C 196.199 59.911 201.679 61.056 206.55 62.2 C 211.421 63.344 216.292 65.061 219.945 66.206 C 224.207 67.922 227.251 69.067 229.078 70.211 L 239.428 50.183 C 232.731 46.178 224.207 42.172 212.638 39.311 C 201.679 36.45 188.893 34.733 174.889 34.733 C 163.321 34.733 152.971 36.45 144.447 39.311 C 135.314 42.172 128.007 46.75 121.919 51.9 C 115.83 57.05 112.177 63.344 108.524 70.211 C 104.871 77.078 103.653 84.517 103.653 92.528 C 103.653 107.406 108.524 119.422 118.266 128.006 C 128.616 136.589 141.402 143.456 157.841 147.461 L 182.804 154.328 C 190.111 156.045 195.59 158.333 200.461 160.622 C 205.332 162.911 208.985 165.772 211.421 168.633 C 213.856 171.495 215.683 174.356 216.9 177.789 C 217.509 181.222 218.118 184.656 218.118 188.089 C 218.118 197.817 214.465 205.828 207.159 211.55 C 199.852 217.272 188.893 220.134 173.672 220.134 C 159.059 220.134 146.882 218.417 135.923 214.984 C 124.963 211.55 117.048 208.689 111.568 205.256 Z M 118.482 467.441 L 118.482 450.941 L 59.216 450.941 L 59.216 327.474 L 41.492 327.474 L 41.492 467.441 Z M 156.7 343.974 C 158.362 341.698 159.47 338.853 159.47 335.439 C 159.47 332.026 158.916 329.181 156.7 326.905 C 154.485 324.629 151.715 323.491 148.392 323.491 C 145.069 323.491 142.299 324.629 140.084 326.905 C 138.422 329.181 137.314 332.026 137.314 335.439 C 137.314 338.853 137.868 341.698 140.084 343.974 C 142.299 346.25 145.069 347.388 148.392 347.388 C 151.715 347.388 154.485 346.25 156.7 343.974 Z M 157.254 367.871 L 140.084 367.871 L 140.084 467.441 L 157.254 467.441 Z M 268.031 467.441 L 268.031 402.578 C 268.031 391.199 264.708 381.526 259.169 375.268 C 253.63 369.009 244.768 365.595 233.69 365.595 C 229.259 365.595 225.382 366.164 221.505 367.302 C 217.628 368.44 214.858 369.578 212.089 371.285 C 209.319 372.423 207.104 374.699 205.442 376.405 C 203.78 378.112 202.119 379.819 201.565 381.526 L 201.011 367.871 L 184.394 367.871 L 184.394 466.872 L 201.565 466.872 L 201.565 417.94 C 201.565 412.82 202.119 408.268 203.227 403.716 C 204.334 399.164 205.996 395.182 208.211 391.768 C 210.427 388.354 213.75 385.509 217.074 383.233 C 220.397 381.526 224.828 380.388 229.813 380.388 C 232.582 380.388 234.798 380.957 237.567 381.526 C 240.337 382.095 242.552 383.802 244.214 385.509 C 246.43 387.785 247.537 390.061 248.645 393.475 C 249.753 396.888 250.307 400.871 250.307 405.992 L 250.307 467.441 Z M 377.146 467.441 L 377.146 368.44 L 359.976 368.44 L 359.976 417.372 C 359.976 422.492 359.422 427.044 358.314 431.596 C 357.206 436.148 355.545 440.13 353.329 443.544 C 351.114 446.958 347.79 449.803 344.467 452.079 C 341.144 453.786 336.713 454.924 331.728 454.924 C 328.404 454.924 325.635 454.355 323.419 453.786 C 321.204 453.217 318.988 451.51 317.327 449.803 C 315.665 448.096 314.557 445.251 313.45 442.406 C 312.342 438.992 311.788 435.01 311.788 430.458 L 311.788 367.871 L 293.51 367.871 L 293.51 433.303 C 293.51 444.682 296.279 453.786 302.372 460.613 C 307.911 466.872 316.773 470.286 327.851 470.286 C 332.282 470.286 336.713 469.717 340.036 468.579 C 343.913 467.441 346.683 466.303 349.452 464.596 C 352.221 462.889 354.437 461.182 356.099 459.476 C 357.76 457.769 359.422 456.062 359.976 454.355 L 360.53 467.441 Z M 447.49 414.527 L 479.061 367.871 L 460.783 367.871 L 438.627 400.871 L 416.472 367.871 L 395.978 367.871 L 428.658 416.234 L 393.763 467.441 L 412.041 467.441 L 437.52 429.32 L 462.998 467.441 L 483.492 467.441 Z"
class="st0" />
<g transform="matrix(5.538847, 0, 0, 5.68973, -136.858704, -157.860214)" />
</svg></span></a></span><span class="mdx-badge__text"><a
href="https://github.com/nokia/srlinux-container-image/pkgs/container/srlinux/120042212?tag=[[[version]]]"
title="[[[title]]]">[[[version]]]</a></span></span>
[[[%- endmacro %]]]

[[[% macro version(version, title='Minimum version', href='#') -%]]]
<span class="mdx-badge"><span class="mdx-badge__icon"><a href="#"><span class="twemoji"><svg
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path
d="m21.41 11.58-9-9A2 2 0 0 0 11 2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 .59 1.42l9 9A2 2 0 0 0 13 22a2 2 0 0 0 1.41-.59l7-7A2 2 0 0 0 22 13a2 2 0 0 0-.59-1.42M13 20l-9-9V4h7l9 9M6.5 5A1.5 1.5 0 1 1 5 6.5 1.5 1.5 0 0 1 6.5 5Z">
</path>
</svg></span></a></span><span class="mdx-badge__text"><a href="[[[href]]]"
title="[[[title]]]">[[[version]]]</a></span></span>
[[[%- endmacro %]]]

[[[% macro clab_version(version, title='Minimum Containerlab version') -%]]]
<span class="mdx-badge"><span class="mdx-badge__icon"><a href="#"><span class="twemoji">
<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
<path
d="M288 0H128c-17.7 0-32 14.3-32 32s14.3 32 32 32v132.8c0 11.8-3.3 23.5-9.5 33.5L10.3 406.2C3.6 417.2 0 429.7 0 442.6 0 480.9 31.1 512 69.4 512h309.2c38.3 0 69.4-31.1 69.4-69.4 0-12.8-3.6-25.4-10.3-36.4L329.5 230.4c-6.2-10.1-9.5-21.7-9.5-33.5V64c17.7 0 32-14.3 32-32S337.7 0 320 0h-32zm-96 196.8V64h64v132.8c0 23.7 6.6 46.9 19 67.1l34.5 56.1h-171l34.5-56.1c12.4-20.2 19-43.4 19-67.1z">
</path>
</svg></span></a></span><span class="mdx-badge__text"><a
href="https://github.com/nokia/srlinux-container-image/pkgs/container/srlinux/120042212?tag=[[[version]]]">[[[version]]]</a></span></span>
href="https://containerlab.dev/rn/[[[version.split('.')[0:2] | join('.')]]]/"
title="[[[title]]]">[[[version]]]</a></span></span>
[[[%- endmacro %]]]

0 comments on commit 5a28a7f

Please sign in to comment.