From 17f21e8b0d10062b8d27e4f367995f5ab2dba6a6 Mon Sep 17 00:00:00 2001 From: Lorenzo Giacomelli Date: Mon, 7 Mar 2016 16:08:40 +0100 Subject: [PATCH 1/4] Aggiornato testo CommentoModel; Guihandeler::generateHeadPublic link registrami crea una piccola finestra; articolo da finire backend per inviare commento --- oth/img/leftArrow.xcf | Bin 0 -> 4021 bytes private/lib/dao/models/CommentoModel.php | 2 +- private/lib/gui/GUIHandler.php | 3 +- public/articolo.php | 53 ++++++++++++++++++++--- public/js/functions.js | 19 ++++++++ public/registration.php | 19 ++++++++ public/sendCommentoBackend.php | 41 ++++++++++++++++++ public/style/public.css | 34 +++++++++++++++ 8 files changed, 162 insertions(+), 9 deletions(-) create mode 100644 oth/img/leftArrow.xcf create mode 100644 public/registration.php create mode 100644 public/sendCommentoBackend.php diff --git a/oth/img/leftArrow.xcf b/oth/img/leftArrow.xcf new file mode 100644 index 0000000000000000000000000000000000000000..f153baecdbac10fa7e3303e80968fe12c293c971 GIT binary patch literal 4021 zcmchayKf^^6vpq2J${Yt+3?r}ft1g|06Qdb%>c{7?FsNK*r5l-Hyh#x-{|p4P}urFDFWA1APcU6 zi(1pTOG??_prtDZs&|_GhYi0!*lqfAFS41Y(azSgh>);Xxr3Vb&UCv=URrg4eg$9LmoFR8~o$aoVuTkG4#_2k@o0? zHjY!Rv)gDlYwi8c4h_VfwA9k@;6bnH4+p)@&T?s~)!rWT2K)XJH?{rt-G;w@eVwl< zVncT=W9r>0Q>EYkXF*f%5BD0|oqpTj5MMApm}b)Oq}4F5^}+^67s>4GARU$N+<>kN+<>M%ES$>Dxn8d>O>Uz z@oA(>encIKB0sa#T_!*1ex1~F$!s?s{gf3sK2DtTIvh|b9{pZSjPQM$gw9d$>lEYB zqnX4A`L!i-+)Z-8Z^n5kupceqhttY=xuhy6Jqsv(iz$jIn?eEQRLG;un&eQ11qbC> z$f9hUWKh-xJ6JBp4fOt>~N~ljJMbs~$fVw8+QSVH0sE2}sIw@pPKTR^I zv4R~T7L64l76TO_9vsXPiiJrL#Y8Be$Ow59ACnx4li;9e30V{~lMD);V26lDV}*#v zK!p|BLiw1s9si8j{in&{;d8(TD#trRBzA_D*cp5t`E0RrcxPydoxw+(PbRA@??5f# zhYJLsYgQTdBNBeJgdeUnTq{`F>_h$@;zI)rnU;r( zw;Mxz)$TX^osK_j_L>hngFgTNmG3^u%pq3zH{YC9jH9`f;R`^&m3%&uSzq2g2zf!+ Zz4yV#x>MV|4`KU=Z2WR~A;`&#`~|#)U=IKQ literal 0 HcmV?d00001 diff --git a/private/lib/dao/models/CommentoModel.php b/private/lib/dao/models/CommentoModel.php index e444812..a3c120a 100644 --- a/private/lib/dao/models/CommentoModel.php +++ b/private/lib/dao/models/CommentoModel.php @@ -13,7 +13,7 @@ class CommentoModel extends Model{ ); /** - * saveableObject deve avere alemeno il campo notizia = notiziaId; + * saveableObject deve avere alemeno il campo notizia = notiziaId e il campo user = userId; * @param stdClass $saveableObject * @throws CoreException */ diff --git a/private/lib/gui/GUIHandler.php b/private/lib/gui/GUIHandler.php index 808b6e5..ce89427 100644 --- a/private/lib/gui/GUIHandler.php +++ b/private/lib/gui/GUIHandler.php @@ -150,10 +150,11 @@ class GUIHandler { $day = date("d"); ?> +
- Aggiornato alle
- +
diff --git a/public/articolo.php b/public/articolo.php index 00062d2..79b1fcc 100644 --- a/public/articolo.php +++ b/public/articolo.php @@ -7,6 +7,7 @@ Creation Date: 05/feb/2016 require_once(dirname(__FILE__)."/load.php"); try { + $sendComment = false; $articolo = null; if (array_key_exists("id", $_GET)){ $articolo = GlobalVariables::get("dao")->getFirst("NotiziaModel",array("id"=>$_GET["id"],"status"=>NotiziaModel::STATUS_ACCEPTED)); @@ -22,7 +23,7 @@ try { $media = DaoMediaHandler::getMainMediaFromModel($articolo); $medias = DaoMediaHandler::getMedias($articolo); // echo $articolo->titolo; - var_dump($medias); +// var_dump($medias); $mesi = array(1=>'Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre','Dicembre'); @@ -36,6 +37,7 @@ try { else if ($media->mediaType == MediaModel::TYPE_IMAGE){ $mediaMetaInfo = 'itemprop="image"'; } + }catch(GUIException $ex){ $error = $ex->getMessage(); }catch (Exception $exec){ @@ -102,14 +104,20 @@ try {
- -
-
- - +
+ +
+ +
Titolo commento:
+ +
Commento:
+ +
+ Invia +
- +
TUTTI I COMMENTI
@@ -149,5 +157,36 @@ try { // alert(actualLeft); } }); + + $("#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); + } + }); +// }); + }); + + +// $("form#commentoForm").on('submit',function (){ +// $.ajax({ +// type:'post', +// url:'sendCommentoBackend.php', +// dataType:'html', +// data:$("#commentoForm").serialize(), +// target: '#sentMessage', +// complete: function(){ +// $("#commentoArea").remove(); + +// } +// }); +// }); + }); \ No newline at end of file diff --git a/public/js/functions.js b/public/js/functions.js index bbd8319..2157ff7 100644 --- a/public/js/functions.js +++ b/public/js/functions.js @@ -11,3 +11,22 @@ function bannerClick(banner, link){ $.ajax({url: "stats/bannerClick.php", method: "POST", data: { "banner": banner, "source": window.location.href }, dataType: "html" }); window.open(link); } + +function openRegistrationModal(){ + $.ajax({ + method:"POST", + url:'registration.php', + dataType:'html', + success: function(data){ + $("#floating").html(data); + var off = $("#regButton").offset(); + var right = $(document).width()-off.left - $("#regButton").outerWidth(); + $("#floating").css("position","absolute").css("right",right).css("top",off.top+25); + $("#floating").show(); + } + }); +} + +function sendRegistration(){ + +} \ No newline at end of file diff --git a/public/registration.php b/public/registration.php new file mode 100644 index 0000000..c633af2 --- /dev/null +++ b/public/registration.php @@ -0,0 +1,19 @@ + +
+
Email:
+
Password:
+
Conferma password:
+ Registrami +
+ save($msg); +} +echo "zzzzzzzzzzzzzzzzzzzzzz"; +?> \ No newline at end of file diff --git a/public/sendCommentoBackend.php b/public/sendCommentoBackend.php new file mode 100644 index 0000000..84746ff --- /dev/null +++ b/public/sendCommentoBackend.php @@ -0,0 +1,41 @@ +getFirst("NotiziaModel",array("id"=>$id,"status"=>NotiziaModel::STATUS_ACCEPTED)); + if(!is_null($articolo)){ + + $news = new stdClass(); + $news->notizia = $articolo->id; + $news->user = UserLoginManager::getLogged(); + + $commento = new CommentoModel($news); + $commento->titolo = $titolo; + $commento->testo = $testo; + $commento->status = CommentoModel::STATUS_PENDING; + + GlobalVariables::get("dao")->save($commento); + echo '
Il tuo commento è stato inviato ed è in attesa di apporvazione.
'; + } + } +// } + else{ + echo '
Un errore ha impedito l\'invio del commento.
'; + } + +}catch (Exception $exec){ + var_dump($exec); +// echo '
Un errore ha impedito l\'invio del commento.(Ex)
'; + $msg = LogModel::fromException($exec); + GlobalVariables::get("dao")->save($msg); +} +?> \ No newline at end of file diff --git a/public/style/public.css b/public/style/public.css index 31f17c3..01d5ce4 100644 --- a/public/style/public.css +++ b/public/style/public.css @@ -76,6 +76,40 @@ body{font-family:lato, arial;} margin-left: 1px; } + +/* + __ __ _ _ +| \/ | ___ __| | __ _| | +| |\/| |/ _ \ / _` |/ _` | | +| | | | (_) | (_| | (_| | | +|_| |_|\___/ \__,_|\__,_|_| + +*/ + +#floating{ + background-color:green; + z-index:4; +} + +#modalBlock{}/* + margin-left:auto; + margin-right:auto; + background-color:green; + width:500px; + height:500px; + opacity:0; +} */ + + + + + + + + + + + /* _ _ | | | | ___ _ __ ___ ___ _ __ __ _ __ _ ___ From d1296a1fc7dfe052a4c417429db6ab7d06f8dcc9 Mon Sep 17 00:00:00 2001 From: Lorenzo Giacomelli Date: Tue, 8 Mar 2016 12:20:43 +0100 Subject: [PATCH 2/4] backend sendRegistration --- private/lib/dao/models/UserModel.php | 8 ++++++ public/index.php | 2 +- public/js/functions.js | 13 ++++++++- public/registration.php | 41 +++++++++++++++++++++++----- public/sendCommentoBackend.php | 4 +-- public/sendRegistrationBackend.php | 41 ++++++++++++++++++++++++++++ public/style/public.css | 8 ++++++ 7 files changed, 106 insertions(+), 11 deletions(-) create mode 100644 public/sendRegistrationBackend.php diff --git a/private/lib/dao/models/UserModel.php b/private/lib/dao/models/UserModel.php index 0ddfed3..d6747cc 100644 --- a/private/lib/dao/models/UserModel.php +++ b/private/lib/dao/models/UserModel.php @@ -16,6 +16,14 @@ class UserModel extends Model{ if (!$this->hasProperty("email")){ throw new CoreException("Impossible to create a user without a mail address"); } + + if (!$this->hasProperty("username")){ + throw new CoreException("Impossible to create a user without a username"); + } + + if(!$this->hasProperty("password")){ + new CoreException("Impossible to create a user without a password"); + } } public static function getCollectionName(){ diff --git a/public/index.php b/public/index.php index 93d9845..f1fbd96 100644 --- a/public/index.php +++ b/public/index.php @@ -275,7 +275,7 @@ catch (Exception $ex){
0){ foreach($lastsNews as $last){ - $data = $mesi[date("n",$last->data->sec)]." ".date("Y",$last->about->data->sec); + $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;?>
diff --git a/public/js/functions.js b/public/js/functions.js index 2157ff7..dcda619 100644 --- a/public/js/functions.js +++ b/public/js/functions.js @@ -28,5 +28,16 @@ function openRegistrationModal(){ } function sendRegistration(){ - + $.ajax({ + method:'POST', + url:'sendRegistrationBackend.php', + dataType:'html', + data:$("#regForm").serialize(), + success: function(data){ + + }, + error:function(data){ + $(".modalError").html(data); + } + }); } \ No newline at end of file diff --git a/public/registration.php b/public/registration.php index c633af2..090a0c8 100644 --- a/public/registration.php +++ b/public/registration.php @@ -4,16 +4,43 @@ require_once(dirname(__FILE__)."/load.php"); try { ?> -
-
Email:
-
Password:
-
Conferma password:
- Registrami -
+ +
+
+
+
Email:
+
Username:
+
Password:
+
Conferma password:
+
Vuoi iscriverti alla newsletter?
+
+
+ save($msg); } echo "zzzzzzzzzzzzzzzzzzzzzz"; -?> \ No newline at end of file +?> + \ No newline at end of file diff --git a/public/sendCommentoBackend.php b/public/sendCommentoBackend.php index 84746ff..2695cb8 100644 --- a/public/sendCommentoBackend.php +++ b/public/sendCommentoBackend.php @@ -19,8 +19,8 @@ try { $news->user = UserLoginManager::getLogged(); $commento = new CommentoModel($news); - $commento->titolo = $titolo; - $commento->testo = $testo; + $commento->titolo = strip_tags($titolo); + $commento->testo = strip_tags($testo); $commento->status = CommentoModel::STATUS_PENDING; GlobalVariables::get("dao")->save($commento); diff --git a/public/sendRegistrationBackend.php b/public/sendRegistrationBackend.php new file mode 100644 index 0000000..618171b --- /dev/null +++ b/public/sendRegistrationBackend.php @@ -0,0 +1,41 @@ +getFirst("UserModel",array("username"=>$userName)); +// GlobalVariables::get("dao")->getFirst("UserModel",array("email"=>$email)); +// GlobalVariables::get("dao")->getFirst("UserModel",array("username"=>$userName)); + $user = new stdClass(); + $user->email = $email; + $user->password = sha1($pass); + $user->username = $userName; + $user->newsletter = $newsletter; + + + $userModel = new UserModel($user); +// GlobalVariables::get("dao")->save($userModel); + echo "salvataggio riuscito"; + } + else{ + echo "Le due password non coincidono"; + } + +}catch(Exception $exec){ + $msg = LogModel::fromException($exec); + GlobalVariables::get("dao")->save($msg); +} + +?> \ No newline at end of file diff --git a/public/style/public.css b/public/style/public.css index 01d5ce4..8fef4cc 100644 --- a/public/style/public.css +++ b/public/style/public.css @@ -89,8 +89,16 @@ body{font-family:lato, arial;} #floating{ background-color:green; z-index:4; + padding:5px 10px; } +.topReg{text-align:right;} +.topReg > div{display:inline-block;} +.topReg > span,a{vertical-align:top;} +.close{vertical-align:top;color:white;} + +.modalBody{text-align:right;} +.modalError{text-algin:center;color:red;font-weight:bold;} #modalBlock{}/* margin-left:auto; margin-right:auto; From 94c6147f1e874447043ffe89219c5eb8c61cc093 Mon Sep 17 00:00:00 2001 From: Lorenzo Giacomelli Date: Tue, 8 Mar 2016 22:28:52 +0100 Subject: [PATCH 3/4] registration finita, in testing inizio styling categorySummary --- public/categorySummary.php | 62 ++++++++++++++++++++++++++++++ public/js/functions.js | 27 ++++++------- public/registration.php | 32 +++------------ public/sendRegistrationBackend.php | 47 ++++++++++++++-------- public/style/public.css | 14 ++++++- 5 files changed, 125 insertions(+), 57 deletions(-) create mode 100644 public/categorySummary.php diff --git a/public/categorySummary.php b/public/categorySummary.php new file mode 100644 index 0000000..7d6b398 --- /dev/null +++ b/public/categorySummary.php @@ -0,0 +1,62 @@ +query("NotiziaModel", + array('$and'=>array(array("status"=>NotiziaModel::STATUS_ACCEPTED),array("category"=>$category))), + array("sort"=>array("about.data"=>-1),"limit"=>10) + ); + } + else{ + GUIHandler::redirect("index.php"); + } + + +}catch(GUIException $ex){ + $error = $ex->getMessage(); +}catch (Exception $exec){ + $msg = LogModel::fromException($exec); + GlobalVariables::get("dao")->save($msg); + + GUIHandler::redirect("index.php"); +} +?> +
+ +
+ titolo) > 103) ? substr($notizia->titolo,0,100).'...' : $notizia->titolo; + $stringSottotitolo = (strlen($notizia->sottotitolo) > 73) ? substr($notizia->sottotitolo,0,70).'...' : $notizia->sottotitolo; + $stringTesto = (strlen($notizia->testo) > 33) ? substr($notizia->testo,0,30).'...' : $notizia->testo; + $media = DaoMediaHandler::getMainMediaFromModel($notizia); + ?> +
+
renderMedia(array("size"=>MediaRenderer::SIZE_SMALL)):"" ;?>
+
+
+
+
+
+
+ +
+
+ + +
\ No newline at end of file diff --git a/public/js/functions.js b/public/js/functions.js index dcda619..f21e087 100644 --- a/public/js/functions.js +++ b/public/js/functions.js @@ -28,16 +28,17 @@ function openRegistrationModal(){ } function sendRegistration(){ - $.ajax({ - method:'POST', - url:'sendRegistrationBackend.php', - dataType:'html', - data:$("#regForm").serialize(), - success: function(data){ - - }, - error:function(data){ - $(".modalError").html(data); - } - }); -} \ No newline at end of file + $.ajax({ + method:'POST', + url:'sendRegistrationBackend.php', + dataType:'html', + data:$('#regForm').serialize(), + success: function(data){ +// $("#regForm").remove(); + $(".modalResponse").html(data); + /* Verificare se si possa eliminare la form in caso di registrazione avvenuta con successo assegnando un parametro + * allo span di avvenuta registrazione*/ +// $(".modalError").html(""); + } + }); +} \ No newline at end of file diff --git a/public/registration.php b/public/registration.php index 090a0c8..1b59bcb 100644 --- a/public/registration.php +++ b/public/registration.php @@ -4,43 +4,23 @@ require_once(dirname(__FILE__)."/load.php"); try { ?> - +
-
+
Email:
Username:
Password:
Conferma password:
Vuoi iscriverti alla newsletter?
+
- + save($msg); } -echo "zzzzzzzzzzzzzzzzzzzzzz"; -?> - \ No newline at end of file +// echo "zzzzzzzzzzzzzzzzzzzzzz"; +?> \ No newline at end of file diff --git a/public/sendRegistrationBackend.php b/public/sendRegistrationBackend.php index 618171b..f7481b4 100644 --- a/public/sendRegistrationBackend.php +++ b/public/sendRegistrationBackend.php @@ -13,24 +13,39 @@ try { } - echo "invitao "; - if(strcmp($pass, $confPass)==0){ -// GlobalVariables::get("dao")->getFirst("UserModel",array("username"=>$userName)); -// GlobalVariables::get("dao")->getFirst("UserModel",array("email"=>$email)); -// GlobalVariables::get("dao")->getFirst("UserModel",array("username"=>$userName)); - $user = new stdClass(); - $user->email = $email; - $user->password = sha1($pass); - $user->username = $userName; - $user->newsletter = $newsletter; - - - $userModel = new UserModel($user); -// GlobalVariables::get("dao")->save($userModel); - echo "salvataggio riuscito"; + $notEmail = GlobalVariables::get("dao")->getFirst("UserModel",array("email"=>$email)); + $notUser = GlobalVariables::get("dao")->getFirst("UserModel",array("username"=>$userName)); + + if(is_null($notEmail) || strcmp($email, $notEmail)!=0){ + if(is_null($notUser) || strcmp($userName, $notUser)!=0){ + if(strcmp($pass, $confPass)==0){ + + // GlobalVariables::get("dao")->getFirst("UserModel",array("username"=>$userName)); + // GlobalVariables::get("dao")->getFirst("UserModel",array("email"=>$email)); + // GlobalVariables::get("dao")->getFirst("UserModel",array("username"=>$userName)); + $user = new stdClass(); + $user->email = $email; + $user->password = sha1($pass); + $user->username = $userName; + $user->newsletter = $newsletter; + + + $userModel = new UserModel($user); + // GlobalVariables::get("dao")->save($userModel); + echo 'Registrazione avvenuta con successo.A breve riceverai una mail per confermare la tua registrazione'; + } + else{ +// trigger_error("Le due password non coincidono (trigger)"); + echo 'Le due password non coincidono'; + } + } + else{ + + echo 'Questo username è già in uso da un altro utente.'; + } } else{ - echo "Le due password non coincidono"; + echo 'Questa email risulta già in utilizzo.'; } }catch(Exception $exec){ diff --git a/public/style/public.css b/public/style/public.css index 8fef4cc..095dca9 100644 --- a/public/style/public.css +++ b/public/style/public.css @@ -87,7 +87,7 @@ body{font-family:lato, arial;} */ #floating{ - background-color:green; + background-color:#ceecf4; z-index:4; padding:5px 10px; } @@ -98,7 +98,8 @@ body{font-family:lato, arial;} .close{vertical-align:top;color:white;} .modalBody{text-align:right;} -.modalError{text-algin:center;color:red;font-weight:bold;} +.regMe{text-align:left;} +.modalResponse{text-align:center;color:aqua;font-weight:bold;} #modalBlock{}/* margin-left:auto; margin-right:auto; @@ -321,3 +322,12 @@ body{font-family:lato, arial;} .rotoBanner{} .reader{} .notRotoBanner{} + + + + + +.categorySummaryContainer{width:600px;padding:5px 10px;vertical-align:top;} +.notiziaContainer > .notiziaImage{display:inline-block;} +.notiziaContainer > .notiziaInfo{display:inline-block;width:430px;padding:10px;} +.summaryRightBar{width:300px;padding:5px;vertical-align:top;} \ No newline at end of file From 87aa5d387ee78b22697823d4e2cec45f262d9348 Mon Sep 17 00:00:00 2001 From: Lorenzo Giacomelli Date: Wed, 9 Mar 2016 12:45:15 +0100 Subject: [PATCH 4/4] categorySummari terminata; inserito in GuiHandler il metodo per la barra di destra coi banner --- private/lib/gui/GUIHandler.php | 53 ++++++++++++++++++++++++++++++++-- public/articolo.php | 6 ++-- public/categorySummary.php | 25 +++++++++++----- public/style/public.css | 49 ++++++++++++++++++++++--------- 4 files changed, 106 insertions(+), 27 deletions(-) diff --git a/private/lib/gui/GUIHandler.php b/private/lib/gui/GUIHandler.php index ce89427..bb2d50b 100644 --- a/private/lib/gui/GUIHandler.php +++ b/private/lib/gui/GUIHandler.php @@ -164,9 +164,9 @@ class GUIHandler {
-
+
BANNER
-
+
BANNER
@@ -276,5 +276,54 @@ class GUIHandler { $url = self::getBaseUrl()."fbMetadata.php?id=".$notizia->id; return 'window.open("http://www.facebook.com/sharer.php?u="+encodeURIComponent("'.$url.'"))'; } + + public static function generateRightBannerBlock(){ + $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'); + + ?> +
+
+
Guarda anche
+
BANNER
+
BANNER
+
+
+
+
+
Più Letti
+
+
+ 0){ + foreach($lastsNews as $last){ + $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;?> +
+
+
+ +
+ +
+
+
+
Guarda anche
+
BANNER
+
BANNER
+
+
+ + \ No newline at end of file diff --git a/public/articolo.php b/public/articolo.php index 79b1fcc..38f47ae 100644 --- a/public/articolo.php +++ b/public/articolo.php @@ -62,7 +62,7 @@ try {
> renderMedia(array("size"=>MediaRenderer::SIZE_BIG)); + $media->renderMedia(array("size"=>MediaRenderer::SIZE_MEDIUM)); } ?>
@@ -122,9 +122,7 @@ try {
-
Riquadro Banner Rotanti
-
Più Letti
-
Riquadro Banner Non Rotanti
+
query("NotiziaModel", array('$and'=>array(array("status"=>NotiziaModel::STATUS_ACCEPTED),array("category"=>$category))), array("sort"=>array("about.data"=>-1),"limit"=>10) ); - } + } else{ GUIHandler::redirect("index.php"); } - + }catch(GUIException $ex){ $error = $ex->getMessage(); @@ -36,8 +37,9 @@ try{ GUIHandler::generateHeadPublic(); GUIHandler::generateMenu();?>
- titolo) > 103) ? substr($notizia->titolo,0,100).'...' : $notizia->titolo; $stringSottotitolo = (strlen($notizia->sottotitolo) > 73) ? substr($notizia->sottotitolo,0,70).'...' : $notizia->sottotitolo; $stringTesto = (strlen($notizia->testo) > 33) ? substr($notizia->testo,0,30).'...' : $notizia->testo; @@ -45,18 +47,27 @@ try{ ?>
renderMedia(array("size"=>MediaRenderer::SIZE_SMALL)):"" ;?>
-
+
-
+
+
-
+
+ +
+ GUIHandler::generateFooter();?> \ No newline at end of file diff --git a/public/style/public.css b/public/style/public.css index 095dca9..e10e5f6 100644 --- a/public/style/public.css +++ b/public/style/public.css @@ -231,12 +231,12 @@ body{font-family:lato, arial;} .middleRightBanner{width:220px;overflow:hidden;} .middleRightBanner > img{max-width:220px; max-heigth:200px;} -.lastContainer{max-height:120px;margin-top:5px;margin-bottom:5px;border-bottom:dotted #C1B4B4 1px;} -.lastContainer:last-child {border-bottom: none;} -.lastData{font-size:12px;} -.lastTitle{font-size:12px;font-weight:bold;} -.lastContinua{text-align:right; font-size:12px;font-weight:bold;padding-bottom:5px;} -.lastContinua a{color:#64bff0;} +.reader > .lastContainer, .lastContainer{max-height:120px;margin-top:5px;margin-bottom:5px;border-bottom:dotted #C1B4B4 1px;} +.reader > .lastContainer:last-child, .lastContainer:last-child {border-bottom: none;} +.reader > .lastData, .lastData{font-size:12px;} +.reader > .lastTitle, .lastTitle{font-size:12px;font-weight:bold;} +.reader > .lastContinua, .lastContinua{text-align:right; font-size:12px;font-weight:bold;padding-bottom:5px;} +.reader > .lastContinua a, .lastContinua a{color:#64bff0;} .gossipContainer{max-height:120px;margin-top:5px;margin-bottom:5px;border-bottom:dotted #C1B4B4 1px;cursor:pointer;} .gossipContainer#gossip_2{border-bottom:none;} @@ -274,7 +274,7 @@ body{font-family:lato, arial;} .headArticolo{margin-bottom:25px;} -.articoloMainMedia{display:inline-block;vertical-align:top;width:400px;} +.articoloMainMedia{display:inline-block;vertical-align:top;width:400px;text-align:center;} .articoloTitle{display:inline-block;width:550px;padding:0px 20px;vertical-align:top;} .articoloTitle > .title{font-size:20px;font-weight:bold;text-transform:uppercase;font-family:"Arial Bold";} @@ -319,15 +319,36 @@ body{font-family:lato, arial;} .articoloRightBar{vertical-align:top;} -.rotoBanner{} -.reader{} -.notRotoBanner{} + +.categorySummaryContainer{width:600px;padding:5px 10px 5px 0px;vertical-align:top;display:inline-block;} +.categorySummaryContainer > .notiziaContainer{border:solid #d6d6d6 1px;margin-bottom:5px;padding:5px;} +.notiziaContainer > .notiziaImage{display:inline-block;vertical-align:middle;text-align:center;} +.notiziaContainer > .notiziaInfo{display:inline-block;width:430px;padding:10px;vertical-align:middle;cursor:pointer;} +.notiziaInfo > .notiziaTitolo{font-weight:bold;padding:5px;} +.notiziaInfo > .notiziaSottotitolo{padding:5px;} +.notiziaInfo > .notiziaTesto{padding:5px;color:#1a9ee9;font-weight:bold;} + +.summaryRightBar{width:370px;padding:5px;vertical-align:top;display:inline-block;} +.rightBarContainer{width:100%;height:100%;} -.categorySummaryContainer{width:600px;padding:5px 10px;vertical-align:top;} -.notiziaContainer > .notiziaImage{display:inline-block;} -.notiziaContainer > .notiziaInfo{display:inline-block;width:430px;padding:10px;} -.summaryRightBar{width:300px;padding:5px;vertical-align:top;} \ No newline at end of file + +.bannerContainer{width:45%;padding:5px;display:inline-block;} + +/* + ____ +| __ ) __ _ _ __ _ __ ___ _ __ +| _ \ / _` | '_ \| '_ \ / _ \ '__| +| |_) | (_| | | | | | | | __/ | +|____/ \__,_|_| |_|_| |_|\___|_| + +*/ + + +.rotoBanner{border:solid #d6d6d6 1px;padding:5px;margin-bottom:5px;} +.reader{border:solid #d6d6d6 1px;padding:5px;margin-bottom:5px;} +.rotoBanner .not{} +