Wonky button - Aardvark Bootstrap

Wonky button - Aardvark Bootstrap

by Shaun Daubney -
Number of replies: 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

 

Attachment Screen Shot 2013-07-31 at July 31, 09.00.28 PM.jpg
Average of ratings:Useful (1)
In reply to Shaun Daubney

Re: Wonky button - Aardvark Bootstrap

by 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; }
Average of ratings:Useful (2)
In reply to Mary Evans

Re: Wonky button - Aardvark Bootstrap

by 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.

In reply to Shaun Daubney

Re: Wonky button - Aardvark Bootstrap

by 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 smile

Cheers

Mary

In reply to Mary Evans

Re: Wonky button - Aardvark Bootstrap

by 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

In reply to Scott Karren

Re: Wonky button - Aardvark Bootstrap

by 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

In reply to Julian Ridden

Re: Wonky button - Aardvark Bootstrap

by Shaun Daubney -

What Julian said smile

 

In reply to Shaun Daubney

Re: Wonky button - Aardvark Bootstrap

by 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
Average of ratings:Useful (1)
In reply to David Scotson

Re: Wonky button - Aardvark Bootstrap

by Shaun Daubney -

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

In reply to Shaun Daubney

Re: Wonky button - Aardvark Bootstrap

by David Scotson -
Happy to help. Great theme, by the way, love the white icons on the colorful backgrounds and the way you're displaying the RSS links and images, very sleek and modern.
Average of ratings:Useful (1)
In reply to Shaun Daubney

Re: Wonky button - Aardvark Bootstrap

by 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');?>
Average of ratings:Useful (1)
In reply to Shaun Daubney

Re: Wonky button - Aardvark Bootstrap

by 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.
In reply to Shaun Daubney

Re: Wonky button - Aardvark Bootstrap

by Bas Brands -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of 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 smile