Example of a custom to display lighter effect for courses presentation on homepage

Issue #241 closed
Clement p created an issue

Hi,

I share here an example of a custom I did for the homepage. Idea is to display courses in boxes but with lighter effect and less information.

The result (https://bitbucket.org/repo/XE9aXM/images/267249176-adaptive-box-courses.png)

What I did :

  1. Background color with course overview files We prefer have no background color to integrate image and .png easily. So I delete color #fff (line 1185 + line 2000 in renderers.php)

  2. Less text and just one time title in course box We think is better to see only one time the title of a course in the box and want to have minimum of text . So : - I comment/desactive line 1212 + 1213 + 1216 + 1217 - we change coursebtn (line 1127 an 1128) to display course name with html_writer::link(new moodle_url('/course/view.php', array('id' => $course->id)) And we add some css lines to custom "course/view.php" div.

I imagine it isn't a very good modification to keep theme generic. But perhaps it's possible to integrate this setting in admin setting.

  1. Display a summary course when course box is hover - I prefer like your last version (1220 > 1226) display a summary with information of the course in the course box when hover. But I change number of caracters to display more texte line 1224 with 200. - I change position of .cimbox in hover state to hide course image and display summary. I modifiy css with .panel-body:hover .cimbox {z-index}

Best regards.

Comments (4)

  1. Jeremy Hopkins

    Hi Clement,

    This looks similar to an option we have already added. In the admin settings for "Frontpage Courses"

    Set "Frontpage Course Boxes" = "Coventry Tiles" Set "Coventry tiles course button" = "off"

    I will remove that second setting and just turn it off automatically if the coventry tiles style is selected.

    There are a couple of issues with the style on that, and we will probably remove "Coventry" and give it a more generic name. It maybe better to alter the slide effect to completely cover the image as shown in your example.

    If you wish to go further than tweaking that existing style, as you can see it is possible to add a new option and a completely new tile option, which would be "generic" in that any user of the theme could choose to enable that style, and thus could be incorporated into our release :-)

  2. Clement p reporter

    Hi Jeremy,

    Thank you. I did not see this new feature "coventry tiles". It's great ! I look soon that in detail soon.

    ++

  3. Jeremy Hopkins

    Ok well if you have any suggestions let me know, and keep in mind it is possible to add more. If you already have code for an alternative style we could look at adding it.

  4. Log in to comment