Bladeren bron

Improve responsive design - refs #5658

Yannick Warnier 12 jaren geleden
bovenliggende
commit
14604fd13a

+ 78 - 0
main/css/responsive.css

@@ -79,6 +79,45 @@ The more frequent ones have been marked with *
         min-height: none;
         width: 95%;
     }
+    .section-mycourses .menu-column, .section-mycampus .menu-column {
+        width: 95%;
+    }
+    .section-mycampus .menu-column #login_block {
+        width: 95%;
+    }
+    .section-mycourses .menu-column #user_image_block, 
+    .section-mycourses .menu-column #profile_block, 
+    .section-mycourses .menu-column #skill_block, 
+    .section-mycourses .menu-column #search_block, 
+    .section-mycourses .menu-column #classes_block, 
+    .section-mycourses .menu-column #reservation_block, 
+    .section-mycourses .menu-column #skill_block, 
+    .section-mycampus .menu-column #help_block, 
+    .section-mycourses .menu-column #notice_block {
+        display: none;
+    }
+    .section-mycampus #homepage {
+        width: 260px;
+    }
+    .section-mycampus #hot_courses {
+        width: 260px;
+    }
+    .section-mycourses #top_main_content {
+        margin-right: 15px;
+    }
+    .section-mycourses #main_content {
+        margin-right: 15px;
+        width: 260px;
+    }
+    .section-mycourses .course-box .course-box-actions {
+        display: none;
+    }
+    .section-mycampus .hot-course-box, .section-mycourses .course-box {
+        width: 95%;
+    }
+    footer {
+        margin-top: 0px;
+    }
 }
 
 @media (min-width: 321px) and (max-width: 480px) {
@@ -195,6 +234,45 @@ The more frequent ones have been marked with *
         min-height: none;
         width: 95%;
     }
+    .section-mycourses .menu-column, .section-mycampus .menu-column {
+        width: 95%;
+    }
+    .section-mycampus .menu-column #login_block {
+        width: 95%;
+    }
+    .section-mycourses .menu-column #user_image_block, 
+    .section-mycourses .menu-column #profile_block, 
+    .section-mycourses .menu-column #skill_block, 
+    .section-mycourses .menu-column #search_block, 
+    .section-mycourses .menu-column #classes_block, 
+    .section-mycourses .menu-column #reservation_block, 
+    .section-mycourses .menu-column #skill_block, 
+    .section-mycampus .menu-column #help_block, 
+    .section-mycourses .menu-column #notice_block {
+        display: none;
+    }
+    .section-mycampus #homepage {
+        width: 400px;
+    }
+    .section-mycampus #hot_courses {
+        width: 400px;
+    }
+    .section-mycourses #top_main_content {
+        margin-right: 15px;
+    }
+    .section-mycourses #main_content {
+        margin-right: 15px;
+        width: 400px;
+    }
+    .section-mycourses .course-box .course-box-actions {
+        display: none;
+    }
+    .section-mycampus .hot-course-box, .section-mycourses .course-box {
+        width: 95%;
+    }
+    footer {
+        margin-top: 0px;
+    }
 }
 
 @media (min-width: 481px) and (max-width: 800px) {

+ 4 - 4
main/inc/lib/course.lib.php

@@ -2784,7 +2784,7 @@ class CourseManager {
      */
     public static function course_item_html($params, $is_sub_content = false) {
         $html = '';
-        $class = "well";
+        $class = "well course-box";
         if ($is_sub_content) {
             $class = "course_item";
         }
@@ -2792,7 +2792,7 @@ class CourseManager {
             $html .= '<div class="row">';
             $html .= '<div class="span7">';
                 $html .= ' <div class="row">';
-                    $html .= '<div class="span1">';
+                    $html .= '<div class="span1 course-box-thumbnail-box">';
                     if (!empty($params['link'])) {
                         $html .= '<a class="thumbnail" href="'.$params['link'].'">';
                         $html .= $params['icon'];
@@ -2824,7 +2824,7 @@ class CourseManager {
 
             $html .= '</div>';
 
-            $html .= '<div class="span1 pull-right">'.$params['right_actions'].'</div>';
+            $html .= '<div class="span1 pull-right course-box-actions">'.$params['right_actions'].'</div>';
         $html .= '</div>';
         $html .= '</div>';
         return $html;
@@ -3860,4 +3860,4 @@ class CourseManager {
         }
         return $options;        
     }
-} //end class CourseManager
+} //end class CourseManager

+ 2 - 2
main/inc/lib/userportal.lib.php

@@ -853,7 +853,7 @@ class IndexManager {
 	 * The most important function here, prints the session and course list (user_portal.php)
 	 *  
 	 * */
-	function return_courses_and_sessions($user_id) {		       
+	function return_courses_and_sessions($user_id) {
         $session_categories = array();        
         $load_history = (isset($_GET['history']) && intval($_GET['history']) == 1) ? true : false;
 		
@@ -1096,4 +1096,4 @@ class IndexManager {
 	function return_hot_courses() {
 		return CourseManager::return_hot_courses();		
 	}
-}
+}

+ 2 - 2
main/template/default/layout/hot_course_item.tpl

@@ -1,6 +1,6 @@
 {% for hot_course in hot_courses %}               
     {% if hot_course.extra_info.title %}        
-        <div class="span9">
+        <div class="span9 hot-course-box">
             <div class="well_border">
                 <div class="row">
                     <div class="span2">
@@ -24,4 +24,4 @@
             </div>
         </div>
     {% endif %}
-{% endfor %}
+{% endfor %}

+ 1 - 1
main/template/default/layout/layout_2_col.tpl

@@ -4,7 +4,7 @@
 	{# Main content #}
    
 	{#  Right column  #}
-	<div class="span3">		        
+	<div class="span3 menu-column">		        
         {% if plugin_menu_top %}
             <div id="plugin_menu_top">
                 {{plugin_menu_top}}