Skip to content

Commit

Permalink
Progressbar to BS4
Browse files Browse the repository at this point in the history
  • Loading branch information
dasistwas committed May 30, 2021
1 parent c767efa commit ed9cdee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 32 deletions.
7 changes: 3 additions & 4 deletions renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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');
Expand Down
28 changes: 0 additions & 28 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit ed9cdee

Please sign in to comment.