Closed sharpchi closed 1 year ago
It was once #page which did not work: https://github.com/gjb2048/moodle-format_grid/commit/461ec378236e950679432e671cd249ae1145c74d then '#region-main' did not work so I changed it to '#page-content' -> https://github.com/gjb2048/moodle-format_grid/commit/58a26847ffc94c7ee267fc8dd6e229dbbc25f727. Thus after extensive testing '#page-content' seems to be the solution for most cases.
I'll perhaps test those out when I'm back from holiday - I wonder if there's any mileage in allowing the admins to specify either their own tag (or a selection of "popular" tags) to pin it to, or their own top px. The trouble with hard coding the #ID is it depends on the theme authors implementing those tags.
Possibly, but all of the id's I've used are standard Moodle theme id's and most actually need to be used for things to work.
Decided that this needs funding as current solution works for core themes and my own.
I see in module.js that the default element that is used to calculate the gridshadebox_content offset has been changed from #page to #page-content. In the standard Boost template, and in my child template, there is an output.full_header between #page and #page-content and this renderer can be overridden to contain extra content. The upshot is that the grid overlay starts below this header, which can be too much.
I can override this in my CSS but was wondering if there was perhaps another way of doing it that isn't dependent on theme IDs - perhaps a px top set in the grid settings? I could do a pull request if we can agree on an implementation.