File tree Expand file tree Collapse file tree 3 files changed +38
-4
lines changed
Expand file tree Collapse file tree 3 files changed +38
-4
lines changed Original file line number Diff line number Diff line change 1+ var groupDetails = {
2+ group_urlname : "Python-Milano"
3+ } ;
4+ getEventData = "https://api.meetup.com/2/events?offset=0&format=json&limited_events=False&group_urlname=" + groupDetails . group_urlname + "&photo-host=public&page=1&fields=&order=time&desc=false&status=upcoming&sig_id=99027442&sig=a0e7723a75144f7a1becb1f5f529a0313cd32374" ;
5+
6+ function getMonth ( time ) {
7+ return "MESE"
8+ }
9+ function getDay ( time ) {
10+ return "00"
11+ }
12+ $ ( document ) . ready ( function ( ) {
13+ $ . getJSON ( getEventData , function ( data ) {
14+ console . log ( data )
15+ } ) . done ( function ( data ) {
16+ if ( data . status && data . status . match ( / ^ 2 0 0 / ) == null ) {
17+ alert ( data . status + ": " + data . details ) ;
18+ } else {
19+ if ( data . results . length == 0 ) {
20+ $ ( "#month" ) . text ( " " ) ;
21+ $ ( '#day' ) . text ( " " ) ;
22+ $ ( '#event-title' ) . text ( "Nessun nuovo evento in programma" ) ;
23+ $ ( '#partecipate-button' ) . text ( "Proponine Uno!" ) . attr ( 'href' , 'https://trello.com/b/0BEDDL3K/argomenti-incontri' ) ;
24+ } else {
25+ var event = data . results [ 0 ] ;
26+ $ ( "#month" ) . text ( getMonth ( event . time ) ) ;
27+ $ ( '#day' ) . text ( getDay ( event . time ) ) ;
28+ $ ( '#event-title' ) . text ( event . name ) ;
29+ $ ( '#partecipate-button' ) . text ( "Partecipa!" ) . attr ( 'href' , event . event_url ) ;
30+ }
31+ }
32+ } ) ;
33+ } ) ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ $(document).ready(function(){
33 "La pyBissa de Milan" ,
44 "Il serpent[1] di Milano" ,
55 "Python Milano's Flying Cathedral" ,
6- "Il secondo serpente di Milano, dopo il biscione" ,
6+ "Il secondo serpente di Milano, dopo il biscione"
77 ] ;
88
99 var motto = motti [ Math . floor ( Math . random ( ) * motti . length ) ] ;
Original file line number Diff line number Diff line change @@ -57,8 +57,8 @@ <h1 class="lead">Sviluppatori e Appassionati di Python a Milano</h1>
5757 < div id ="meetup ">
5858 < h2 class ="thin "> Prossimo Meetup</ h2 >
5959 < p class ="text-muted ">
60- < strong > Genropy - Tool di Migrazione e package editor.</ strong > < br > < br >
61- < a href ="http://www.meetup.com/it/Python-Milano/events/225798285/ " class ="btn btn-action btn-lg "> Partecipa!</ a >
60+ < strong id =" event-title " > Genropy - Tool di Migrazione e package editor.</ strong > < br > < br >
61+ < a id =" partecipate-button " href ="http://www.meetup.com/it/Python-Milano/events/225798285/ " class ="btn btn-action btn-lg "> Partecipa!</ a >
6262 </ p >
6363 </ div >
6464</ div >
103103 < div class ="h-caption ">
104104 < h4 >
105105 < i class ="fa fa-slack fa-5 "> </ i >
106- < script async defer src ="https://pythonmilano.herokuapp.com/slackin.js?large "> </ script >
106+ <!--< script async defer src="https://pythonmilano.herokuapp.com/slackin.js?large"></script>-- >
107107 </ h4 >
108108 </ div >
109109 < div class ="h-body text-center ">
169169< script src ="assets/js/jQuery.headroom.min.js "> </ script >
170170< script src ="assets/js/template.js "> </ script >
171171< script src ="assets/js/motto.js "> </ script >
172+ < script src ="assets/js/app.js "> </ script >
172173
173174</ body >
174175</ html >
You can’t perform that action at this time.
0 commit comments