{* custom declarations *}
<div id="advanced-custom" class="tabMenuContent">
<section class="section">
- <h2 class="sectionTitle">{lang}wcf.acp.style.advanced.individualLess{/lang}</h2>
+ <h2 class="sectionTitle">{lang}wcf.acp.style.advanced.individualScss{/lang}</h2>
<dl class="wide">
<dt></dt>
<dd>
- <textarea id="individualLessCustom" rows="20" cols="40" name="individualLessCustom">{$variables[individualLessCustom]}</textarea>
- <small>{lang}wcf.acp.style.advanced.individualLess.description{/lang}</small>
+ <textarea id="individualScssCustom" rows="20" cols="40" name="individualScssCustom">{$variables[individualScssCustom]}</textarea>
+ <small>{lang}wcf.acp.style.advanced.individualScss.description{/lang}</small>
</dd>
</dl>
</section>
- <section class="section{if $errorField == 'overrideLessCustom'} formError{/if}">
- <h2 class="sectionTitle">{lang}wcf.acp.style.advanced.overrideLess{/lang}</h2>
+ <section class="section{if $errorField == 'overrideScssCustom'} formError{/if}">
+ <h2 class="sectionTitle">{lang}wcf.acp.style.advanced.overrideScss{/lang}</h2>
<dl class="wide">
<dt></dt>
<dd>
- <textarea id="overrideLessCustom" rows="20" cols="40" name="overrideLessCustom">{$variables[overrideLessCustom]}</textarea>
- {if $errorField == 'overrideLessCustom'}
+ <textarea id="overrideScssCustom" rows="20" cols="40" name="overrideScssCustom">{$variables[overrideScssCustom]}</textarea>
+ {if $errorField == 'overrideScssCustom'}
<small class="innerError">
- {lang}wcf.acp.style.advanced.overrideLess.error{/lang}
- {implode from=$errorType item=error}{lang}wcf.acp.style.advanced.overrideLess.error.{$error.error}{/lang}{/implode}
+ {lang}wcf.acp.style.advanced.overrideScss.error{/lang}
+ {implode from=$errorType item=error}{lang}wcf.acp.style.advanced.overrideScss.error.{$error.error}{/lang}{/implode}
</small>
{/if}
- <small>{lang}wcf.acp.style.advanced.overrideLess.description{/lang}</small>
+ <small>{lang}wcf.acp.style.advanced.overrideScss.description{/lang}</small>
</dd>
</dl>
</section>
- {include file='codemirror' codemirrorMode='text/x-less' codemirrorSelector='#individualLessCustom, #overrideLessCustom'}
+ {include file='codemirror' codemirrorMode='text/x-less' codemirrorSelector='#individualScssCustom, #overrideScssCustom'}
{event name='syntaxFieldsetsCustom'}
</div>
{/if}
<section class="section">
- <h2 class="sectionTitle">{lang}wcf.acp.style.advanced.individualLess{/lang}{if !$isTainted} ({lang}wcf.acp.style.protected.less{/lang}){/if}</h2>
+ <h2 class="sectionTitle">{lang}wcf.acp.style.advanced.individualScss{/lang}{if !$isTainted} ({lang}wcf.acp.style.protected.less{/lang}){/if}</h2>
<dl class="wide">
<dt></dt>
<dd>
- <textarea id="individualLess" rows="20" cols="40" name="individualLess">{$variables[individualLess]}</textarea>
- <small>{lang}wcf.acp.style.advanced.individualLess.description{/lang}</small>
+ <textarea id="individualScss" rows="20" cols="40" name="individualScss">{$variables[individualScss]}</textarea>
+ <small>{lang}wcf.acp.style.advanced.individualScss.description{/lang}</small>
</dd>
</dl>
</section>
- <section class="section{if $errorField == 'overrideLess'} formError{/if}">
- <h2 class="sectionTitle">{lang}wcf.acp.style.advanced.overrideLess{/lang}{if !$isTainted} ({lang}wcf.acp.style.protected.less{/lang}){/if}</h2>
+ <section class="section{if $errorField == 'overrideScss'} formError{/if}">
+ <h2 class="sectionTitle">{lang}wcf.acp.style.advanced.overrideScss{/lang}{if !$isTainted} ({lang}wcf.acp.style.protected.less{/lang}){/if}</h2>
<dl class="wide">
<dt></dt>
<dd>
- <textarea id="overrideLess" rows="20" cols="40" name="overrideLess">{$variables[overrideLess]}</textarea>
- {if $errorField == 'overrideLess'}
+ <textarea id="overrideScss" rows="20" cols="40" name="overrideScss">{$variables[overrideScss]}</textarea>
+ {if $errorField == 'overrideScss'}
<small class="innerError">
- {lang}wcf.acp.style.advanced.overrideLess.error{/lang}
- {implode from=$errorType item=error}{lang}wcf.acp.style.advanced.overrideLess.error.{$error.error}{/lang}{/implode}
+ {lang}wcf.acp.style.advanced.overrideScss.error{/lang}
+ {implode from=$errorType item=error}{lang}wcf.acp.style.advanced.overrideScss.error.{$error.error}{/lang}{/implode}
</small>
{/if}
- <small>{lang}wcf.acp.style.advanced.overrideLess.description{/lang}</small>
+ <small>{lang}wcf.acp.style.advanced.overrideScss.description{/lang}</small>
</dd>
</dl>
</section>
- {include file='codemirror' codemirrorMode='text/x-less' codemirrorSelector='#individualLess, #overrideLess' editable=$isTainted}
+ {include file='codemirror' codemirrorMode='text/x-less' codemirrorSelector='#individualScss, #overrideScss' editable=$isTainted}
{event name='syntaxFieldsetsOriginal'}
* @param {boolean} isTainted false if style is in protected mode
*/
_handleLess: function(isTainted) {
- var individualLess = elById('individualLess');
- var overrideLess = elById('overrideLess');
+ var individualScss = elById('individualScss');
+ var overrideScss = elById('overrideScss');
if (isTainted) {
EventHandler.add('com.woltlab.wcf.simpleTabMenu_styleTabMenuContainer', 'select', function(data) {
- individualLess.codemirror.refresh();
- overrideLess.codemirror.refresh();
+ individualScss.codemirror.refresh();
+ overrideScss.codemirror.refresh();
});
}
else {
EventHandler.add('com.woltlab.wcf.simpleTabMenu_advanced', 'select', function(data) {
if (data.activeName === 'advanced-custom') {
- elById('individualLessCustom').codemirror.refresh();
- elById('overrideLessCustom').codemirror.refresh();
+ elById('individualScssCustom').codemirror.refresh();
+ elById('overrideScssCustom').codemirror.refresh();
}
else if (data.activeName === 'advanced-original') {
- individualLess.codemirror.refresh();
- overrideLess.codemirror.refresh();
+ individualScss.codemirror.refresh();
+ overrideScss.codemirror.refresh();
}
});
}
}
}
- if (!empty($this->variables['overrideLess'])) {
+ if (!empty($this->variables['overrideScss'])) {
$this->parseOverrides();
}
}
$variables[] = $row['variableName'];
}
- $lines = explode("\n", StringUtil::unifyNewlines($this->variables['overrideLess']));
+ $lines = explode("\n", StringUtil::unifyNewlines($this->variables['overrideScss']));
$regEx = new Regex('^@([a-zA-Z]+): ?([@a-zA-Z0-9 ,\.\(\)\%\#-]+);$');
$errors = [];
foreach ($lines as $index => &$line) {
}
}
- $this->variables['overrideLess'] = implode("\n", $lines);
+ $this->variables['overrideScss'] = implode("\n", $lines);
if (!empty($errors)) {
- throw new UserInputException('overrideLess', $errors);
+ throw new UserInputException('overrideScss', $errors);
}
}
// set specialized variables
$this->specialVariables = [
- 'individualLess',
- 'overrideLess',
+ 'individualScss',
+ 'overrideScss',
'pageLogo',
'useFluidLayout',
'useGoogleFont',
unset($variableValue);
if (!$this->style->isTainted) {
- $tmp = Style::splitLessVariables($this->variables['individualLess']);
- $this->variables['individualLess'] = $tmp['preset'];
- $this->variables['individualLessCustom'] = $tmp['custom'];
+ $tmp = Style::splitLessVariables($this->variables['individualScss']);
+ $this->variables['individualScss'] = $tmp['preset'];
+ $this->variables['individualScssCustom'] = $tmp['custom'];
- $tmp = Style::splitLessVariables($this->variables['overrideLess']);
- $this->variables['overrideLess'] = $tmp['preset'];
- $this->variables['overrideLessCustom'] = $tmp['custom'];
+ $tmp = Style::splitLessVariables($this->variables['overrideScss']);
+ $this->variables['overrideScss'] = $tmp['preset'];
+ $this->variables['overrideScssCustom'] = $tmp['custom'];
}
}
parent::setVariables();
if (!$this->style->isTainted) {
- $this->specialVariables[] = 'individualLessCustom';
- $this->specialVariables[] = 'overrideLessCustom';
+ $this->specialVariables[] = 'individualScssCustom';
+ $this->specialVariables[] = 'overrideScssCustom';
}
}
// TODO: how should this actually work?
/*if (!$this->style->isTainted) {
- $this->variables['individualLess'] = Style::joinLessVariables($this->variables['individualLess'], $this->variables['individualLessCustom']);
- $this->variables['overrideLess'] = Style::joinLessVariables($this->variables['overrideLess'], $this->variables['overrideLessCustom']);
+ $this->variables['individualScss'] = Style::joinLessVariables($this->variables['individualScss'], $this->variables['individualScssCustom']);
+ $this->variables['overrideScss'] = Style::joinLessVariables($this->variables['overrideScss'], $this->variables['overrideScssCustom']);
- unset($this->variables['individualLessCustom']);
- unset($this->variables['overrideLessCustom']);
+ unset($this->variables['individualScssCustom']);
+ unset($this->variables['overrideScssCustom']);
}*/
$this->objectAction = new StyleAction(array($this->style), 'update', array(
public function markAsTainted() {
// merge definitions
$variables = $this->styleEditor->getVariables();
- $variables['individualLess'] = str_replace("/* WCF_STYLE_CUSTOM_USER_MODIFICATIONS */\n", '', $variables['individualLess']);
- $variables['overrideLess'] = str_replace("/* WCF_STYLE_CUSTOM_USER_MODIFICATIONS */\n", '', $variables['overrideLess']);
+ $variables['individualScss'] = str_replace("/* WCF_STYLE_CUSTOM_USER_MODIFICATIONS */\n", '', $variables['individualScss']);
+ $variables['overrideScss'] = str_replace("/* WCF_STYLE_CUSTOM_USER_MODIFICATIONS */\n", '', $variables['overrideScss']);
$this->styleEditor->setVariables($variables);
$this->styleEditor->update([
$variables = $style->getVariables();
- $individualLess = Style::splitLessVariables($variables['individualLess']);
- $variables['individualLess'] = Style::joinLessVariables($styleData['variables']['individualLess'], $individualLess['custom']);
+ $individualScss = Style::splitLessVariables($variables['individualScss']);
+ $variables['individualScss'] = Style::joinLessVariables($styleData['variables']['individualScss'], $individualScss['custom']);
- $overrideLess = Style::splitLessVariables($variables['overrideLess']);
- $variables['overrideLess'] = Style::joinLessVariables($styleData['variables']['overrideLess'], $overrideLess['custom']);
+ $overrideScss = Style::splitLessVariables($variables['overrideScss']);
+ $variables['overrideScss'] = Style::joinLessVariables($styleData['variables']['overrideScss'], $overrideScss['custom']);
$styleData['variables'] = $variables;
<item name="wcf.acp.style.add"><![CDATA[Stil hinzufügen]]></item>
<item name="wcf.acp.style.advanced"><![CDATA[Erweiterte Einstellungen]]></item>
<item name="wcf.acp.style.advanced.custom"><![CDATA[Eigene Deklarationen]]></item>
- <item name="wcf.acp.style.advanced.individualLess"><![CDATA[Individuelles CSS und LESS]]></item>
- <item name="wcf.acp.style.advanced.individualLess.description"><![CDATA[Die Eingabe wird am Ende des Stils eingefügt und kann vollständig aus CSS bestehen. Sie haben zusätzlich den Zugriff auf LESS und alle von Community Framework zur Verfügung gestellten Mixins.]]></item>
+ <item name="wcf.acp.style.advanced.individualScss"><![CDATA[Individuelles CSS und SCSS]]></item>
+ <item name="wcf.acp.style.advanced.individualScss.description"><![CDATA[Die Eingabe wird am Ende des Stils eingefügt und kann vollständig aus CSS bestehen. Sie haben zusätzlich den Zugriff auf SCSS und alle von Community Framework zur Verfügung gestellten Mixins.]]></item>
<item name="wcf.acp.style.advanced.original"><![CDATA[Vorgegebene Deklarationen]]></item>
- <item name="wcf.acp.style.advanced.overrideLess"><![CDATA[Überschreiben von LESS-Variablen]]></item>
- <item name="wcf.acp.style.advanced.overrideLess.description"><![CDATA[Sie können innerhalb dieser Eingabe beliebige LESS-Variablen überschreiben, die nicht durch den Stil-Editor direkt bearbeitbar sind. Beim Bezug auf andere Variablen muss sichergestellt werden, dass diese in der Reihenfolge vorher definiert wurden. Die Syntax muss wie folgt lauten: „@variableName: variableValue;“]]></item>
- <item name="wcf.acp.style.advanced.overrideLess.error"><![CDATA[Ihre Eingabe war ungültig, bitte überprüfen Sie die folgenden Einträge:]]></item>
- <item name="wcf.acp.style.advanced.overrideLess.error.notValid"><![CDATA[Eingabe „{$error[text]}“ ungültig]]></item>
- <item name="wcf.acp.style.advanced.overrideLess.error.predefined"><![CDATA[Variable „{$error[text]}“ wird bereits durch den Stil-Editor gesetzt]]></item>
- <item name="wcf.acp.style.advanced.overrideLess.error.unknown"><![CDATA[Variable „{$error[text]}“ unbekannt]]></item>
+ <item name="wcf.acp.style.advanced.overrideScss"><![CDATA[Überschreiben von SCSS-Variablen]]></item>
+ <item name="wcf.acp.style.advanced.overrideScss.description"><![CDATA[Sie können innerhalb dieser Eingabe beliebige SCSS-Variablen überschreiben, die nicht durch den Stil-Editor direkt bearbeitbar sind. Beim Bezug auf andere Variablen muss sichergestellt werden, dass diese in der Reihenfolge vorher definiert wurden. Die Syntax muss wie folgt lauten: „$variableName: variableValue;“]]></item>
+ <item name="wcf.acp.style.advanced.overrideScss.error"><![CDATA[Ihre Eingabe war ungültig, bitte überprüfen Sie die folgenden Einträge:]]></item>
+ <item name="wcf.acp.style.advanced.overrideScss.error.notValid"><![CDATA[Eingabe „{$error[text]}“ ungültig]]></item>
+ <item name="wcf.acp.style.advanced.overrideScss.error.predefined"><![CDATA[Variable „{$error[text]}“ wird bereits durch den Stil-Editor gesetzt]]></item>
+ <item name="wcf.acp.style.advanced.overrideScss.error.unknown"><![CDATA[Variable „{$error[text]}“ unbekannt]]></item>
<item name="wcf.acp.style.authorName"><![CDATA[Autor]]></item>
<item name="wcf.acp.style.authorURL"><![CDATA[Website]]></item>
<item name="wcf.acp.style.button.exportStyle"><![CDATA[Export starten]]></item>
<item name="wcf.acp.style.add"><![CDATA[Add Style]]></item>
<item name="wcf.acp.style.advanced"><![CDATA[Advanced Settings]]></item>
<item name="wcf.acp.style.advanced.custom"><![CDATA[Own Declarations]]></item>
- <item name="wcf.acp.style.advanced.individualLess"><![CDATA[Individual CSS and LESS]]></item>
- <item name="wcf.acp.style.advanced.individualLess.description"><![CDATA[Content will be appended to the style sheet and may contain pure CSS. Furthermore you can use LESS including all Mixins provided by Community Framework.]]></item>
+ <item name="wcf.acp.style.advanced.individualScss"><![CDATA[Individual CSS and SCSS]]></item>
+ <item name="wcf.acp.style.advanced.individualScss.description"><![CDATA[Content will be appended to the style sheet and may contain pure CSS. Furthermore you can use SCSS including all Mixins provided by Community Framework.]]></item>
<item name="wcf.acp.style.advanced.original"><![CDATA[Preset Declarations]]></item>
- <item name="wcf.acp.style.advanced.overrideLess"><![CDATA[LESS Variables Override]]></item>
- <item name="wcf.acp.style.advanced.overrideLess.description"><![CDATA[Allows you to override LESS variables not available through the style editor itself. Syntax: “@variableName: variableValue;”, referred variables must be declared prior any attempt to read their value.]]></item>
- <item name="wcf.acp.style.advanced.overrideLess.error"><![CDATA[Provided value was invalid, please verify these items:]]></item>
- <item name="wcf.acp.style.advanced.overrideLess.error.notValid"><![CDATA[Input for “{$error[text]}” invalid]]></item>
- <item name="wcf.acp.style.advanced.overrideLess.error.predefined"><![CDATA[Variable “{$error[text]}” is already defined by the style editor]]></item>
- <item name="wcf.acp.style.advanced.overrideLess.error.unknown"><![CDATA[Variable “{$error[text]}” is not recognized]]></item>
+ <item name="wcf.acp.style.advanced.overrideScss"><![CDATA[SCSS Variables Override]]></item>
+ <item name="wcf.acp.style.advanced.overrideScss.description"><![CDATA[Allows you to override SCSS variables not available through the style editor itself. Syntax: “$variableName: variableValue;”, referred variables must be declared prior any attempt to read their value.]]></item>
+ <item name="wcf.acp.style.advanced.overrideScss.error"><![CDATA[Provided value was invalid, please verify these items:]]></item>
+ <item name="wcf.acp.style.advanced.overrideScss.error.notValid"><![CDATA[Input for “{$error[text]}” invalid]]></item>
+ <item name="wcf.acp.style.advanced.overrideScss.error.predefined"><![CDATA[Variable “{$error[text]}” is already defined by the style editor]]></item>
+ <item name="wcf.acp.style.advanced.overrideScss.error.unknown"><![CDATA[Variable “{$error[text]}” is not recognized]]></item>
<item name="wcf.acp.style.authorName"><![CDATA[Author]]></item>
<item name="wcf.acp.style.authorURL"><![CDATA[Website]]></item>
<item name="wcf.acp.style.button.exportStyle"><![CDATA[Start Export]]></item>
-- style default values
-INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('individualLess', '');
+INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('individualScss', '');
INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('messageSidebarOrientation', 'left');
-INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('overrideLess', '');
+INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('overrideScss', '');
INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('pageLogo', '');
INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('useFluidLayout', '1');
INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('useGoogleFont', '1');