-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove asset and head.php rename former theme.css to theme_base.css create new css/options folder for optional CSS files to be added
- Loading branch information
1 parent
641e09e
commit 2e1d0e0
Showing
9 changed files
with
93 additions
and
46 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
|
||
cd themes/FlexTheme | ||
lessc -x ./less/build.less ./css/theme.css | ||
lessc -x ./less/build.less ./css/theme_base.css | ||
cd ../../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
namespace humhub\modules\flexTheme\helpers; | ||
|
||
use humhub\modules\flexTheme\models\Config; | ||
use Yii; | ||
|
||
class FileHelper { | ||
|
||
const THEME_PATH = '@flex-theme/themes/FlexTheme'; | ||
|
||
public static function getVarsFile() | ||
{ | ||
return Yii::getAlias(self::THEME_PATH . '/css/variables.css'); | ||
} | ||
|
||
private static function getOptionsPath() | ||
{ | ||
return Yii::getAlias(self::THEME_PATH . '/css/options'); | ||
} | ||
|
||
private static function getThemeFile() | ||
{ | ||
return Yii::getAlias(self::THEME_PATH . '/css/theme.css'); | ||
} | ||
|
||
private static function getThemeBaseFile() | ||
{ | ||
return Yii::getAlias(self::THEME_PATH . '/css/theme_base.css'); | ||
} | ||
|
||
public static function updateThemeFile() | ||
{ | ||
$theme_base = file_get_contents(self::getThemeBaseFile()); | ||
$vars = file_get_contents(self::getVarsFile()); | ||
$options = ''; | ||
|
||
$config = new Config(); | ||
if ($config->showUploadAsButtons) { | ||
$options = file_get_contents(self::getOptionsPath() . '/showUploadAsButtons.css'); | ||
} | ||
|
||
$content = $theme_base . $options . $vars; | ||
|
||
file_put_contents(self::getThemeFile(), $content); | ||
|
||
// Clear Asset Manager to reload theme.css | ||
Yii::$app->assetManager->clear(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.upload-buttons .btn-group .fileinput-button, .upload-buttons .btn-group .dropdown-toggle { | ||
display: none; | ||
} | ||
.upload-buttons .btn-group .dropdown-menu { | ||
display: inline-block; | ||
position: relative; | ||
border: none; | ||
padding: 0; | ||
margin: 0; | ||
width: auto; | ||
min-width: 0; | ||
} | ||
.upload-buttons .btn-group .dropdown-menu li { | ||
float: left; | ||
margin: 0; | ||
line-height: 1; | ||
border-radius: 10px; | ||
} | ||
.upload-buttons .btn-group .dropdown-menu li a { | ||
margin: 0 3px; | ||
padding: 3px; | ||
} | ||
.upload-buttons .btn-group .dropdown-menu li a i { | ||
margin: 1px; | ||
} | ||
.upload-buttons .btn-group .dropdown-menu li a[data-action-click="file.uploadByType"] { | ||
font-size: 0; padding: 5px 3px; | ||
} | ||
.upload-buttons .btn-group .dropdown-menu li:hover { | ||
border-left-color: transparent !important; | ||
} |
File renamed without changes.
This file was deleted.
Oops, something went wrong.