Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixes #52

  • Loading branch information...
commit 5c6c55550316ed4fff1f64ca1f0736642ebd7076 1 parent 9c71a4a
Valérian Saliou authored
View
203 css/home.css
@@ -235,7 +235,7 @@ Last revision: 20/10/12
}
#home .plane {
- background-position: 0 -384px;
+ background-position: 0 -421px;
width: 507px;
height: 328px;
position: absolute;
@@ -244,8 +244,6 @@ Last revision: 20/10/12
}
#home .main {
- background-color: rgb(20,20,20);
- background-color: rgba(20,20,20,0.85);
position: absolute;
top: 50%;
margin-top: -200px;
@@ -254,6 +252,17 @@ Last revision: 20/10/12
left: 50%;
margin-left: -400px;
z-index: 50;
+}
+
+#home .mainview {
+ background-color: rgb(20,20,20);
+ background-color: rgba(20,20,20,0.85);
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ z-index: 2;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
@@ -481,6 +490,194 @@ Last revision: 20/10/12
display: table-cell;
}
+#home .friendsview {
+ height: 65px;
+ position: absolute;
+ bottom: -65px;
+ left: 15px;
+ right: 15px;
+ z-index: 1;
+ opacity: 0.8;
+}
+
+#home .friendsview .friends {
+ background: #e4eef9;
+ background: -moz-linear-gradient(top, #e4eef9, #C5E1FF);
+ background: -webkit-gradient(linear, left top, left bottom, from(#e4eef9), to(#C5E1FF));
+ font-size: 13.4px;
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ border-bottom-left-radius: 8px;
+ border-bottom-right-radius: 8px;
+ -moz-border-radius-bottomleft: 8px;
+ -moz-border-radius-bottomright: 8px;
+ -webkit-border-bottom-left-radius: 8px;
+ -webkit-border-bottom-right-radius: 8px;
+ box-shadow: 0 0 10px black;
+ -moz-box-shadow: 0 0 10px black;
+ -webkit-box-shadow: 0 0 10px black;
+}
+
+#home .friendsview .friends,
+#home .friendsview .friends a {
+ color: black;
+}
+
+#home .friendsview .friends .group {
+ display: block;
+ position: absolute;
+ top: 10px;
+ bottom: 10px;
+}
+
+#home .friendsview .friends .group.content {
+ width: 340px;
+ left: 10px;
+}
+
+#home .friendsview .friends .group.standard {
+ width: 289px;
+ padding-left: 10px;
+ left: 360px;
+}
+
+#home .friendsview .friends .group.content table,
+#home .friendsview .friends .group.standard table {
+ margin-top: -4px;
+}
+
+#home .friendsview .friends .group.content table a,
+#home .friendsview .friends .group.standard table a {
+ text-decoration: underline;
+}
+
+#home .friendsview .friends .group.content table td {
+ padding-top: 3px;
+}
+
+#home .friendsview .friends .group.content a.available_space,
+#home .friendsview .friends .group.standard a.available_space,
+#home .friendsview .friends a.group.refer {
+ opacity: 0.75;
+ -webkit-transition: 0.3s linear;
+ -moz-transition: 0.3s linear;
+ transition: 0.3s linear;
+}
+
+#home .friendsview .friends .group.content a.available_space:hover,
+#home .friendsview .friends .group.content a.available_space:focus,
+#home .friendsview .friends .group.standard a.available_space:hover,
+#home .friendsview .friends .group.standard a.available_space:focus,
+#home .friendsview .friends a.group.refer:hover,
+#home .friendsview .friends a.group.refer:focus {
+ opacity: 1;
+}
+
+#home .friendsview .friends .group.content a.available_space,
+#home .friendsview .friends .group.standard a.available_space {
+ border: 1px dashed #909090;
+ font-size: 11px;
+ font-weight: bold;
+ letter-spacing: 1px;
+ text-transform: uppercase;
+ text-align: center;
+ padding-top: 14px;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+}
+
+#home .friendsview .friends .group.standard a.available_space {
+ left: 10px;
+}
+
+#home .friendsview .friends a.group.refer {
+ width: 81px;
+ padding-left: 10px;
+ right: 10px;
+}
+
+#home .friendsview .friends a.group.refer span {
+ display: block;
+}
+
+#home .friendsview .friends a.group.refer span.icon {
+ background-position: 0 -385px;
+ width: 25px;
+ height: 25px;
+ margin: 0 auto;
+ -webkit-transition: 0.3s linear;
+ -moz-transition: 0.3s linear;
+ transition: 0.3s linear;
+}
+
+#home .friendsview .friends a.group.refer:hover span.icon,
+#home .friendsview .friends a.group.refer:focus span.icon {
+ -webkit-transform: rotate(360deg);
+ -moz-transform: rotate(360deg);
+ transform: rotate(360deg);
+}
+
+#home .friendsview .friends a.group.refer span.label {
+ font-size: 10px;
+ font-weight: bold;
+ text-transform: uppercase;
+ text-align: center;
+ margin-top: 6px;
+}
+
+#home .friendsview .friends .group .separator,
+#home .friendsview .friends .group .separator .top,
+#home .friendsview .friends .group .separator .bottom {
+ position: absolute;
+}
+
+#home .friendsview .friends .group .separator {
+ width: 1px;
+ top: 0;
+ bottom: 0;
+ left: -1px;
+}
+
+#home .friendsview .friends .group .separator .top,
+#home .friendsview .friends .group .separator .bottom {
+ height: 50%;
+ left: 0;
+ right: 0;
+}
+
+#home .friendsview .friends .group .separator .top {
+ background: #eeeeee;
+ background: rgba(0,0,0,0.3);
+ background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(0,0,0,0)), color-stop(100%, rgba(0,0,0,0.3)));
+ background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
+ background: -o-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
+ background: -ms-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
+ background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
+ top: 0;
+}
+
+#home .friendsview .friends .group .separator .bottom {
+ background: #eeeeee;
+ background: rgba(0,0,0,0.3);
+ background: -moz-linear-gradient(top, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(0,0,0,0.3)), color-stop(100%, rgba(0,0,0,0)));
+ background: -webkit-linear-gradient(top, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 100%);
+ background: -o-linear-gradient(top, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 100%);
+ background: -ms-linear-gradient(top, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 100%);
+ background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 100%);
+ bottom: 0;
+}
+
#home a.advanced {
background-position: 0 -334px;
font-size: 0.9em;
View
BIN  img/sources/sprites/home.xcf
Binary file not shown
View
BIN  img/sprites/home.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
5 js/home.js
@@ -368,6 +368,11 @@ function launchHome() {
return false;
});
+ // Slide down the friend links
+ if(exists('#home .friendsview .friends')) {
+ $('#home .friendsview .friends').hide().slideDown(750);
+ }
+
// Warns for an obsolete browser
if(isObsolete()) {
// Add the code
View
77 php/advertising.php
@@ -0,0 +1,77 @@
+<?php
+
+/*
+
+Jappix - An open social platform
+These are the Jappix advertising functions
+
+NOTICE: THIS SCRIPT USES THE THIRD-PARTY SERVICE BACKLINKS.COM
+
+-------------------------------------------------
+
+License: AGPL
+Author: Valérian Saliou
+Last revision: 05/03/13
+
+*/
+
+// Get the adverts for the given advertising type
+function getAdverts($type) {
+ // Available pages
+ if($type == 'content') {
+ $script = 'enginec.php';
+ $key = ADS_CONTENT;
+ } else {
+ $script = 'engine.php';
+ $key = ADS_STANDARD;
+ }
+
+ // Not available?
+ if(!$key)
+ return '';
+
+ $cache_file = JAPPIX_BASE.'/store/cache/ads_'.md5($key).'.cache';
+
+ // Must get from server?
+ if(!file_exists($cache_file) || (isset($_SERVER['HTTP_USER_AGENT']) && ($_SERVER['HTTP_USER_AGENT'] == 'BackLinks.com'))) {
+ // Get the cache data
+ if(isset($_SERVER['SCRIPT_URI']) && strlen($_SERVER['SCRIPT_URI']))
+ $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_URI'].((strlen($_SERVER['QUERY_STRING'])) ? '?'.$_SERVER['QUERY_STRING'] : '');
+ else
+ $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'].((strlen($_SERVER['QUERY_STRING'])) ? '?'.$_SERVER['QUERY_STRING'] : '');
+
+ $query = 'LinkUrl='.urlencode(((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on')) ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
+ $query .= '&Key=' .urlencode($key);
+ $query .= '&OpenInNewWindow=1';
+ $code = @file_get_contents('http://www.backlinks.com/'.$script.'?'.$query);
+
+ // Write code to cache
+ @file_put_contents($cache_file, $code);
+ } else {
+ $code = @file_get_contents($cache_file);
+ }
+
+ if(!$code)
+ $code = '';
+
+ return $code;
+}
+
+// Display the adverts for the given advertising type
+function displayAdverts($type, $refer) {
+ // Get content ads
+ $ads_content = getAdverts($type);
+
+ if(strpos(strtolower($ads_content), '</a>')) {
+ echo($ads_content);
+ } else {
+ echo $ads_content;
+
+ echo '<a class="available_space" href="'.$refer.'" target="_blank">';
+ echo '<span class="home-images icon"></span>';
+ echo '<span class="label">'.T_("Advertising space available!").'</span>';
+ echo '</a>';
+ }
+}
+
+?>
View
104 php/desktop.php
@@ -59,47 +59,81 @@
<div class="home-images plane"></div>
<div class="main">
- <div class="left">
- <div class="home-images logo"></div>
- <p class="upper"><?php _e("Communicate with the entire world!"); ?></p>
- <p class="secondary"><?php _e("Jappix is an open social platform, that let's you easily get or keep in touch with everyone."); ?></p>
- <p class="secondary"><?php _e("Join the millions of users who are currently using the XMPP Network (Google Talk, etc), don't stay out!"); ?></p>
- </div>
-
- <div class="right">
- <h1 class="top default"><?php _e("Hi there!"); ?></h1>
-
- <div class="default homediv">
- <p><?php printf(T_("Welcome on %1s, “%2s”."), htmlspecialchars(SERVICE_NAME), htmlspecialchars(SERVICE_DESC)); ?></p>
-
- <p><?php _e("Login to your existing XMPP account or create a new one for free!"); ?></p>
-
- <button class="login buttons-images">
- <span class="home-images"></span>
- <span class="text"><?php _e("Login"); ?></span>
- </button>
-
- <button class="register buttons-images">
- <span class="home-images"></span>
- <span class="text"><?php _e("Register"); ?></span>
- </button>
-
- <p class="notice"><?php _e("For your account safety, when you login or register, make sure your password remains secret."); ?></p>
+ <div class="mainview">
+ <div class="left">
+ <div class="home-images logo"></div>
+ <p class="upper"><?php _e("Communicate with the entire world!"); ?></p>
+ <p class="secondary"><?php _e("Jappix is an open social platform, that let's you easily get or keep in touch with everyone."); ?></p>
+ <p class="secondary"><?php _e("Join the millions of users who are currently using the XMPP Network (Google Talk, etc), don't stay out!"); ?></p>
</div>
- <div class="navigation">
- <?php
+ <div class="right">
+ <h1 class="top default"><?php _e("Hi there!"); ?></h1>
- // Keep get var
- $keep_get = keepGet('m', false);
+ <div class="default homediv">
+ <p><?php printf(T_("Welcome on %1s, “%2s”."), htmlspecialchars(SERVICE_NAME), htmlspecialchars(SERVICE_DESC)); ?></p>
+
+ <p><?php _e("Login to your existing XMPP account or create a new one for free!"); ?></p>
+
+ <button class="login buttons-images">
+ <span class="home-images"></span>
+ <span class="text"><?php _e("Login"); ?></span>
+ </button>
+
+ <button class="register buttons-images">
+ <span class="home-images"></span>
+ <span class="text"><?php _e("Register"); ?></span>
+ </button>
+
+ <p class="notice"><?php _e("For your account safety, when you login or register, make sure your password remains secret."); ?></p>
+ </div>
- ?>
- <a class="home-images mobile" href="./?m=mobile<?php echo $keep_get; ?>"><span class="vert_center"><?php _e("Mobile"); ?></span></a>
- <?php if(showManagerLink()) { ?>
- <a class="home-images manager" href="./?m=manager<?php echo $keep_get; ?>"><span class="vert_center"><?php _e("Manager"); ?></span></a>
- <?php } if(sslCheck() && !httpsForce()) echo sslLink(); ?>
+ <div class="navigation">
+ <?php
+
+ // Keep get var
+ $keep_get = keepGet('m', false);
+
+ ?>
+ <a class="home-images mobile" href="./?m=mobile<?php echo $keep_get; ?>"><span class="vert_center"><?php _e("Mobile"); ?></span></a>
+ <?php if(showManagerLink()) { ?>
+ <a class="home-images manager" href="./?m=manager<?php echo $keep_get; ?>"><span class="vert_center"><?php _e("Manager"); ?></span></a>
+ <?php } if(sslCheck() && !httpsForce()) echo sslLink(); ?>
+ </div>
</div>
</div>
+
+ <?php if((ADS_ENABLE == 'on') && (ADS_STANDARD || ADS_STANDARD)) { ?>
+ <?php require_once('./php/advertising.php'); ?>
+ <?php $advertise_link = 'http://www.backlinks.com/?aff=58769'; ?>
+
+ <div class="friendsview">
+ <div class="friends">
+ <div class="group content">
+ <?php displayAdverts('content', $advertise_link); ?>
+ </div>
+
+ <div class="group standard">
+ <div class="separator">
+ <span class="top"></span>
+ <span class="bottom"></span>
+ </div>
+
+ <?php displayAdverts('standard', $advertise_link); ?>
+ </div>
+
+ <a class="group refer" href="<?php echo $advertise_link; ?>" target="_blank">
+ <div class="separator">
+ <span class="top"></span>
+ <span class="bottom"></span>
+ </div>
+
+ <span class="home-images icon"></span>
+ <span class="label"><?php _e("Advertise here"); ?></span>
+ </a>
+ </div>
+ </div>
+ <?php } ?>
</div>
<div class="home-images corporation">
Please sign in to comment.
Something went wrong with that request. Please try again.