Moved emojis to assets

This commit is contained in:
Igor Scheller 2018-09-10 18:09:23 +02:00
parent c1a1180d1f
commit 8456a3cf6f
13 changed files with 9 additions and 2 deletions

View File

@ -482,7 +482,7 @@ function ReplaceSmilies($msg)
) {
$msg = str_ireplace($search, sprintf(
'<img src="%s">',
sprintf($assets->getAsset('emojis/%s.gif'), $replace)
sprintf($assets->getAsset('assets/emojis/%s.gif'), $replace)
), $msg);
}

View File

Before

Width:  |  Height:  |  Size: 498 B

After

Width:  |  Height:  |  Size: 498 B

View File

Before

Width:  |  Height:  |  Size: 236 B

After

Width:  |  Height:  |  Size: 236 B

View File

Before

Width:  |  Height:  |  Size: 336 B

After

Width:  |  Height:  |  Size: 336 B

View File

Before

Width:  |  Height:  |  Size: 174 B

After

Width:  |  Height:  |  Size: 174 B

View File

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 248 B

View File

Before

Width:  |  Height:  |  Size: 650 B

After

Width:  |  Height:  |  Size: 650 B

View File

Before

Width:  |  Height:  |  Size: 485 B

After

Width:  |  Height:  |  Size: 485 B

View File

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 171 B

View File

Before

Width:  |  Height:  |  Size: 174 B

After

Width:  |  Height:  |  Size: 174 B

View File

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 170 B

View File

@ -22,7 +22,7 @@ class Response extends SymfonyResponse implements ResponseInterface
public function __construct(
$content = '',
int $status = 200,
array $headers = array(),
array $headers = [],
Renderer $view = null
) {
$this->view = $view;

View File

@ -23,6 +23,11 @@ for (let i = 0; i < 7; i++) {
themeEntries[`theme${i}`] = `./resources/assets/themes/theme${i}.less`;
}
const emojis = {};
for (let emoji of ['redface', 'wind', 'smile', 'sad', 'lol', 'cry', 'rolleyes', 'evil', 'mad', 'question']){
emojis[`${emoji}`] = `./resources/assets/emojis/${emoji}.gif`;
}
module.exports = {
context: __dirname,
resolve: {
@ -31,6 +36,7 @@ module.exports = {
entry: {
...themeEntries,
vendor: './resources/assets/js/vendor.js',
...emojis,
},
output: {
path: path.resolve('public/assets'),
@ -46,6 +52,7 @@ module.exports = {
query: { cacheDirectory: true },
},
{ test: /\.(eot|ttf|otf|svg|woff2?)(\?.*)?$/, loader: 'file-loader' },
{ test: /\.gif$/, loader: 'file-loader?name=emojis/[name].[ext]' },
{ test: /\.json$/, loader: 'json-loader' },
{ test: /\.css$/, loader: 'style-loader!css-loader' },
{ test: /\.less$/, use: ExtractTextPlugin.extract({