versione mobile index e articolo;

menu per la versione mobile;
This commit is contained in:
Lorenzo Giacomelli
2016-05-13 18:26:20 +02:00
parent 7890685c0a
commit d959fe76a4
26 changed files with 2559 additions and 1 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ $currentSystem->apache->user = "var-www";
$currentSystem->apache->group = "var-www";
$currentSystem->apache->workdir = "/var/www"; // Il path in cui inserire la cartella con le pagine html
$currentSystem->remoteLocationPath = "http://localhost/fdn2/";
$currentSystem->remoteLocationPath = "http://10.0.0.249/fdn2/";
$backupSystem = new stdClass();
$backupSystem->account = "40a911e14db8ad6faf0a0e7385e7c267";
+1
View File
@@ -95,6 +95,7 @@ class GUIHandler {
if (array_key_exists("additionalHeaders", $data) && is_array($data["additionalHeaders"]) && sizeof($data["additionalHeaders"])>0){
echo implode("\n", $data["additionalHeaders"]);
}
echo "<script type=\"text/javascript\">if(screen.width <=699){window.location='".GUIHandlerMobile::getBaseUrl()."/index.php';}</script>";
echo '</head>';
}
+470
View File
@@ -0,0 +1,470 @@
<?php
/*
Author: Riccardo Di Dato
Creation Date: 13/gen/2016
*/
class GUIHandlerMobile {
const STYLESHEET_GENERAL = 0;
const STYLESHEET_USER = 1;
const STYLESHEET_ADMIN = 2;
const JAVASCRIPT_GENERAL = 0;
const JAVASCRIPT_USER = 1;
const JAVASCRIPT_ADMIN = 2;
private static $STYLESHEETS = array(self::STYLESHEET_GENERAL=>array(),self::STYLESHEET_USER=>array(),self::STYLESHEET_ADMIN=>array());
private static $JAVASCRIPTS = array(self::JAVASCRIPT_GENERAL=>array(),self::JAVASCRIPT_USER=>array(),self::JAVASCRIPT_ADMIN=>array());
private static $onLoadEvents = array();
public static function generateHtmlHeaders(array $data = array(), $admin = false){
$conf = GlobalVariables::get("config");
$title = $conf->info->projectName;
if (array_key_exists("title", $data)){
$title = $data["title"];
}
$description = $conf->info->projectDescription;
if (array_key_exists("description", $data)){
$description = $data["description"];
}
$useAuthor = true;
$author = $conf->info->author;
if (array_key_exists("author", $data)){
if ($data["author"] === false){
$useAuthor = false;
$author = "";
}
else {
$author = $data["author"];
}
}
header("Content-type: text/html; charset=utf-8");
echo "<!DOCTYPE html>\n";
echo "<html class=\"sidebar_default no-js\" lang=\"en\">\n<head>\n";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";
echo "<title>$title</title>\n";
echo "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n";
echo "<meta name=\"description\" content=\"$description\">\n";
if ($useAuthor){
echo "<meta name=\"author\" content=\"$author\">\n";
}
echo "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge,chrome=1\">\n";
echo '<link rel="shortcut icon" href="images/favicon.ico">'."\n";
echo '<link href="http://fonts.googleapis.com/css?family=Lato&subset=latin,latin-ext" rel="stylesheet" type="text/css">'."\n";
echo '<META http-equiv="Cache-Control" content="no-cache,no-store" />'."\n";
echo '<META http-equiv="Pragma" content="no-cache" />'."\n";
if ($admin){
}
foreach (self::$STYLESHEETS[self::STYLESHEET_GENERAL] as $file){
echo '<link type="text/css" rel="stylesheet" href="'.self::getStylesheetsUrl().$file.'"';
}
$othStyle = $admin?self::STYLESHEET_ADMIN:self::STYLESHEET_USER;
foreach (self::$STYLESHEETS[$othStyle] as $file){
echo '<link type="text/css" rel="stylesheet" href="'.self::getStylesheetsUrl().$file.'">'."\n";
}
foreach (self::$JAVASCRIPTS[self::JAVASCRIPT_GENERAL] as $file){
echo '<script type="text/javascript" src="'.self::getJavascriptsUrl().$file.'"></script>'."\n";
}
$othJs = $admin?self::JAVASCRIPT_ADMIN:self::JAVASCRIPT_USER;
foreach (self::$JAVASCRIPTS[$othJs] as $file){
echo '<script type="text/javascript" src="'.self::getJavascriptsUrl().$file.'"></script>'."\n";
}
if (sizeof(self::$onLoadEvents)>0){
echo '<script type="text/javascript">'."\n";
echo '$(document).ready(function(){'."\n";
foreach (self::$onLoadEvents as $evt){
echo $evt;
}
echo '});'."\n";
echo '</script>'."\n";
}
if (array_key_exists("additionalHeaders", $data) && is_array($data["additionalHeaders"]) && sizeof($data["additionalHeaders"])>0){
echo implode("\n", $data["additionalHeaders"]);
}
echo '</head>';
}
public static function redirect($url){
// $tmp = new JavaScriptElement("var index = window.location.href.indexOf('#');window.location.href='".$url."'+(index == -1 ? '' : window.location.href.substr(index));");
// $tmp->render();
echo '<script type="text/javascript">window.location.href="'.self::getBaseUrl().$url.'";</script>';
die();
}
public static function pageReload(){
// $tmp = new JavaScriptElement("var index = window.location.href.indexOf('#');window.location.href='".$url."'+(index == -1 ? '' : window.location.href.substr(index));");
// $tmp->render();
echo '<script type="text/javascript">location.reload();</script>';
die();
}
public static function redirectPost($url,array $vals = array()){
// $tmp = new JavaScriptElement("var index = window.location.href.indexOf('#');window.location.href='".$url."'+(index == -1 ? '' : window.location.href.substr(index));");
// $tmp->render();
$valArr = array();
if (sizeof($vals)>0){
foreach ($vals as $key=>$val){
$valArr[] = '{"name":"'.$key.'","value":"'.$val.'"}';
}
}
$valString = '['.implode(",", $valArr).']';
echo '<script type="text/javascript">$(document).ready(function(){openPagePost("'.self::getBaseUrl().$url.'",'.$valString.');});</script>';
die();
}
public static function addStylesheet($group, $file){
if (array_key_exists($group, self::$STYLESHEETS)){
self::$STYLESHEETS[$group][] = $file;
}
else {
throw new CoreException("Invalid stylesheet group ($group) passed to GUIHandlerMobile::addStylesheet() for file '$file'");
}
}
public static function addJavascriptLib($group, $file){
if (array_key_exists($group, self::$JAVASCRIPTS)){
self::$JAVASCRIPTS[$group][] = $file;
}
else {
throw new CoreException("Invalid stylesheet group ($group) passed to GUIHandlerMobile::addJavascriptLib() for file '$file'");
}
}
// public static function generateLoadingOverlay(){
// echo '<div id="loading" class="no-print"><div>Caricamento....<br/>Attendere prego<br/><br/><img src="'.self::getImagesUrl().'/ajax-loader.gif"></div></div>';
// }
public static function getBaseUrl(){
$conf = GlobalVariables::get("config");
return $conf->pages->remoteLocationPath."/mobile/";
}
public static function getImagesUrl(){
return self::getBaseUrl()."images/";
}
public static function getStylesheetsUrl(){
return self::getBaseUrl()."style/";
}
public static function getJavascriptsUrl(){
return self::getBaseUrl()."js/";
}
public static function addOnLoadJsEvent($script){
self::$onLoadEvents[] = $script;
}
public static function generateHeadPublic($bannerCategory = BannerModel::GENERAL_CATEGORY){
$mesi = array(1=>'Gennaio', 'Febbraio', 'Marzo', 'Aprile',
'Maggio', 'Giugno', 'Luglio', 'Agosto',
'Settembre', 'Ottobre', 'Novembre','Dicembre');
$day = date("d");
ASDSessionHandler::setSessionValue("bannerActive",array());
?>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '1707001356211512',
xfbml : true,
version : 'v2.6'
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="headContainer">
<div class="upperBar">
<div class="dateBar"><?php echo $day." ".$mesi[date("n")]." ".date("Y"); ?> - Aggiornato alle <span style="color:#f68235;"><?php echo date("H:i");?></span></div>
</div>
<div class="logo"><a href="http://ifattidinapoli.com/mobile/index.php"><img src="images/logo_uff.png" /></a></div>
<div class="bottomBar">
<img id="menuMobile" alt="" src="images/menuIcon.png">
<img id="loginMobile" alt="" src="images/loginIcon.png">
</div>
</div>
<?php
}
public static function generateMenu(){
?><div class="menuContainer">
<div class="menuHead">
<img id="closeMenu" alt="" src="images/menuIconTransparent.png"/>
<div class="searchBar">
<div>
<form id="searchForm" method="POST" action="searchResults.php">
<input class="inputBar" name="search" placeholder="cerca nel sito" />
</form>
<img id="sendFormGlass" alt="" src="images/magnifyingGlass.png"/>
</div>
</div>
</div>
<div class="menuBar">
<div class="menuTab">
<a href="index.php">HOME</a>
</div>
<?php
foreach (NotiziaModel::$NOTIZIE_CATEGORY as $category=>$data){
if(($data["mainMenu"]) && !$data["hidden"]){
?>
<div class="menuTab"><a href="categorySummary.php?category=<?php echo $category;?>"><?php echo strtoupper($data["label"]);?></a></div>
<?php
}
}
?>
<!-- <div class="menuTab"> -->
<!-- TUTTE LE SEZIONI -->
<!-- <ul> -->
<?php
foreach(NotiziaModel::$NOTIZIE_CATEGORY as $category=>$data){
if(!$data["mainMenu"] && !$data["hidden"]){
?>
<div class="menuTab"><a href="categorySummary.php?category=<?php echo $category;?>"><?php echo strtoupper($data["label"]);?></a></div>
<?php
}
}
?>
<!-- </ul> -->
</div>
</div>
<script type="text/javascript">
$(document).ready(function(event){
$("#menuable").click(function(){
if($(".hiddenMenu").hasClass("open")){
$(".hiddenMenu").fadeOut().removeClass("open");
}
else{
$(".hiddenMenu").fadeIn().addClass("open");
}
});
$(".hiddenMenu").mouseleave(function(){
if($(".hiddenMenu").hasClass("open")){
$(".hiddenMenu").fadeOut().removeClass("open");
}
});
$("#sendFormGlass").click(function (){
$("#searchForm").submit();
});
$(".inputBar").keypress(function(e){
if(e.which == 13){
$("#sendFormGlass").click();
}
});
$(".menuContainer").bind("open",function(){
if(!$(this).hasClass("open")){
$(this).animate({
"margin-left":"0vw"
},700).addClass("open");
$("body").css({"position":"fixed"});
}
}).bind("close",function (){
if($(this).hasClass("open")){
$(this).animate({
"margin-left":"-100vw"
},700).removeClass("open");
$("body").css({"position":"static"})
}
});
$("#menuMobile").click(function (){
$(".menuContainer").trigger("open");
});
$("#closeMenu").click(function (){
$(".menuContainer").trigger("close");
});
});
</script>
<?php
}
public static function generateFooter(){
if (!self::hasSeenCookieMessage()){
?>
<!-- <div class="cookieAdvice"> -->
<!-- <div>Questo sito utilizza cookie tecnici per offrirti una migliore esperienza di navigazione sul sito.</div> -->
<!-- <div>Navigando su questo sito accetti l'utilizzo dei cookie.</div><br/> -->
<!-- <a class="closeAdvice">Chiudi</a> -->
<!-- <br/><br/> -->
<!-- </div> -->
<script type="text/javascript">
$(document).ready(function(){
$('.closeAdvice').click(function(){
$('.cookieAdvice').hide();
});
$('.cookieAdvice').click(function(){
$('.cookieAdvice').hide();
});
});
</script>
<?php
self::setCookieSeen();
}
?>
<div class="footer">
<div class="footerButton" style="text-align:center;">
<a href="#">
<img alt="" src="images/goTopButton.png">
<div>TORNA SU</div>
</a>
</div>
<p>TESTATA REGISTRATA PRESSO IL TRIBUNALE DI NAPOLI AUT. NR. 8 DEL 27 GENNAIO 2006</p>
<p>COPYRIGHT &copy 2016 <a href="www.ifattidinapoli.it" style="color:white;">www.ifattidinapoli.it</a> - Giornale della Terza Metropoli Italiana</p>
<p><a href="redazione.php" style="color:white;">REDAZIONE</a> | <a href="archivio.php" style="color:white;">ARCHIVIO STORICO</a></p>
</div>
<?php
}
public static function getFacebookShareFunction(NotiziaModel $notizia){
$url = self::getBaseUrl()."fbMetadata.php?id=".$notizia->id;
return 'window.open("http://www.facebook.com/sharer.php?u="+encodeURIComponent("'.$url.'"))';
}
public static function getTwitterShareFunction(NotiziaModel $notizia){
$url = self::getBaseUrl()."articolo.php?id=".$notizia->id;
return 'window.open("http://twitter.com/home?source=ifdn&status="+encodeURIComponent("'.$url.'"))';
}
public static function getGooglePlusShareFunction(NotiziaModel $notizia){
$url = self::getBaseUrl()."fbMetadata.php?id=".$notizia->id;
return 'window.open("http://www.facebook.com/sharer.php?u="+encodeURIComponent("'.$url.'"))';
}
public static function getLinkedinShareFunction(NotiziaModel $notizia){
$url = self::getBaseUrl()."fbMetadata.php?id=".$notizia->id;
return 'window.open("http://www.facebook.com/sharer.php?u="+encodeURIComponent("'.$url.'"))';
}
public static function generateRightBannerBlock($category = BannerModel::GENERAL_CATEGORY){
$stats = GlobalVariables::get("dao")->aggregate("StatisticModel",PipelineHelper::getMostViewedOfLastDays(strtotime("-7 days"),5));
$idArray = array_map(function ($ele){ return new MongoId($ele["_id"]["notizia"]);}, $stats);
$lastsNews = GlobalVariables::get("dao")->query("NotiziaModel",
array("status"=>NotiziaModel::STATUS_ACCEPTED,"_id"=>array('$in'=>$idArray)),
array("sort"=>array("about.data"=>-1))
);
if (sizeof($lastsNews)<5){
$missing = 5-sizeof($lastsNews);
$add = GlobalVariables::get("dao")->query("NotiziaModel",
array("status"=>NotiziaModel::STATUS_ACCEPTED,"_id"=>array('$nin'=>$idArray)),
array("sort"=>array("about.data"=>-1),"limit"=>$missing)
);
$lastsNews = array_merge($lastsNews,$add);
}
// $lastsNews = GlobalVariables::get("dao")->query("NotiziaModel",
// array("status"=>NotiziaModel::STATUS_ACCEPTED),
// array("sort"=>array("about.data"=>-1),"limit"=>5)
// );
if (sizeof($lastsNews)>0){
$lastsNews = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $lastsNews);
}
$mesi = array(1=>'Gennaio', 'Febbraio', 'Marzo', 'Aprile',
'Maggio', 'Giugno', 'Luglio', 'Agosto',
'Settembre', 'Ottobre', 'Novembre','Dicembre');
?>
<div id="rightBarContainer" class="">
<div class="rotoBanner">
<div class="bannerContainer mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY,$category);?></div>
<div class="bannerContainer mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY,$category);?></div>
</div>
<div class="reader">
<div class="lastNews">
<div class="categoryBar" style="text-align:left;">
<div class="categoryTag"><span>Pi&ugrave Letti</span></div>
<div class="categoryLine"></div>
</div>
<?php if(sizeof($lastsNews)>0){
$i=0;
foreach($lastsNews as $last){
$i++;
$data = $mesi[date("n",$last->about->data->sec)]." ".date("Y",$last->about->data->sec);
$string = (strlen($last->titolo) > 103) ? substr($last->titolo,0,100).'...' : $last->titolo;?>
<a href="articolo.php?id=<?php echo $last->id;?>" id="last_<?php echo $i;?>" class="lastContainer">
<div class="lastData"><?php echo $data;?></div>
<div class="lastTitle"><?php echo $string;?></div>
</a>
<?php }
}?>
</div>
</div>
<div class="rotoBanner not">
<div class="bannerContainer mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY,$category);?></div>
<div class="bannerContainer mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY,$category);?></div>
</div>
</div>
<?php
}
public static function generateGoogleAnalyticsScripts(){
?>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-75287906-1', 'auto');
ga('send', 'pageview');
ga('create', 'UA-6137905-1', 'auto');
ga('send', 'pageview');
</script>
<?php
}
/**
* ritorna true se bisogna mostrare il messaggio dei cookie
* Il messaggio è basato su SESSIONE
* @return bool
*/
public static function hasSeenCookieMessage(){
return ASDSessionHandler::sessionValueExists("cookieShown") && ASDSessionHandler::getSessionValue("cookieShown")===true;
}
/**
* Chiamare quando viene mostrato il messaggio dei cookies
*/
public static function setCookieSeen(){
ASDSessionHandler::setSessionValue("cookieShown",true);
}
}
?>
+13
View File
@@ -6,6 +6,8 @@ Creation Date: 13/gen/2016
GUIHandler::addStylesheet(GUIHandler::STYLESHEET_ADMIN, "normalize.css");
GUIHandlerMobile::addStylesheet(GUIHandler::STYLESHEET_USER, "normalize.css");
GUIHandler::addStylesheet(GUIHandler::STYLESHEET_ADMIN, "jquery-ui.css");
GUIHandler::addStylesheet(GUIHandler::STYLESHEET_ADMIN, "chosen.css");
@@ -22,8 +24,14 @@ GUIHandler::addStylesheet(GUIHandler::STYLESHEET_USER, "photoswipe.css");
GUIHandler::addStylesheet(GUIHandler::STYLESHEET_USER, "default-skin.css");
GUIHandlerMobile::addStylesheet(GUIHandler::STYLESHEET_USER, "photoswipe.css");
GUIHandlerMobile::addStylesheet(GUIHandler::STYLESHEET_USER, "default-skin.css");
GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_GENERAL, "jquery-1.12.0.min.js");
GUIHandlerMobile::addJavascriptLib(GUIHandler::JAVASCRIPT_GENERAL, "jquery-1.12.0.min.js");
GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_ADMIN, "jquery-ui.min.js");
// GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_ADMIN, "jquery.dataTables.min.js");
@@ -47,6 +55,10 @@ GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_GENERAL,"functions.js?rev=".
GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_USER,"photoswipe.min.js");
GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_USER,"photoswipe-ui-default.min.js");
GUIHandlerMobile::addJavascriptLib(GUIHandler::JAVASCRIPT_USER,"photoswipe.min.js");
GUIHandlerMobile::addJavascriptLib(GUIHandler::JAVASCRIPT_USER,"photoswipe-ui-default.min.js");
/*
____ _ _ ____ _ ___ ____
| _ \| | | | __ )| | |_ _/ ___|
@@ -57,4 +69,5 @@ GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_USER,"photoswipe-ui-default.
*/
GUIHandler::addStylesheet(GUIHandler::STYLESHEET_USER, "public.css?rev=".time());
GUIHandlerMobile::addStylesheet(GUIHandler::STYLESHEET_USER, "public.css?rev=".time());
?>
+1
View File
@@ -12,6 +12,7 @@ require_once(dirname(__FILE__)."/CatalogManager.php");
require_once(dirname(__FILE__)."/StaticCatalogManager.php");
require_once(dirname(__FILE__)."/GUIHandler.php");
require_once(dirname(__FILE__)."/GUIHandlerMobile.php");
require_once(dirname(__FILE__)."/PostHandler.php");
require_once(dirname(__FILE__)."/ASDSessionHandler.php");
+374
View File
@@ -0,0 +1,374 @@
<?php
/*
Author: Riccardo Di Dato
Creation Date: 05/feb/2016
*/
require_once(dirname(__FILE__)."/../load.php");
try {
// UserLoginManager::logout();
$sendComment = false;
$articolo = null;
if (array_key_exists("id", $_GET)){
$articolo = GlobalVariables::get("dao")->getFirst("NotiziaModel",array("id"=>$_GET["id"],"status"=>NotiziaModel::STATUS_ACCEPTED));
}
if (is_null($articolo)){
GUIHandlerMobile::redirect("index.php");
}
AnalyticsHelper::logNotiziaImpression($articolo->id);
AnalyticsHelper::logPageImpression();
$user = UserLoginManager::getLogged();
$media = DaoMediaHandler::getMainMediaFromModel($articolo);
$medias = DaoMediaHandler::getMedias($articolo);
$commenti = GlobalVariables::get("dao")->query("CommentoModel",
array("notizia"=>$articolo->id,"status"=>CommentoModel::STATUS_ACCEPTED),
array("sort"=>array("about.data"=>-1))
);
// echo $articolo->titolo;
// var_dump($medias);
$mesi = array(1=>'Gennaio', 'Febbraio', 'Marzo', 'Aprile',
'Maggio', 'Giugno', 'Luglio', 'Agosto',
'Settembre', 'Ottobre', 'Novembre','Dicembre');
$data = date("d",$articolo->about->data->sec)." ".$mesi[date("n",$articolo->about->data->sec)]." ".date("Y",$articolo->about->data->sec)." ".date("H:i",$articolo->about->data->sec);
$config = GlobalVariables::get("config");
$additionalHeaders = array();
$additionalHeaders[] = '<meta property="og:url" content="'.$config->pages->remoteLocationPath.$_SERVER['REQUEST_URI'].'"/>';
$additionalHeaders[] = '<meta property="og:site_name" content="I Fatti di Napoli"/>';
$additionalHeaders[] = '<meta property="og:type" content="article"/>';
$additionalHeaders[] = '<meta property="og:title" content="'.htmlentities(strip_tags($articolo->titolo),ENT_QUOTES).'"/>';
$additionalHeaders[] = '<meta property="og:description" content="'.htmlentities(strip_tags($articolo->sottotitolo),ENT_QUOTES).'"/>';
$additionalHeaders[] = '<meta property="og:author" content="https://www.facebook.com/antonio.pianelli"/>';
$additionalHeaders[] = '<meta property="fb:app_id" content="1707001356211512"/>';
$mediaMetaInfo = '';
if ($media->mediaType == MediaModel::TYPE_LOCALVIDEO || $media->mediaType == MediaModel::TYPE_YOUTUBE){
$mediaMetaInfo = 'itemprop="video"';
if ($media->mediaType == MediaModel::TYPE_YOUTUBE){
$additionalHeaders[] = '<meta property="og:image" content="'.$media->getRenderer()->getThumbnailLink().'"/>';
$additionalHeaders[] = '<meta property="og:video" content="'.$media->getRenderer()->getVideoLink().'"/>';
$additionalHeaders[] = '<meta property="og:video:type" content="application/x-shockwave-flash"/>';
$additionalHeaders[] = '<meta property="og:video:width" content="240"/>';
$additionalHeaders[] = '<meta property="og:video:height" content="205"/>';
}
}
else if ($media->mediaType == MediaModel::TYPE_IMAGE){
$mediaMetaInfo = 'itemprop="image"';
$additionalHeaders[] = '<meta property="og:image" content="'.$media->getRenderer()->getImageLink(MediaRenderer::SIZE_BIG).'"/>';
$additionalHeaders[] = '<meta property="og:image:url" content="'.$media->getRenderer()->getImageLink(MediaRenderer::SIZE_BIG).'"/>';
}
if(array_key_exists("submit", $_POST) && strcmp($_POST["submit"] ,"Submit")==0){
// var_dump($articolo->sondaggio->voci);
if($articolo->hasProperty("sondaggio") && !is_null($articolo->sondaggio)){
if(!in_array($user->username, $articolo->sondaggio->votanti)){
$selectedVoice = $_POST["voce"];
foreach ($articolo->sondaggio->voci as $voce){
// var_dump($voce);
if(strcmp($voce->nome, $selectedVoice)==0){
$voce->voti +=1;
}
// var_dump($voce);
}
$articolo->sondaggio->votanti[] = $user->username;
GlobalVariables::get("dao")->save($articolo);
}
}
// var_dump($articolo->sondaggio);
}
if(array_key_exists("sendCommento", $_POST) && strcmp($_POST["sendCommento"] ,"Invia")==0){
if(UserLoginManager::isLogged()){
$saveable = new stdClass();
$saveable->user = $user->id;
$saveable->notizia = $articolo->id;
$saveable->titolo = strip_tags($_POST["titolo"]);
$saveable->testo = strip_tags($_POST["commento"]);
$saveable->status = CommentoModel::STATUS_PENDING;
// var_dump($saveable);
$commento = new CommentoModel($saveable);
GlobalVariables::get("dao")->save($commento);
$sendComment = true;
}
}
}catch(GUIException $ex){
$error = $ex->getMessage();
}catch (Exception $exec){
$msg = LogModel::fromException($exec);
GlobalVariables::get("dao")->save($msg);
GUIHandlerMobile::redirect("index.php");
}
GUIHandlerMobile::generateHtmlHeaders(array("additionalHeaders"=>$additionalHeaders,"author"=>false,"description"=>htmlentities(strip_tags($articolo->sottotitolo),ENT_QUOTES),"title"=>htmlentities(strip_tags($articolo->titolo),ENT_QUOTES)));
?>
<!--<div class="imageOverlay" onclick="javascript:hidePreview()">
<div class="imagePreviewBefore"><img src="images/leftImage.png" /></div>
<div class="imagePreviewAfter"><img src="images/rightImage.png" /></div>
</div>
<div class="clickableImageContainer" onclick="javascript:hidePreview()"></div> -->
<div style="margin-top:32vw;width:100vw;margin-left:auto;margin-right:auto;" itemscope itemtype="http://schema.org/Article">
<?php
GUIHandlerMobile::generateHeadPublic();
GUIHandlerMobile::generateMenu();
?>
<div class="newsContainer">
<div class="articoloCategoryName" style="background-color:<?php echo NotiziaModel::$NOTIZIE_CATEGORY[$articolo->category]["color"] ?>">
<span itemprop="articleSection"><?php echo strtoupper(NotiziaModel::$NOTIZIE_CATEGORY[$articolo->category]["label"]);?></span>
</div>
<div class="headArticolo">
<div class="newsImage" >
<?php if(!is_null($media)) {
$pos = 0;
if(sizeof($medias)>0){
$pos = array_search($media, $medias);
}
?>
<div onclick="javascript:loadImage('<?php echo $pos;?>')">
<?php $media->renderMedia(array("size"=>MediaRenderer::SIZE_BIG,"clickable"=>true));?>
</div>
<?php
}
?>
</div>
<div class="articoloTitle">
<p class="title" itemprop="name"><?php echo htmlentities($articolo->titolo);?></p>
<p class="subTitle">
<span><?php echo $data;?> &mdash;</span>
<span itemprop="headline"><?php echo $articolo->sottotitolo;?></span>
</p>
</div>
</div>
<div class="articoloBody">
<div class="articoloTesto" itemprop="articleBody"><?php echo $articolo->testo;?></div>
<div class="socialBarArticolo">
<?php
$twitterCutTitle = trim(strip_tags($articolo->titolo));
if (strlen($twitterCutTitle)>95){
$twitterCutTitle = substr($twitterCutTitle, 0, 92) . "...";
}
?>
<a class="socialLink" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://ifattidinapoli.com/articolo.php?id=<?php echo $articolo->id;?>"><div style="background-image:url(images/fb_round.png);"></div></a>
<a class="socialLink" target="_blank" href="https://twitter.com/intent/tweet?via=fattidinapoli&url=http://ifattidinapoli.com/articolo.php?id=<?php echo $articolo->id;?>&text=<?php echo urlencode($twitterCutTitle." -");?>"><div style="background-image:url(images/twitter_round.png);"></div></a>
<a class="socialLink" target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url=http://ifattidinapoli.com/articolo.php?id=<?php echo $articolo->id;?>"><div style="background-image:url(images/linkedin_round.png);"></div></a>
<a class="socialLink" target="_blank" href="https://plus.google.com/share?url=http://ifattidinapoli.com/articolo.php?id=<?php echo $articolo->id;?>"><div style="background-image:url(images/google_round.png);"></div></a>
</div>
</div>
<div class="commentiContainer">
<div class="commentiLabelContainer">
<div class="commentiLabel">Commenti (<?php echo count($commenti);?>)</div>
<hr style="color:#ddd;">
</div>
<?php if(sizeof($commenti)>0){
?>
<div class="oldCommentiContainer">
<?php foreach ($commenti as $oldCommento){
$utonto = GlobalVariables::get("dao")->getFirst("UserModel",array("_id"=>$oldCommento->user));
?>
<div class="commento">
<div class="commentoTitle"><?php echo $oldCommento->titolo;?></div>
<div class="commentoTesto"><?php echo $oldCommento->testo;?></div>
<div class="userInfo">
<div class="userCommento">Inviato da <span class="user" ><?php echo $utonto->nome." ".$utonto->cognome;?></span> il <span class="data"><?php echo date("d/m/Y",$oldCommento->date->sec)?></span></div>
</div>
</div>
<?php }
?>
</div>
<?php
}
echo '<hr style="color:#ddd;">';
if($sendComment){
?>
<div class="commento commentoInviato">Il tuo commento è stato inviato alla redazione ed è in attesa di essere accettato.</div>
<?php }
if(UserLoginManager::isLogged()){
?>
<div id="commentoArea" class="commento">
<div class="commentoTitle">
Aggiungi il tuo commento per questa notizia
</div>
<div>
<form method="POST" id="commentoForm">
<input name="titolo" type="text" placeholder="Titolo del commento"/>
<textarea name="commento" placeholder="Il tuo commento" rows="5" cols="80"></textarea>
<input type="hidden" name="id" value="<?php echo $articolo->id;?>" />
<div class="sendBtnDiv">
<input type="submit" name="sendCommento" value="Invia" />
</div>
</form>
</div>
</div>
<?php }
else{
?>
<div class="commento noLogin">Per commentare questa notizia <a href="#loginLink">accedi</a> all'applicazione o <a href="#regButton">registrati</a> se non hai ancora un account </div>
<?php }
?>
</div>
</div>
<?php
GUIHandlerMobile::generateFooter();
?>
</div>
<!-- Root element of PhotoSwipe. Must have class pswp. -->
<!-- <div class="pswp" tabindex="-1" role="dialog" aria-hidden="true"> -->
<!-- Background of PhotoSwipe.
<!-- It's a separate element as animating opacity is faster than rgba(). -->
<!-- <div class="pswp__bg"></div> -->
<!-- Slides wrapper with overflow:hidden. -->
<!-- <div class="pswp__scroll-wrap"> -->
<!-- Container that holds slides.
<!-- PhotoSwipe keeps only 3 of them in the DOM to save memory. -->
<!-- Don't modify these 3 pswp__item elements, data is added later on. -->
<!-- <div class="pswp__container"> -->
<!-- <div class="pswp__item"></div> -->
<!-- <div class="pswp__item"></div> -->
<!-- <div class="pswp__item"></div> -->
<!-- </div> -->
<!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
<!-- <div class="pswp__ui pswp__ui--hidden"> -->
<!-- <div class="pswp__top-bar"> -->
<!-- Controls are self-explanatory. Order can be changed. -->
<!-- <div class="pswp__counter"></div> -->
<!-- <button class="pswp__button pswp__button--close" title="Close (Esc)"></button> -->
<!-- <!-- Eliminato share <button class="pswp__button pswp__button--share" title="Share"></button> -->
<!-- <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button> -->
<!-- <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button> -->
<!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
<!-- element will get class pswp__preloader--active when preloader is running -->
<!-- <div class="pswp__preloader"> -->
<!-- <div class="pswp__preloader__icn"> -->
<!-- <div class="pswp__preloader__cut"> -->
<!-- <div class="pswp__preloader__donut"></div> -->
<!-- </div> -->
<!-- </div> -->
<!-- </div> -->
<!-- </div> -->
<!-- <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"> -->
<!-- <div class="pswp__share-tooltip"></div> -->
<!-- </div> -->
<!-- <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"> -->
<!-- </button> -->
<!-- <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"> -->
<!-- </button> -->
<!-- <div class="pswp__caption"> -->
<!-- <div class="pswp__caption__center"></div> -->
<!-- </div> -->
<!-- </div> -->
<!-- </div> -->
<!-- </div> -->
<script type="text/javascript">
<?php
// if(sizeof($medias)>0){
?>
// function loadImage(pos){
// var pswpElement = document.querySelectorAll('.pswp')[0];
// //build items array
// pos = parseInt(pos);
// //define options (if needed)
// var options = {
// index: pos // start at slide
// };
// //Initializes and opens PhotoSwipe
// var gallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, items, options);
// gallery.init();
// }
<?php
// }
?>
$(document).ready(function(event){
$("#submit").click(function (){
// $("form#commentoForm").submit(function (){
$.ajax({
method:'POST',
url:'sendCommentoBackend.php',
dataType:'html',
data:$("#commentoForm").serialize(),
success: function(data){
$("#commentoArea").remove();
$("#sentMessage").html(data);
}
});
// });
});
<?php /**
if($articolo->hasProperty("sondaggio") && !is_null($articolo->sondaggio)){
$colori=array('#434348', '#90ed7d', '#f7a35c', '#8085e9', '#f15c80', '#e4d354', '#2b908f', '#f45b5b', '#91e8e1','#7cb5ec');?>
$("#sondaggioGraph").highcharts({
chart:{type:'bar'},
title:{text:'<?php echo trim(html_entity_decode($articolo->sondaggio->titolo)); ?>'},
xAxis:{
categories:[<?php $i =0; foreach($articolo->sondaggio->voci as $voce){
echo ($i++==0?"":", ")."\"".trim($voce->nome)."\"";
}
?>],
},
yAxis:{
title:{text:"Numero Voti"},
tickInterval:1
},
legend: {
enabled: false,
},
series:[{
name:"Voti",
data:[<?php $i =0; foreach($articolo->sondaggio->voci as $voce){
// echo ($i++==0?"":", ").$voce->voti;
echo ($i++==0?"{":", {")."y:".$voce->voti.",color:'".$colori[$i%10]."'}";
}
?>]
}]
});
<?php }
?>
<?php
// if(sizeof($medias)>0){?>
<?php
// }*/
?>
});
</script>
<?php GUIHandlerMobile::generateGoogleAnalyticsScripts();?>
Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

+328
View File
@@ -0,0 +1,328 @@
<?php
/*
Author: Riccardo Di Dato
Creation Date: 22/dic/2015
*/
require_once(dirname(__FILE__)."/../load.php");
try {
// AnalyticsHelper::logPageImpression();
GUIHandlerMobile::generateHtmlHeaders();
// echo "OK";
// var_dump(date("n"));
$mesi = array(1=>'Gennaio', 'Febbraio', 'Marzo', 'Aprile',
'Maggio', 'Giugno', 'Luglio', 'Agosto',
'Settembre', 'Ottobre', 'Novembre','Dicembre');
// $day = date("d");
$pageSelected="home";
$ansaNews = GlobalVariables::get("dao")->query("NotiziaModel",
array("isAnsa"=>true,"status"=>NotiziaModel::STATUS_ACCEPTED,"about.data"=>array('$lte'=>new MongoDate())),
array("sort"=>array("about.data"=>-1),"limit"=>3));
$ansaIds = array();
if (sizeof($ansaNews)>0){
$ansaIds = array_map(function($ele){return new MongoId($ele->id);}, $ansaNews);
$ansaNews = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $ansaNews);
}
$politicaNews = GlobalVariables::get("dao")->query("NotiziaModel",
array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>NotiziaModel::CATEGORY_POLITICA,'_id'=>array('$nin'=>$ansaIds),
"about.data"=>array('$lte'=>new MongoDate())),
array("sort"=>array("about.data"=>-1),"limit"=>4)
);
if (sizeof($politicaNews)>0){
$politicaNews = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $politicaNews);
}
$cronacaNews = GlobalVariables::get("dao")->query("NotiziaModel",
array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>NotiziaModel::CATEGORY_CRONACA,'_id'=>array('$nin'=>$ansaIds),
"about.data"=>array('$lte'=>new MongoDate())),
array("sort"=>array("about.data"=>-1),"limit"=>4)
);
if (sizeof($cronacaNews)>0){
$cronacaNews = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $cronacaNews);
}
$sportNews = GlobalVariables::get("dao")->query("NotiziaModel",
array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>NotiziaModel::CATEGORY_SPORT,'_id'=>array('$nin'=>$ansaIds),
"about.data"=>array('$lte'=>new MongoDate())),
array("sort"=>array("about.data"=>-1),"limit"=>4)
);
if (sizeof($sportNews)>0){
$sportNews = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $sportNews);
}
$culturaNews = GlobalVariables::get("dao")->query("NotiziaModel",
array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>NotiziaModel::CATEGORY_CULTURA,'_id'=>array('$nin'=>$ansaIds),
"about.data"=>array('$lte'=>new MongoDate())),
array("sort"=>array("about.data"=>-1),"limit"=>4)
);
if (sizeof($culturaNews)>0){
$culturaNews = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $culturaNews);
}
// $ristorantiNews = GlobalVariables::get("dao")->query("NotiziaModel",
// array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>NotiziaModel::CATEGORY_RISTORANTI,'_id'=>array('$nin'=>$ansaIds),
// "about.data"=>array('$lte'=>new MongoDate())),
// array("sort"=>array("about.data"=>-1),"limit"=>3)
// );
// if (sizeof($ristorantiNews)>0){
// $ristorantiNews = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $ristorantiNews);
// }
// $stats = GlobalVariables::get("dao")->aggregate("StatisticModel",PipelineHelper::getMostViewedOfLastDays(strtotime("-7 days"),5));
// $idArray = array_map(function ($ele){ return new MongoId($ele["_id"]["notizia"]);}, $stats);
// $lastsNews = GlobalVariables::get("dao")->query("NotiziaModel",
// array("status"=>NotiziaModel::STATUS_ACCEPTED,"_id"=>array('$in'=>$idArray),"about.data"=>array('$lte'=>new MongoDate(),'$gte'=>new MongoDate(strtotime('-2 months')))),
// array("sort"=>array("about.data"=>-1))
// );
// if (sizeof($lastsNews)<5){
// $missing = 5-sizeof($lastsNews);
// $add = GlobalVariables::get("dao")->query("NotiziaModel",
// array("status"=>NotiziaModel::STATUS_ACCEPTED,"_id"=>array('$nin'=>$idArray),"about.data"=>array('$lte'=>new MongoDate())),
// array("sort"=>array("about.data"=>-1),"limit"=>$missing)
// );
// $lastsNews = array_merge($lastsNews,$add);
// }
// if (sizeof($lastsNews)>0){
// $lastsNews = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $lastsNews);
// }
// $gossipNews = GlobalVariables::get("dao")->query("NotiziaModel",
// array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>NotiziaModel::CATEGORY_GOSSIP,'_id'=>array('$nin'=>$ansaIds),
// "about.data"=>array('$lte'=>new MongoDate())),
// array("sort"=>array("about.data"=>-1),"limit"=>2)
// );
// if (sizeof($gossipNews)>0){
// $gossipNews = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $gossipNews);
// }
// $elezioni = GlobalVariables::get("dao")->getFirst("NotiziaModel",
// array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>NotiziaModel::CATEGORY_SPECIALE_ELEZIONI,'_id'=>array('$nin'=>$ansaIds),
// "about.data"=>array('$lte'=>new MongoDate())),
// array("sort"=>array("about.data"=>-1))
// );
// if (!is_null($elezioni)){
// $elezioni->testo = strip_tags($elezioni->testo);
// $elezioni->sottotitolo = strip_tags($elezioni->sottotitolo);
// }
// $lastViaggi = GlobalVariables::get("dao")->getFirst("NotiziaModel",
// array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>NotiziaModel::CATEGORY_VIAGGI,'_id'=>array('$nin'=>$ansaIds),
// "about.data"=>array('$lte'=>new MongoDate())),
// array("sort"=>array("about.data"=>-1))
// );
// if (!is_null($lastViaggi)){
// $lastViaggi->testo = strip_tags($lastViaggi->testo);
// $lastViaggi->sottotitolo = strip_tags($lastViaggi->sottotitolo);
// }
// $animalNews = GlobalVariables::get("dao")->getFirst("NotiziaModel",
// array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>NotiziaModel::CATEGORY_ANIMALI,'_id'=>array('$nin'=>$ansaIds),
// "about.data"=>array('$lte'=>new MongoDate())),
// array("sort"=>array("about.data"=>-1))
// );
// if (!is_null($animalNews)){
// $animalNews->testo = strip_tags($animalNews->testo);
// $animalNews->sottotitolo = strip_tags($animalNews->sottotitolo);
// }
// $saluteNews = GlobalVariables::get("dao")->getFirst("NotiziaModel",
// array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>NotiziaModel::CATEGORY_SALUTE,'_id'=>array('$nin'=>$ansaIds),
// "about.data"=>array('$lte'=>new MongoDate())),
// array("sort"=>array("about.data"=>-1))
// );
// if (!is_null($saluteNews)){
// $saluteNews->testo = strip_tags($saluteNews->testo);
// $saluteNews->sottotitolo = strip_tags($saluteNews->sottotitolo);
// }
// var_dump($politicaNews);
// if(sizeof($politicaNews)<=0){
// echo "non trovateee!!!!";
// }
}
catch (Exception $ex){
echo $ex->getMessage();
}
?>
<?php
GUIHandlerMobile::generateHeadPublic();
GUIHandlerMobile::generateMenu();
?>
<div class="newsBarMobile">
<div class="newsContainer" >
<?php $i=0; foreach($ansaNews as $ansa){
$i++;
$stringTitolo = (strlen($ansa->titolo) > 103) ? substr($ansa->titolo,0,100).'...' : $ansa->titolo;
// $stringSottotitolo = (strlen($ansa->sottotitolo) > 73) ? substr($ansa->sottotitolo,0,70).'...' : $ansa->sottotitolo;
// $stringTesto = (strlen($ansa->testo) > 33) ? substr($ansa->testo,0,30).'...' : $ansa->testo;?>
<div class="primaryNews">
<a href="articolo.php?id=<?php echo $ansa->id;?>" id="ansa_<?php echo $i;?>" class="ansaNews"><?php
$media = DaoMediaHandler::getMainMediaFromModel($ansa);
if(!is_null($media)){?>
<div class="newsImage">
<?php $media->renderMedia();?>
</div>
<?php }?>
<div class="newsTitle"><?php echo $stringTitolo;?></div>
</a>
</div>
<?php } ?>
</div>
<div class="newsContainer">
<div class="categoryBar" style="background-color:<?php echo NotiziaModel::$NOTIZIE_CATEGORY[NotiziaModel::CATEGORY_POLITICA]["color"] ?>">
<span>POLITICA</span>
</div>
<?php if(sizeof($politicaNews)>0){
$i=0;
foreach ($politicaNews as $articolo){
$stringTitolo = (strlen($articolo->titolo) > 53) ? substr($articolo->titolo,0,50).'...' : $articolo->titolo;
// $string = (strlen($politica->sottotitolo) > 33) ? substr($politica->sottotitolo,0,30).'...' : $politica->sottotitolo;?>
<?php
if($i==0){?>
<div class="primaryNews">
<?php
}
else{
?>
<div class="secondaryNews">
<?php
}
?>
<a href="articolo.php?id=<?php echo $articolo->id;?>" class="news">
<?php
$media = DaoMediaHandler::getMainMediaFromModel($articolo);
if(!is_null($media)){?>
<div class="newsImage"><?php $media->renderMedia();?></div>
<?php }?>
<div class="newsTitle"><?php echo $stringTitolo;?></div>
</a>
</div>
<?php
$i++;
}
}?>
</div>
<div class="newsContainer">
<div class="categoryBar" style="background-color:<?php echo NotiziaModel::$NOTIZIE_CATEGORY[NotiziaModel::CATEGORY_CRONACA]["color"] ?>">
<span>CRONACA</span>
</div>
<?php if(sizeof($cronacaNews)>0){
$i=0;
foreach ($cronacaNews as $articolo){
$stringTitolo = (strlen($articolo->titolo) > 53) ? substr($articolo->titolo,0,50).'...' : $articolo->titolo;
// $string = (strlen($politica->sottotitolo) > 33) ? substr($politica->sottotitolo,0,30).'...' : $politica->sottotitolo;?>
<?php
if($i==0){?>
<div class="primaryNews">
<?php
}
else{
?>
<div class="secondaryNews">
<?php
}
?>
<a href="articolo.php?id=<?php echo $articolo->id;?>" class="news">
<?php
$media = DaoMediaHandler::getMainMediaFromModel($articolo);
if(!is_null($media)){?>
<div class="newsImage"><?php $media->renderMedia();?></div>
<?php }?>
<div class="newsTitle"><?php echo $stringTitolo;?></div>
</a>
</div>
<?php
$i++;
}
}?>
</div>
<div class="newsContainer">
<div class="categoryBar" style="background-color:<?php echo NotiziaModel::$NOTIZIE_CATEGORY[NotiziaModel::CATEGORY_SPORT]["color"] ?>">
<span>SPORT</span>
</div>
<?php if(sizeof($sportNews)>0){
$i=0;
foreach ($sportNews as $articolo){
$stringTitolo = (strlen($articolo->titolo) > 53) ? substr($articolo->titolo,0,50).'...' : $articolo->titolo;
// $string = (strlen($politica->sottotitolo) > 33) ? substr($politica->sottotitolo,0,30).'...' : $politica->sottotitolo;?>
<?php
if($i==0){?>
<div class="primaryNews">
<?php
}
else{
?>
<div class="secondaryNews">
<?php
}
?>
<a href="articolo.php?id=<?php echo $articolo->id;?>" class="news">
<?php
$media = DaoMediaHandler::getMainMediaFromModel($articolo);
if(!is_null($media)){?>
<div class="newsImage"><?php $media->renderMedia();?></div>
<?php }?>
<div class="newsTitle"><?php echo $stringTitolo;?></div>
</a>
</div>
<?php
$i++;
}
}?>
</div>
<div class="newsContainer">
<div class="categoryBar" style="background-color:#095a87;text-align:center;font-size:1vw;">
<span>CULTURA&SPETTACOLO</span>
</div>
<div class="grigliaContainer">
<?php if(sizeof($culturaNews)>0){
$i=0;
foreach ($culturaNews as $articolo){
$stringTitolo = (strlen($articolo->titolo) > 53) ? substr($articolo->titolo,0,50).'...' : $articolo->titolo;
// $string = (strlen($politica->sottotitolo) > 33) ? substr($politica->sottotitolo,0,30).'...' : $politica->sottotitolo;?>
<div class="grigliaNews">
<a href="articolo.php?id=<?php echo $articolo->id;?>" class="news">
<?php
$media = DaoMediaHandler::getMainMediaFromModel($articolo);
if(!is_null($media)){?>
<div class="newsImage"><?php $media->renderMedia();?></div>
<?php }?>
<div class="overlayDiv"></div>
<div class="newsTitle"><div style="width:100%;height:100%;"></div style="vertical-align:middle;"><div><?php echo $stringTitolo;?></div></div>
</a>
</div>
<?php
}
}?>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$(".newsBarMobile").css({"margin-top":$(".headContainer").outerHeight()});
});
</script>
<?php
GUIHandlerMobile::generateFooter();
GUIHandlerMobile::generateGoogleAnalyticsScripts();
?>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+483
View File
@@ -0,0 +1,483 @@
/*! PhotoSwipe Default UI CSS by Dmitry Semenov | photoswipe.com | MIT license */
/*
Contents:
1. Buttons
2. Share modal and links
3. Index indicator ("1 of X" counter)
4. Caption
5. Loading indicator
6. Additional styles (root element, top bar, idle state, hidden state, etc.)
*/
/*
1. Buttons
*/
/* <button> css reset */
.pswp__button {
width: 44px;
height: 44px;
position: relative;
background: none;
cursor: pointer;
overflow: visible;
-webkit-appearance: none;
display: block;
border: 0;
padding: 0;
margin: 0;
float: right;
opacity: 0.75;
-webkit-transition: opacity 0.2s;
transition: opacity 0.2s;
-webkit-box-shadow: none;
box-shadow: none; }
.pswp__button:focus,
.pswp__button:hover {
opacity: 1; }
.pswp__button:active {
outline: none;
opacity: 0.9; }
.pswp__button::-moz-focus-inner {
padding: 0;
border: 0; }
/* pswp__ui--over-close class it added when mouse is over element that should close gallery */
.pswp__ui--over-close .pswp__button--close {
opacity: 1; }
.pswp__button,
.pswp__button--arrow--left:before,
.pswp__button--arrow--right:before {
background: url(../images/default-skin.png) 0 0 no-repeat;
background-size: 264px 88px;
width: 44px;
height: 44px; }
@media (-webkit-min-device-pixel-ratio: 1.1), (-webkit-min-device-pixel-ratio: 1.09375), (min-resolution: 105dpi), (min-resolution: 1.1dppx) {
/* Serve SVG sprite if browser supports SVG and resolution is more than 105dpi */
.pswp--svg .pswp__button,
.pswp--svg .pswp__button--arrow--left:before,
.pswp--svg .pswp__button--arrow--right:before {
background-image: url(../images/default-skin.svg); }
.pswp--svg .pswp__button--arrow--left,
.pswp--svg .pswp__button--arrow--right {
background: none; } }
.pswp__button--close {
background-position: 0 -44px; }
.pswp__button--share {
background-position: -44px -44px; }
.pswp__button--fs {
display: none; }
.pswp--supports-fs .pswp__button--fs {
display: block; }
.pswp--fs .pswp__button--fs {
background-position: -44px 0; }
.pswp__button--zoom {
display: none;
background-position: -88px 0; }
.pswp--zoom-allowed .pswp__button--zoom {
display: block; }
.pswp--zoomed-in .pswp__button--zoom {
background-position: -132px 0; }
/* no arrows on touch screens */
.pswp--touch .pswp__button--arrow--left,
.pswp--touch .pswp__button--arrow--right {
visibility: hidden; }
/*
Arrow buttons hit area
(icon is added to :before pseudo-element)
*/
.pswp__button--arrow--left,
.pswp__button--arrow--right {
background: none;
top: 50%;
margin-top: -50px;
width: 70px;
height: 100px;
position: absolute; }
.pswp__button--arrow--left {
left: 0; }
.pswp__button--arrow--right {
right: 0; }
.pswp__button--arrow--left:before,
.pswp__button--arrow--right:before {
content: '';
top: 35px;
background-color: rgba(0, 0, 0, 0.3);
height: 30px;
width: 32px;
position: absolute; }
.pswp__button--arrow--left:before {
left: 6px;
background-position: -138px -44px; }
.pswp__button--arrow--right:before {
right: 6px;
background-position: -94px -44px; }
/*
2. Share modal/popup and links
*/
.pswp__counter,
.pswp__share-modal {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; }
.pswp__share-modal {
display: block;
background: rgba(0, 0, 0, 0.5);
width: 100%;
height: 100%;
top: 0;
left: 0;
padding: 10px;
position: absolute;
z-index: 1600;
opacity: 0;
-webkit-transition: opacity 0.25s ease-out;
transition: opacity 0.25s ease-out;
-webkit-backface-visibility: hidden;
will-change: opacity; }
.pswp__share-modal--hidden {
display: none; }
.pswp__share-tooltip {
z-index: 1620;
position: absolute;
background: #FFF;
top: 56px;
border-radius: 2px;
display: block;
width: auto;
right: 44px;
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
-webkit-transform: translateY(6px);
-ms-transform: translateY(6px);
transform: translateY(6px);
-webkit-transition: -webkit-transform 0.25s;
transition: transform 0.25s;
-webkit-backface-visibility: hidden;
will-change: transform; }
.pswp__share-tooltip a {
display: block;
padding: 8px 12px;
color: #000;
text-decoration: none;
font-size: 14px;
line-height: 18px; }
.pswp__share-tooltip a:hover {
text-decoration: none;
color: #000; }
.pswp__share-tooltip a:first-child {
/* round corners on the first/last list item */
border-radius: 2px 2px 0 0; }
.pswp__share-tooltip a:last-child {
border-radius: 0 0 2px 2px; }
.pswp__share-modal--fade-in {
opacity: 1; }
.pswp__share-modal--fade-in .pswp__share-tooltip {
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0); }
/* increase size of share links on touch devices */
.pswp--touch .pswp__share-tooltip a {
padding: 16px 12px; }
a.pswp__share--facebook:before {
content: '';
display: block;
width: 0;
height: 0;
position: absolute;
top: -12px;
right: 15px;
border: 6px solid transparent;
border-bottom-color: #FFF;
-webkit-pointer-events: none;
-moz-pointer-events: none;
pointer-events: none; }
a.pswp__share--facebook:hover {
background: #3E5C9A;
color: #FFF; }
a.pswp__share--facebook:hover:before {
border-bottom-color: #3E5C9A; }
a.pswp__share--twitter:hover {
background: #55ACEE;
color: #FFF; }
a.pswp__share--pinterest:hover {
background: #CCC;
color: #CE272D; }
a.pswp__share--download:hover {
background: #DDD; }
/*
3. Index indicator ("1 of X" counter)
*/
.pswp__counter {
position: absolute;
left: 0;
top: 0;
height: 44px;
font-size: 13px;
line-height: 44px;
color: #FFF;
opacity: 0.75;
padding: 0 10px; }
/*
4. Caption
*/
.pswp__caption {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
min-height: 44px; }
.pswp__caption small {
font-size: 11px;
color: #BBB; }
.pswp__caption__center {
text-align: left;
max-width: 420px;
margin: 0 auto;
font-size: 13px;
padding: 10px;
line-height: 20px;
color: #CCC; }
.pswp__caption--empty {
display: none; }
/* Fake caption element, used to calculate height of next/prev image */
.pswp__caption--fake {
visibility: hidden; }
/*
5. Loading indicator (preloader)
You can play with it here - http://codepen.io/dimsemenov/pen/yyBWoR
*/
.pswp__preloader {
width: 44px;
height: 44px;
position: absolute;
top: 0;
left: 50%;
margin-left: -22px;
opacity: 0;
-webkit-transition: opacity 0.25s ease-out;
transition: opacity 0.25s ease-out;
will-change: opacity;
direction: ltr; }
.pswp__preloader__icn {
width: 20px;
height: 20px;
margin: 12px; }
.pswp__preloader--active {
opacity: 1; }
.pswp__preloader--active .pswp__preloader__icn {
/* We use .gif in browsers that don't support CSS animation */
background: url(preloader.gif) 0 0 no-repeat; }
.pswp--css_animation .pswp__preloader--active {
opacity: 1; }
.pswp--css_animation .pswp__preloader--active .pswp__preloader__icn {
-webkit-animation: clockwise 500ms linear infinite;
animation: clockwise 500ms linear infinite; }
.pswp--css_animation .pswp__preloader--active .pswp__preloader__donut {
-webkit-animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite;
animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite; }
.pswp--css_animation .pswp__preloader__icn {
background: none;
opacity: 0.75;
width: 14px;
height: 14px;
position: absolute;
left: 15px;
top: 15px;
margin: 0; }
.pswp--css_animation .pswp__preloader__cut {
/*
The idea of animating inner circle is based on Polymer ("material") loading indicator
by Keanu Lee https://blog.keanulee.com/2014/10/20/the-tale-of-three-spinners.html
*/
position: relative;
width: 7px;
height: 14px;
overflow: hidden; }
.pswp--css_animation .pswp__preloader__donut {
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 14px;
height: 14px;
border: 2px solid #FFF;
border-radius: 50%;
border-left-color: transparent;
border-bottom-color: transparent;
position: absolute;
top: 0;
left: 0;
background: none;
margin: 0; }
@media screen and (max-width: 1024px) {
.pswp__preloader {
position: relative;
left: auto;
top: auto;
margin: 0;
float: right; } }
@-webkit-keyframes clockwise {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg); }
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg); } }
@keyframes clockwise {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg); }
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg); } }
@-webkit-keyframes donut-rotate {
0% {
-webkit-transform: rotate(0);
transform: rotate(0); }
50% {
-webkit-transform: rotate(-140deg);
transform: rotate(-140deg); }
100% {
-webkit-transform: rotate(0);
transform: rotate(0); } }
@keyframes donut-rotate {
0% {
-webkit-transform: rotate(0);
transform: rotate(0); }
50% {
-webkit-transform: rotate(-140deg);
transform: rotate(-140deg); }
100% {
-webkit-transform: rotate(0);
transform: rotate(0); } }
/*
6. Additional styles
*/
/* root element of UI */
.pswp__ui {
-webkit-font-smoothing: auto;
visibility: visible;
opacity: 1;
z-index: 1550; }
/* top black bar with buttons and "1 of X" indicator */
.pswp__top-bar {
position: absolute;
left: 0;
top: 0;
height: 44px;
width: 100%; }
.pswp__caption,
.pswp__top-bar,
.pswp--has_mouse .pswp__button--arrow--left,
.pswp--has_mouse .pswp__button--arrow--right {
-webkit-backface-visibility: hidden;
will-change: opacity;
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
/* pswp--has_mouse class is added only when two subsequent mousemove events occur */
.pswp--has_mouse .pswp__button--arrow--left,
.pswp--has_mouse .pswp__button--arrow--right {
visibility: visible; }
.pswp__top-bar,
.pswp__caption {
background-color: rgba(0, 0, 0, 0.5); }
/* pswp__ui--fit class is added when main image "fits" between top bar and bottom bar (caption) */
.pswp__ui--fit .pswp__top-bar,
.pswp__ui--fit .pswp__caption {
background-color: rgba(0, 0, 0, 0.3); }
/* pswp__ui--idle class is added when mouse isn't moving for several seconds (JS option timeToIdle) */
.pswp__ui--idle .pswp__top-bar {
opacity: 0; }
.pswp__ui--idle .pswp__button--arrow--left,
.pswp__ui--idle .pswp__button--arrow--right {
opacity: 0; }
/*
pswp__ui--hidden class is added when controls are hidden
e.g. when user taps to toggle visibility of controls
*/
.pswp__ui--hidden .pswp__top-bar,
.pswp__ui--hidden .pswp__caption,
.pswp__ui--hidden .pswp__button--arrow--left,
.pswp__ui--hidden .pswp__button--arrow--right {
/* Force paint & create composition layer for controls. */
opacity: 0.001; }
/* pswp__ui--one-slide class is added when there is just one item in gallery */
.pswp__ui--one-slide .pswp__button--arrow--left,
.pswp__ui--one-slide .pswp__button--arrow--right,
.pswp__ui--one-slide .pswp__counter {
display: none; }
.pswp__element--disabled {
display: none !important; }
.pswp--minimal--dark .pswp__top-bar {
background: none; }
+527
View File
@@ -0,0 +1,527 @@
/*! normalize.css v1.1.2 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 6/7/8/9 and Firefox 3.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
display: block;
}
/**
* Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.
*/
audio,
canvas,
video {
display: inline-block;
*display: inline;
*zoom: 1;
}
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Address styling not present in IE 7/8/9, Firefox 3, and Safari 4.
* Known issue: no IE 6 support.
*/
[hidden] {
display: none;
}
/* ==========================================================================
Base
========================================================================== */
/**
* 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using
* `em` units.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-size: 100%; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/**
* Address `font-family` inconsistency between `textarea` and other form
* elements.
*/
html,
button,
input,
select,
textarea {
font-family: sans-serif;
}
/**
* Address margins handled incorrectly in IE 6/7.
*/
body {
margin: 0;
}
/* ==========================================================================
Links
========================================================================== */
/**
* Address `outline` inconsistency between Chrome and other browsers.
*/
a:focus {
outline: thin dotted;
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0;
}
/* ==========================================================================
Typography
========================================================================== */
/**
* Address font sizes and margins set differently in IE 6/7.
* Address font sizes within `section` and `article` in Firefox 4+, Safari 5,
* and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
h2 {
font-size: 1.5em;
margin: 0.83em 0;
}
h3 {
font-size: 1.17em;
margin: 1em 0;
}
h4 {
font-size: 1em;
margin: 1.33em 0;
}
h5 {
font-size: 0.83em;
margin: 1.67em 0;
}
h6 {
font-size: 0.67em;
margin: 2.33em 0;
}
/**
* Address styling not present in IE 7/8/9, Safari 5, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome.
*/
b,
strong {
font-weight: bold;
}
blockquote {
margin: 1em 40px;
}
/**
* Address styling not present in Safari 5 and Chrome.
*/
dfn {
font-style: italic;
}
/**
* Address differences between Firefox and other browsers.
* Known issue: no IE 6/7 normalization.
*/
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
/**
* Address styling not present in IE 6/7/8/9.
*/
mark {
background: #ff0;
color: #000;
}
/**
* Address margins set differently in IE 6/7.
*/
p,
pre {
margin: 1em 0;
}
/**
* Correct font family set oddly in IE 6, Safari 4/5, and Chrome.
*/
code,
kbd,
pre,
samp {
font-family: monospace, serif;
_font-family: 'courier new', monospace;
font-size: 1em;
}
/**
* Improve readability of pre-formatted text in all browsers.
*/
pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
/**
* Address CSS quotes not supported in IE 6/7.
*/
q {
quotes: none;
}
/**
* Address `quotes` property not supported in Safari 4.
*/
q:before,
q:after {
content: '';
content: none;
}
/**
* Address inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* ==========================================================================
Lists
========================================================================== */
/**
* Address margins set differently in IE 6/7.
*/
dl,
menu,
ol,
ul {
margin: 1em 0;
}
dd {
margin: 0 0 0 40px;
}
/**
* Address paddings set differently in IE 6/7.
*/
menu,
ol,
ul {
padding: 0 0 0 40px;
}
/**
* Correct list images handled incorrectly in IE 7.
*/
nav ul,
nav ol {
list-style: none;
list-style-image: none;
}
/* ==========================================================================
Embedded content
========================================================================== */
/**
* 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3.
* 2. Improve image quality when scaled in IE 7.
*/
img {
border: 0; /* 1 */
-ms-interpolation-mode: bicubic; /* 2 */
}
/**
* Correct overflow displayed oddly in IE 9.
*/
svg:not(:root) {
overflow: hidden;
}
/* ==========================================================================
Figures
========================================================================== */
/**
* Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11.
*/
figure {
margin: 0;
}
/* ==========================================================================
Forms
========================================================================== */
/**
* Correct margin displayed oddly in IE 6/7.
*/
form {
margin: 0;
}
/**
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct color not being inherited in IE 6/7/8/9.
* 2. Correct text not wrapping in Firefox 3.
* 3. Correct alignment displayed oddly in IE 6/7.
*/
legend {
border: 0; /* 1 */
padding: 0;
white-space: normal; /* 2 */
*margin-left: -7px; /* 3 */
}
/**
* 1. Correct font size not being inherited in all browsers.
* 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5,
* and Chrome.
* 3. Improve appearance and consistency in all browsers.
*/
button,
input,
select,
textarea {
font-size: 100%; /* 1 */
margin: 0; /* 2 */
vertical-align: baseline; /* 3 */
*vertical-align: middle; /* 3 */
}
/**
* Address Firefox 3+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
button,
input {
line-height: normal;
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+.
* Correct `select` style inheritance in Firefox 4+ and Opera.
*/
button,
select {
text-transform: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
* 4. Remove inner spacing in IE 7 without affecting normal text inputs.
* Known issue: inner spacing remains in IE 6.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
*overflow: visible; /* 4 */
}
/**
* Re-set default cursor for disabled elements.
*/
button[disabled],
html input[disabled] {
cursor: default;
}
/**
* 1. Address box sizing set to content-box in IE 8/9.
* 2. Remove excess padding in IE 8/9.
* 3. Remove excess padding in IE 7.
* Known issue: excess padding remains in IE 6.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
*height: 13px; /* 3 */
*width: 13px; /* 3 */
}
/**
* 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
/**
* Remove inner padding and search cancel button in Safari 5 and Chrome
* on OS X.
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Remove inner padding and border in Firefox 3+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* 1. Remove default vertical scrollbar in IE 6/7/8/9.
* 2. Improve readability and alignment in all browsers.
*/
textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
}
/* ==========================================================================
Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}
+177
View File
@@ -0,0 +1,177 @@
/*! PhotoSwipe main CSS by Dmitry Semenov | photoswipe.com | MIT license */
/*
Styles for basic PhotoSwipe functionality (sliding area, open/close transitions)
*/
/* pswp = photoswipe */
.pswp {
display: none;
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
overflow: hidden;
-ms-touch-action: none;
touch-action: none;
z-index: 1500;
-webkit-text-size-adjust: 100%;
/* create separate layer, to avoid paint on window.onscroll in webkit/blink */
-webkit-backface-visibility: hidden;
outline: none; }
.pswp * {
-webkit-box-sizing: border-box;
box-sizing: border-box; }
.pswp img {
max-width: none; }
/* style is added when JS option showHideOpacity is set to true */
.pswp--animate_opacity {
/* 0.001, because opacity:0 doesn't trigger Paint action, which causes lag at start of transition */
opacity: 0.001;
will-change: opacity;
/* for open/close transition */
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
.pswp--open {
display: block; }
.pswp--zoom-allowed .pswp__img {
/* autoprefixer: off */
cursor: -webkit-zoom-in;
cursor: -moz-zoom-in;
cursor: zoom-in; }
.pswp--zoomed-in .pswp__img {
/* autoprefixer: off */
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: grab; }
.pswp--dragging .pswp__img {
/* autoprefixer: off */
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
cursor: grabbing; }
/*
Background is added as a separate element.
As animating opacity is much faster than animating rgba() background-color.
*/
.pswp__bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: #000;
opacity: 0;
-webkit-backface-visibility: hidden;
will-change: opacity; }
.pswp__scroll-wrap {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: hidden; }
.pswp__container,
.pswp__zoom-wrap {
-ms-touch-action: none;
touch-action: none;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0; }
/* Prevent selection and tap highlights */
.pswp__container,
.pswp__img {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none; }
.pswp__zoom-wrap {
position: absolute;
width: 100%;
-webkit-transform-origin: left top;
-ms-transform-origin: left top;
transform-origin: left top;
/* for open/close transition */
-webkit-transition: -webkit-transform 333ms cubic-bezier(0.4, 0, 0.22, 1);
transition: transform 333ms cubic-bezier(0.4, 0, 0.22, 1); }
.pswp__bg {
will-change: opacity;
/* for open/close transition */
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
.pswp--animated-in .pswp__bg,
.pswp--animated-in .pswp__zoom-wrap {
-webkit-transition: none;
transition: none; }
.pswp__container,
.pswp__zoom-wrap {
-webkit-backface-visibility: hidden; }
.pswp__item {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
overflow: hidden; }
.pswp__img {
position: absolute;
width: auto;
height: auto;
top: 0;
left: 0; }
/*
stretched thumbnail or div placeholder element (see below)
style is added to avoid flickering in webkit/blink when layers overlap
*/
.pswp__img--placeholder {
-webkit-backface-visibility: hidden; }
/*
div element that matches size of large image
large image loads on top of it
*/
.pswp__img--placeholder--blank {
background: #222; }
.pswp--ie .pswp__img {
width: 100% !important;
height: auto !important;
left: 0;
top: 0; }
/*
Error message appears when image is not loaded
(JS option errorMsg controls markup)
*/
.pswp__error-msg {
position: absolute;
left: 0;
top: 50%;
width: 100%;
text-align: center;
font-size: 14px;
line-height: 16px;
margin-top: -8px;
color: #CCC; }
.pswp__error-msg a {
color: #CCC;
text-decoration: underline; }
+171
View File
@@ -0,0 +1,171 @@
@CHARSET "UTF-8";
@font-face {
font-family: 'Bebas Neue';
font-style: normal;
font-weight: normal;
src: local('Bebas Neue'), url('BebasNeue.woff') format('woff');
}
a{text-decoration:none;}
body{font-family:lato, arial;}
/* TOP HEAD BAR/Menu/Footer (GUIHandler)*/
.headContainer{position:fixed;background-color:white;width:100vw;top:0;left:0;z-index:10;overflow:hidden;}
.upperBar{text-align:center;border:1px solid #949494;border-left:0px;border-right:0px;margin:5px 0;padding:2px;font-size:8pt;color:#949494;}
.logo{text-align:center;}
.logo img{width:50vw;margin:auto;}
.bottomBar{border:1px solid #949494; border-right:0px;border-left:0px;border-bottom:0;padding:1vw 10px;}
.bottomBar a {display:inline-block;}
.bottomBar #menuMobile{border:0px;border-right:1px solid #949494;padding:0 1.5vw;}
.bottomBar #loginMobile{border:0px;margin-left:1vw;}
.bottomBar img{width:2.2em;display:inline-block;}
.menuContainer{width:100vw;height:215vh;position:fixed;margin-left:-100vw;background-color:#333;z-index:100;overflow:scroll;top:0;}
.menuHead{text-align:right;overflow:auto;}
#closeMenu{height:2em;float:right;margin:0.3em 0.3em 0.3em 10px;}
.searchBar{overflow:auto;height:2em;margin:0.3em 10px;}
.searchBar > div{font-size:14pt;position:relative;}
.searchBar form{display:block;box-sizing:border-box;}
.searchBar input{
width: 100%;
box-sizing:border-box;
margin:0;
height:1.6em;
padding: 0 2em 0 20px;
border-radius: 5px 0 0 5px;
border: 0px;
}
.searchBar img{
width:1.3em;
position: absolute;
top: 0.15em;
right: 0.3em;
}
.menuBar{font-weight:bold;color:white;/* background-color:#0069a3 */;height:200vh;padding-bottom:15vh;}
.menuTab{
font-size: 14pt;
font-family: "Bebas Neue";
border-radius: 5px 0px 0px 5px;
margin: 0px 5px 2px 10px;
background-color: #222;
border-left: 5px solid #0069a3;
}
.menuTab:hover{/* background-color:#0069a3; */}
.menuTab > a {text-decoration:none;color:white;padding:7px 17px;display:block;}
.menuTab > ul{margin:0;}
.menuTab > ul > li{width:60%;}
.footer{background-color:/* #095a87 */black;text-align:center;width:100vw;font-size:8pt;color:white;overflow:hidden;}
.footer .footerButton{text-align:center;margin-bottom:2vw;}
.footer img{width:8vw;}
.footer a{color:white;font-weight:bold;}
.cookieAdvice{
position:fixed;
bottom:0;
left:0;
width:100%;
color:white;
opacity:0.8;
background-color:black;
z-index:99;
text-align:center;
font-size:10pt;
}
.newsBarMobile{margin-top:32vw;width:100vw;}
.newsContainer{width:100vw;}
.newsContainer .categoryBar{padding:5px 10px;}
.newsContainer .categoryBar > span{color:white;font-weight:bold;font-size:14pt;}
.headArticolo, .primaryNews{margin-bottom:10px;}
.primaryNews .newsImage{width:100vw;max-height:40vh;text-align:center;overflow:hidden;}
.headArticolo .newsImage, .primaryNews .newsImage img{width:100vw;}
.primaryNews .newsTitle{padding:10px 15px;font-weight:bold;text-align:left;text-decoration:none;color:black;font-size:14pt;}
.secondaryNews .newsImage{display:inline-block;padding:10px;vertical-align:middle;text-align:center;}
.secondaryNews .newsImage img{width:10vw;}
.secondaryNews .newsTitle{display:inline-block;padding:10px 15px;vertical-align:middle;color:black;font-size:11pt;}
.grigliaContainer{margin:auto;width:90vw;text-align:center;z-index:1;padding:10px 0;}
.grigliaNews{display:inline-block;width:30vw;height:30vw;margin:5px 1px;position:relative;vertical-align:top;overflow:hidden;}
.grigliaNews .newsImage img{width:100%;height:100%}
.grigliaNews .newsTitle{position:absolute;color:white;top:35%;left:0;font-size:10pt;padding:5px;font-weight:bold;z-index:3;}
.overlayDiv{
width:100%;
height:100%;
background-color: #095a87;
z-index: 2;
position: absolute;
top: 0;
opacity: 0.6;
filter:alpha(opacity=60);
}
.cookieAdvice div {vertical-align:middle;padding:0 10px;margin:10px 0px 0px;}
.closeAdvice{
border-radius:10px;
border:2px solid white;
padding:5px 10px;
vertical-align:middle;
color:white;
text-decoration:none;
cursor:pointer;
}
.articoloCategoryName{display:inline-block;text-align:center;color:black;margin:5px 0;padding:5px 20px;font-size:14pt;}
.articoloCategoryName span{}
.headArticolo .newsImage{width:100vw;text-align:center;overflow:hidden;}
.articoloTitle{width:90%;padding:10px;margin:auto;}
.articoloTitle .title{font-weight:bold;color:black;}
.articoloTitle .subTitle{font-weight:italic;color:#9a9a9a;}
.articoloBody{width:90vw;margin:auto;}
.articoloBody .articoloTesto{text-align:left;padding:5px;}
.socialBarArticolo{
padding: 4px 10px;
vertical-align:top;
text-align:center;
}
.socialBarArticolo > a{margin-right:3px;display:inline-block;}
.socialBarArticolo > a > div{display:inline-block;width:22px;height:22px;background-repeat:no-repeat;background-position:center;}
.commentiContainer{padding:5px;}
.oldCommentiContainer{margin:5px 0px; padding-left: 30px;}
.sondaggio, .commento{border: 3px solid #CFCFCF;border-radius: 15px;padding: 12px 5px 5px 20px;margin: 5px 0px;background-color: #e6e6e6;}
.commentoTitle{font-weight:bold;}
.commentoTesto{padding: 5px 26px;text-align: justify;}
.commentiLabel{background-color: #cfdbe9;padding: 10px 20px;/* border-radius: 10px */;font-style: italic;color: #222;font-weight: bold;font-size: 11pt;}
.userCommento{/* display:inline-block; */}
/* .userCommento span {color:#5847c1;} */
.userInfo{text-align: right;padding: 0 26px 3px;font-size: 9pt;font-style: italic;}
.dataCommento{font-size:14pt;}
.userInfo .user{font-weight:bold;}
.commento form{width:100%;}
.commento input[type="text"]{width: 90%;padding: 5px 10px;font-weight: bold;}
.commento textarea{margin-left:5%;width:85%;padding: 5px 10px;resize:none;font-size: 11pt;}
.commento form .sendBtnDiv{text-align: right;padding-right: 6%;}
.commento form .sendBtnDiv input{padding:5px 20px;}
.sondaggio.noLogin, .commento.noLogin{font-size: 10pt;padding-bottom: 10px;background-color: rgb(252, 252, 198);}
.sondaggio.noLogin a, .commento.noLogin a {color:#1C89C3; font-weight:bold;}
#commentoArea{background-color:#E0F6E5;}
#commentoArea .commentoTitle{font-size: 10pt;padding: 0px 0px 10px;text-align: center;font-style: italic;}
.newCommento{padding:10px 5px;}
.newCommento div{padding:5px 0px;}
.newCommento textarea{}
.newCommento input{padding:5px 10px;}