adding default expanded styles to the lessons page
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 1 Aug 2018 18:45:40 +0000 (14:45 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 1 Aug 2018 18:45:40 +0000 (14:45 -0400)
footer.php
js/custom.js

index 09f1069..128d6c9 100644 (file)
     </script>
 </body>
 <style>
-    
     html body #learndash_quizzes #quiz_heading {
         background-color: #3A8BB6;
         color: white;
-        font-size: 18px;
+        font-size: 20px;
     }
     html body #learndash_quizzes #quiz_heading span:first-child{
         padding: 4px;
         border: 1px solid white;
         border-radius: 3px;
         position: relative;
+        background: #5CB85C;
     }
     html body #learndash_quizzes #quiz_heading span:first-child::after{
         content: '\25bc';
         position: absolute;
         right: -25px;
     }
+    .single-sfwd-quiz{
+        display: block !important;
+    }
+    .single-sfwd-quiz .wpProQuiz_text{
+        padding: 20px;
+    }
+    .single-sfwd-quiz [name='startQuiz']{
+        background: #5CB85C;
+        font-size: 30px;
+        padding: 20px;
+        height: auto;
+        border-radius: 4px;
+    }
+    html body #learndash_course_content #lesson_heading{
+        background-color: #0C3C60;
+        color: white;
+        font-size: 16px;
+    }
+    html body #learndash_course_content h4 > a{
+        font-size: 15px;
+    }
+    html body #learndash_course_content #lessons_list > div > .completed, html body #learndash_course_content #lessons_list > div  .notcompleted{
+        background-color: #3A8BB6;
+        color: white;
+    }
+    html body #learndash_course_content #lessons_list > div > .completed:hover, html body #learndash_course_content #lessons_list > div  .notcompleted:hover{
+        cursor: default;
+    }
 </style>
 </html>
index 88019b8..c48e1c4 100644 (file)
@@ -218,8 +218,15 @@ jQuery(document).ready(function($){
     if(window.page === "login"){
         $("#modal-login").remove();
     }
-    $(".flippable").trigger("click");
-    $(".expand_collapse").children("a:first-child").trigger("click");
+    if($(".flippable").length > 0){
+        $(".flippable").trigger("click");
+    }
+    if($(".expand_collapse").length > 0){
+        $(".expand_collapse").children("a:first-child").trigger("click");
+    }
+    jQuery("#lessons_list").find(".completed, .notcompleted").on("click", function(e){
+        e.preventDefault();
+    });
     // if(window.post_type === "sfwd-lessons"){
     //     $("#learndash_mark_complete_button").css("display", "none");
     // }