airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kamilbreg...@apache.org
Subject [airflow-site] branch aip-11 updated: Add meetup events (#165)
Date Fri, 15 Nov 2019 10:29:18 GMT
This is an automated email from the ASF dual-hosted git repository.

kamilbregula pushed a commit to branch aip-11
in repository https://gitbox.apache.org/repos/asf/airflow-site.git


The following commit(s) were added to refs/heads/aip-11 by this push:
     new 1ab531e  Add meetup events (#165)
1ab531e is described below

commit 1ab531e54e4d2a14eaff9fc79ff7f978d7c85020
Author: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
AuthorDate: Fri Nov 15 11:29:11 2019 +0100

    Add meetup events (#165)
---
 landing-pages/site/assets/scss/_list-boxes.scss    |   4 +
 .../site/layouts/partials/boxes/event.html         |   8 +-
 landing-pages/site/static/meetups.json             | 167 +++++++--------------
 landing-pages/src/js/meetupsList.js                |   8 +-
 4 files changed, 69 insertions(+), 118 deletions(-)

diff --git a/landing-pages/site/assets/scss/_list-boxes.scss b/landing-pages/site/assets/scss/_list-boxes.scss
index f8282e9..20bebd1 100644
--- a/landing-pages/site/assets/scss/_list-boxes.scss
+++ b/landing-pages/site/assets/scss/_list-boxes.scss
@@ -173,6 +173,10 @@ $card-margin: 20px;
 
     &--next-meetup {
       @extend .bodytext__medium--cerulean-blue;
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      min-height: 52px;
       margin-bottom: 20px;
       text-align: center;
     }
diff --git a/landing-pages/site/layouts/partials/boxes/event.html b/landing-pages/site/layouts/partials/boxes/event.html
index 8f83848..23a4d24 100644
--- a/landing-pages/site/layouts/partials/boxes/event.html
+++ b/landing-pages/site/layouts/partials/boxes/event.html
@@ -29,8 +29,12 @@
             <span>{{ .members }} members</span>
         </p>
         <p class="box-event__meetup--next-meetup">
-            Next meetup:<br>
-            <span class="bodytext__medium--greyish-brown font-weight-500">{{ .date
}}</span>
+            {{ if .date }}
+                Next meetup:<br>
+                <span class="bodytext__medium--greyish-brown font-weight-500">{{ .date
}}</span>
+            {{ else }}
+                No upcoming meetups
+            {{ end }}
         </p>
         <a href="{{ .url }}">
             {{ partial "buttons/button-hollow" (dict "text" "Learn more") }}
diff --git a/landing-pages/site/static/meetups.json b/landing-pages/site/static/meetups.json
index f9a36cf..4711ef0 100644
--- a/landing-pages/site/static/meetups.json
+++ b/landing-pages/site/static/meetups.json
@@ -1,143 +1,80 @@
 [
   {
-    "city": "Warsaw",
+    "city": "Amsterdam",
     "continent": "Europe",
-    "country": "Poland",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
+    "country": "Netherlands",
+    "date": "",
+    "members": 337,
+    "url": "https://www.meetup.com/Amsterdam-Airflow-meetup/"
   },
   {
-    "city": "New York",
+    "city": "San Francisco",
     "country": "USA",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
-  },
-  {
-    "city": "Berlin",
-    "country": "Germany",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
+    "date": "",
+    "members": 1663,
+    "url": "https://www.meetup.com/Bay-Area-Apache-Airflow-Incubating-Meetup/"
   },
   {
-    "city": "Paris",
-    "country": "France",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
+    "city": "London",
+    "country": "United Kingdom",
+    "date": "",
+    "members": 648,
+    "url": "https://www.meetup.com/London-Apache-Airflow-Meetup/"
   },
   {
-    "city": "Warsaw",
-    "country": "Poland",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
-  },
-  {
-    "city": "Warsaw",
-    "country": "Poland",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
-  },
-  {
-    "city": "Warsaw",
-    "country": "Poland",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
-  },
-  {
-    "city": "Warsaw",
-    "country": "Poland",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
-  },
-  {
-    "city": "Warsaw",
-    "country": "Poland",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
-  },
-  {
-    "city": "Warsaw",
-    "country": "Poland",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
-  },
-  {
-    "city": "Warsaw",
-    "country": "Poland",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
-  },
-  {
-    "city": "Warsaw",
-    "country": "Poland",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
-  },
-  {
-    "city": "Warsaw",
-    "country": "Poland",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
+    "city": "New York City",
+    "country": "USA",
+    "date": "",
+    "members": 625,
+    "url": "https://www.meetup.com/NYC-Apache-Airflow-Meetup/"
   },
   {
-    "city": "Warsaw",
-    "country": "Poland",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
+    "city": "Melbourne",
+    "country": "Australia",
+    "date": "",
+    "members": 125,
+    "url": "https://www.meetup.com/Melbourne-Apache-Airflow-Meetup/"
   },
   {
-    "city": "Warsaw",
-    "country": "Poland",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
+    "city": "Paris",
+    "country": "France",
+    "date": "",
+    "members": 550,
+    "url": "https://www.meetup.com/Paris-Apache-Airflow-Meetup/"
   },
   {
-    "city": "Warsaw",
-    "country": "Poland",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
+    "city": "Portland",
+    "country": "USA",
+    "date": "",
+    "members": 69,
+    "url": "https://www.meetup.com/Portland-Apache-Airflow-Meetup/"
   },
   {
-    "city": "Warsaw",
-    "country": "Poland",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
+    "city": "Tokyo",
+    "country": "Japan",
+    "date": "",
+    "members": 109,
+    "url": "https://www.meetup.com/Tokyo-Apache-Airflow-incubating-Meetup/"
   },
   {
-    "city": "Warsaw",
-    "country": "Poland",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
+    "city": "Bangalore",
+    "country": "India",
+    "date": "",
+    "members": 138,
+    "url": "https://www.meetup.com/Bangalore-Apache-Airflow-Meetup/"
   },
   {
-    "city": "Warsaw",
-    "country": "Poland",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
+    "city": "Seattle",
+    "country": "USA",
+    "date": "",
+    "members": 164,
+    "url": "https://www.meetup.com/Seattle-Apache-Airflow-Users-Group/"
   },
   {
     "city": "Warsaw",
     "country": "Poland",
-    "date": "TUE, SEP 24, 6:00 PM",
-    "members": 100,
-    "url": ""
+    "date": "",
+    "members": 206,
+    "url": "https://www.meetup.com/Warsaw-Airflow-Meetup/"
   }
 ]
diff --git a/landing-pages/src/js/meetupsList.js b/landing-pages/src/js/meetupsList.js
index 3f7484e..98b7428 100644
--- a/landing-pages/src/js/meetupsList.js
+++ b/landing-pages/src/js/meetupsList.js
@@ -49,11 +49,17 @@ const runMeetups = () => {
 
       const createElement = (item) => {
         const element = templateElement.cloneNode(true);
+        const nextMeetupNode = element.querySelector(".box-event__meetup--next-meetup");
         element.querySelector('[data-name="location"]').innerHTML = `${item.city}<br/>${item.country}`;
         element.querySelector('[data-name="members-count"]').innerText = `${item.members}
members`;
-        element.querySelector('[data-name="date"]').innerText = item.date;
         element.querySelector("a").href = item.url;
 
+        if (item.date) {
+          element.querySelector('[data-name="date"]').innerText = item.date;
+        } else {
+          nextMeetupNode.innerHTML = "No upcoming meetups";
+        }
+
         return element.firstElementChild;
       };
 


Mime
View raw message