You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by bd...@apache.org on 2023/04/28 08:35:28 UTC

[comdev-site] 02/02: More tags + remove obsolete broken calendars page

This is an automated email from the ASF dual-hosted git repository.

bdelacretaz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/comdev-site.git

commit b3cd0d859bae6fb7fc408b15b6b9acb256649a26
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Fri Apr 28 10:35:17 2023 +0200

    More tags + remove obsolete broken calendars page
---
 layouts/_default/terms.html            |  2 +-
 source/blog/2023-preparing-the-move.md |  9 +++-
 source/calendars/_index.md             | 11 ++++-
 source/calendars/conferences.md        | 87 ++--------------------------------
 static/css/main.css                    |  7 +++
 5 files changed, 30 insertions(+), 86 deletions(-)

diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index 744185b..7d19441 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -1,7 +1,7 @@
 {{ define "main" }}
 <h2>All tags</h2>
 <ul>
-    {{ range .Pages }}
+    {{ range sort .Pages }}
         <li>
             <a href="{{ .Permalink }}">{{ .Title }}</a>
         </li>
diff --git a/source/blog/2023-preparing-the-move.md b/source/blog/2023-preparing-the-move.md
index 0c54313..2622bc8 100644
--- a/source/blog/2023-preparing-the-move.md
+++ b/source/blog/2023-preparing-the-move.md
@@ -4,12 +4,19 @@ url: /blog/preparing-the-move/
 description: We're about to move our blog here
 date: 2023-04-20
 blog_post: true
-tags: ["blog","help-needed"]
+tags: ["blog","help-wanted"]
 ---
 
 We're in the process of moving our content here from the 
 existing [blogs.apache.org](https://blogs.apache.org/) location.
 
+<div class ="help-wanted">
+
+#### Help wanted
+
 The content has been exported to a
 [branch of the comdev-site](https://github.com/apache/comdev-site/tree/christ/blog_migration)
 repository, it needs a bit of tweaking, patches welcome!
+
+</div>
+
diff --git a/source/calendars/_index.md b/source/calendars/_index.md
index 7539b42..b84e852 100644
--- a/source/calendars/_index.md
+++ b/source/calendars/_index.md
@@ -1,9 +1,18 @@
 ---
 title: Apache Related Event Calendars
 url: /calendars/
-tags: ["calendars","events","conferences"]
+tags: ["calendars","events","conferences","help-wanted"]
 ---
 
+<div class ="help-wanted">
+
+#### Help wanted
+
+This page can probably just redirect to the [events.apache.org](https://events.apache.org) website, would anything be missing if we do that?
+</div>
+
+## Calendar
+
 This calendar lists major events relating to The Apache Software Foundation
 and our many Apache projects.  We also have an automated
 [listing of upcoming Apache-related Meetups][5] (smaller events) available.
diff --git a/source/calendars/conferences.md b/source/calendars/conferences.md
index d2a2ba4..6d53012 100644
--- a/source/calendars/conferences.md
+++ b/source/calendars/conferences.md
@@ -1,90 +1,11 @@
 ---
 title: Apache Conferences Calendar
-tags: ["calendars","events","conferences"]
 ---
 
-## Deprecated - See New Calendar instead
+This page is not used anymore, see [/calendars](/calendars/) instead.
 
-This calendar is no longer maintained; please see [this page](/calendars/) instead.
-
-This Calendar is maintained by the Apache Community Development Committee (ComDev),
-to have your event listed considered for addition please mail [dev@community.apache.org][1].
-Note that to be listed in this calendar events must conform to the [Third Party Event Branding Policy][2].
-
-## Upcoming events
-
-* _List loading_
-
-<iframe src="https://www.google.com/calendar/embed?src=nerseigospses068jd57bk5ar8%40group.calendar.google.com&ctz=America/New_York"
-style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>
-
-This Calendar is also available as an [iCal feed][3]
-
-<script type="text/javascript">
-function handleContents(li, text) {
-   if(text == undefined || text.length == 0) {
-      return;
-   }
-   parts = text.split("\n");
-   for(var i=0; i<parts.length; i++) {
-      li.appendChild(document.createElement("br"));
-      li.appendChild(document.createTextNode(parts[i]));
-   }
-}
-
-var dateRegExp = new RegExp("^(\\d{4})-(\\d{2})-(\\d{2})$");
-function handleDates(li, when) {
-   var from = when['startTime'];
-   var to = when['endTime'];
-   if(from.match(dateRegExp) && to.match(dateRegExp)) {
-      var fp = from.split(dateRegExp);
-      var tp = to.split(dateRegExp);
-      var fromDate = new Date(fp[1],fp[2]-1,fp[3]);
-      var toDate = new Date(tp[1],tp[2]-1,tp[3]);
-      var realToDate = new Date(toDate.getTime() - 24*60*60*1000);
-
-      var text;
-      if(fromDate.getTime() == realToDate.getTime()) {
-         // Single day
-         text = from;
-      } else {
-         // Really multi day
-         text = from + " to " + realToDate.getFullYear() + "-" +
-                (realToDate.getMonth()+1) + "-"  + realToDate.getDate();
-      }
-      li.appendChild(document.createTextNode(" - " + text))
-   } else {
-      li.appendChild(document.createTextNode(" - " + from))
-   }
-}
-
-function render(data) {
-   var ev = document.getElementById("events");
-   if(ev.hasChildNodes()) {
-      while(ev.childNodes.length >= 1) {
-         ev.removeChild(ev.firstChild);
-      }
-   }
-
-   var feed = data.feed;
-   for(var i=0; i<feed.entry.length; i++) {
-      var entry = feed.entry[i];
-      var title = entry.title.$t;
-      var text = entry.content.$t;
-      var when = entry['gd$when'][0];
-
-      var li = document.createElement("li");
-      var li_b = document.createElement("b");
-      li_b.appendChild(document.createTextNode(title));
-      li.appendChild(li_b);
-      handleDates(li, when);
-      handleContents(li, text);
-      ev.appendChild(li);
-   }
-}
+<script>
+    // Hugo aliases should do that, didn't get them to work so far
+    window.location.href = "/calendars/"
 </script>
-<script src="https://www.google.com/calendar/feeds/nerseigospses068jd57bk5ar8@group.calendar.google.com/public/full?alt=json-in-script&callback=render&orderby=starttime&max-results=30&singleevents=true&sortorder=ascending&futureevents=true"></script>
 
-  [1]: mailto:dev@community.apache.org
-  [2]: https://www.apache.org/foundation/marks/events.html
-  [3]: https://www.google.com/calendar/ical/nerseigospses068jd57bk5ar8%40group.calendar.google.com/public/basic.ics
diff --git a/static/css/main.css b/static/css/main.css
index 24b034d..ff4e60e 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -70,4 +70,11 @@ ul.tags-list {
   float: right;
   margin-left: 1rem;
   margin-bottom: 1rem;
+}
+
+.help-wanted {
+  padding: 1rem;
+  border-left: solid var(--gray) 1px;
+  font-size: 90%;
+  background-color: var(--light);
 }
\ No newline at end of file