Reply New Topic
2014/12/20 11:12:45
#1
Offline
Home away from home

Help with bootstrap theme - navbar

I've been working on a new theme for a site based on icmsbootstrap3 and have the following tweak to make - the position of the search field changes after logging in and I'd like it to be the same as the logged out position.

Looking at theme.html, the button & dropdown are constructed differently.

Logged out (just uses a li and a b element):
<{if !$icms_isuser}> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#"><{$smarty.const.THEME_PSEUDO}><b class="caret"></b></a> <ul class="dropdown-menu"> <form style="margin-left: 10px;margin-right: 10px;padding-bottom: 8px;padding-top: 8px;" action="<{$icms_url}>/user.php" method="post" class="form-signin navbar-left"> <input type="text" placeholder="<{$smarty.const.THEME_DESC_PSEUDO}>" class="form-control" name="uname" /> <input type="password" placeholder="<{$smarty.const.THEME_DESC_PASSWORD}>" class="form-control" name="pass" /> <{if $rememberme}> <input type="checkbox" name="rememberme" value="On" /><{$lang_rememberme}> <{/if}> <input type="hidden" name="icms_redirect" value="<{$icms_requesturi}>" /> <input type="hidden" name="op" value="login" /> <button class="btn btn-primary btn-block" type="submit"><{$smarty.const.THEME_PSEUDO}></button> </form> <li class="divider"></li> <li><a href="<{$icms_url}>/user.php#lost" title=""><span class="glyphicon glyphicon-warning-sign" style="padding-right:5px;"></span> Forgot your password?</a></li> <li><a href="<{$icms_url}>/register.php" title="<{$smarty.const.THEME_REGISTER}>"><span class="glyphicon glyphicon-user" style="padding-right:5px;"></span> <{$smarty.const.THEME_REGISTER}></a></li> </ul> </li> <{/if}>


Logged in (uses a div and a button element) :
<{if $icms_isuser}> <div class="btn-group" style="margin-left: 10px;margin-right: 10px;padding-bottom: 8px;padding-top: 8px;"> <a href="<{$icms_url}>/user.php" role="button" class="btn btn-default"><span class="glyphicon glyphicon-user" style="padding-right:5px;"></span> <{$icms_uname}></a> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span> <span class="sr-only">Toggle Dropdown</span> </button> <ul class="dropdown-menu" role="menu"> <li><a href="<{$icms_url}>/edituser.php"><span class="glyphicon glyphicon-pencil" style="padding-right:5px;"></span> Edit Profile</a></li> <li><a href="<{$icms_url}>/edituser.php?op=avatarform"><span class="glyphicon glyphicon-camera" style="padding-right:5px;"></span> My Avatar</a></li> <li><a href="<{$icms_url}>/notifications.php"><span class="glyphicon glyphicon-envelope" style="padding-right:5px;"></span> <{$smarty.const.THEME_NOTIFICATION}></a></li> <li><{xoInboxCount assign=pmcount}><{if $pmcount}><a href="<{xoAppUrl viewpmsg.php}>" title="<{$smarty.const.THEME_INBOX}> <{$pmcount}> <{$smarty.const.THEME_NOTREAD}>"><span class="glyphicon glyphicon-comment" style="padding-right:5px;"></span> <{$smarty.const.THEME_INBOX}> <span class="badge badge-info"><{$pmcount}></span></a><{else}><a href="<{xoAppUrl viewpmsg.php}>" title="<{$smarty.const.THEME_INBOX}>"><span class="glyphicon glyphicon-comment" style="padding-right:5px;"></span> <{$smarty.const.THEME_INBOX}></a><{/if}></li> <li class="divider"></li> <li><a href="<{$icms_url}>/admin.php"><span class="glyphicon glyphicon-wrench" style="padding-right:5px;"></span> <{$smarty.const.THEME_ADMIN}></a></li> <li><a href="<{$icms_url}>/user.php?op=logout"><span class="glyphicon glyphicon-off" style="padding-right:5px;"></span> <{$smarty.const.THEME_LOGOUT}></a></li> </ul> </div> <{/if}> <form style="margin-left: 10px;margin-right: 10px;padding-bottom: 8px;padding-top: 8px;" action="<{$icms_url}>/search.php" class="navbar-left"> <input type="text" placeholder="<{$smarty.const.THEME_SEARCH}>" class="form-control" name="query" /> <input type="hidden" name="action" value="results" /> </form> </ul> </div>


I'm sure I could figure it out, but there are others who would be able to do this much quicker than me.

Thanks!

Attach file:



png  icms-bootstrap3-nav-login.png (166.54 KB)
54__58225495ca0647c95.png 1155X192 px

png  icms-bootstrap3-nav-logged-in.png (167.94 KB)
54__163205495ca14360b8.png 1167X190 px

_________________

Steve Twitter: @skenow Facebook: Steve Kenow


Subject Poster Date
     Help with bootstrap theme - navbar skenow 2014/12/20 11:12:45
       Re: Help with bootstrap theme - navbar fiammybe 2014/12/20 13:57:09
         Re: Help with bootstrap theme - navbar skenow 2014/12/20 19:24:04
           Re: Help with bootstrap theme - navbar skenow 2014/12/21 16:53:53
Reply New Topic extras
 Previous Topic   Next Topic
You can view topic.
You can start a new topic.
You can reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You can post without approval.