Wonky button - Aardvark Bootstrap

Wonky button - Aardvark Bootstrap

Shaun Daubney -
回帖数:14

Hi all, sorry I've not been around much but I've finally found some time to work on Aardvark and actually rewrite it from the ground up to capitalise on the fantastic bootstrap code. 

I'm planning to release the theme into the wild before the end of the week but I'm stuck on one tiny thing. I can't seem to line up the submit button with the login fields in the profile bar (menu bar).

If anyone knows how to solve this I would be extremely grateful. You can see it at http://vle.newbury-college.ac.uk?&theme=aardvarkbs

 

附件 Screen Shot 2013-07-31 at July 31, 09.00.28 PM.jpg
平均分:Useful (1)
回复Shaun Daubney

Re: Wonky button - Aardvark Bootstrap

Mary Evans -
Try adding something like this might fix it... .navbar #profilelogin input[type="submit"], .navbar #profilelogin input[type="text"], .navbar #profilelogin input[type="password"] { margin: 5px 0 0 5px; }
回复Mary Evans

Re: Wonky button - Aardvark Bootstrap

Shaun Daubney -

Cool I'll try that in the morning. Thank you, I've missed you Mary! Hope you're well.

UPDATE - hacked in from home and updated the CSS. Works a treat. Where would I be without you in my life?! thanks again. I'll package it up and upload it tomorrow.

回复Shaun Daubney

Re: Wonky button - Aardvark Bootstrap

Mary Evans -

Hi Shaun,

Thanks for asking but I've not been well at all. I think the heat wave we have had has been the cause. I'm taking it easy for a few weeks.  I just seem to lack energy.

Anyway, I am looking forward to seeing your rendition of a Bootstrap Aardvark 微笑

Cheers

Mary

回复Mary Evans

Re: Wonky button - Aardvark Bootstrap

Scott Karren -

Shaun

Will you new version of Aardvark be compatible with Moodle 2.4.4+?  I am testing Aardvark 2.4 beta on this version and have had some strange things happen. If your new version will work with 2.4.4+ I will stop my own hacking.  Thanks for a great theme.

Scott

回复Scott Karren

Re: Wonky button - Aardvark Bootstrap

Julian Ridden -

Answering on behalf of Shaun as I am confident I have the answer.

Shaun mentioned the rewrite is based on bootstrap. If that is the case for the new version you will need 2.5 or above as the older versions of Moodle do not support the Bootstrap engine.

Julian

回复Julian Ridden

Re: Wonky button - Aardvark Bootstrap

Shaun Daubney -

What Julian said 微笑

 

回复Shaun Daubney

Re: Wonky button - Aardvark Bootstrap

David Scotson -
Bootstrap has special classes for forms in navbars. If you're writing the HTML yourself you should copy those, if not then you should copy the associated CSS and apply it the classes created by Moodle:

http://getbootstrap.com/2.3.2/components.html#navbar

and an example that does the same thing to copy from:

http://getbootstrap.com/2.3.2/examples/hero.html
回复David Scotson

Re: Wonky button - Aardvark Bootstrap

Shaun Daubney -

Brilliant, thank you. I'll update this and upload it.

回复Shaun Daubney

Re: Wonky button - Aardvark Bootstrap

Mary Evans -

This is how I did the login in the navbar in my Tiny Bootstrap theme...

<?php

    function get_content () {
    global $USER, $CFG, $SESSION, $COURSE;
    $wwwroot = '';
    $signup = '';
}

    if (empty($CFG->loginhttps)) {
        $wwwroot = $CFG->wwwroot;
    } else {
        $wwwroot = str_replace('http://', 'https://', $CFG->wwwroot);
}

    if (!isloggedin() or isguestuser()) {
    echo '<form id="login" class="navbar-form pull-right" method="post" action="'.$wwwroot.'/login/index.php?authldap_skipntlmsso=1">';

    echo '<input class="loginform span2" type="text" name="username" id="login_username" value="" placeholder="'.get_string('username').'" />';
    echo '<input class="loginform span2" type="password" name="password" id="login_password" value="" placeholder="'.get_string('password').'" />';
    echo '<button type="submit" class="btn">'.get_string('login').'</button>';
    echo '</form>';
    } else {
    echo '<a href="'.$CFG->wwwroot.'/login/logout.php?sesskey='. sesskey().'"><button type="submit" class="btn btn-small btn-primary pull-right">'.get_string('logout').'&nbsp;&nbsp;<i class="icon-hand-left icon-white"></i></button></a>';
} ?>


I included it using ...

<?php include('loginout.php');?>
回复Shaun Daubney

Re: Wonky button - Aardvark Bootstrap

David Scotson -
You can get this mostly working by inheriting from Bas Brands Bootstrap theme for 2.4, as it shares, oh about 95% of code with the BootstrapBase version in core for Moodle 2.5 but at this stage I'd recommend just updating Moodle itself.
回复Shaun Daubney

Re: Wonky button - Aardvark Bootstrap

Bas Brands -
Core developers的头像 Peer reviewers的头像 Plugin developers的头像 Plugins guardians的头像 Testers的头像

I love this theme! Using the icons for the menus is great and having the login in the navigation bar is very nice too!Just very cool to see bootstrap being used for themes 微笑