Browse Source

Adaptação na lista de cursos

MOODLE_37_STABLE
Matheus Garcia 6 years ago
parent
commit
9a0a838f12
  1. 5
      classes/output/core/course_renderer.php
  2. 30
      scss/courselist.scss
  3. 3
      scss/moodle.scss

5
classes/output/core/course_renderer.php

@ -249,7 +249,7 @@ class course_renderer extends \core_course_renderer {
'data-toggle' => 'popover', 'data-placement' => 'right',
'data-content' => $chelper->get_course_formatted_summary($course,
array('noclean' => true, 'para' => false)), 'data-html' => 'true', 'tabindex' => '0', 'data-trigger' => 'focus'));
$content .= get_string('seemore', 'theme_trema');
$content .= 'Mais informações';
$content .= html_writer::end_tag('div');
$content .= html_writer::end_tag('div'); // End summary.
}
@ -269,7 +269,7 @@ class course_renderer extends \core_course_renderer {
$url = file_encode_url("$CFG->wwwroot/pluginfile.php",
'/'. $file->get_contextid(). '/'. $file->get_component(). '/'.
$file->get_filearea(). $file->get_filepath(). $file->get_filename(), !$isimage);
if ($isimage) {
if ($isimage) {
$contentimage = html_writer::start_tag('div', array('style' => "background-image:url('$url')",
'class' => 'card-img-top'));
$contentimage .= html_writer::end_tag('div');
@ -284,6 +284,7 @@ class course_renderer extends \core_course_renderer {
'class' => 'card-img-top'));
$contentimage .= html_writer::end_tag('div');
}
return $contentimage;
}
/**

30
scss/courselist.scss

@ -0,0 +1,30 @@
.course-card-view {
box-shadow: 5px 5px 9px -4px rgba($black, .1);
padding-bottom: 4rem;
max-width: 16rem;
min-width: 12rem;
.course-card-img div {
height: 6.5rem;
background-position: top right;
background-size: cover;
}
.card-see-more {
position: absolute;
bottom: 0;
width: 100%;
.btn {
width: 90%;
}
}
}
body#page-enrol-index {
.box.generalbox > div {
@extend .course-card-view;
position: relative;
}
}

3
scss/moodle.scss

@ -40,4 +40,5 @@ $breadcrumb-divider-rtl: "◀" !default;
@import "moodle/tool_usertours";
@import "moodle/bs2-compat";
@import "moodle/print";
@import "moodle/modal";
@import "moodle/modal";
@import 'courselist';

Loading…
Cancel
Save