Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 133759d

Browse files
committed
Cleanup placeholder files.
1 parent 2133d3c commit 133759d

File tree

4 files changed

+6
-51
lines changed

4 files changed

+6
-51
lines changed

lib/placeholder/base.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,5 @@ public function isThere() {
148148
public function trailingSlash() {
149149
return $this->options['output.xhtml'] ? ' /' : '';
150150
}
151+
151152
}

lib/placeholder/blurred.php

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,34 +37,13 @@ public function make() {
3737
public function html() {
3838

3939
$attr = [
40-
'src' => $this->thumb->dataUri(),
40+
'src' => $this->thumb->url(),
4141
'class' => $this->option('class'),
4242
'alt' => ' ', // one space generates creates empty alt attribute
4343
'aria-hidden' => 'true',
4444
];
4545

4646
return '<img ' . html::attr($attr) . $this->trailingSlash() . '>';
4747
}
48-
49-
// public function html() {
50-
51-
// $color = utils::dominantColor($this->source);
52-
53-
// $img = html::tag('span', [
54-
// 'style' => 'background-image: url(' . $this->thumb->dataUri() . ');',
55-
// ]);
56-
57-
// $width = $this->thumb->width();
58-
// $height = $this->thumb->height();
59-
// $id = 'imageset-filter-' . uniqid();
60-
61-
// $html = [
62-
// '<svg color-interpolation-filters="sRGB" viewbox="0 0 ' . $width . ' ' . $height . '" preserveAspectRatio="xMidYMid slice" class="imageset__placeholder" aria-hidden="true">',
63-
// '<filter id="' . $id . '"><feGaussianBlur in="SourceGraphic" stdDeviation="2" /></filter>',
64-
// '<image width="' . $width . '" height="' . $height . '" xlink:href="' . $this->thumb->dataUri() . '" filter="url(#' . $id . ')" />',
65-
// '</svg>',
66-
// ];
67-
68-
// return implode('', $html);
69-
// }
48+
7049
}

lib/placeholder/color.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ public function html() {
3737

3838
return html::tag('span', $attr);
3939
}
40+
4041
}

lib/placeholder/lqip.php

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -43,32 +43,6 @@ public function html() {
4343
];
4444

4545
return '<img ' . html::attr($attr) . $this->trailingSlash() . '>';
46-
}
47-
48-
// public function html() {
49-
50-
// $width = $this->thumb->width();
51-
// $height = $this->thumb->height();
52-
// $id = 'imageset-filter-' . uniqid();
53-
54-
// $html = [
55-
// '<svg color-interpolation-filters="sRGB" viewbox="0 0 ' . $width . ' ' . $height . '" preserveAspectRatio="xMidYMid slice" class="imageset__placeholder" aria-hidden="true">',
56-
// '<filter id="' . $id . '"><feGaussianBlur in="SourceGraphic" stdDeviation="0.75" /></filter>',
57-
// '<image width="' . $width . '" height="' . $height . '" xlink:href="' . $this->thumb->dataUri() . '" filter="url(#' . $id . ')" />',
58-
// '</svg>',
59-
// ];
60-
61-
// return implode('', $html);
62-
63-
// // $color = utils::dominantColor($this->source);
64-
65-
// // $img = html::tag('span', [
66-
// // 'style' => 'background-image: url(' . $this->thumb->dataUri() . ');',
67-
// // ]);
68-
69-
// // return html::tag('span', $img, [
70-
// // 'class' => $this->option('class'),
71-
// // 'style' => 'background-color: ' . $color . ';',
72-
// // ]);
73-
// }
46+
}
47+
7448
}

0 commit comments

Comments
 (0)