File tree Expand file tree Collapse file tree 5 files changed +49
-24
lines changed
Expand file tree Collapse file tree 5 files changed +49
-24
lines changed Original file line number Diff line number Diff line change 1212 background-color : # f5f5f5 ;
1313 margin-top : 0px ;
1414 padding-top : 60px ;
15+ position : static;
16+ /* to prevent weird overlap on page.hbs */
1517}
1618ul .nav li {
1719 display : inline;
Original file line number Diff line number Diff line change 2626 background-color : @rascal-bright-white ;
2727 margin-top : 0px ;
2828 padding-top : 60px ;
29+ position : static ; /* to prevent weird overlap on page.hbs */
2930}
3031
3132ul .nav li {
Original file line number Diff line number Diff line change 1010 <a class =" brand" href =" /" ><img src =" http://rascalmicro.com/img/rm-logo-words-only-light.png" ></a >
1111 <ul class =" nav" >
1212 <li class =" active" ><a href =" http://store.rascalmicro.com" >Store</a ></li >
13- <li ><a href =" /about.htm " >About</a ></li >
13+ <li ><a href =" /about" >About</a ></li >
1414 <li ><a href =" /blog/" >Blog</a ></li >
15- <li ><a href =" /forum/" >Forum</a ></li >
1615 <li ><a href =" /docs/" >Docs</a ></li >
1716 </ul >
1817 </div >
Original file line number Diff line number Diff line change 33{{! This is a page template. A page outputs content just like any other post, and has all the same
44 attributes by default, but you can also customise it to behave differently if you prefer. }}
55
6+ <div class =" navbar-fill" >
7+ <div class =" container" >
8+ <a class =" brand" href =" /" ><img src =" http://rascalmicro.com/img/rm-logo-words-only-light.png" ></a >
9+ <ul class =" nav" >
10+ <li class =" active" ><a href =" http://store.rascalmicro.com" >Store</a ></li >
11+ <li ><a href =" /about" >About</a ></li >
12+ <li ><a href =" /blog/" >Blog</a ></li >
13+ <li ><a href =" /docs/" >Docs</a ></li >
14+ </ul >
15+ </div >
16+ </div >
17+ <script type =" text/javascript" >
18+ function activateNavbar () { // From https://gist.github.com/1362111, but with the regex tweaked
19+ var path = location .pathname .replace (/ ^ (\/ . +? \/ ). + $ / , ' $1' );
20+ $ (' ul.nav li' ).removeClass (" active" );
21+ $ (' ul.nav a[href="' + path + ' "]' ).parent ().addClass (" active" );
22+ }
23+ $ (function (){
24+ activateNavbar ();
25+ })
26+ </script >
27+
628<main class =" content" role =" main" >
729
830 <article class =" {{ post_class }} " >
931
10- <header class =" post-header" >
11- <a class =" blog-logo" href =" {{ @blog.url }} " >
12- {{ #if @blog.logo }}
13- <img src =" {{ @blog.logo }} " alt =" Blog Logo" />
14- {{ else }}
15- <span class =" blog-title" >{{ @blog.title }} </span >
16- {{ /if }}
17- </a >
18- </header >
19-
2032 {{ #post }}
2133
2234 <h1 class =" post-title" >{{{ title }}} </h1 >
Original file line number Diff line number Diff line change 33{{! The comment above "< default" means - insert everything in this file into
44 the {body} of the default.hbs template, which contains our header/footer. }}
55
6+ <div class =" navbar-fill" >
7+ <div class =" container" >
8+ <a class =" brand" href =" /" ><img src =" http://rascalmicro.com/img/rm-logo-words-only-light.png" ></a >
9+ <ul class =" nav" >
10+ <li class =" active" ><a href =" http://store.rascalmicro.com" >Store</a ></li >
11+ <li ><a href =" /about" >About</a ></li >
12+ <li ><a href =" /blog/" >Blog</a ></li >
13+ <li ><a href =" /docs/" >Docs</a ></li >
14+ </ul >
15+ </div >
16+ </div >
17+ <script type =" text/javascript" >
18+ function activateNavbar () { // From https://gist.github.com/1362111, but with the regex tweaked
19+ var path = location .pathname .replace (/ ^ (\/ . +? \/ ). + $ / , ' $1' );
20+ $ (' ul.nav li' ).removeClass (" active" );
21+ $ (' ul.nav a[href="' + path + ' "]' ).parent ().addClass (" active" );
22+ }
23+ $ (function (){
24+ activateNavbar ();
25+ })
26+ </script >
27+
628<main class =" content" role =" main" >
729
830 <article class =" {{ post_class }} " >
931
10- {{! Each post has the blog logo at the top, with a link back to the home page }}
11- <header class =" post-header" >
12- <a class =" blog-logo" href =" {{ @blog.url }} " >
13- {{ #if @blog.logo }}
14- <img src =" {{ @blog.logo }} " alt =" Blog Logo" />
15- {{ else }}
16- <span class =" blog-title" >{{ @blog.title }} </span >
17- {{ /if }}
18- </a >
19- </header >
20-
2132 {{! Everything inside the #post tags pulls data from the post }}
2233 {{ #post }}
2334
5869
5970 </article >
6071
61- </main >
72+ </main >
You can’t perform that action at this time.
0 commit comments