Commit ae2781714e913ff103807072f851552307af84cd

Navigation Menu with style and onclick event handler
  
1/*! HTML5 Boilerplate v4.3.0 | MIT License | http://h5bp.com/ */
1/*! HTML4 Boilerplate v4.3.0 | MIT License | http://h5bp.com/ */
22
33/*
44 * What follows is the result of much research on cross-browser styling.
9999}
100100.heading {
101101 font-family: Helvetica, Arial, Sans-Serif;
102}
102}/*
103103.navigation-img {
104104 top:-20px;
105105 padding:0px 25px;
198198}
199199.signal-strength-icon {
200200 url : "/static/img/signal-strength-icon.svg"
201}
201}*/
202202
203203/* CSS classes for the image url ends here */
204204
207207 Author's custom styles
208208 ========================================================================== */
209209
210/*a .showme {
211 display:none;
212}
210213
214a .default {
215 display:block;
216}*/
217
218/*.nav>li:link .default{
219 display:none;
220
221}
222.nav>li:link .showme{
223 display:block;
224}*/
225
226.nav li a:hover .default{
227 display:none;
228}
229
230.nav li a:hover .showme{
231 display: block;
232 position:relative;
233 top: -3px;
234}
235
236.nav li.active .default{
237 display:none;
238
239}
240.nav li.active .showme{
241 display:block;
242 position:relative;
243 top:-3px;
244}
245
246
247
248.navbar {
249 background-image: url("/static/img/bg.jpg");
250
251}
252
253#forline {
254 position: relative;
255 display: block;
256 height: 1px;
257 /*width: 100%;*/
258 border: 1px solid #444;
259 z-index: 1;
260
261}
262
263.navbar-nav {
264 position:relative;
265 top:-1.5em;
266 left:10%;
267}
268
269.playcollapse {
270 position:relative;
271 top:-1.5em;
272 width:150px;
273 height:auto;
274}
275
276#navpos {
277 position:relative;
278 top:-10px;
279}
280
281#play-about {
282 display:block;
283 position:relative;
284
285}
286#play-signal-intensity, #play-research-methodology, #play-radio-policies, #play-global-radio {
287 position: relative;
288 top:-47px;
289
290}
291
292a {
293 color:#444;
294}
295
296/*a:active .showme{
297 display:block;
298}
299
300a:active .default{
301 display:none;
302}*/
211303/* ==========================================================================
212304 Helper classes
213305 ========================================================================== */
Binary files differ
Binary files differ
Binary files differ
  
103103 }
104104 else if(this.model.get('customMenu') === true) {
105105 // get the URL fragment
106 var fragment = location.hash.split('/')[1];
106 var fragment = location.hash;//.split('/')[1];
107107 // find out where it is in the nav menu
108 var link = $('.nav').find('a[href="#/'+ fragment +'"]')[0];
108 //var link = $('.nav').find('a[href="#/'+ fragment +'"]')[0];
109 var link = $('.nav').find('a[href='+ fragment +'] ')[0];
109110 // find its <li> parent all the way up in the main ul.nav
110111 $(link).closest('ul.nav > li').addClass('active');
112 //console.log(customNavClick);
113 customNavClick(link, fragment);
111114 }
112115 }
116
113117});
114118
115119var AppRouter = Backbone.Router.extend({
  
3434 <script src="{{url_for('static', filename='js/mouchak.js')}}"></script>
3535 <script src="{{url_for('static', filename='js/models.js')}}"></script>
3636 <script src="{{url_for('static', filename='js/views.js')}}"></script>
37 <script src="{{url_for('static', filename='user_plugins/some.js')}}"></script>
3738{% endblock %}
3839
3940{% block templates %}