Fordson and Fluid Grid

Fordson and Fluid Grid

by Dave Sherwin -
Number of replies: 9
Picture of Particularly helpful Moodlers

The summer project is to update our moodle site and rebrand with a new theme. We are currently using...

Moodle 3.1.2+ (Build: 20160929)
Essential Theme 3.1.1.0 (Build: 2016061709)

...and with the screenshot attached the image on the left shows that the fluid grid system to be responsive is working as expected when displayed on a computer.

image of themes

However with the image on the right using the new site and rebranding...

Moodle 3.2.2+ (Build: 20170324)
Fordson Theme v1.3.1 (2017032700)

... the Fordson theme displays it in a single column instead of using the grid.

I was wondering how is the coding different in Fordson to display the fluid grid the way Essential displays the grid. Because it's obvious that there are some differences between the coding...

aloha aku oe a i ka nui lā

Attachment FluidGrid.jpg
Average of ratings: -
In reply to Dave Sherwin

Re: Fordson and Fluid Grid

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Why are you moving away from Essential please Dave?

In reply to Gareth J Barnard

Re: Fordson and Fluid Grid

by Dave Sherwin -
Picture of Particularly helpful Moodlers

Bismarck Public Schools has been using Moodle since 2008 and have probably have had progressed through four different themes since the first years. With the last theme being Essential serving us well and the longest; over the last three years.  There are many nice features with Essential that we have to workout with the new theme.

However there were a couple of reasons for the rebrand with a new theme.

  1. Our website is being rebranded and there are many similarities between the Fordson and our new website which will launch in July. However we probably could make those changes with Essential, however with Fordson the similarities were too close to ignore.
  2. The second reason is probably more important is that we want to use some of the benefits of Boost, that we feel will help bring more staff on board with the ease of navigation and other functionality that Boost offers.

The good news is that we still are using Moodle and our usage continues to grow. I think because we try to keep it fresh and updated. So thanks to Essential, which helped us the last three years. So we are just planning for the future use...


In reply to Dave Sherwin

Re: Fordson and Fluid Grid

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers

I think with bootstrap you can set the cutoff points for when the page scales to screen size.

Maybe someone knows the scss variable to do this?

Also, I'd recommend if possible you upgrade to Moodle 3.3 and  use the latest version of Fordson.  The 3.3 branch is getting all the attention as that is what we just upgraded to.


Also, check out our new Easy Enrollment plugin for Moodle which allows students to enroll in courses using 6 digit codes right from the Fordson homepage.  It's awesome for K-12!! Teachers get the codes from a button on the course page.  There is also the new Teacher and Student dashboard collapsible menu which is really nice in the latest version of Fordson.


In reply to Chris Kenniburg

Re: Fordson and Fluid Grid

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

I think there's more to it than just the responsive cut-off points Chris.

The grid structure changed between BS2 and 3 and now in BS4 also incorporates flexbox layouts

BS2 uses span4, span6 etc

http://getbootstrap.com/2.3.2/scaffolding.html#gridSystem

While BS4 uses col-md-4, col-sm-6, col-lg2 etc.

http://v4-alpha.getbootstrap.com/layout/grid/

But, for reference, the grid cutoff scss variables are (from about line200 of the _variables.scss in the main bootstrap4 download):


// Grid breakpoints
//
// Define the minimum dimensions at which your layout will change,
// adapting to different screen sizes, for use in media queries.

$grid-breakpoints: (
  xs: 0,
  sm: 576px,
  md: 768px,
  lg: 992px,
  xl: 1200px
) !default;
@include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
@include _assert-starts-at-zero($grid-breakpoints);


// Grid containers
//
// Define the maximum width of `.container` for different screen sizes.

$container-max-widths: (
  sm: 540px,
  md: 720px,
  lg: 960px,
  xl: 1140px
) !default;
@include _assert-ascending($container-max-widths, "$container-max-widths");
Average of ratings: Useful (2)
In reply to Richard Oelmann

Re: Fordson and Fluid Grid

by Dave Sherwin -
Picture of Particularly helpful Moodlers

Richard - thanks for the link http://v4-alpha.getbootstrap.com/layout/grid/ and description of the code changing from span to col-md##. Now this old dog has some new tricks to learn and share.  Attached is the pre/post changes to show the changes. The grid better utilizes the screenspace from device to device

Thanks again

Attachment FluidGridpost.jpg
Average of ratings: Useful (2)
In reply to Dave Sherwin

Re: Fordson and Fluid Grid

by Derek Chirnside -

Great work Dave.  Really nice looking.

In laymans terms (well sort of) see this blog post from the Bootstrap mother ship: https://blog.getbootstrap.com/2017/01/06/bootstrap-4-alpha-6/  As far as I know this is the first 'official' word on a first alpha for BS.

Slightly OT

I'm very interested in the power of Bootstrap + snippets in Atto to do simple nice things.  Atto is sometimes not up to the job https://tracker.moodle.org/browse/MDL-58084  Between 3.1 and 3.1 the html stripping out of code was tightened a bit.  

Essentially if I have a some nice bootstrap tabs in a label or something - or a few other bits of BS code as well - Atto strips this all out if you then try to paste certain things in without formatting, like a URL.  It does a code 'cleanup'.  Not all the BS code is stripped, but enough to break your page.  I've tried to persuade the Atto coders to make the code stripping not so aggressive, but no deal so far.

I have not worried too about this since we are upgrading to 3.3 in two weeks.  Then I'll be looking to see if I can find a way to improve things: either get the code stripping in Atto relaxed (now Bootstrap is a little more stable) or find a work around that does not involve copying from MS word.

When you guys are doing your BS magic, I presume you are using high powered editors and not atto?

-Derek

In reply to Derek Chirnside

Re: Fordson and Fluid Grid

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Derek,

Just noting that although BS4 alpha 6 has been out since January and the Beta is supposedly due 'soon', Boost itself is still built using Alpha4 (as was available when it Boost was first created). I assume HQ are waiting on a Beta release before updating.

I don't think there are huge differences in code, although the integration of flexbox is a fairly big change in the background, but it is worth just being aware, as there are some changes.

As for editors - I generally use Geany (on Linux) or Notepad++ (on Windows) smile

But for comparison, have recently been doing some work with WordPress - and found that the editor there (or at least the widgets in the theme being used, so could be the particular WP theme I suppose - its use of bootstrap was 'quirky' to say the least!) is even worse, and  less consistent, about stripping html. There, it seems, if you put html in and never visit the visual editor, you can often get away without it being stripped, but the minute you visit the visual editor it strips it. Very frustrating - especially when working with others. You just get something the way you want it in the text editor - and someone else views it in the visual editor and all your html suddenly vanishes! :D