zregvart commented on a change in pull request #298: Pulling data from json apis
URL: https://github.com/apache/camel-website/pull/298#discussion_r401468651
 
 

 ##########
 File path: layouts/shortcodes/contributors.html
 ##########
 @@ -0,0 +1,40 @@
+
+<table class="tableblock stretch">
+    <thead>
+        <tr>
+            <th>Avatar</th>
+            <th>Name</th>
+            <th>Organization</th>
+        </tr>
+    </thead>
+    <tbody>
+        {{ range  $page_count := (seq 10) }}
+            {{ $page := string $page_count }}
+                {{ $git_contributors := getJSON 
"https://api.github.com/repos/apache/camel/contributors?per_page=100&anon=1&page=";
 $page "&access_token=" $.Site.Params.token }}
+                {{ range  $git_contributors }}
+                    {{ if .url }}
+                        {{ $user_url := getJSON .url }}
+                        {{ if $user_url.name }}
+                            <tr>
+                                <td> <img width="50px" height="50px" src="{{ 
.avatar_url }}"/></td>
 
 Review comment:
   Would prefer to use a CSS class instead of `width`/`height`

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to