changeset 2850:86b747edc4a7

basic theme support for devices with less than 480 pixels
author RogerHaase <haaserd@gmail.com>
date Thu, 13 Nov 2014 11:25:34 -0700
parents 22796e5b5361
children 5a49eeb1f307
files MoinMoin/static/js/basic.js MoinMoin/themes/basic/static/css/theme.css MoinMoin/themes/basic/static/custom-less/theme.less MoinMoin/themes/basic/templates/layout.html
diffstat 4 files changed, 42 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/static/js/basic.js	Thu Nov 13 07:46:51 2014 -0700
+++ b/MoinMoin/static/js/basic.js	Thu Nov 13 11:25:34 2014 -0700
@@ -10,7 +10,6 @@
     $('div.dropup').removeClass('menu');
     $('ul.dropdown-menu').removeClass('submenu');
     $('.topnavcollapse').addClass('collapse');
-    $('.moin-navbar-collapse').removeClass('in');
     if ($('li.active > a.moin-modify-button').length) {
         $('.moin-loginsettings').addClass('moin-pull-right');
     }
--- a/MoinMoin/themes/basic/static/css/theme.css	Thu Nov 13 07:46:51 2014 -0700
+++ b/MoinMoin/themes/basic/static/css/theme.css	Thu Nov 13 11:25:34 2014 -0700
@@ -6181,10 +6181,8 @@
 }
 /* end diffs */
 /* start of basic theme custom css for moin2 */
-@media screen and (min-width: 480px) {
-  .moin-pull-right {
-    float: right !important;
-  }
+ul.moin-pull-right {
+  float: right !important;
 }
 h1:hover .moin-permalink,
 h2:hover .moin-permalink,
@@ -6569,6 +6567,17 @@
 .moin-navbar-inverse .navbar-brand {
   color: #c8ddf1;
 }
+.moin-navbar-user > ul.nav > li,
+.moin-navbar-user > ul.nav > li > a {
+  display: inline;
+}
+.moin-navbar-user > ul.nav > li > a {
+  padding: 10px 10px;
+}
+.moin-navbar-user > ul.nav {
+  margin-top: 15px;
+  margin-bottom: 15px;
+}
 .moin-quicklink {
   position: relative;
   padding: 2px 10px 2px 10px;
@@ -7024,11 +7033,6 @@
   min-height: 100%;
   position: relative;
 }
-@media (max-width: 992px) {
-  .moin-content {
-    padding-bottom: 250px;
-  }
-}
 html {
   overflow-y: scroll;
 }
@@ -7097,7 +7101,6 @@
   #moin-main-wrapper.showsidebar {
     left: 33%;
   }
-  /* TODO why does bootstrap display navbar-toggle only at width < 480 when <780 is wanted */
   .navbar-toggle {
     position: relative;
     float: left;
@@ -7123,4 +7126,7 @@
   .navbar-toggle .icon-bar + .icon-bar {
     margin-top: 4px;
   }
-}
+  div.moin-navbar-user {
+    margin-right: 15px;
+  }
+}
--- a/MoinMoin/themes/basic/static/custom-less/theme.less	Thu Nov 13 07:46:51 2014 -0700
+++ b/MoinMoin/themes/basic/static/custom-less/theme.less	Thu Nov 13 11:25:34 2014 -0700
@@ -16,12 +16,11 @@
 /* start of basic theme custom css for moin2 */
 
 @grid-float-breakpoint: @screen-xs;
-@media screen and (min-width: @grid-float-breakpoint) {
-  .moin-pull-right {
-    .pull-right;
-  }
+ul.moin-pull-right {
+  .pull-right;
 }
 
+
 h1, h2, h3, h4, h5, h6 {
   &:hover, &:focus {
     .moin-permalink {
@@ -206,6 +205,20 @@
   }
 }
 
+.moin-navbar-user > ul.nav > li,
+.moin-navbar-user > ul.nav > li  > a {
+  display: inline;
+}
+
+.moin-navbar-user > ul.nav > li  > a {
+  padding: 10px 10px;
+}
+
+.moin-navbar-user > ul.nav {
+  margin-top: 15px;
+  margin-bottom: 15px;
+}
+
 .moin-quicklink {
   position: relative;
   padding: 2px 10px 2px 10px;
@@ -247,10 +260,6 @@
   }
 }
 
-
-
-
-
 .comment {
   color: @text-color;
   background-color: lighten(@link-color, 40%);
@@ -637,12 +646,6 @@
   min-height: 100%;
   position: relative;
 }
-// set min-width to prevent search box from floating off window to right
-@media (max-width: 992px) {
-  .moin-content {
-    padding-bottom: 250px;
-  }
-}
 
 html{
   overflow-y: scroll;
@@ -713,7 +716,6 @@
   #moin-main-wrapper.showsidebar {
     left: 33%;
   }
-  /* TODO why does bootstrap display navbar-toggle only at width < 480 when <780 is wanted */
   .navbar-toggle {
     position: relative;
     float: left;
@@ -739,5 +741,8 @@
   .navbar-toggle .icon-bar + .icon-bar {
     margin-top: 4px;
   }
+  div.moin-navbar-user {
+    margin-right: 15px;
+  }
 
 }
--- a/MoinMoin/themes/basic/templates/layout.html	Thu Nov 13 07:46:51 2014 -0700
+++ b/MoinMoin/themes/basic/templates/layout.html	Thu Nov 13 11:25:34 2014 -0700
@@ -124,7 +124,7 @@
                 {{ before_header }}
                 <nav class="navbar moin-navbar-inverse">
                     <div class="row">
-                        <div class="col-md-3 col-sm-5 col-xs-6">
+                        <div class="col-md-3 col-sm-5 col-xs-8">
                             <div class="moin-navbar-header">
 
                                 <button type="button" id="hideshowsidebar" class="navbar-toggle">
@@ -142,8 +142,8 @@
                             </div>
                         </div>
 
-                        <div class="col-md-6 col-sm-4 col-xs-6 moin-loginsettings">
-                            <div class="moin-navbar-collapse navbar-collapse collapse in">
+                        <div class="col-md-6 col-sm-4 col-xs-4 moin-loginsettings">
+                            <div class="moin-navbar-user">
                                 <ul class="nav navbar-nav moin-pull-right">
                                     {% if user.valid -%}
                                         {% set avatar = user.avatar(20) %}
@@ -156,14 +156,14 @@
                                                 {{ hyperlink(wiki_href, title, exists, aliasname, "fa fa-user fa-inverse", None) }}
                                             </li>
                                             {% if 'frontend.usersettings' not in cfg.endpoints_excluded -%}
-                                                <li>
+                                                <li title="{{_('Settings')}}">
                                                     {{ hyperlink(url_for('frontend.usersettings'), None, True,
                                                         _('Settings'), "fa fa-cog fa-inverse", None) }}
                                                 </li>
                                             {%- endif %}
                                         {%- endif %}
                                         {% if user.auth_method in cfg.auth_can_logout %}
-                                            <li>
+                                            <li title="{{_('Logout')}}">
                                                 {{ hyperlink(url_for('frontend.logout', logout_submit=1), None, True,
                                                         _('Logout'), "fa fa-sign-out fa-inverse", None) }}
                                             </li>