changeset 2488:dc05bbf035d3

Fixes the top navbar, links now work and tested with FF too
author sharky93 <rishabhr123@gmail.com>
date Sun, 15 Sep 2013 12:12:47 +0530
parents 3530bd246d26
children d29bfd06cd8c
files MoinMoin/themes/basic/static/css/basic.css MoinMoin/themes/basic/static/custom-less/basic.less MoinMoin/themes/basic/templates/layout.html
diffstat 3 files changed, 71 insertions(+), 60 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/themes/basic/static/css/basic.css	Sun Sep 15 01:34:04 2013 +0530
+++ b/MoinMoin/themes/basic/static/css/basic.css	Sun Sep 15 12:12:47 2013 +0530
@@ -4208,6 +4208,11 @@
     display: none !important;
   }
 }
+@media screen and (min-width: 992px) {
+  .moin-pull-right {
+    float: right;
+  }
+}
 h1:hover .moin-permalink,
 h2:hover .moin-permalink,
 h3:hover .moin-permalink,
--- a/MoinMoin/themes/basic/static/custom-less/basic.less	Sun Sep 15 01:34:04 2013 +0530
+++ b/MoinMoin/themes/basic/static/custom-less/basic.less	Sun Sep 15 12:12:47 2013 +0530
@@ -3,6 +3,12 @@
 // ---- Customising the top navbar breakpoint
 @grid-float-breakpoint: @screen-medium;
 
+@media screen and (min-width: @grid-float-breakpoint) {
+  .moin-pull-right {
+    .pull-right;
+  }
+}
+
 h1, h2, h3, h4, h5, h6 {
   &:hover, &:focus {
     .moin-permalink {
--- a/MoinMoin/themes/basic/templates/layout.html	Sun Sep 15 01:34:04 2013 +0530
+++ b/MoinMoin/themes/basic/templates/layout.html	Sun Sep 15 12:12:47 2013 +0530
@@ -61,74 +61,74 @@
             <div class="col-lg-10">
                 <div class="row">
                     <div class="col-lg-12">
-                        <nav class="navbar moin-navbar-inverse" role="navigation">
-                            <div class="col-lg-3">
-                                <div class="navbar-header">
-                                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".topnavcollapse">
-                                      <span class="sm-only"></span>
-                                      <span class="icon-bar"></span>
-                                      <span class="icon-bar"></span>
-                                      <span class="icon-bar"></span>
-                                    </button>
-                                    {% if cfg.sitename %}
-                                        <a class="navbar-brand" href="{{ url_for('frontend.show_item', item_name=cfg.item_root) }}"> 
-                                            {{ cfg.sitename }} 
-                                        </a>
-                                    {% endif %}
+                        <nav class="navbar moin-navbar-inverse">
+                            <div class="container">
+                                <div class="col-lg-3">
+                                    <div class="navbar-header">
+                                        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#target">
+                                          <span class="sm-only"></span>
+                                          <span class="icon-bar"></span>
+                                          <span class="icon-bar"></span>
+                                          <span class="icon-bar"></span>
+                                        </button>
+                                        {% if cfg.sitename %}
+                                            <a class="navbar-brand" href="{{ url_for('frontend.show_item', item_name=cfg.item_root) }}"> 
+                                                {{ cfg.sitename }} 
+                                            </a>
+                                        {% endif %}
+                                    </div>
                                 </div>
-                            </div> <!-- column-sitename -->
-                            <div class="col-lg-6">
-                                <div class="nav-collapse topnavcollapse">
-                                    <ul class="nav navbar-nav pull-right">
+                                <div class="col-lg-6">
+                                    <div class="nav-collapse collapse" id="target">
+                                        <ul class="nav navbar-nav moin-pull-right">
 
-                                        {% if user.valid -%}
-                                        {% set avatar = user.avatar(20) %}
-                                            {% if avatar %}
-                                                <li><img id="moin-avatar" src="{{ avatar }}" /></li>
-                                            {%- endif %}
-                                            {% if user.name -%}
-                                                {% set wiki_href, aliasname, title, exists = theme_supp.userhome() %}
-                                                <li>
-                                                    {{ hyperlink(wiki_href, title, exists, aliasname, "icon-user icon-white", None) }}
-                                                </li>
-                                                {% if 'frontend.usersettings' not in cfg.endpoints_excluded -%}
+                                            {% if user.valid -%}
+                                            {% set avatar = user.avatar(20) %}
+                                                {% if avatar %}
+                                                    <li><img id="moin-avatar" src="{{ avatar }}" /></li>
+                                                {%- endif %}
+                                                {% if user.name -%}
+                                                    {% set wiki_href, aliasname, title, exists = theme_supp.userhome() %}
                                                     <li>
-                                                        {{ hyperlink(url_for('frontend.usersettings'), None, True,
-                                                            _('Settings'), "icon-cog icon-white", None) }}
+                                                        {{ hyperlink(wiki_href, title, exists, aliasname, "icon-user icon-white", None) }}
                                                     </li>
+                                                    {% if 'frontend.usersettings' not in cfg.endpoints_excluded -%}
+                                                        <li>
+                                                            {{ hyperlink(url_for('frontend.usersettings'), None, True,
+                                                                _('Settings'), "icon-cog icon-white", None) }}
+                                                        </li>
+                                                    {%- endif %}
                                                 {%- endif %}
+                                                {% if user.auth_method in cfg.auth_can_logout %}
+                                                    <li>
+                                                        {{ hyperlink(url_for('frontend.logout', logout_submit=1), None, True,
+                                                                _('Logout'), "icon-off icon-white", None) }}
+                                                    </li>
+                                                {% endif %}
+                                            {% else %}
+                                                {% set login_url = theme_supp.login_url() %}
+                                                {% if login_url %}
+                                                    <li>
+                                                        {{ hyperlink(login_url, None, True, _('Login'), None, None) }}
+                                                    </li>
+                                                {% endif %}
                                             {%- endif %}
-                                            {% if user.auth_method in cfg.auth_can_logout %}
-                                                <li>
-                                                    {{ hyperlink(url_for('frontend.logout', logout_submit=1), None, True,
-                                                            _('Logout'), "icon-off icon-white", None) }}
-                                                </li>
-                                            {% endif %}
-                                        {% else %}
-                                            {% set login_url = theme_supp.login_url() %}
-                                            {% if login_url %}
-                                                <li>
-                                                    {{ hyperlink(login_url, None, True, _('Login'), None, None) }}
-                                                </li>
-                                            {% endif %}
-                                        {%- endif %}
-
-                                    </ul>
+                                        </ul>
+                                    </div>
                                 </div>
-                            </div><!-- column-user-options -->
-
-                            <div class="col-lg-3">
-                                <form class="navbar-form" action="{{ url_for('frontend.search') }}" method="get" role="search">
-                                    <div class="input-group">
-                                        <input name='q' type="text" class="form-control" placeholder="Search ...">
-                                        <div class="input-group-btn">
-                                            <button class="btn btn-primary" type="submit">
-                                                <i class="icon-search"></i>
-                                            </button>
+                                <div class="col-lg-3">
+                                    <form class="navbar-form" action="{{ url_for('frontend.search') }}" method="get" role="search">
+                                        <div class="input-group">
+                                            <input name='q' type="text" class="form-control" placeholder="Search ...">
+                                            <div class="input-group-btn">
+                                                <button class="btn btn-primary" type="submit">
+                                                    <i class="icon-search"></i>
+                                                </button>
+                                            </div>
                                         </div>
-                                    </div>
-                                </form>
-                            </div> <!-- column-3 -->
+                                    </form>
+                                </div>
+                            </div>
                         </nav> <!-- navbar-inverse-->
                     </div> <!-- column-12 -->
                 </div> <!-- row for top-navbar -->