last things, webp images all aboard

This commit is contained in:
noxy
2019-09-02 22:06:28 +00:00
parent 4b6d5812a8
commit 08d88a0c9c
13 changed files with 36 additions and 16 deletions

View File

@@ -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 '';
}

View File

@@ -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] . ':'
],

View File

@@ -3772,7 +3772,8 @@ button#layout5 {
}
div#parent {
overflow-x: overlay;
overflow-x: overlay !important;
overflow-x: scroll;
}
a.not-safe-for-work {

View File

@@ -7,7 +7,7 @@
@foreach($categories as $category)
<div id="category_box_{{$category->shortname}}" class="col-sm-6 col-md-4 category">
<div class="thumbnail">
<img src="{{ asset('/images/cat/' . $category->shortname . '.png') }}" alt="{{$category->name}}">
<img src="{{ asset('/images/cat/' . $category->shortname . '.webp') }}" alt="{{$category->name}}">
<div class="caption">
<h3>{{$category->name}} <small>{{$category->videos()->count()}}</small></h3>
<p>{{$category->description}}</p>

View File

@@ -22,6 +22,7 @@
<a href="{{url('register')}}" class="btn btn-success disabled">Register</a>
</form>
</div>
<p>w0bm now supports a javascript free experience, check it out if you dont like js that much</p>
</div>
</div>
</div>

View File

@@ -31,12 +31,12 @@
<div style="display: none;" id="parent" class="emojis-box">
<div id="child" class="emojis">
<?php
$files = glob(public_path() . DIRECTORY_SEPARATOR . 'images/comments/*.{gif,png}', GLOB_BRACE);
$files = glob(public_path() . DIRECTORY_SEPARATOR . 'images/comments/*.webp', GLOB_BRACE);
$files = array_map(function ($f) { return pathinfo($f); }, $files);
?>
@foreach ($files as $file)
<a title=":{{$file['filename']}}:" href="javascript:;" onclick="formatTextEmoji ('{{$file['filename']}}');"><img class="comment_emoji_small" src="//s.w0bm.com/images/comments/{{$file['basename']}}"></a>
<a title=":{{$file['filename']}}:" href="javascript:;" onclick="formatTextEmoji ('{{$file['filename']}}');"><img class="comment_emoji_small" src="//w0bm.com/images/comments/{{$file['basename']}}"></a>
@endforeach
</div>
</div>

View File

@@ -7,7 +7,7 @@
@foreach($categories as $category)
<div id="category_box_{{$category->shortname}}" class="col-sm-6 col-md-4 category">
<div class="thumbnail">
<img src="{{ asset('/images/cat/' . $category->shortname . '.png') }}" alt="{{$category->name}}">
<img src="{{ asset('/images/cat/' . $category->shortname . '.webp') }}" alt="{{$category->name}}">
<div class="caption">
<h3>{{$category->name}} <small>{{$category->videos()->count()}}</small></h3>
<p>{{$category->description}}</p>

View File

@@ -46,6 +46,8 @@
<div id="layoutSwitcher" class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" id="layout1" href="#">w0bm.com</a>
<a class="dropdown-item" id="layout3" href="#">z0mb</a>
<a class="dropdown-item" id="layout4" href="#"><span style="font-size:10px;">nojs</span>z0mbie</a>
<a class="dropdown-item" id="layout5" href="#">m0bile</a>
</div>
</li>

View File

@@ -7,7 +7,7 @@
@foreach($categories as $category)
<div id="category_box_{{$category->shortname}}" class="col-sm-6 col-md-4 category">
<div class="thumbnail">
<img src="{{ asset('/images/cat/' . $category->shortname . '.png') }}" alt="{{$category->name}}">
<img src="{{ asset('/images/cat/' . $category->shortname . '.webp') }}" alt="{{$category->name}}">
<div class="caption">
<h3>{{$category->name}} <small>{{$category->videos()->count()}}</small></h3>
<p>{{$category->description}}</p>

View File

@@ -7,7 +7,7 @@
@foreach($categories as $category)
<div id="category_box_{{$category->shortname}}" class="col-sm-6 col-md-4 category">
<div class="thumbnail">
<img src="{{ asset('/images/cat/' . $category->shortname . '.png') }}" alt="{{$category->name}}">
<img src="{{ asset('/images/cat/' . $category->shortname . '.webp') }}" alt="{{$category->name}}">
<div class="caption">
<h3>{{$category->name}} <small>{{$category->videos()->count()}}</small></h3>
<p>{{$category->description}}</p>

View File

@@ -7,7 +7,7 @@
@foreach($categories as $category)
<div class="col-sm-6 col-md-4 category">
<div class="thumbnail">
<img src="{{ asset('/images/cat/' . $category->shortname . '.png') }}" alt="{{$category->name}}">
<img src="{{ asset('/images/cat/' . $category->shortname . '.webp') }}" alt="{{$category->name}}">
<div class="caption">
<h3>{{$category->name}} <small>{{$category->videos()->count()}}</small></h3>
<p>{{$category->description}}</p>

View File

@@ -27,12 +27,12 @@
<div style="display: none;" id="parent" class="emojis-box">
<div data-simplebar data-simplebar-auto-hide="false" id="child" class="emojis">
<?php
$files = glob(public_path() . DIRECTORY_SEPARATOR . 'images/comments/*.{gif,png}', GLOB_BRACE);
$files = glob(public_path() . DIRECTORY_SEPARATOR . 'images/comments/*.webp', GLOB_BRACE);
$files = array_map(function ($f) { return pathinfo($f); }, $files);
?>
@foreach ($files as $file)
<a title=":{{$file['filename']}}:" href="javascript:;" onclick="formatTextEmoji ('{{$file['filename']}}');"><img class="comment_emoji_small" src="//s.w0bm.com/images/comments/{{$file['basename']}}"></a>
<a title=":{{$file['filename']}}:" href="javascript:;" onclick="formatTextEmoji ('{{$file['filename']}}');"><img class="comment_emoji_small" src="//w0bm.com/images/comments/{{$file['basename']}}"></a>
@endforeach
</div>
</div>

View File

@@ -0,0 +1,16 @@
<li role="presentation" class="layoutChanger" id="layoutSwitcher">
<a data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span> Layout
</a>
<ul class="dropdown-menu">
<div class="layoutblah">
<button class="layoutbutton" id="layout1">w0bm.com</button>
<br>
<button class="layoutbutton" id="layout2">Njum</button>
<br>
<button class="layoutbutton" id="layout3">z0mb</button>
<br>
<button class="layoutbutton" id="layout4">z0mbie</button>
</div>
</ul>
</li>