last things, webp images all aboard
This commit is contained in:
@@ -26,7 +26,7 @@ class Icon extends Model
|
||||
return '<i class="fa fa-' . $this->icon . '"></i>';
|
||||
case 'img':
|
||||
case 'image':
|
||||
return '<img class="icon" src="https://s.w0bm.com/' . ltrim($this->icon, '/') . '" alt="' . $this->icon . '">';
|
||||
return '<img class="icon" src="https://w0bm.com/' . ltrim($this->icon, '/') . '" alt="' . $this->icon . '">';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
|
@@ -42,10 +42,10 @@ class Markdown extends \Parsedown {
|
||||
if (preg_match('/\:(\w+)\:/mUs', $Excerpt['text'], $matches)) {
|
||||
$path = "images/comments/" . $matches[1];
|
||||
$file_ext = "";
|
||||
if(file_exists($path . ".png"))
|
||||
$file_ext = ".png";
|
||||
else if(file_exists($path . ".gif"))
|
||||
$file_ext = ".gif";
|
||||
if(file_exists($path . ".webp"))
|
||||
$file_ext = ".webp";
|
||||
else if(file_exists($path . ".webp"))
|
||||
$file_ext = ".webp";
|
||||
if($file_ext === "")
|
||||
return;
|
||||
return [
|
||||
@@ -55,7 +55,7 @@ class Markdown extends \Parsedown {
|
||||
'handler' => 'line',
|
||||
'attributes' => [
|
||||
'class' => 'comment_emoji',
|
||||
'src' => '//s.w0bm.com/images/comments/' . $matches[1] . $file_ext,
|
||||
'src' => '//w0bm.com/images/comments/' . $matches[1] . $file_ext,
|
||||
'alt' => ':' . $matches[1] . ':',
|
||||
'title' => ':' . $matches[1] . ':'
|
||||
],
|
||||
|
Reference in New Issue
Block a user