Browse Source

fix design for tabs in home page in mobile view + fixed font awesome icons size

Come 8 years ago
parent
commit
f13c43a150

+ 34 - 1
tracim/tracim/public/assets/css/dashboard.css View File

@@ -85,6 +85,9 @@ body {
85 85
 .navbar-right {
86 86
   margin-right: 0px;
87 87
 }
88
+.dropdown-toggle {
89
+  margin-right: 15px;
90
+}
88 91
 
89 92
 /* Sidebar navigation */
90 93
 .nav-sidebar {
@@ -648,6 +651,9 @@ div.mce-fullscreen {
648 651
   .navbar-nav .open .dropdown-menu > li > a {
649 652
     color: #ddd;
650 653
   }
654
+  .navbar-toggle {
655
+    margin-right: 15px;
656
+  }
651 657
   .navbar-right {
652 658
     margin-right: -15px;
653 659
   }
@@ -657,8 +663,35 @@ div.mce-fullscreen {
657 663
   .content__wrapper {
658 664
     margin: 0;
659 665
   }
666
+  .content__title__subtitle-home-hidden-xs > div > p { /* remove the "welcome username" msg from homepage  */
667
+    display: none;
668
+  }
660 669
   .content__home__tab__item {
661
-    width: 32%;
670
+    display: block;
671
+    width: auto;
672
+    max-width: 100%;
673
+    border-radius: 0px;
674
+  }
675
+  .content__home__tab__item, .content__home__tab__item.active {
676
+    max-width: 100%;
677
+    border: 0px;
678
+  }
679
+  .content__home__tab-wrapper {
680
+    border: 10px solid;
681
+    border-width: 0px 0px 0px 10px;
682
+  }
683
+  .content__home__tab-wrapper.recent_activity {
684
+    border-color: #faebcc;
685
+  }
686
+  .content__home__tab-wrapper.unread {
687
+    border-color: #d6e9c6;
688
+  }
689
+  .content__home__tab-wrapper.workspace {
690
+    border-color: #bce8f1;
691
+  }
692
+  .panel-warning, .panel-success, .panel-info {
693
+    border-top-width: 0px;
694
+    border-left-width: 10px;
662 695
   }
663 696
 }
664 697
 

+ 6 - 5
tracim/tracim/public/assets/js/main.js View File

@@ -20,15 +20,16 @@ $(document).ready(function () {
20 20
     $('.content__home__tab__item.unread, .content__home__tab__item.recent_activity, .content__home__tab__item.workspace').removeClass('active')
21 21
     homeTabList.forEach(function (item) { $(item).css('display', 'none') })
22 22
   })
23
-  $('.content__home__tab__item.unread').click(function () {
24
-    $(this).addClass('active')
25
-    $('#unread-content-panel').css('display', 'block') })
26 23
   $('.content__home__tab__item.recent_activity').click(function () {
27
-    $(this).addClass('active')
24
+    $(this).addClass('active').parent().removeClass('unread recent_activity workspace').addClass('recent_activity')
28 25
     $('#recent-activity-panel').css('display', 'block')
29 26
   })
27
+  $('.content__home__tab__item.unread').click(function () {
28
+    $(this).addClass('active').parent().removeClass('unread recent_activity workspace').addClass('unread')
29
+    $('#unread-content-panel').css('display', 'block')
30
+  })
30 31
   $('.content__home__tab__item.workspace').click(function () {
31
-    $(this).addClass('active')
32
+    $(this).addClass('active').parent().removeClass('unread recent_activity workspace').addClass('workspace')
32 33
     $('#workspaces-panel').css('display', 'block')
33 34
   })
34 35
 

+ 2 - 2
tracim/tracim/templates/home.mak View File

@@ -12,7 +12,7 @@
12 12
 
13 13
 <%def name="TITLE_ROW()">
14 14
     <div class="content__title">
15
-        ${ROW.TITLE_ROW(_('My Dashboard'), 'fa-home', '', 't-user-color', _('Welcome to your home, {username}.').format(username=fake_api.current_user.name))}
15
+        ${ROW.TITLE_ROW(_('My Dashboard'), 'fa-home', 'content__title__subtitle-home-hidden-xs', 't-user-color', _('Welcome to your home, {username}.').format(username=fake_api.current_user.name))}
16 16
     </div>
17 17
 </%def>
18 18
 
@@ -32,7 +32,7 @@
32 32
 </%def>
33 33
 
34 34
 <div class="content__home">
35
-    <div class="content__home__tab-wrapper">
35
+    <div class="content__home__tab-wrapper recent_activity">
36 36
         <div class="content__home__tab__item recent_activity active">
37 37
             <i class="fa fa-fw fa-line-chart"></i>${_('Recent Activity')}
38 38
             % if fake_api.last_actives.contents[0]:

+ 9 - 9
tracim/tracim/templates/master_authenticated.mak View File

@@ -116,7 +116,7 @@
116 116
                             <a href="${tg.url('/home')}">${TIM.FA('fa-home fa-lg')} ${_('My Home')}</a>
117 117
                         </li>
118 118
                         <li class="header__navbar__list__item">
119
-                            <a href="${tg.url('/calendar')}">${TIM.FA('fa-calendar')} ${_('Calendar')}</a>
119
+                            <a href="${tg.url('/calendar')}">${TIM.FA('fa-calendar fa-fw')} ${_('Calendar')}</a>
120 120
                         </li>
121 121
                         ${NAVBAR_MENU.ADMIN_ITEMS()}
122 122
                     </ul>
@@ -136,10 +136,10 @@
136 136
 
137 137
                         % if fake_api.current_user.profile.id>=8: #2:
138 138
                             <li class="dropdown">
139
-                              <a href="#" class="dropdown-toggle" data-toggle="dropdown">${TIM.FA('fa-lg fa-cogs')} ${_('Admin')} <b class="caret"></b></a>
139
+                              <a href="#" class="dropdown-toggle" data-toggle="dropdown">${TIM.FA('fa-lg fa-cogs fa-fw')} ${_('Admin')} <b class="caret"></b></a>
140 140
                               <ul class="dropdown-menu">
141
-                                <li><a href="${tg.url('/admin/users')}">${TIM.FA('fa-users tracim-less-visible')} ${_('Users')}</a></li>
142
-                                <li><a href="${tg.url('/admin/workspaces')}">${TIM.FA('fa-bank tracim-less-visible')} ${_('Workspaces')}</a></li>
141
+                                <li><a href="${tg.url('/admin/users')}">${TIM.FA('fa-users fa-fw tracim-less-visible')} ${_('Users')}</a></li>
142
+                                <li><a href="${tg.url('/admin/workspaces')}">${TIM.FA('fa-bank fa-fw tracim-less-visible')} ${_('Workspaces')}</a></li>
143 143
 ## TODO - D.A. - 2014-10-20 - Restore global configuration screen
144 144
 ##                                <li class="divider" role="presentation"></li>
145 145
 ##                                <li><a href="${tg.url('/admin/configuration')}">${TIM.ICO(16, 'categories/preferences-system')} ${_('Global configuration')}</a></li>
@@ -149,21 +149,21 @@
149 149
 
150 150
                         % if False and h.is_debug_mode():
151 151
                             <li class="dropdown text-danger" >
152
-                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">${TIM.FA('fa-warning t-orange')} Debug <b class="caret"></b></a>
152
+                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">${TIM.FA('fa-warning t-orange fa-fw')} Debug <b class="caret"></b></a>
153 153
                                 <ul class="dropdown-menu">
154 154
                                     <li><a class="text-danger" href=""><strong>${_('you MUST desactivate debug in production')}</strong></a></li>
155 155
                                     <li class="divider" role="presentation"></li>
156 156
                                     <li><a href="${tg.url('/debug/environ')}">${TIM.FA('fa-globe fa-fw t-less-visible')} request.environ</a></li>
157 157
                                     <li><a href="${tg.url('/debug/identity')}">${TIM.FA('fa-user fa-fw t-less-visible')} request.identity</a></li>
158 158
                                     <li class="divider" role="presentation"></li>
159
-                                    <li><a href="${tg.url('/debug/iconset-fa')}">${TIM.FA('fa-file-image-o t-less-visible')} Icon set - Font Awesome</a></li>
160
-                                    <li><a href="${tg.url('/debug/iconset-tango')}">${TIM.FA('fa-file-image-o t-less-visible')} Icon set - Tango Icons</a></li>
159
+                                    <li><a href="${tg.url('/debug/iconset-fa')}">${TIM.FA('fa-file-image-o fa-fw t-less-visible')} Icon set - Font Awesome</a></li>
160
+                                    <li><a href="${tg.url('/debug/iconset-tango')}">${TIM.FA('fa-file-image-o fa-fw t-less-visible')} Icon set - Tango Icons</a></li>
161 161
                                 </ul>
162 162
                             </li>
163 163
                         % endif
164 164
                         <li class="dropdown">
165 165
                             <a href="#" class="dropdown-toggle" data-toggle="dropdown">
166
-                                ${TIM.FA('fa-lg fa-user')} ${fake_api.current_user.name}
166
+                                ${TIM.FA('fa-lg fa-fw fa-user')} ${fake_api.current_user.name}
167 167
 
168 168
                             </a>
169 169
                             <ul class="dropdown-menu pull-right">
@@ -191,7 +191,7 @@
191 191
                 </ul>
192 192
 
193 193
                 <div class="header__navbar__switch-mode switch-read-mode hidden-xs">
194
-                    ${TIM.FA('fa-eye')} ${_('Read mode')}
194
+                    ${TIM.FA('fa-eye fa-fw')} ${_('Read mode')}
195 195
                 </div>
196 196
 
197 197
             </div>