File tree Expand file tree Collapse file tree 6 files changed +56
-428
lines changed Expand file tree Collapse file tree 6 files changed +56
-428
lines changed Original file line number Diff line number Diff line change @@ -29,4 +29,4 @@ To contact the teaching staff send a private message through [Piazza](https://pi
29
29
*Instructor:* Ibrahim Awwal
30
30
* Final Exam:
31
31
* **Location:** TBD
32
- * **Time:** Wednesday, Dec. 17, 3-6pm
32
+ * **Time:** Wednesday, Dec. 17, 3-6pm
Original file line number Diff line number Diff line change 4
4
< p > Published with < a href ="http://pages.github.com "> GitHub Pages</ a > </ p >
5
5
</ footer >
6
6
</ div >
7
+
8
+ < script src ="/javascripts/main.js "> </ script >
Original file line number Diff line number Diff line change 2
2
< html >
3
3
4
4
{% include head.html %}
5
- < body >
5
+ < body data-spy =" scroll " data-target =" #side-nav-toc " >
6
6
7
7
{% include header.html %}
8
8
<!-- MAIN CONTENT -->
9
9
< div class ="container ">
10
10
< div class ="row ">
11
- < div id ="main_content_wrap " class ="col-md-9 ">
11
+ < div id ="main_content_wrap " class ="col-md-9 " >
12
+ < h1 > {{ page.title }}</ h1 >
12
13
{{ content }}
13
14
</ div >
14
- < div class ="col-md-3 ">
15
- < ul class ="nav nav-stacked " id ="side_nav ">
15
+ < div class ="col-md-3 hidden-xs hidden-sm " id ="right-sidebar ">
16
+ < h4 > Recent Announcements</ h4 >
17
+ < ul class ="nav " id ="posts-sidebar ">
18
+ {% for post in site.posts %}
19
+ < li >
20
+ < a class ="post-link " href ="{{ post.url | prepend: site.baseurl }} "> {{ post.title }}</ a >
21
+ </ li >
22
+ {% endfor %}
16
23
</ ul >
24
+ {% if page.disableTOC != true %}
25
+ < div id ="side-nav-toc " class ="affix ">
26
+ < h4 > Contents</ h4 >
27
+ < ul class ="nav nav-stacked nav-pills ">
28
+ </ ul >
29
+ </ div >
30
+ {% endif %}
17
31
</ div >
18
32
</ div >
19
33
</ div >
Original file line number Diff line number Diff line change 1
1
---
2
2
layout : default
3
+ disableTOC : true
3
4
---
4
5
5
6
<div id =" header_wrap " class =" container " >
@@ -10,13 +11,17 @@ layout: default
10
11
</div >
11
12
12
13
<div id =" posts " >
13
- <ul class =" post-list " >
14
- {% for post in site.posts %}
15
- <li >
16
- <h4>
17
- <a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
18
- </h4>
19
- </li >
20
- {% endfor %}
21
- </ul >
14
+ <ul class =" post-list " >
15
+ {% for post in site.posts %}
16
+ <li>
17
+ <h3 class="post-title">
18
+ <a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
19
+ </h4>
20
+ <span class="post-time">
21
+ Posted on <time datetime="{{post.date}}">{{ post.date | date: "%A %B %d, %Y"}}</time>
22
+ </span>
23
+ <p>{{ post.excerpt }}<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">...</a></p>
24
+ </li>
25
+ {% endfor %}
26
+ </ul >
22
27
</div >
Original file line number Diff line number Diff line change 1
- console . log ( 'This would be the main JS file.' ) ;
1
+ if ( $ ( "h2" ) . length == 0 ) {
2
+ $ ( "#side-nav-toc" ) . css ( {
3
+ display : "none" ,
4
+ visibility : "hidden"
5
+ } ) ;
6
+ console . log ( "Hide TOC" ) ;
7
+ }
8
+
9
+ $ ( "h2" ) . each ( function ( index , heading ) {
10
+ var $el = $ ( heading ) ;
11
+ if ( $el . attr ( 'id' ) ) {
12
+ $ ( "#side-nav-toc ul" ) . append ( "<li><a href='#" + $el . attr ( 'id' ) + "'>" + $el . text ( ) + "</a></li>" ) ;
13
+ }
14
+
15
+ } ) ;
You can’t perform that action at this time.
0 commit comments