Course page, datatables
authorCharles Connell <charles@connells.org>
Mon, 24 Mar 2014 19:41:06 +0000 (15:41 -0400)
committerCharles Connell <charles@connells.org>
Mon, 24 Mar 2014 19:41:06 +0000 (15:41 -0400)
13 files changed:
karmaworld/apps/notes/models.py
karmaworld/assets/css/global.css
karmaworld/assets/css/home.css
karmaworld/assets/css/note_course_pages.css
karmaworld/assets/img/banner.jpg [new file with mode: 0644]
karmaworld/assets/js/course-detail.js
karmaworld/assets/js/jquery.backstretch.min.js [new file with mode: 0644]
karmaworld/templates/base.html
karmaworld/templates/courses/course_detail.html
karmaworld/templates/courses/course_list.html
karmaworld/templates/courses/course_list_entry.html
karmaworld/templates/header.html
karmaworld/templates/notes/note_list_entry.html

index 56e8d2ca56b1786825c9648e82ee7345744a99ea..dc25b961e2a5e3e5f1c76b8936633b391c2e17e2 100644 (file)
@@ -324,7 +324,10 @@ class Note(Document):
         """
         if self.slug is not None:
             # return a url ending in slug
-            return reverse('note_detail', args=[self.course.school.slug, self.course.slug, self.slug])
+            if self.course.school:
+                return reverse('note_detail', args=[self.course.school.slug, self.course.slug, self.slug])
+            else:
+                return reverse('note_detail', args=[self.course.department.school.slug, self.course.slug, self.slug])
         else:
             # return a url ending in id
             return reverse('note_detail', args=[self.course.school.slug, self.course.slug, self.id])
index ccdec2cfa4dc7c3f51b38efb967559bf88ba109d..ab21bcd3f10844951150a2db2d6286197568aa12 100644 (file)
@@ -1,3 +1,19 @@
+body {
+  font-family: 'adelle-sans';
+}
+
+.museo300 {
+  font-family: 'museo300';
+}
+
+.museo700 {
+  font-family: 'museo700';
+}
+
+.adelle-sans {
+  font-family: 'adelle-sans';
+}
+
 .nav-list ul {
   list-style-type: none;
   margin: 0;
 }
 
 .mobile-nav-list li {
-  padding: 10px 10px 10px 10px;
   font-size: 1.5em;
+  padding: 0 20px 0 10px;
+}
+
+.mobile-nav-item {
+  padding: 5px 0px 5px 0px;
+  border-bottom: 1px solid black;
+  width: 100%;
+  color: #999999;
 }
 
 #header-nav {
 #header-login-nav {
   text-align: right;
   background: #000000;
-  color: #d4d4d4;
+  padding: 3px 0 3px 0;
 }
 
-#header-login-nav a {
+#header-login-nav ul {
   color: #d4d4d4;
+  font: 0.8em 'adelle-sans';
 }
 
 #logo-container {
@@ -41,7 +65,6 @@
   background: #333333;
   color: #d4d4d4;
   padding: 1em 0 0.4em 0;
-  font: 1em 'museo300';
 }
 
 .gradient-bar
@@ -93,15 +116,19 @@ a:hover {
 }
 
 
-span.table-school,
+span.table-school {
+  font-weight: bold;
+}
+
 span.table-note-count,
 span.table-quiz-count,
 span.table-thanks-count {
-  font-weight: bold;
+  margin-right: 15px;
 }
 
-span.table-course-name {
+.table-course-name {
   font-size: 1.8em;
+  margin-right: 10px;
 }
 
 table.dataTable {
@@ -110,17 +137,17 @@ table.dataTable {
 }
 
 table.dataTable div.table-entry-first-line {
-  padding-top: 20px;
-  font-family: 'museo700';
+  font-size: 0.9em;
+  margin: 0 0 5px 0;
 }
 
-table.dataTable div.table-entry-second-line {
-  font-family: 'museo700';
+table.dataTable div.table-entry-third-line {
+  font-size: 0.9em;
+  margin: 5px 0 0 0;
 }
 
-table.dataTable div.table-entry-third-line {
-  padding-bottom: 20px;
-  font-family: 'Akkurat-Leicht';
+table.dataTable div.data-table-entry {
+  margin: 20px 0 20px 0;
 }
 
 table.dataTable tr.even {
index 5625234b756fb441964dd59cbff41efb7db57a42..e682e0064dc9d4943671ad66e9df763d1580fd74 100644 (file)
@@ -1,7 +1,6 @@
 #splash {
   font: 3em 'Museo700';
   padding: 10vh 5vh 10vh 5vh;
-  background: grey;
   color: #ffffff;
   text-align: center;
 }
index e28b387e1e8a2d2d6fb926b9fa4ca351889b00cf..e8008a3b07970cee85d32f2d16e8fc86665e77c7 100644 (file)
@@ -18,7 +18,6 @@ span.course-header-school
 #end-header
 {
   margin-top: 20px;
-  border-bottom: 1px solid black;
 }
 
 #edit-button,
@@ -47,9 +46,10 @@ select.note-sort {
 }
 
 #note-search-bar {
-  margin-top: 20px;
-  border: 1px solid grey;
-  padding: 10px 0 0 0;
+  background: #f5f5f5;
+  padding: 15px 0 0 0;
+  font: 1em 'museo300';
+  margin-bottom: 20px;
 }
 
 ul.socialaccount_providers li,
@@ -58,3 +58,11 @@ ul#uploaded_files li
   display: inline;
 }
 
+table.dataTable div.note-date {
+  margin-bottom: 10px;
+}
+
+table.dataTable div.note-text {
+  margin: 10px 0 10px 0;
+}
+
diff --git a/karmaworld/assets/img/banner.jpg b/karmaworld/assets/img/banner.jpg
new file mode 100644 (file)
index 0000000..7e0a6d1
Binary files /dev/null and b/karmaworld/assets/img/banner.jpg differ
index 9c2e15c2074079cedf05e09d94a9a66d49b37ef1..ebdaabdcfae0c9cf1d851aee168a5c9f018b8b1d 100644 (file)
@@ -103,72 +103,51 @@ $(function() {
   KARMAWORLD.Course.initCourseNameAutocomplete({});
   KARMAWORLD.Course.initInstructorNameAutocomplete({});
 
-  $('#data_table_list').dataTable({
-    // remove the default filter label
-    'oLanguage': {
-      'sSearch': '',
-    },
-    // we will set column widths explicitly
-    'bAutoWidth': false,
-    // don't provide a option for the user to change the table page length
-    'bLengthChange': false,
-    // sepcify the number of rows in a page
-    'iDisplayLength': 20,
-    // Position the filter bar at the top
-    // DIFF: do not show search bar (f)
-    'sDom': '<"top">rt<"bottom"p><"clear">',
-    // Specify options for each column
-    "aoColumnDefs": [
-      {
-        // 3rd element: likes
-        "aTargets": [ 2 ],
-        "bSortable": true,
-        "bVisible": true,
-        "mData": function ( source, type, val ) {
-          //console.log(source);
-          if (type === 'set') {
-            source.count = val;
-            // Store the computed dislay and filter values for efficiency
-            // DIFF: label name change.
-            source.count_display = val=="" ? "" : "<span>"+val+" Thanks</span>";
-            return;
-          }
-          else if (type === 'display') {
-            return source.count_display;
-          }
-          // 'sort', 'type', 'filter' and undefined all just use the integer
-          return source.count;
-        }
-      },
-      {
-        // 2nd element: date
-        "aTargets": [ 1 ],
-        "bSortable": true,
-        "bVisible": true,
-        "mData": function ( source, type, val ) {
-          //console.log(source);
-          if (type === 'set') {
-            source.date = val;
-            // DIFF: label name change.
-            source.date_display = val=="" ? "" : "<span>Uploaded "+val+"</span>";
-            return;
-          }
-          else if (type === 'display') {
-            return source.date_display;
-          }
-          // for types 'sort', 'type', 'filter' and undefined use raw date
-          return source.date;
+  $(function() {
+
+    // load dataTable for course data
+    var dataTable = $('#data_table_list').dataTable({
+      // we will set column widths explicitly
+      'bAutoWidth': false,
+      // don't provide a option for the user to change the table page length
+      'bLengthChange': false,
+      // sepcify the number of rows in a page
+      'iDisplayLength': 20,
+      // Position the filter bar at the top
+      'sDom': '<"top">rt<"bottom"p><"clear">',
+      // Specify options for each column
+      "aoColumnDefs": [
+        {
+          // 2nd element: thanks
+          "aTargets": [ 1 ],
+          "bSortable": true,
+          "bVisible": true
+        },
+        {
+          // 1st element: date
+          "aTargets": [ 0 ],
+          "bSortable": true,
+          "bVisible": true
         }
-      },
-      {
-        // 1st element: "sort by" label
-        "aTargets": [ 0 ],
-        "bSortable": false,
-        "bVisible": true
-      }
-    ],
-    // Initial sorting
-    'aaSorting': [[2,'desc']]
+      ],
+      // Initial sorting
+      'aaSorting': [[1,'desc']]
+    });
+
+    // wire up search box
+    $('input.search-notes').keyup(function() {
+      dataTable.fnFilter($(this).val());
+    });
+
+    // wire up sort chooser
+    $('select.course-sort').change(function() {
+      dataTable.fnSort([[$(this).val(), 'desc']]);
+    });
+
+    // sort by current value of sort chooser, since
+    // the browser may change this from our default
+    dataTable.fnSort([[$('select.note-sort').val(), 'desc']]);
+
   });
 
 });
diff --git a/karmaworld/assets/js/jquery.backstretch.min.js b/karmaworld/assets/js/jquery.backstretch.min.js
new file mode 100644 (file)
index 0000000..1bb20f8
--- /dev/null
@@ -0,0 +1,4 @@
+/*! Backstretch - v2.0.4 - 2013-06-19
+* http://srobbin.com/jquery-plugins/backstretch/
+* Copyright (c) 2013 Scott Robbin; Licensed MIT */
+(function(a,d,p){a.fn.backstretch=function(c,b){(c===p||0===c.length)&&a.error("No images were supplied for Backstretch");0===a(d).scrollTop()&&d.scrollTo(0,0);return this.each(function(){var d=a(this),g=d.data("backstretch");if(g){if("string"==typeof c&&"function"==typeof g[c]){g[c](b);return}b=a.extend(g.options,b);g.destroy(!0)}g=new q(this,c,b);d.data("backstretch",g)})};a.backstretch=function(c,b){return a("body").backstretch(c,b).data("backstretch")};a.expr[":"].backstretch=function(c){return a(c).data("backstretch")!==p};a.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5E3,fade:0};var r={left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},s={position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxHeight:"none",maxWidth:"none",zIndex:-999999},q=function(c,b,e){this.options=a.extend({},a.fn.backstretch.defaults,e||{});this.images=a.isArray(b)?b:[b];a.each(this.images,function(){a("<img />")[0].src=this});this.isBody=c===document.body;this.$container=a(c);this.$root=this.isBody?l?a(d):a(document):this.$container;c=this.$container.children(".backstretch").first();this.$wrap=c.length?c:a('<div class="backstretch"></div>').css(r).appendTo(this.$container);this.isBody||(c=this.$container.css("position"),b=this.$container.css("zIndex"),this.$container.css({position:"static"===c?"relative":c,zIndex:"auto"===b?0:b,background:"none"}),this.$wrap.css({zIndex:-999998}));this.$wrap.css({position:this.isBody&&l?"fixed":"absolute"});this.index=0;this.show(this.index);a(d).on("resize.backstretch",a.proxy(this.resize,this)).on("orientationchange.backstretch",a.proxy(function(){this.isBody&&0===d.pageYOffset&&(d.scrollTo(0,1),this.resize())},this))};q.prototype={resize:function(){try{var a={left:0,top:0},b=this.isBody?this.$root.width():this.$root.innerWidth(),e=b,g=this.isBody?d.innerHeight?d.innerHeight:this.$root.height():this.$root.innerHeight(),j=e/this.$img.data("ratio"),f;j>=g?(f=(j-g)/2,this.options.centeredY&&(a.top="-"+f+"px")):(j=g,e=j*this.$img.data("ratio"),f=(e-b)/2,this.options.centeredX&&(a.left="-"+f+"px"));this.$wrap.css({width:b,height:g}).find("img:not(.deleteable)").css({width:e,height:j}).css(a)}catch(h){}return this},show:function(c){if(!(Math.abs(c)>this.images.length-1)){var b=this,e=b.$wrap.find("img").addClass("deleteable"),d={relatedTarget:b.$container[0]};b.$container.trigger(a.Event("backstretch.before",d),[b,c]);this.index=c;clearInterval(b.interval);b.$img=a("<img />").css(s).bind("load",function(f){var h=this.width||a(f.target).width();f=this.height||a(f.target).height();a(this).data("ratio",h/f);a(this).fadeIn(b.options.speed||b.options.fade,function(){e.remove();b.paused||b.cycle();a(["after","show"]).each(function(){b.$container.trigger(a.Event("backstretch."+this,d),[b,c])})});b.resize()}).appendTo(b.$wrap);b.$img.attr("src",b.images[c]);return b}},next:function(){return this.show(this.index<this.images.length-1?this.index+1:0)},prev:function(){return this.show(0===this.index?this.images.length-1:this.index-1)},pause:function(){this.paused=!0;return this},resume:function(){this.paused=!1;this.next();return this},cycle:function(){1<this.images.length&&(clearInterval(this.interval),this.interval=setInterval(a.proxy(function(){this.paused||this.next()},this),this.options.duration));return this},destroy:function(c){a(d).off("resize.backstretch orientationchange.backstretch");clearInterval(this.interval);c||this.$wrap.remove();this.$container.removeData("backstretch")}};var l,f=navigator.userAgent,m=navigator.platform,e=f.match(/AppleWebKit\/([0-9]+)/),e=!!e&&e[1],h=f.match(/Fennec\/([0-9]+)/),h=!!h&&h[1],n=f.match(/Opera Mobi\/([0-9]+)/),t=!!n&&n[1],k=f.match(/MSIE ([0-9]+)/),k=!!k&&k[1];l=!((-1<m.indexOf("iPhone")||-1<m.indexOf("iPad")||-1<m.indexOf("iPod"))&&e&&534>e||d.operamini&&"[object OperaMini]"==={}.toString.call(d.operamini)||n&&7458>t||-1<f.indexOf("Android")&&e&&533>e||h&&6>h||"palmGetResource"in d&&e&&534>e||-1<f.indexOf("MeeGo")&&-1<f.indexOf("NokiaBrowser/8.5.0")||k&&6>=k)})(jQuery,window);
\ No newline at end of file
index 69468681990ba5bceb4c51670d09bf83b5ac058b..575f45eb5ef19c60a5125110996a840360d2778d 100644 (file)
@@ -17,6 +17,8 @@
 
   <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
   <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
+  <script type="text/javascript" src="//use.typekit.net/pnc8diw.js"></script>
+  <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
 
 
   <!-- block pagescripts -->
@@ -49,6 +51,8 @@
     {% include 'footer.html' %}
     <!-- end include footer-->
 
+    <a class="exit-off-canvas"></a>
+
     <!-- block bodyscripts -->
     {% block bodyscripts %}
     {% endblock %}
@@ -59,7 +63,6 @@
     <script>
       $(document).foundation();
     </script>
-    <a class="exit-off-canvas"></a>
   </div>
 
 </body>
index c1fe72ec2a44af8217648048b0dbceea381ecbb0..0ea9db7220d49b352dc69cf5a88528cc615f3d1c 100644 (file)
         {{ file_upload_form.fp_file }}
       </div>
       <div class="small-12 large-6 columns">
-        <form class="search-notes" action="{% url 'note_search' %}" method="GET">
+        <form class="search-notes adelle-sans" action="{% url 'note_search' %}" method="GET">
           <input name="query" class="search-notes" type="text" placeholder="Search Notes" />
           <input type="hidden" name="course_id" value="{{ course.id }}">
         </form>
           Sort By
           <select class="note-sort">
             <option value="0">Date</option>
-            <option value="1">Number of Quizzes</option>
-            <option value="2" selected>Popularity</option>
+            <option value="1" selected>Popularity</option>
           </select>
         </div>
       </div>
       </div>
     </div>
 
-    <div class="row">
-      <div class="small-10 columns small-offset-1"> <hr/> </div>
-    </div>
-
     <div id="course_container">
       <div class="row">
-        <div class="small-12 columns large-10 large-offset-1">
+        <div class="small-12 columns">
+          <!-- Main course table -->
           <table id="data_table_list">
-            <thead><tr>
-              <th id="data-table-sort-by"> Sort by: </th>
-              <th id="data-table-date"> Date </th>
-              <th id="data-table-thank-count"> Popularity </th>
-              <th class="no-display" id="data-table-note-name"> Name </th>
-              <th class="no-display" id="data-table-tags"> Tags </th>
-              <th class="no-display" id="data-table-note-preview"> Preview </th>
-            </tr></thead>
+            <thead class="hide">
+              <tr>
+                <th class="no-display" id="data-table-date"> Date </th>
+                <th class="no-display" id="data-table-thanks"> Popularity </th>
+                <th class="no-display" id="data-table-note"> Note </th>
+              </tr>
+            </thead>
             <tbody>
               {% for note in note_set %}
                 {% include 'notes/note_list_entry.html' with note=note %}
             </tbody>
           </table>
         </div>
-      </div>
+      </div> <!-- .row -->
+
     </div><!-- /course_container -->
 
   </section><!--/course_content-->
index 2c18eefc310908aead4c2aa7624c1503c00848d3..ce0463e3fcdc77eb4d372eed1ab9456f076bef34 100644 (file)
 
 {% block bodyscripts %}
   <script src="{{ STATIC_URL }}js/jquery.dataTables.min.js"></script>
+  <script src="{{ STATIC_URL }}js/jquery.backstretch.min.js"></script>
+  <script>
+    $("#splash").backstretch("{{ STATIC_URL }}img/banner.jpg");
+  </script>
 {% endblock %}
 
 {% block content %}
 <section id="home_content">
   <div id="page_header">
-      <div id="splash">
-        <div class="row">
-          <div class="small-12 large-8 columns large-offset-2">
-            Browse and contribute lecture notes and quizzes from over 100 college courses.
-          </div>
+    <div id="splash">
+      <div class="row">
+        <div class="small-12 large-8 columns large-offset-2">
+          Browse and contribute lecture notes and quizzes from over 100 college courses.
         </div>
-        <div class="row">
-          <div class="small-12 columns">
-            <button id="intro-video-button">Watch the video&nbsp;&nbsp;<i class='fa fa-caret-right'></i></button>
-          </div>
+      </div>
+      <div class="row">
+        <div class="small-12 columns">
+          <button id="intro-video-button">Watch the video&nbsp;&nbsp;<i class='fa fa-caret-right'></i></button>
         </div>
       </div>
     </div>
@@ -77,9 +80,7 @@
             <th class="no-display" id="data-table-date"> Date </th>
             <th class="no-display" id="data-table-note-count"> # Notes </th>
             <th class="no-display" id="data-table-thanks"> Popularity </th>
-            <th class="no-display" id="data-table-upload"> School & Instructor </th>
-            <th class="no-display" id="data-table-course-name"> Course Name </th>
-            <th class="no-display" id="data-table-school-name"> Stats </th>
+            <th class="no-display" id="data-table-upload"> Course </th>
           </tr>
         </thead>
         <tbody>
@@ -88,7 +89,7 @@
         {% endfor %}
         </tbody>
       </table>
-    </div><!-- .ten columns -->
+    </div>
   </div> <!-- .row -->
 
   {% include 'partial/add_course.html' %}
index f2a727544d7d5d2bc2fb76f1d0d451593e3f6b33..101277d7fb4a97b2c288f06a030ff726e733dc9e 100644 (file)
@@ -1,46 +1,45 @@
 <tr class="table-row">
   <td class="hide">{{ course.updated_at|date:"U" }}</td>
-  <td class="hide">{{ course.file_count }}</td>
-  <td class="hide">{{ course.get_popularity }}</td>
+  <td class="hide">{{ course.file_count|stringformat:"010g" }}</td>
+  <td class="hide">{{ course.get_popularity|stringformat:"010g" }}</td>
 
   <td class="small-12 columns">
-    <div class="table-entry-first-line">
-      <span class="table-school">
-        {% if course.school.name %}
-          {{ course.school.name }}
+    <div class="data-table-entry">
+      <div class="table-entry-first-line">
+        <span class="table-school">
+          {% if course.school.name %}
+            {{ course.school.name }}
+          {% endif %}
+          {% if course.department.school.name %}
+            {{ course.department.school.name }}
+          {% endif %}
+        </span>
+        {% if course.department %}
+          &nbsp;&nbsp;&bull;&nbsp;&nbsp;
+          <span class="table-department">{{ course.department.name }}</span>
         {% endif %}
-        {% if course.department.school.name %}
-          {{ course.department.school.name }}
+        {% if course.instructor_name %}
+          &nbsp;&nbsp;&bull;&nbsp;&nbsp;
+          <span class="table-instructor">{{ course.instructor_name }}</span>
         {% endif %}
-      </span>
-      {% if course.department %}
-        &nbsp;&nbsp;&bull;&nbsp;&nbsp;
-        <span class="table-department">{{ course.department.name }}</span>
-      {% endif %}
-      {% if course.instructor_name %}
-        &nbsp;&nbsp;&bull;&nbsp;&nbsp;
-        <span class="table-instructor">{{ course.instructor_name }}</span>
-      {% endif %}
-      {% if couse.instructor.name %}
-        &nbsp;&nbsp;&bull;&nbsp;&nbsp;
-        <span class="table-instructor">{{ course.instructor.name }}</span>
-      {% endif %}
-    </div>
-  </td>
+        {% if couse.instructor.name %}
+          &nbsp;&nbsp;&bull;&nbsp;&nbsp;
+          <span class="table-instructor">{{ course.instructor.name }}</span>
+        {% endif %}
+      </div>
 
-  <td class="small-12 columns">
-    <div class="table-entry-second-line">
-      <span class="table-course-name"><a href="{{ course.get_absolute_url }}">{{ course.name }}</a></span>
-    </div>
-  </td>
+      <div class="table-entry-second-line museo700">
+        <span class="table-course-name"><a href="{{ course.get_absolute_url }}">{{ course.name }}</a></span>
+      </div>
 
-  <td class="small-12 columns">
-    <div class="table-entry-third-line">
-      <span class="table-note-count">{{ course.file_count }} Notes</span>&nbsp;&nbsp;&bull;&nbsp;&nbsp;
-      <span class="table-quiz-count">{{ course.quiz_count }} Quizzes </span>&nbsp;&nbsp;&bull;&nbsp;&nbsp;
-      <span class="table-thanks-count">{{ course.get_popularity }} Thanks </span>&nbsp;&nbsp;&bull;&nbsp;&nbsp;
-      <span>Updated {{ course.updated_at|date:"b d, o"|capfirst }}</span>
+      <div class="table-entry-third-line">
+        <span class="table-note-count"><i class="fa fa-file-text-o"></i>&nbsp;&nbsp;{{ course.file_count }} Notes</span>
+        <span class="table-quiz-count"><i class="fa fa-question"></i>&nbsp;&nbsp;{{ course.quiz_count }} Quizzes </span>
+        <span class="table-thanks-count"><i class="fa fa-thumbs-up"></i>&nbsp;&nbsp;{{ course.get_popularity }} Thanks </span>
+        <span>Updated {{ course.updated_at|date:"b d, o"|capfirst }}</span>
+      </div>
     </div>
+
   </td>
 
 </tr>
index c3b2930f32f33bff3857015f4e96b5df8a1d0365..a1905a39a251ef4263b80f437768a017c9c91431 100644 (file)
@@ -18,7 +18,7 @@
   </div>
 
 
-  <div id="main-header">
+  <div id="main-header" class="museo300">
     <div class="row">
       <div id="logo-container" class="small-12 large-4 columns">
         <div style="display: inline;">
         {% endif %}
       </div>
 
-      <aside class="left-off-canvas-menu mobile-nav-list">
-        <ul>
-          <li>Courses</li>
-          <li>My Courses</li>
-          <li>My Notes</li>
-          <li>My Quizzes</li>
-        </ul>
-      </aside>
-
     </div>
   </div>
 
 </header><!--/global header-->
+
+<aside class="left-off-canvas-menu mobile-nav-list museo700">
+  <ul>
+    <li><div class="mobile-nav-item">Courses</div></li>
+    <li><div class="mobile-nav-item">My Courses</div></li>
+    <li><div class="mobile-nav-item">My Notes</div></li>
+    <li><div class="mobile-nav-item">My Quizzes</div></li>
+    <li><div class="mobile-nav-item"><a href="{% url 'control_panel' %}">My Account</a></div></li>
+    <li><div class="mobile-nav-item"><a href="{% url 'account_logout' %}">Log Out</a></div></li>
+  </ul>
+</aside>
index 9a71c246c798b228234d166759a4ae21cf27ab7e..de48d3117a4b0e21e13d862341666df31686837b 100644 (file)
@@ -1,31 +1,28 @@
 <tr>
-  <td class="no-display"><!-- this spot solely for the Sort By header --></td>
-  <td class="small-8 columns large-4 slim">{{ note.uploaded_at|date:"l M d o"|capfirst }}</td>
-  <td class="small-4 columns large-2 large-offset-2 slim">{{ note.thanks }}</td>
+  <td class="hide">{{ note.uploaded_at|date:"U" }}</td>
+  <td class="hide">{{ note.thanks|stringformat:"010g" }}</td>
 
-  <td class="small-12 large-5 columns">
-    <a href="{{ note.get_absolute_url }}">{{ note.name }}</a>
-  </td>
-
-  <td class="twelve columns">
-    {% if note.tags.count > 0 %}
-    <span class="activity_details_context">Tags:
-      {% for tag in note.tags.all %}
-        {{ tag.name }}{% if not forloop.last %}, {% endif %}
-      {% endfor %}
-    </span>
-    {% endif %}
-  </td>
-
-  <td class="twelve columns note_preview">
-    {% if note_preview %}
-      {{ note_preview|safe }}
-    {% elif note.text|length <= 500 %}
-      {{ note.text }}
-    {% else %}
-      {{ note.text|slice:":500" }} &hellip;
-    {% endif %}
-    <hr class="midrule"></hr>
+  <td>
+    <div class="data-table-entry">
+      <div class="note-date adelle-sans">{{ note.uploaded_at|date:"l, F j, Y" }}</div>
+      <div class="note-name-line">
+        <span class="table-course-name museo700">
+          <a href="{{ note.get_absolute_url }}">
+            {{ note.name }}</a>
+        </span>
+        <span class="note-thanks"><i class="fa fa-thumbs-up"></i> {{ note.thanks }} thanks</span>
+      </div>
+      <div class="note-text">{{ note.text|slice:":500" }} &hellip;</div>
+      <div class="note-tags">
+        {% if note.tags.count > 0 %}
+          <span class="activity_details_context"><strong>Tags:</strong>
+            {% for tag in note.tags.all %}
+              {{ tag.name }}{% if not forloop.last %}, {% endif %}
+            {% endfor %}
+          </span>
+        {% endif %}
+      </div>
+    </div>
   </td>
 
 </tr>