@@ -25,7 +25,7 @@ <h1>{{ next_event.time|date:"F j"|upper }}</h1>
2525 </ time >
2626 </ header >
2727 < h2 > {{ next_event.name|safe }}</ h2 >
28- {% if next_event.venue.id %}< address > {{ next_event.venue.name }} // {{ next_event.venue.address1 }}{% if next_event.venue.address2 %}, {{ next_event.venue.address2 }}{% endif %} // {{ next_event.venue.city }}, {{ next_event.venue.state }} {{ next_event.venue.zip }}</ address > {% else %}Venue TBD{% endif %}
28+ {% if next_event.venue.id %}< address > {{ next_event.venue.name }}{% if next_event.venue.address1 %} // {{ next_event.venue.address1 }}{% if next_event.venue.address2 %}, {{ next_event.venue.address2 }}{% endif % }{% endif %} // {{ next_event.venue.city }}, {{ next_event.venue.state }} {{ next_event.venue.zip }}</ address > {% else %}Venue TBD{% endif %}
2929 {% if next_event.description %}< p class ="description "> {{ next_event.description|safe }}</ p > {% endif %}
3030 < p class ="rsvp "> RSVP at < a href ="{{ next_event.event_url }} "> < img src ="{{ STATIC_URL }}meetup-logo.gif " alt ="PythonKC Meetup RSVP for {{ next_event.name|safe }} "> </ a > </ p >
3131 </ div >
@@ -48,9 +48,12 @@ <h1>Past Events</h1>
4848 < h1 > < time datetime > {{ event.time|date:"F j, Y" }}</ time > </ h1 >
4949 </ header >
5050
51- < h2 > {{ event.name|safe }}</ h2 >
52- < p > {{ event.description|safe }}</ p >
53- < div class ="attendees ">
51+ < h2 > < a href ="{{ event.event_url }} "> {{ event.name|safe }}</ a > </ h2 >
52+ {% if event.description %}
53+ < p > {{ event.description|safe|truncatewords_html:25 }}</ p >
54+ {% endif %}
55+ < a href ="{{ event.event_url }} " class ="read-more "> Read more at the Meetup event page →</ a >
56+ < div class ="attendees clearfix ">
5457 < h3 > Attendees ({{event.attendees|length}})</ h3 >
5558 {% for attendee in event.attendees %}
5659 {% if attendee.photo.thumb_url %}
@@ -63,7 +66,37 @@ <h3>Attendees ({{event.attendees|length}})</h3>
6366 </ div >
6467 </ div >
6568 </ section >
66-
69+ < section class ="resources clearfix ">
70+ < div class ="wrap ">
71+ < h1 > Resources</ h1 >
72+ < article >
73+ < h1 > Books</ h1 >
74+ < ul class ="resources ">
75+ < li > < a href ="http://www.diveintopython.org/ "> Dive Into Python < span class ="author "> Mark Pilgrim</ span > </ a > </ li >
76+ < li > < a href ="http://learnpythonthehardway.org/ "> Learn Python The Hard Way < span class ="author "> Zed A. Shaw</ span > </ a > </ li >
77+ < li > < a href ="http://www.swaroopch.com/notes/Python "> A Byte of Python < span class ="author "> Swaroop C H</ span > </ a > </ li >
78+ < li > < a href ="http://greenteapress.com/thinkpython/thinkpython.html "> Think Python < span class ="author "> Allen B. Downey</ span > </ a > </ li >
79+ </ ul >
80+ </ article >
81+ < article >
82+ < h1 > Websites</ h1 >
83+ < ul class ="resources ">
84+ < li > < a href ="http://python.org/ "> Official Python Site</ a > </ li >
85+ < li > < a href ="http://docs.python.org "> Python Docs</ a > </ li >
86+ < li > < a href ="http://codingbat.com/python "> Coding exercises</ a > </ li >
87+ < li > < a href ="https://github.com/gregmalcolm/python_koans "> Coding koans</ a > </ li >
88+ < li > < a href ="http://www.pythonchallenge.com/ "> The Python Challenge</ a > </ li >
89+ </ ul >
90+ </ article >
91+ < article >
92+ < h1 > Community</ h1 >
93+ < ul class ="resources ">
94+ < li > < a href ="http://www.python.org/community/ "> Python Community</ a > </ li >
95+ < li > < a href ="http://reddit.com/r/python/ "> Python on Reddit</ a > </ li >
96+ </ ul >
97+ </ article >
98+ </ div >
99+ </ section >
67100 < footer >
68101 < a class ="top "> Back to the top</ a >
69102 < div class ="wrap ">
@@ -102,76 +135,11 @@ <h1>FOLLOW US</h1>
102135 </ div >
103136 < script type ="text/javascript " src ="http://maps.googleapis.com/maps/api/js?sensor=false "> </ script >
104137 < script src ="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js " type ="text/javascript " charset ="utf-8 "> </ script >
138+ < script src ="{{ STATIC_URL }}pykc.js " type ="text/javascript " charset ="utf-8 "> </ script >
105139 < script type ="text/javascript " charset ="utf-8 ">
106- var pykc = window . pykc = pykc || { } ;
107- pykc . map ;
108-
109- pykc . mapInit = function ( ) {
110- var latlng = new google . maps . LatLng ( { { next_event . venue . lat | default :past_events .0 . venue . lat | default :- 34.397 } } , { { next_event . venue . lon | default :past_events .0 . venue . lon | default :150.644 } } ) ;
111- var opts = {
112- zoom : 8 ,
113- center : latlng ,
114- mapTypeId : google . maps . MapTypeId . ROADMAP
115- } ;
116- this . map = new google . maps . Map ( document . getElementById ( "map_canvas" ) , opts ) ;
117- var venue = new google . maps . Marker ( {
118- position : latlng ,
119- map : this . map ,
120- title :'{{ next_events.venue }}'
121- } ) ;
122- }
123-
124- pykc . resizeMap = function ( ) {
125- this . $mapHolder = this . $mapHolder || $ ( "#map_canvas" ) ;
126- this . $mapHolder . width ( this . $mapHolder . parent ( ) . width ( ) / 2 ) ;
127- google . maps . event . trigger ( this . map , 'resize' ) ;
128- }
129-
130- pykc . $slides = $ ( '#evt-wrapper' ) . children ( ) ;
131- pykc . slideNum = 0 ;
132-
133- pykc . onPrev = function ( e ) {
134- var $ele = pykc . $slides . eq ( pykc . slideNum - 1 ) ;
135- var eloffset = $ele . position ( ) . left ;
136- e . preventDefault ( ) ;
137- if ( pykc . slideNum === 0 ) return ;
138- eloffset === 0 ?
139- pykc . $slides . parent ( ) . animate ( { left : 0 } ) :
140- pykc . $slides . parent ( ) . animate ( { left : '+=' + eloffset } )
141- pykc . slideNum -- ;
142- pykc . checkButtons ( 'prev' ) ;
143- }
144-
145- pykc . onNext = function ( e ) {
146- e . preventDefault ( ) ;
147- if ( pykc . slideNum === pykc . $slides . length - 1 ) return ;
148- var $ele = pykc . $slides . eq ( pykc . slideNum + 1 ) ;
149- var eloffset = $ele . position ( ) . left ;
150- pykc . $slides . parent ( ) . animate ( { left : - eloffset } ) ;
151- pykc . slideNum ++ ;
152- pykc . checkButtons ( 'next' ) ;
153- }
154-
155- pykc . checkButtons = function ( id ) {
156- if ( pykc . slideNum === 0 || pykc . slideNum === pykc . $slides . length - 1 ) {
157- $ ( '#' + id ) . addClass ( 'disabled' ) ;
158- } else {
159- $ ( '.btn-control' ) . removeClass ( 'disabled' ) ;
160- }
161- }
162-
163- pykc . init = function ( ) {
164- $ ( '.top' ) . click ( function ( e ) {
165- e . preventDefault ( ) ;
166- $ ( 'html, body' ) . animate ( { scrollTop : 0 } , 300 ) ;
167- } ) ;
168- $ ( '#prev' ) . click ( pykc . onPrev ) ;
169- $ ( '#next' ) . click ( pykc . onNext ) ;
170- this . mapInit ( ) ;
171- this . resizeMap ( )
172- }
173-
174- $ ( function ( ) { pykc . init ( ) ; } ) ;
140+ $ ( function ( ) {
141+ pykc . init ( { { next_event . venue . lat | default :past_events .0 . venue . lat | default :- 34.397 } } , { { next_event . venue . lon | default :past_events .0 . venue . lon | default :150.644 } } ) ;
142+ } ) ;
175143 </ script >
176144</ body >
177145</ html >
0 commit comments