Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Poirier2019-02-11 16:36:00 +0000
committerEric Poirier2019-02-11 16:55:32 +0000
commit43782589a937cd5144c7a6f5c892a36d48e17e5c (patch)
tree85cb2815c7ba3138079d5a58220205680f9c2587
parent3da0ef2e0059a9c6923b79ce2de4f7e4f51c1c07 (diff)
downloadeclipse.org-common-43782589a937cd5144c7a6f5c892a36d48e17e5c.tar.gz
eclipse.org-common-43782589a937cd5144c7a6f5c892a36d48e17e5c.tar.xz
eclipse.org-common-43782589a937cd5144c7a6f5c892a36d48e17e5c.zip
Bug 544294 - Change footer banner and update setAttributes function
Change-Id: I772da6d6d0666c72f1725202658f2415c0e0783e Signed-off-by: Eric Poirier <eric.poirier@eclipse-foundation.org>
-rw-r--r--classes/themes/baseTheme.class.php40
-rw-r--r--classes/themes/quicksilver.class.php15
2 files changed, 28 insertions, 27 deletions
diff --git a/classes/themes/baseTheme.class.php b/classes/themes/baseTheme.class.php
index daf713bd..00ab1ea3 100644
--- a/classes/themes/baseTheme.class.php
+++ b/classes/themes/baseTheme.class.php
@@ -554,26 +554,28 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
);
$type = strtolower($type);
- $value = explode(' ', $value);
- foreach ($value as $val) {
- if (in_array($type, $allowed_type) && is_string($element) && !empty($element) && !empty($val)) {
- switch ($type) {
- case 'class':
- // Append classes instead of overriting them.
- // This way we can set multiple classes for differents contexts.
- if (!isset($this->attributes[$type][$element]) || !in_array($val, $this->attributes[$type][$element])) {
- $this->attributes['class'][$element][] = $val;
- }
- break;
-
- // For everything else, we only keep the last value set.
- default:
- $this->attributes[$type][$element] = array(
- $val
- );
- break;
+ if (!in_array($type, $allowed_type) || !is_string($element) || empty($element) || empty($value)) {
+ return $this->attributes;
+ }
+
+ switch ($type) {
+ case 'class':
+ $value = explode(' ', $value);
+ foreach ($value as $val) {
+ // Append classes instead of overriting them.
+ // This way we can set multiple classes for differents contexts.
+ if (!isset($this->attributes[$type][$element]) || !in_array($val, $this->attributes[$type][$element])) {
+ $this->attributes['class'][$element][] = $val;
+ }
}
- }
+ break;
+
+ // For everything else, we only keep the last value set.
+ default:
+ $this->attributes[$type][$element] = array(
+ $value
+ );
+ break;
}
return $this->attributes;
}
diff --git a/classes/themes/quicksilver.class.php b/classes/themes/quicksilver.class.php
index 47ddf241..c140390e 100644
--- a/classes/themes/quicksilver.class.php
+++ b/classes/themes/quicksilver.class.php
@@ -39,13 +39,13 @@ class Quicksilver extends solstice {
$this->setAttributes('img_logo_mobile', '160', 'width');
// Featured footer
- $this->setAttributes('featured-footer', 'featured-footer featured-footer-newsletter background-secondary');
+ $this->setAttributes('featured-footer', 'featured-footer featured-footer-newsletter');
$featured_footer_bg_img = "https://www.eclipse.org/home/images/banner_image_survey.jpg";
if(time() >= strtotime("17 December 2018")) {
- $featured_footer_bg_img = "https://eclipse.org/home/images/background_eclipselandingpage.jpg";
+ $featured_footer_bg_img = "https://eclipse.org/home/images/whisp.png";
}
- $this->setAttributes('featured-footer', "background-size:cover;background-image:url(". $featured_footer_bg_img .");background-repeat:no-repeat;background-position:center;",'style');
+ $this->setAttributes('featured-footer', "background-size:cover;background-image:url(". $featured_footer_bg_img .");background-repeat:no-repeat;background-position:center;clip-path:polygon(0 8%,100% 0,100% 100%,0 100%);-webkit-clip-path:polygon(0 8%,100% 0,100% 100%,0 100%);border-bottom:1px solid #ccc;",'style');
// Set attributes on main sidebar
$this->setAttributes('main-sidebar', 'main-sidebar-default-margin');
@@ -178,13 +178,12 @@ EOHTML;
<p style="font-size:18px;">Runs until December 14, 2018</p>
<p><a class="btn btn-primary" href="https://bit.ly/2yS61ap">Take the Survey!</a></p>';
- if(time() >= strtotime("17 December 2018") && time() < strtotime("19 December 2018 10:00")) {
- $content = '<p style="font-size:16px;" class="white">Coming December 19, 2018</p>
- <h2 style="font-size:52px;" class="white"><strong>Eclipse IDE 2018-12</strong></h2>
- <p><a class="btn btn-primary btn-lg" href="https://www.eclipse.org/eclipseide/">Learn More</a></p>';
+ if(time() >= strtotime("11 February 2019") && time() < strtotime("8 March 2019 10:00")) {
+ $content = '<h2><strong>The 2019 IoT Developer Survey is here! Complete it today!</strong></h2>
+ <p><a class="btn btn-primary btn-lg" href="https://www.surveymonkey.com/r/H6VJWDJ">Click Here</a></p>';
}
- if(time() >= strtotime("19 December 2018 10:00")) {
+ if(time() >= strtotime("8 March 2019 10:00")) {
$btn_url = $this->buildUrl("https://www.eclipse.org/go/PROMO_ECLIPSEIDE_FOOTER", array(
'query' => array(
'utm_source' => "eclipse_foundation",

Back to the top