dropped theme cli command

This commit is contained in:
Sergio Brighenti 2021-09-05 17:56:46 +02:00
parent a4077b7844
commit 6523e87520
3 changed files with 2363 additions and 43 deletions

View file

@ -4,12 +4,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## Unreleased
## [3.5.0] - 2021-09-05
### Added
- Support for theme-park.dev themes.
### Fixed
- Wrong css when reapplying the default theme.
### Removed
- Dropped theme cli command.
## [3.4.1] - 2021-08-11
### Added
- Toggle to disable embeds.

View file

@ -1,36 +0,0 @@
#!/usr/bin/env php
<?php
((PHP_MAJOR_VERSION >= 7 && PHP_MINOR_VERSION >= 2) || PHP_MAJOR_VERSION > 7) ?: die('Sorry, PHP 7.2 or above is required to run XBackBone.');
if (PHP_SAPI !== 'cli') {
die();
}
require __DIR__ . '/../vendor/autoload.php';
chdir(__DIR__ . '/../');
$json = json_decode(file_get_contents('https://bootswatch.com/api/4.json'));
if (!isset($argv[1])) {
echo 'Usage: php bin\\theme <theme-name|"default">' . PHP_EOL;
echo 'Here a list of available Bootswatch themes:' . PHP_EOL;
}
if (isset($argv[1]) && strtolower($argv[1]) === 'default') {
file_put_contents('static/bootstrap/css/bootstrap.min.css', file_get_contents('https://bootswatch.com/_vendor/bootstrap/dist/css/bootstrap.min.css'));
echo "Reverted to default theme." . PHP_EOL;
} else {
foreach ($json->themes as $theme) {
if (isset($argv[1]) && strtolower($argv[1]) === strtolower($theme->name)) {
file_put_contents('static/bootstrap/css/bootstrap.min.css', file_get_contents($theme->cssMin));
echo "Installed theme {$theme->name}." . PHP_EOL;
break;
}
if (!isset($argv[1])) {
echo " - {$theme->name} ({$theme->description})[Preview: {$theme->preview}]" . PHP_EOL;
}
}
}
exit(0);

2365
package-lock.json generated

File diff suppressed because it is too large Load diff