Commit 29ff6612 authored by Romain Loth's avatar Romain Loth

topbar for php directory pages + prune corresponding css

parent cadede71
<?php
$html_declaration = '<!DOCTYPE html5>
<html lang="fr-FR">
';
$html_head_inner = '
<meta charset="utf-8">
<!-- ## CSS ## -->
<link type=text/css rel=stylesheet href="/static/css/bootstrap.min.css">
<link type=text/css rel=stylesheet href="/static/js/jquery-ui-1.12.1/jquery-ui.min.css">
<link type=text/css rel=stylesheet href="/static/js/realperson/jquery.realperson.css">
<link type=text/css rel=stylesheet href="/static/css/whoswho.css">
<link type=text/css rel=stylesheet href="/static/css/comex_user.css">
<link type=text/css rel=stylesheet href="/static/css/comex.css">
<link type=text/css rel=stylesheet href="/static/css/bootstrap_directory.css">
<link type=text/css rel=stylesheet href="/static/css/topbar_bootstrap_retrocompatibility.css">
<!-- ## fonts ## -->
<link type="text/css" href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<link type="text/css" href="https://fonts.googleapis.com/css?family=Droid%20Sans" rel="stylesheet">
<!-- ## JS ## -->
<!-- libs -->
<script type="text/javascript" src="/static/js/jquery/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="/static/js/jquery-ui-1.12.1/jquery-ui.min.js"></script>
<!-- for topbar search/refine -->
<script type="text/javascript" src="/static/js/utils.js"></script>
<script type="text/javascript" src="/static/js/misc/underscore.min.js"></script>
<script type="text/javascript" src="/static/js/jquery/jquery.highlight-3.js"></script>
<script type="text/javascript" src="/static/js/whoswho.js"></script>
<script type="text/javascript" src="static/js/highcharts-5.0.js"></script>
<!-- realperson
factorized here in base layout because menubar login has captcha -->
<!-- realperson salt:
possible to change it and send it each time with makeSalt-->
<script type="text/javascript">$.salt = \'verylonverylongverylonverylongverylonverylong\'</script>
<script type="text/javascript" src="/static/js/realperson/jquery.plugin.min.js"></script>
<!-- for some reason jquery.realperson.min.js reacts differently to salt than jquery.realperson.js -->
<script type="text/javascript" src="/static/js/realperson/jquery.realperson.js"></script>
<!-- /realperson -->
<!-- NB our js will be at the end -->
<!-- ## Piwik ## -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function() {
var u="//piwik.iscpif.fr/";
_paq.push(["setTrackerUrl", u+"piwik.php"]);
_paq.push(["setSiteId", "4"]);
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0];
g.type="text/javascript"; g.async=true; g.defer=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//piwik.iscpif.fr/piwik.php?idsite=4" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
<!-- for title and stuff -->
<title>Community explorer: Complex Systems Scholars</title>
<meta name="description" content="Community Explorer Scholar User Profile">
<meta name="keywords" content="complex systems, community, user profile">
<!-- here possible highcharts block include -->
';
?>
<?php
$html_tail_imports = '
<script type="text/javascript" src="/static/js/bootstrap-native-1.1.min.js"></script>
<!-- our js for auth and login: to be able to login via popup anywhere -->
<script src="/static/js/comex_user_shared.js"></script>
<script src="/static/js/comex_user_shared_auth.js"></script>
<script src="/static/js/comex_lib_elts.js"></script>
<script src="/static/js/comex_menubar_login_controllers.js"></script>
';
$footer = '<footer>
<!-- This directory is maintained by the <a href="http://cssociety.org" target="blank">Complex Systems Society</a>
and the <a href="http://iscpif.fr" target="blank">Complex Systems Institute of Paris Ile-de-France</a>.<br/>-->
<center>
<a href="/about.html"><span class="glyphicon glyphicon-question-sign"></span> About</a> -
<!-- <a href="http://moma.csregistry.org/feedback" target="BLANK"><span class="glyphicon glyphicon-repeat"></span> Feedback</a> - -->
<a href="/about/privacy"> <span class="glyphicon glyphicon-list-alt"></span> Privacy</a>
<br>
Directory maintained by the <a href="http://iscpif.fr/" target="blank">Complex Systems Institute of Paris Ile-de-France</a> (<a href="http://www.cnrs.fr/fr/recherche/index.htm" target="_BLANK">CNRS</a> UPS 3611) in partnership with the <a href="http://cssociety.org/" target="blank"> Complex Systems Society</a>.
<br>
<a href="http://iscpif.fr/">
<img src="/static/img/logo_m_bleu-header.png" title="Institut des Systèmes Complexes de Paris Ile-de-France"
style="border: none; margin: 3px 0 -6px 0; height:30px;">
</a>
&nbsp;&nbsp;
<a href="http://cssociety.org/" target="_BLANK">
<img src="/static/img/logo_cssociety_no_legend.png" alt="http://cssociety.org"
style="border: none; margin: 3px 0 -6px 0; height:30px;"
title="Complex systems society">
</a>
&nbsp;&nbsp;
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" target="blank">
<img alt="Creative Commons License" style="border: none; margin: 3px 0 -6px 0; height:30px;" src="/static/img/cc.png">
</a>
&nbsp;&nbsp;
<a href="http://www.cnrs.fr/" target="blank">
<img alt="CNRS" style="border: none; margin: 3px 0 -6px 0; height:30px;" src="/static/img/logo_cnrs.png">
</a>
<!-- <a href="http://moma.csregistry.org/" target="_BLANK"> MOMA</a> - -->
</center>
<p>&nbsp;</p>
</footer>';
?>
<?php
$doors_connect_params = '<form><input id="doors_connect" name="doors_connect" type="text" hidden="" value="doors.iscpif.fr"></form>';
$topbar = '
<div class="topbar" style="opacity: 0.9;">
<div class="topbar-inner">
<div class="container-fluid">
<ul class="white nav navbar-nav navbar-left">
<li>
<a class="brand" href="https://iscpif.fr/">
<img height="25px" style="max-width:30px;" src="/static/img/logo_m_bleu-header.png"></a>
</li>
<li>
<a class="brand" href="/">
<span class="glyphicon glyphicon-home white"></span>&nbsp;&nbsp;
Community Explorer
</a>
</li>
<!-- MAIN SEARCH/REFINE NAVBAR -->
<li id="mapping" class="comex-nav-item">
<p class=\'topbarlink\'>
<strong>SELECT Keywords AND Scholars</strong>
</p>
</li>
<li id="refine" class="dropdown comex-nav-item">
<a class="btn-default nav-inline-selectable"
style="padding-top: 1em"
onclick=\'$(this).next(".dropdown-menu").toggle();\'
>refine<i class="caret"></i></a>
<ul class="dropdown-menu">
<li>
<a id="addfiltercountry" href="#"
onclick=\'$(this).parents(".dropdown-menu").toggle();\'>
Filter by country</a>
</li>
<li>
<a id="addfilterkeyword" href="#"
onclick=\'$(this).parents(".dropdown-menu").toggle();\'>
Filter by keyword</a>
</li>
<li>
<a id="addfiltertag" href="#"
onclick=\'$(this).parents(".dropdown-menu").toggle();\'>
Filter by community tags</a>
</li>
<li>
<a id="addfilterlaboratory" href="#"
onclick=\'$(this).parents(".dropdown-menu").toggle();\'>
Filter by laboratory</a>
</li>
<li>
<a id="addfilterinstitution" href="#"
onclick=\'$(this).parents(".dropdown-menu").toggle();\'>
Filter by organization</a>
</li>
</ul>
</li>
<li class="comex-nav-item">
<a class="topbarlink" id="print" href="#"> <i class="icon-arrow-right icon-white"></i> <strong>CREATE DIRECTORY</strong></a>
</li>
<li class="comex-nav-item">
<p class="topbarlink">
<strong>&nbsp;OR&nbsp;</strong>
</p>
</li>
<li class="comex-nav-item">
<a class="topbarlink" id="generate" href="#"> <i class="icon-arrow-right icon-white"></i> <strong>MAP</strong></a>
</li>
</ul>
<ul class="white nav navbar-nav navbar-right">
<!--
<li class="comex-nav-item">
<a class="topbarlink" href=\'/print_scholar_directory.php?query={{ current_user.uid }}\'> Your Directory </a>
</li>
-->
<!-- USER TOOLBARS (LOGIN/REGISTER/PROFILE/ETC) -->
<li class="dropdown">
<a href="#" class="navlink dropdown-toggle"
data-toggle="dropdown" role="button"
aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-user"></span>
User
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li style="color:red;">
<a href="/services/user/register"> Register </a>
</li>
<li>
<div class="dropdown-a-like" id="poplogin"
data-toggle="dropdown"
onclick="cmxClt.elts.box.toggleBox(\'auth_modal\')">
Login </div>
</li>
<li>
<a href="/services/user/profile"> Your Profile </a>
</li>
<li>
<a href="/services/user/logout/"> Logout </a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
';
?>
......@@ -51,7 +51,7 @@ foreach ($scholars as $scholar) {
// </div>
// </div>
// <div class="row">
// <div class="span12" align="justify">
// <div class="span8" align="justify">
// <!-- interests text -->
// </div>
// </div>
......@@ -60,7 +60,7 @@ foreach ($scholars as $scholar) {
// </div>
$content .= "\n";
$content.= '<div class="row">';
$content.= '<div class="row scholar-row">';
// picture <=> left column
$content.= ' <div class="span3" align="justify">';
......@@ -71,12 +71,12 @@ foreach ($scholars as $scholar) {
if ($_SERVER['REQUEST_SCHEME'] == 'https') {
$pic_src = preg_replace('/^http:/i', 'https:', $pic_src) ;
}
$content .= '<img class="pic-of-scholar" src="'. $pic_src . '" width="' . $imsize . 'px" align="left">';
$content .= '<img alt="scholar picture" class="pic-of-scholar" src="'. $pic_src . '" style="width:' . $imsize . 'px;" align="left">';
}
else {
if (count($scholars) < 2000) {
$im_id = floor(rand(0, 11));
$content .= '<img class="pic-of-scholar" src="static/img/' . $im_id . '.png" width="' . $imsize . 'px" align="left">';
$content .= '<img alt="scholar picture" class="pic-of-scholar" src="static/img/' . $im_id . '.png" style="width:' . $imsize . 'px;" align="left">';
}
}
$content.= ' </div><!-- close pic -->';
......@@ -204,7 +204,7 @@ foreach ($scholars as $scholar) {
$content .= "\n";
$content .= '
<center><img src="static/img/bar.png"></center>';
<center><img alt="horizontal separator" src="static/img/bar.png"></center>';
$content .= '<br/>';
$content .= '<br/>';
// fin du profil
......@@ -395,7 +395,7 @@ foreach ($base->query($sql) as $row) {
///////////////////////////////////////////////////////////////
$content .='<br/> <A NAME="labs"> </A>
<h1>Labs by alphabetical order</h1>
<h2 class="oldstyle">Labs by alphabetical order</h2>
<p><i>List of teams or labs mentioned by the scholars</i></p>';
include('labs_list.php');
......@@ -405,7 +405,7 @@ include('labs_list.php');
/// affichage des organismes / affiliations institutionnelles ///
/////////////////////////////////////////////////////////////////
$content .= '<br/> <A NAME="orga"> </A>
<h1>Institutions by alphabetical order</h1>
<h2 class="oldstyle">Institutions by alphabetical order</h2>
<br/>
<p><i>List of institutions to which scholars are affiliated</i></p>';
include('orga_list.php');
......
......@@ -12,9 +12,14 @@ $rm_ads_snippet = <<< ENDHTML
setTimeout( function() {
var ads = document.getElementsByClassName("highcharts-credits")
for (var ad of ads) {
ad.innerHTML = ""
ad.style.WebkitTransition = 'opacity 1s';
ad.style.MozTransition = 'opacity 1s';
ad.style.opacity = 0;
setTimeout (function() {
ad.innerHTML = ""
}, 1000)
}
}, 2000)
}, 5000)
})
</script>
ENDHTML;
......
......@@ -17,10 +17,10 @@ foreach ($labs as $lab) {
continue;
}
$content.= '<div class="row">
$content.= '<div class="row org-row">
<div class="span12">
<div class="row">
<div class="span9" align="justify">';
<div class="span10" align="justify">';
$content .= '<div>';
$content .= '<h2 >';
......@@ -70,7 +70,7 @@ foreach ($labs as $lab) {
$has_admin = array_key_exists('admin', $lab) && strlen($lab['admin']);
$has_kws = array_key_exists('keywords', $lab) && strlen($lab['keywords']);
if ($n_related_insts || $has_admin || $has_kws) {
$content .= '<div class="span3" align="justify">';
$content .= '<div class="span2" align="justify">';
if ($has_kws) {
$content .= '<i class="icon-tags"></i> ' . $lab['keywords'] . '<br/><br/>';
}
......
......@@ -20,7 +20,7 @@ foreach ($institutions as $orga) {
$loop+=1;
if ($orga['name'] != null) {
$orga_count+=1;
$content.= '<div class="row">
$content.= '<div class="row org-row">
<div class="span12">
<div class="row">
<div class="span9" align="justify">';
......
This diff is collapsed.
<?php
include ("php_library/comex_library.php");
include ("php_library/js_elements.php");
include ("php_library/parametres.php");
include ("php_library/normalize.php");
include ("php_library/baselayout_head_template.php");
include ("php_library/baselayout_topbar_template.php");
include ("php_library/baselayout_tail_template.php");
$meta = '<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Complex Systems Scholars</title>
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
<link type="text/css" href="https://fonts.googleapis.com/css?family=Droid%20Sans" rel="stylesheet">
<link type="text/css" href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<link type="text/css" href="static/css/whoswho.css" rel="stylesheet">
<link type="text/css" href="static/css/comex.css" rel="stylesheet">
<link type="text/css" href="static/css/bootstrap_directory.css" rel="stylesheet">
<!-- ## fonts ## -->
<link type="text/css" href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<link type="text/css" href="https://fonts.googleapis.com/css?family=Droid%20Sans" rel="stylesheet">
<!-- updated versions as of 2016-2017 -->
<script type="text/javascript" src="static/js/jquery/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="static/js/jquery-ui-1.12.1/jquery-ui.min.js"></script>
<script type="text/javascript" src="static/js/highcharts-5.0.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push([\'_setAccount\', \'UA-30062222-1\']);
_gaq.push([\'_setDomainName\', \'communityexplorer.org\']);
_gaq.push([\'_trackPageview\']);
(function() {
var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;
ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';
var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
';
define('_is_utf8_split', 5000);
function is_utf8($string) {
// From http://w3.org/International/questions/qa-forms-utf-8.html
return preg_match('%^(?:
[\x09\x0A\x0D\x20-\x7E] # ASCII
| [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
| \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs
| [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte
| \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates
| \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
| [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
| \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
)*$%xs', $string);
$meta = $html_head_inner;
$meta .= $rm_ads_snippet;
}
//phpinfo();
//echo $_GET['query']."<br/>";
$userid = $_GET['query'];
......@@ -260,54 +212,13 @@ include ("php_library/stat-prep_from_array.php");
include ("php_library/directory_content.php");
$content .= '</div>';
$content .= '</div>
<footer style="color:white">
<!-- This directory is maintained by the <a href="http://cssociety.org" target="blank">Complex Systems Society</a>
and the <a href="http://iscpif.fr" target="blank">Complex Systems Institute of Paris Ile-de-France</a>.<br/>-->
<center>
<a href="/about.html"><span class="glyphicon glyphicon-question-sign"></span> About</a> -
<!-- <a href="http://moma.csregistry.org/feedback" target="BLANK"><span class="glyphicon glyphicon-repeat"></span> Feedback</a> - -->
<a href="/about/privacy"> <span class="glyphicon glyphicon-list-alt"></span> Privacy</a>
<br>
Directory maintained by the <a href="http://iscpif.fr/" target="blank">Complex Systems Institute of Paris Ile-de-France</a> (<a href="http://www.cnrs.fr/fr/recherche/index.htm" target="_BLANK">CNRS</a> UPS 3611) in partnership with the <a href="http://cssociety.org/" target="blank"> Complex Systems Society</a>.
<br>
<a href="http://iscpif.fr/">
<img src="/static/img/logo_m_bleu-header.png" title="Institut des Systèmes Complexes de Paris Ile-de-France"
style="border: none; margin: 3px 0 -6px 0; height:30px;">
</a>
&nbsp;&nbsp;
<a href="http://cssociety.org/" target="_BLANK">
<img src="/static/img/logo_cssociety_no_legend.png" alt="http://cssociety.org"
style="border: none; margin: 3px 0 -6px 0; height:30px;"
title="Complex systems society">
</a>
&nbsp;&nbsp;
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" target="blank">
<img alt="Creative Commons License" style="border: none; margin: 3px 0 -6px 0; height:30px;" src="/static/img/cc.png">
</a>
&nbsp;&nbsp;
<a href="http://www.cnrs.fr/" target="blank">
<img alt="CNRS" style="border: none; margin: 3px 0 -6px 0; height:30px;" src="/static/img/logo_cnrs.png">
</a>
<!-- <a href="http://moma.csregistry.org/" target="_BLANK"> MOMA</a> - -->
</center>
<p>&nbsp;</p>
</footer>
</div>
</body>
</html>';
//////// Header
$header = '<div class="row" id="welcome">
<div class="span12" align="justify">
<img src="static/img/RegistryBanner.png" align="center">
<br/><br/>
<h1>Complex Systems Scholars</h1>
<br/>
<br/>
<br/>
<h2 class="oldstyle maintitle">Complex Systems Scholars</h2>
<br/>
<div class="mini-hero">
<p>
This directory presents the profiles of <a href="#scholars">'. count($scholars).' scholars</a>, <a href="#labs">'. count($labs).' labs</a> and <a href="#orga">'.$orga_count.' organizations</a> in the field of Complex Systems
<br/>
......@@ -327,9 +238,9 @@ Contributions and ideas are welcome to improve this directory.
</ul>
</p>
</div>
<br/>
<br/>
<h2>Global statistics</h2>
<h2 class="oldstyle">Global statistics</h2>
<div id="country" style="width: 800px; height: 300px; margin: 0 auto"></div>
<div id="title" style="width: 800px; height: 300px; margin: 0 auto"></div>
<div id="position" style="width: 800px; height: 300px; margin: 0 auto"></div>
......@@ -342,14 +253,13 @@ Contributions and ideas are welcome to improve this directory.
<br/>
<br/> <A NAME="scholars"> </A>
<h2>Scholars sorted by number of common keywords with '.$target_name.'</h2>
<h2 class="oldstyle">Scholars sorted by number of common keywords with '.$target_name.'</h2>
<br/>
<br/>
</div>
</div>';
echo $meta.' '.$stats.'</head>';
if (count($scholars)==0){
// TODO message in modal panel
......@@ -357,13 +267,26 @@ echo '<h2>Sorry, '.$target_name.' did not mention any keywords ... we cannot pr
If you are '.$target_name.', you can <a href="/services/user/profile" target="_BLANK">modify your profile</a> and see your
network in few minutes.';
}else{
echo '<body>
<div class="container full-directory">
<div class="hero-unit">';
echo $html_declaration;
echo '<head>';
echo $meta;
echo $stats;
echo '</head>';
echo '<body>';
echo $doors_connect_params;
echo $topbar;
echo '<div class="container full-directory">';
// echo '<div class="hero-unit">';
echo $header;
echo '';
echo $content;
echo $footer;
// echo '</div>';
echo '</div>';
echo $html_tail_imports;
echo '</body>
</html>';
exit(0);
}
exit(0);
......
This diff is collapsed.
/* =============================== MAIN COMEX STYLESHEET =============================== */
/* ====================== MAIN COMEX STYLESHEET ====================== */
@media all{
......@@ -105,6 +105,10 @@ div.my-centering-box > * {
line-height: 110%;
}
.small-item {
font-size: 13px;
}
/* div, for message main text */
.message-hero {
margin-top: 28px;
......@@ -288,6 +292,7 @@ h2.oldstyle {
h2.oldstyle.maintitle {
margin-left: -.5em;
font-size: 27px;
}
/* "accordeon": collapsible formcats */
......@@ -383,7 +388,11 @@ div.ccsection-footer {
.container.inner {
width: 100%;
}
.scholars-list {
.scholar-row {
margin: 0 0 22px 0;
}
.org-row {
margin: 0 0 15px 0;
}
.interests-of-scholar p {
font-size: 1.2em !important;
......@@ -391,6 +400,9 @@ div.ccsection-footer {
margin-top: -.5em;
}
.keywords-of-scholar {
/*margin-top: 10px; (aligned with name)*/
/*margin-top: 38px; (aligned with jobtitle)*/
margin-top: 17px; /*(middle)*/
}
.url-of-scholar {
margin-top: .5em;
......
......@@ -195,6 +195,7 @@ input.readonly {
.tagbox-container {
background-color:#eee ;
border-bottom: 3px solid #ccc;
min-width: 50em;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment