blob: fd1b53a0d26a2c894b0d36be7cb536f3aedd41a1 [file] [log] [blame]
<?php
/*******************************************************************************
* Copyright (c) 2014 - 2016 Eclipse Foundation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://eclipse.org/legal/epl-v10.html
*
* Contributors:
* Christopher Guindon (Eclipse Foundation) - Initial implementation
* Eric Poirier (Eclipse Foundation)
*******************************************************************************/
// Get the featured newsletter items
$newsletter_items_xml = simplexml_load_file('newsletter-items.xml');
$newsletter_items = json_decode(json_encode($newsletter_items_xml),TRUE);
$featured_newsletter_col_class = "col-md-8 col-sm-12 col-xs-24";
if (count($newsletter_items["featured_newsletters"]['item']) <= 4) {
$featured_newsletter_col_class = "col-sm-12 col-xs-24";
}
?>
<?php if (!empty($thankyou)): ?>
<div class="container margin-top-20"><?php print $thankyou;?></div>
<?php endif; ?>
<?php include($_SERVER['DOCUMENT_ROOT'] . "/downloads/content/thankyou/newsletter.tpl.php");?>
<div class="newsletter-sponsored-by">
<div class="container">
<div class="row">
<div class="col-sm-12">
<?php if ($displayNewsletterSponsor): ?>
<p class="sponsored-by-neon"><small class="margin-top-10">Newsletter sponsored by</small> <a target="_blank" href="<?php print $newsletter_items['sponsors_home_page']['link']; ?>"><img class="neon-logo" src="<?php print $newsletter_items['sponsors_home_page']['image']; ?>" alt="<?php print $newsletter_items['sponsors_home_page']['title']; ?>"></a></p>
<?php endif; ?>
</div>
<div class="col-md-8 col-md-offset-4 col-sm-12 col-xs-12 col-xs-offset-6 col-sm-offset-0">
<p class="google-search-archive">Search Newsletter Archives</p>
<div class="reset-box-sizing content">
<script>
(function() {
var cx = '011805775785170369411:9igyhchnmqc';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:searchbox-only gname="newsletter" resultsUrl="https://<?php print $domain['domain']; ?>/home/search.php" queryParameterName="n" as_sitesearch="www.eclipse.org/community/eclipse_newsletter/"></gcse:searchbox-only>
</div>
</div>
</div>
</div>
</div>
<div class="newsletter-featured-container">
<div class="container">
<div class="row">
<div class="col-md-8">
<div class="featured-title-container">
<div class="featured-title-item">
<h2 class="heading-underline">Featured <br>Newsletter</h2>
<h3 class="white"><?php print $newsletter_items['featured_newsletters_title']['title']; ?></h3>
<p class="padding-top-10"><a class="btn btn-default" href="<?php print $newsletter_items['featured_newsletters_readmore']['link']; ?>"><?php print $newsletter_items['featured_newsletters_readmore']['title']; ?></a></p>
</div>
</div>
</div>
<div class="col-md-16">
<div class="row reset">
<?php foreach ($newsletter_items["featured_newsletters"]['item'] as $article): ?>
<div style="background-size:cover;background-image:url(<?php print $article['imageurl']?>);" class="<?php print $featured_newsletter_col_class; ?> reset featured-centered-item">
<a class="" href="<?php print $article['link']?>">
<span class="centered-vertical-item">
<span class="item-title"><?php print $article['title']?></span>
<?php print '<span class="item-description">' . (!empty($article['description']) ? $article['description'] : "") . '</span>';?>
</span>
</a>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
</div>
<div class="text-center">
<div class="container">
<h2 class="heading-underline text-center">Recent Newsletters</h2>
<div class="row">
<?php foreach ($newsletter_items["recent_newsletters"]['item'] as $newsletter): ?>
<div class="col-md-6 col-sm-12 col-xs-24 margin-bottom-25">
<div style="background-image:url(<?php print $newsletter['imageurl']?>);" class="featured-centered-item">
<a class="hidden-item" href="<?php print $newsletter['link']?>">
<span class="centered-vertical-item">
<span class="item-title"><?php print $newsletter['title']?></span>
<?php print '<span class="item-description">' . (!empty($newsletter['description']) ? $newsletter['description'] : "") . '</span>';?>
</span>
</a>
</div>
</div>
<?php endforeach; ?>
</div>
<div class="padding-top-50 padding-bottom-50">
<p><a class="btn btn-warning" href="/community/eclipse_newsletter/archives.php">All Past Newsletters</a></p>
</div>
</div>
</div>
<div class="newsletter-contact-us text-center padding-bottom-50" style="background-color:#383837;">
<div class="container">
<h2 class="heading-underline text-center white">Contact us</h2>
<ul class="list-inline list-border-right">
<li><a class="a-underline fw-200 white" href="mailto:newsletter@eclipse.org">Send us Feedback</a></li>
<li><a class="a-underline fw-200 white" href="mailto:newsletter@eclipse.org">Sponsor the Newsletter</a></li>
<li><a class="a-underline fw-200 white" href="mailto:newsletter@eclipse.org">Submit an Idea</a></li>
</ul>
</div>
</div>