[ 
https://issues.apache.org/jira/browse/BEAM-11424?focusedWorklogId=547021&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-547021
 ]

ASF GitHub Bot logged work on BEAM-11424:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Feb/21 14:20
            Start Date: 03/Feb/21 14:20
    Worklog Time Spent: 10m 
      Work Description: Jakub-Sadowski commented on a change in pull request 
#13565:
URL: https://github.com/apache/beam/pull/13565#discussion_r569451325



##########
File path: website/www/site/layouts/shortcodes/highlight.html
##########
@@ -12,20 +12,36 @@
 
 {{ $content := (trim .Inner "\n\r") | htmlUnescape | safeHTML }}
 {{ $ctx := . }}
-{{ with (.Get "class") }}
-    <div class={{ . }}>
-        {{ with ($ctx.Get "lang") }}
+{{ $py := .Get "py" }}
+{{ with (.Get "language") }}
+    <div class='{{ printf "language-%s" . }} snippet'>
+        <div class="notebook-skip code-snippet">
+            {{ with $py }}
+                <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>
+                <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` }}">
+                    <img src="/images/code-icon.svg"/>
+                </a>
+                <a class="copy" type="button" data-bs-toggle="tooltip" 
data-bs-placement="bottom" title="Copy to clipboard">
+                    <img src="/images/copy-icon.svg"/>
+                </a>
+            {{ else }}
+                <a class="copy" type="button" data-bs-toggle="tooltip" 
data-bs-placement="bottom" title="Copy to clipboard">
+                    <img src="/images/copy-icon.svg"/>
+                </a>
+            {{ end }}
             {{ highlight $content . "" }}
-        {{ else }}
-            {{ highlight $content "" "" }}
-        {{ end }}
+        </div>
     </div>
 {{ else }}
-    {{ with (.Get 0) }}
-        <div class={{ printf "language-%s" . }}>
-            {{ highlight $content . "" }}
+    <div class="snippet">
+        <div class="notebook-skip code-snippet without_switcher">
+            <a class="copy" type="button" data-bs-toggle="tooltip" 
data-bs-placement="bottom" title="Copy to clipboard">
+                <img src="/images/copy-icon.svg"/>
+            </a>
+            {{ highlight $content "" "" }}
         </div>
-    {{ else }}
-        {{ highlight $content "" "" }}
-    {{ end }}
+    </div>

Review comment:
       I deleted the gray line at the top, the gap is not visible anymore. and 
about the space, it's necessary because in some cases there are 3 buttons and 
the text could overlay them, using code fences is an exception and there we 
don't have this space




----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 547021)
    Time Spent: 7h  (was: 6h 50m)

> [Website revamp] Development of Contribution Guide page
> -------------------------------------------------------
>
>                 Key: BEAM-11424
>                 URL: https://issues.apache.org/jira/browse/BEAM-11424
>             Project: Beam
>          Issue Type: Improvement
>          Components: website
>            Reporter: Agnieszka Sell
>            Assignee: Jakub Sadowski
>            Priority: P2
>              Labels: website-revamp-2020, website-revamp-sprint-9
>          Time Spent: 7h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to