Browse Source

Merge branch 'MOODLE_37_STABLE' of https://github.com/interlegis/moodle_theme_ilb into MOODLE_37_STABLE

MOODLE_37_STABLE
Matheus Garcia 6 years ago
parent
commit
c38ceac26a
  1. 26
      classes/output/core/course_renderer.php
  2. 87
      scss/courselist.scss

26
classes/output/core/course_renderer.php

@ -125,7 +125,7 @@ class course_renderer extends \core_course_renderer {
$coursecount = 1;
$content .= html_writer::start_tag('div', array('class' => ' row card-deck my-4'));
foreach ($courses as $course) {
$content .= $this->coursecat_coursebox($chelper, $course, 'card mb-3 course-card-view boxCursos');
$content .= $this->coursecat_coursebox($chelper, $course, 'card mb-3 course-card-view boxCursos tamanhoBoxCursos');
$coursecount ++;
}
$content .= html_writer::end_tag('div');
@ -200,24 +200,13 @@ class course_renderer extends \core_course_renderer {
$coursename = $chelper->get_course_formatted_name($course);
$courseurl = new moodle_url('/course/view.php', array('id' => $course->id));
$coursenamelink = html_writer::link($courseurl,
$coursename, array('class' => $course->visible ? '' : 'dimmed'));
$coursename, array('class' => $course->visible ? 'propertiesTextColor' : 'dimmed propertiesTextColor'));
$content = html_writer::start_tag('a', array ('href' => $courseurl, 'class' => 'course-card-img'));
$content .= $this->get_course_summary_image($course);
$content .= html_writer::end_tag('a');
$content .= html_writer::start_tag('div', array('class' => 'card-body'));
$content .= "<h5 class='card-title text-center m-1'>". $coursenamelink ."</h5>";
$content .= "<div class='elegantshd textCardEdited'>". $coursenamelink ."</div>";
$content .= html_writer::end_tag('div');
$content .= html_writer::start_tag('div', array('class' => 'card-block text-center'));
// Print enrolmenticons.
if ($icons = enrol_get_course_info_icons($course)) {
foreach ($icons as $pixicon) {
$content .= $this->render($pixicon);
}
}
$content .= html_writer::start_tag('div', array('class' => 'pull-right'));
$content .= html_writer::end_tag('div'); // End pull-right.
$content .= html_writer::end_tag('div'); // End card-block.
// Display course contacts. See core_course_list_element::get_course_contacts().
if ($course->has_course_contacts()) {
$content .= html_writer::start_tag('div', array('class' => 'card-footer teachers'));
$content .= html_writer::start_tag('ul');
@ -243,14 +232,19 @@ class course_renderer extends \core_course_renderer {
}
// Display course summary.
if ($course->has_summary()) {
$content .= html_writer::start_tag('div', array('class' => 'card-see-more text-center'));
$content .= html_writer::start_tag('div', array('class' => 'btn btn-secondary m-2',
$content .= html_writer::start_tag('div', array('class' => 'card-see-more text-center teste'));
$content .= html_writer::start_tag('div', array('class' => 'btn btn-inscrever'));
$content .= 'Inscrever';
$content .= html_writer::end_tag('div');
$content .= html_writer::start_tag('div', array('class' => 'btn btn-mais-info m-2',
'id' => "course-popover-{$course->id}", 'role' => 'button', 'data-region' => 'popover-region-toggle',
'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 .= 'Mais informações';
$content .= html_writer::end_tag('div');
$content .= html_writer::end_tag('div'); // End summary.
}
return $content;

87
scss/courselist.scss

@ -6,6 +6,10 @@
min-width: calc(100% - 0.5rem) !important;
max-width: calc(100% - 0.5rem) !important;
}
.popover {
max-width: 100% !important;
width: 95% !important;
}
}
@media screen and
@ -15,7 +19,10 @@
min-width: calc(50% - 0.5rem) !important;
max-width: calc(50% - 0.5rem) !important;
}
.popover {
max-width: 100% !important;
width: 80% !important;
}
}
@ -26,13 +33,20 @@
min-width: calc(33% - 0.5rem) !important;
max-width: calc(33% - 0.5rem) !important;
}
.popover {
max-width: 100% !important;
width: 80% !important;
}
}
@media screen and
(min-width: 1251px) and
(max-width: 4080px){
.popover {
max-width: 100% !important;
width: 60% !important;
}
}
.course-card-view {
@ -65,10 +79,7 @@ body#page-enrol-index {
}
}
.popover {
max-width: 100% !important;
width: 50% !important;
}
.minheight{
background-position: top center !important;
@ -78,10 +89,74 @@ body#page-enrol-index {
transition: box-shadow .3s;
border: 1px solid #ccc;
float: left;
background: #fff; /* Old browsers */
background: -moz-radial-gradient(center, ellipse cover, #011c35 1%, #E0E0E0 100%); /* FF3.6+ */
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(1%,#fff), color-stop(100%,#E0E0E0)); /* Chrome,Safari4+ */
background: -webkit-radial-gradient(center, ellipse cover, #fff 1%,#E0E0E0 100%); /* Chrome10+,Safari5.1+ */
background: -o-radial-gradient(center, ellipse cover, #fff 1%,#E0E0E0 100%); /* Opera 12+ */
background: -ms-radial-gradient(center, ellipse cover, #fff 1%,#E0E0E0 100%); /* IE10+ */
background: radial-gradient(ellipse at center, #fff 1%,#E0E0E0 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0264d6', endColorstr='#1c2b5a',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}
.tamanhoBoxCursos{
max-height: 440px;
}
.boxCursos:hover {
-webkit-box-shadow: 0px 0px 14px -2px rgba(0,0,0,1);
-moz-box-shadow: 0px 0px 14px -2px rgba(0,0,0,1);
box-shadow: 0px 0px 14px -2px rgba(0,0,0,1);
}
.btn-mais-info{
color: white;
background-color: #0069d9;
border-color: #0069d9;
border-radius: 5px;
}
.btn-mais-info:hover{
-webkit-box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.58);
-moz-box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.58);
box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.58);
}
.textCardEdited {
font-family: "Avant Garde", Avantgarde, "Century Gothic", CenturyGothic, "AppleGothic", sans-serif;
font-size: 16px;
text-align: center;
text-transform: uppercase;
text-rendering: optimizeLegibility;
color: #444444;
}
.elegantshd {
color: #131313;
letter-spacing: .15em;
}
.propertiesTextColor{
color:#303030;
}
.propertiesTextColor:hover{
color:#787878 !important;
text-decoration: none !important;
}
.btn-inscrever{
color: #fff;
background-color: #28a745;
border-color: #28a745;
border-radius: 5px;
margin-top: 10px;
}
.btn-inscrever:hover{
-webkit-box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.58);
-moz-box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.58);
box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.58);
}
.card-body{
margin-bottom: 10px;
}
Loading…
Cancel
Save