Browse Source

remove radial progress bar stuff in favor of simpler bootstrap progress bars

fix-133-memory-crash
Dan Janosik 6 years ago
parent
commit
08ed8048be
No known key found for this signature in database GPG Key ID: C6F8CE9FFDB2CED2
  1. 9
      public/css/bootstrap-dark.min.css
  2. 1154
      public/css/radial-progress.css
  3. 73
      public/css/radial-progress.less
  4. 11
      views/includes/block-content.pug
  5. 2
      views/includes/blocks-list.pug
  6. 8
      views/includes/radial-progress-bar.pug
  7. 1
      views/layout.pug

9
public/css/bootstrap-dark.min.css

File diff suppressed because one or more lines are too long

1154
public/css/radial-progress.css

File diff suppressed because it is too large

73
public/css/radial-progress.less

@ -1,73 +0,0 @@
.radial-progress {
@circle-size: 16px;
@circle-background: #d6dadc;
@circle-color: #0eb23a;
@inset-size: 6px;
@inset-color: #ffffff;
@transition-length: 0s;
@shadow: 0px 0px 0px rgba(0,0,0,0.1);
width: @circle-size;
height: @circle-size;
display: inline-block;
background-color: @circle-background;
border-radius: 50%;
.circle {
.mask, .fill, .shadow {
width: @circle-size;
height: @circle-size;
position: absolute;
border-radius: 50%;
}
.shadow {
box-shadow: @shadow inset;
}
.mask, .fill {
-webkit-backface-visibility: hidden;
transition: -webkit-transform @transition-length;
transition: -ms-transform @transition-length;
transition: transform @transition-length;
border-radius: 50%;
}
.mask {
clip: rect(0px, @circle-size, @circle-size, @circle-size/2);
.fill {
clip: rect(0px, @circle-size/2, @circle-size, 0px);
background-color: @circle-color;
}
}
}
.inset {
width: @inset-size;
height: @inset-size;
position: absolute;
margin-left: (@circle-size - @inset-size)/2;
margin-top: (@circle-size - @inset-size)/2;
background-color: @inset-color;
border-radius: 50%;
box-shadow: @shadow;
}
@i: 0;
@increment: 180deg / 100;
.loop (@i) when (@i <= 100) {
&[data-progress="@{i}"] {
.circle {
.mask.full, .fill {
-webkit-transform: rotate(@increment * @i);
-ms-transform: rotate(@increment * @i);
transform: rotate(@increment * @i);
}
.fill.fix {
-webkit-transform: rotate(@increment * @i * 2);
-ms-transform: rotate(@increment * @i * 2);
transform: rotate(@increment * @i * 2);
}
}
}
.loop(@i + 1);
}
.loop(@i);
}

11
views/includes/block-content.pug

@ -94,11 +94,16 @@ div(class="tab-content")
div(class="summary-split-table-content monospace")
span(style="") #{result.getblock.weight.toLocaleString()} wu
- var radialProgressBarPercent = new Decimal(100 * result.getblock.weight / coinConfig.maxBlockWeight).toDecimalPlaces(2);
include ./radial-progress-bar.pug
span(class="text-muted") (#{new Decimal(100 * result.getblock.weight / coinConfig.maxBlockWeight).toDecimalPlaces(2)}% full)
- var fullPercent = new Decimal(100 * result.getblock.weight / coinConfig.maxBlockWeight).toDecimalPlaces(0);
div(class="row")
div(class="col-md-10 col-lg-8 col-12")
div(class="progress my-1 mr-2", style="height: 4px;")
div(class="progress-bar", role="progressbar", style=("width: " + fullPercent + "%;"), aria-valuenow=parseInt(100 * result.getblock.weight / coinConfig.maxBlockWeight), aria-valuemin="0" ,aria-valuemax="100")
div(class="row")
div(class="summary-split-table-label") Size
div(class="summary-split-table-content monospace") #{result.getblock.size.toLocaleString()} bytes

2
views/includes/blocks-list.pug

@ -50,5 +50,5 @@ div(class="table-responsive")
span #{block.weight.toLocaleString()}
small(class="font-weight-light text-muted") (#{fullPercent}%)
div(class="progress", style="height: 3px;")
div(class="progress", style="height: 4px;")
div(class="progress-bar", role="progressbar", style=("width: " + fullPercent + "%;"), aria-valuenow=parseInt(100 * block.weight / coinConfig.maxBlockWeight), aria-valuemin="0" ,aria-valuemax="100")

8
views/includes/radial-progress-bar.pug

@ -1,8 +0,0 @@
div(class="radial-progress d-none d-lg-inline-block", data-progress=parseInt(radialProgressBarPercent), data-toggle="tooltip", title=(radialProgressBarPercent + "% full"))
div(class="circle")
div(class="mask full")
div(class="fill")
div(class="mask half")
div(class="fill")
div(class="fill fix")
div(class="inset")

1
views/layout.pug

@ -7,7 +7,6 @@ html(lang="en")
link(rel="stylesheet", href="/css/fonts.css", integrity="sha384-XOmmu8j3C2MFUXRVGg8VWYNwlhEkSNb0rW/4e7bi3F56S6PejEmBUQDGZofQyjbL")
link(rel="stylesheet", href="/css/highlight.min.css", integrity="sha384-zhIsEafzyQWHSoMCQ4BfT8ZlRXQyIFwAHAJn32PNdsb8n6tVysGZSLpEEIvCskw4")
link(rel="stylesheet", href="/css/radial-progress.css", type="text/css", integrity="sha384-rVsl/jqFJiDta9jRFygvgOlJOMkXmhlPQa0+JRofBRdvy/mWU2ZPovkF6cCXzcjl")
if (session.uiTheme && session.uiTheme == "dark")

Loading…
Cancel
Save