TheNeuralBit commented on a change in pull request #13565:
URL: https://github.com/apache/beam/pull/13565#discussion_r571054669



##########
File path: website/www/site/layouts/shortcodes/highlight.html
##########
@@ -12,20 +12,51 @@
 
 {{ $content := (trim .Inner "\n\r") | htmlUnescape | safeHTML }}
 {{ $ctx := . }}
-{{ with (.Get "class") }}
-    <div class={{ . }}>
-        {{ with ($ctx.Get "lang") }}
+{{ $language := .Get 0 }}
+{{ $file := .Get "file" }}
+{{ $notebook := .Get "notebook" }}
+{{ with (.Get "language") }}
+    <div class='{{ printf "language-%s" . }} snippet'>
+        <div class="notebook-skip code-snippet">
+            {{ with $file }}
+                {{ with $notebook }}
+                    <a target="_blank" type="button" data-bs-toggle="tooltip" 
data-bs-placement="bottom" title="Run code" 
href="https://colab.research.google.com/github/{{ $ctx.Site.Params.branch_repo 
}}/{{ $ctx.Get `notebook` }}-py.ipynb">
+                        <img src="/images/run-icon.svg"/>
+                    </a>
+                {{ end }}
+                <a target="_blank" type="button" data-bs-toggle="tooltip" 
data-bs-placement="bottom" title="View source code" href="https://github.com/{{ 
$ctx.Site.Params.branch_repo }}/{{ $ctx.Get `py` }}">

Review comment:
       ```suggestion
                   <a target="_blank" type="button" data-bs-toggle="tooltip" 
data-bs-placement="bottom" title="View source code" href="https://github.com/{{ 
$ctx.Site.Params.branch_repo }}/{{ $ctx.Get `file` }}">
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to