Bug 563674 and Bug 566239 - remove old image

Bug 563674 and Bug 566239 Add featured committer and project according
to newsletter

bug 563674 and Bug 566239 Update title

Signed-off-by: Yi Liu <yi.liu@eclipse-foundation.org>

Change-Id: Iea97e40e21db40de902572b1900a522909d9301d
diff --git a/content/en_index.php b/content/en_index.php
index 97085a7..89219a3 100644
--- a/content/en_index.php
+++ b/content/en_index.php
@@ -37,27 +37,48 @@
   <div class="row">
     <div class="col-lg-10 col-lg-offset-2 col-md-12 padding-bottom-50">
       <div class="block-summary-title">
-        <i class="center-block" data-feather="activity" stroke-width="1"></i>
+        <i class="fa fa-comments fa-3x center-block brand-primary text-center padding-bottom-10" aria-hidden="true"></i>
         <h2>Announcements</h2>
       </div>
      <div id="news-list-announcements" data-pagination="false" data-news-type="announcements" data-news-count="4" data-publish-target="eclipse_org"></div>
-      <ul class="list-inline block-summary-more">
-        <li><a href="http://feeds.feedburner.com/eclipse/fnews" title="Subscribe to our RSS-feed"><i class="fa fa-rss margin-right-5"></i> Subscribe to our RSS-feed</a></li>
-        <li><a href="https://newsroom.eclipse.org/eclipse/announcements/">View all</a></li>
+      <ul class="list-inline text-center">
+        <li><a class="btn btn-primary" href="http://feeds.feedburner.com/eclipse/fnews" title="Subscribe to our RSS-feed"><i class="fa fa-rss margin-right-5"></i> Subscribe </a></li>
+        <li><a class="btn btn-primary" href="https://newsroom.eclipse.org/eclipse/announcements/"> View all </a></li>
       </ul>
     </div>
     <div class="col-lg-10 col-md-12 padding-bottom-50">
       <div class="block-summary-title">
-        <i class="center-block" data-feather="tv" stroke-width="1"></i>
+        <i class="fa fa-users fa-3x center-block brand-primary text-center padding-bottom-10" aria-hidden="true"></i>
         <h2>Community News</h2>
       </div>
       <div id="news-list-community" data-pagination="false" data-news-type="community_news"  data-news-count="4" data-publish-target="eclipse_org"></div>
-      <ul class="list-inline block-summary-more">
-        <li><a href="http://feeds.feedburner.com/eclipse/cnews" title="Subscribe to our RSS-feed"><i class="fa fa-rss margin-right-5"></i> Subscribe to our RSS-feed</a></li>
-        <li><a href="https://newsroom.eclipse.org/eclipse/community-news/">View all</a></li>
+      <ul class="list-inline text-center">
+        <li><a class="btn btn-primary" href="http://feeds.feedburner.com/eclipse/cnews" title="Subscribe to our RSS-feed"><i class="fa fa-rss margin-right-5"></i> Subscribe </a></li>
+        <li><a class="btn btn-primary" href="https://newsroom.eclipse.org/eclipse/community-news/"> View all </a></li>
       </ul>
     </div>
   </div>
+  <hr class="brand-primary padding-bottom-10">
+  <!-- Featured Committer and Featured project -->
+  <div class="row">
+    <div class="col-lg-10 col-lg-offset-2 col-md-12 padding-bottom-50">
+      <div class="block-summary-title">
+        <i class="fa fa-star fa-3x center-block brand-primary text-center padding-bottom-10" aria-hidden="true"></i>
+        <h2>Featured Committer</h2>
+      </div>
+      <div class="news-container my-group" id="commiters-container">
+      </div>
+    </div>
+
+    <div class="col-lg-10 col-md-12 padding-bottom-50">
+      <div class="block-summary-title">
+        <i class="fa fa-rocket fa-3x center-block brand-primary text-center padding-bottom-10" aria-hidden="true"></i>
+        <h2>Featured Project</h2>
+      </div>
+      <div class="news-container my-group" id="projects-container">
+      </div>
+    </div>
+  </div>
 </div>
 
 
diff --git a/images/featured_contents/featured_committers/jakob_erdmann.jpeg b/images/featured_contents/featured_committers/jakob_erdmann.jpeg
new file mode 100644
index 0000000..d918635
--- /dev/null
+++ b/images/featured_contents/featured_committers/jakob_erdmann.jpeg
Binary files differ
diff --git a/images/featured_contents/featured_projects/cdt.png b/images/featured_contents/featured_projects/cdt.png
new file mode 100644
index 0000000..43b57b5
--- /dev/null
+++ b/images/featured_contents/featured_projects/cdt.png
Binary files differ
diff --git a/index.php b/index.php
index b91f6cf..de0a375 100644
--- a/index.php
+++ b/index.php
@@ -73,6 +73,7 @@
 });
 </script>
 ');
+$App->AddExtraJSFooter('<script src="/home/js/featured-projects-committer.js"></script>');
 // Place your html content in a file called content/en_pagename.php
 ob_start();
 include("content/en_" . $App->getScriptName());
diff --git a/js/data.json b/js/data.json
new file mode 100644
index 0000000..2fb3221
--- /dev/null
+++ b/js/data.json
@@ -0,0 +1,20 @@
+{
+    "committers": [
+        {
+            "name": "Jakob Erdmann",
+            "Committer to": "Eclipse SUMO",
+            "Committer since": "2018",
+            "image": "/home/images/featured_contents/featured_committers/jakob_erdmann.jpeg",
+            "url": "http://eclipse.org/community/eclipse_newsletter/2020/december/5.php"
+        }
+    ],
+
+    "projects": [
+        {
+            "name": "Eclipse CDT",
+            "description": "Eclipse CDT provides a fully functional C/C++ IDE based on the Eclipse Platform.",
+            "image": "/home/images/featured_contents/featured_projects/cdt.png",
+            "url": "https://www.eclipse.org/cdt/"
+        }
+    ]
+}
\ No newline at end of file
diff --git a/js/featured-projects-committer.js b/js/featured-projects-committer.js
new file mode 100644
index 0000000..a4b25bc
--- /dev/null
+++ b/js/featured-projects-committer.js
@@ -0,0 +1,38 @@
+(function($, document) {
+    //your code here;
+    $.getJSON("/home/js/data.json", function(data){
+        const committers = data.committers
+        const projects = data.projects
+
+        for (let i=0; i<committers.length; i++) {
+            var image = "<div class='col-xs-8 padding-0 eclipsefdn-user-display-circle'><img class='img img-responsive' src=" + committers[i].image + "></div>"
+            var content = " <div class='col-xs-16'>" + 
+            "<h3 class='h4'><strong>" + committers[i].name + "</strong></h3>" + 
+            "<p><strong>Committer to: </strong>" + committers[i]["Committer to"] + "</p>" + 
+            "<p><strong>Committer since: </strong>" + committers[i]["Committer since"] + "</p>" + 
+            "<a class='btn btn-primary' href='" + committers[i].url + "' title='Subscribe to our RSS-feed'> Read more </a>" + 
+            "</div>"
+
+            var result = "<div class='item clearfix block-summary-item match-height-item-by-row'>" + image + content + "</div>"
+
+            $('#commiters-container').append(result)
+        }
+
+        for (let i=0; i<projects.length; i++) {
+            var image = "<div class='col-xs-8 padding-0'><img class='img img-responsive' src=" + projects[i].image + "></div>"
+            var content = " <div class='col-xs-16'>" + 
+            "<h3 class='h4'><strong>" + projects[i].name + "</strong></h3>" + 
+            "<p>" + projects[i].description + "</p>" + 
+            "<a class='btn btn-primary' href='" + projects[i].url + "' title='Subscribe to our RSS-feed'> Read more </a>" + 
+            "</div>"
+
+            var result = "<div class='item clearfix block-summary-item match-height-item-by-row'>" + image + content + "</div>"
+
+            $('#projects-container').append(result)
+        }
+
+    }).fail(function(){
+        console.log("An error has occurred.");
+    });
+
+ })(jQuery, document);
\ No newline at end of file