Wonky button - Aardvark Bootstrap

Wonky button - Aardvark Bootstrap

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

 

附件 Screen Shot 2013-07-31 at July 31, 09.00.28 PM.jpg
評比平均分數:Useful (1)
In reply to 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; }
評比平均分數:Useful (2)
In reply to 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.

In reply to 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

In reply to 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

In reply to 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

In reply to Julian Ridden

Re: Wonky button - Aardvark Bootstrap

Shaun Daubney發表於

What Julian said 微笑

 

In reply to 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
評比平均分數:Useful (1)
In reply to David Scotson

Re: Wonky button - Aardvark Bootstrap

Shaun Daubney發表於

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

In reply to Shaun Daubney

Re: Wonky button - Aardvark Bootstrap

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.
評比平均分數:Useful (1)
In reply to 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');?>
評比平均分數:Useful (1)
In reply to 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.
In reply to 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 微笑