Przeglądaj źródła

website: fix tag for Activity Feed (#4118)

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Livia Medeiros 2 lat temu
rodzic
commit
df8cabdc24

+ 1 - 1
website/themes/uppy/layout/index.ejs

@@ -174,7 +174,7 @@
 <section class="IndexActivity">
   <h2>Activity Feed</h2>
 
-  <div class="on-the-githubs" data-event-source="repos/transloadit/uppy">Loading...</div>
+  <noscript class="activity-feed" data-event-source="repos/transloadit/uppy">You need JavaScript to display the activity feed.</noscript>
 </section>
 
 <section>

+ 4 - 1
website/themes/uppy/layout/layout.ejs

@@ -100,7 +100,10 @@ if (page.series) {
         <script src="//ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> 
         <script src="//kvz.github.io/on-the-githubs/js/jquery.on-the-githubs.min.js"></script>
         <script type="text/javascript">
-          $('.on-the-githubs').onthegithubs();
+          {
+            const $placeholder = $('.activity-feed');
+            $('<ul>', { class: 'on-the-githubs', data: $placeholder.data() }).replaceAll($placeholder).onthegithubs();
+          }
         </script>
       <% } %>
       <script src="/js/common.js"></script>

+ 8 - 1
website/themes/uppy/source/css/_stats.scss

@@ -42,9 +42,16 @@ a.Stats-package {
 
 .on-the-githubs {
   @include clearfix;
+  margin: 0;
+  padding: 0;
+  list-style-type: none;
+
+  &:empty::before {
+    content: "Loading...";
+  }
+
   > li {
     @include clearfix;
-    list-style-type: none;
     margin: 0;
     padding: 12px 0;
     position: relative;