From ed9cdee3297af9d747a3590acdc5812d23e420ec Mon Sep 17 00:00:00 2001 From: David Bogner Date: Sun, 30 May 2021 17:06:33 +0200 Subject: [PATCH] Progressbar to BS4 --- renderer.php | 7 +++---- styles.css | 28 ---------------------------- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/renderer.php b/renderer.php index 1e54980..4c6e091 100755 --- a/renderer.php +++ b/renderer.php @@ -162,8 +162,7 @@ public function render_newsletter_issue_summary(newsletter_issue_summary $issue) 'issue' => $issue->id)); $now = time(); - $output = ''; - $output .= html_writer::start_tag('div', array('class' => 'mod_newsletter__issue--summary')); + $output = html_writer::start_tag('div', array('class' => 'mod_newsletter__issue--summary')); $output .= html_writer::start_tag('div', array('class' => 'mod_newsletter__issue--summary__link-read')); $output .= html_writer::link($url, $link); @@ -352,9 +351,9 @@ public function render_newsletter_progressbar(newsletter_progressbar $progressba $completed = ''; } - $output .= html_writer::start_tag('div', array('class' => 'mod_newsletter_progress')); + $output .= html_writer::start_tag('div', array('class' => 'progress')); $output .= html_writer::div($completed, '', - array('class' => 'mod_newsletter_progress-bar', 'role' => 'progressbar', + array('class' => 'progress-bar', 'role' => 'progressbar', 'aria-valuenow' => $value, 'aria-valuemin' => '0', 'aria-valuemax' => '100', 'style' => 'width:' . $value . '%')); $output .= html_writer::end_tag('div'); diff --git a/styles.css b/styles.css index 7276eac..8c3f995 100755 --- a/styles.css +++ b/styles.css @@ -188,32 +188,4 @@ } .mod-newsletter__action-link, .newsletter-toolbar { display: inline-block; -} -.mod_newsletter_progress { - margin-bottom: -5px; - overflow: hidden; - background-color: #f5f5f5; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); - display: inline-block; - height: 1.5em; - width: 16em; - padding: 0; -} - -.mod_newsletter_progress-bar { - float: left; - width: 0; - height: 100%; - font-size: 12px; - line-height: 20px; - color: #fff; - text-align: center; - background-color: #337ab7; - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); - -webkit-transition: width .6s ease; - -o-transition: width .6s ease; - transition: width .6s ease; } \ No newline at end of file