Skip to content

Commit

Permalink
Merge pull request #18 from Gamemap/master
Browse files Browse the repository at this point in the history
Added Wrap Plugin support
  • Loading branch information
MrReSc authored Dec 17, 2021
2 parents bc24884 + b1b6d9d commit c0e3cda
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 3 deletions.
2 changes: 1 addition & 1 deletion conf/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
$conf['autoDark'] = 0;
$conf['userChoice'] = 0;
$conf['pluginNote'] = 0;

$conf['pluginWrap'] = 0;

1 change: 1 addition & 0 deletions conf/metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
$meta['autoDark'] = array('onoff');
$meta['userChoice'] = array('onoff');
$meta['pluginNote'] = array('onoff');
$meta['pluginWrap'] = array('onoff');

67 changes: 67 additions & 0 deletions css/_plugin_wrap.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/**
* This file provides styles for the Wrap plugin if the option pluginWrap is enabled
*/

&:root[pluginWrap="1"] {


/* general styles */
.wrap_info { background-color: #d1d7f; }

.wrap_important { background-color: #ffd39f; }

.wrap_alert { background-color: #ffbcaf; }

.wrap_tip { background-color: #fff79f; }

.wrap_help { background-color: #dcc2ef; }

.wrap_todo { background-color: #c2efdd; }

.wrap_download { background-color: #d6efc2; }

.wrap_hi {
background-color: #ff9;
overflow: hidden;
}



/**************************************************/
/* DARK MODE */
/* for dark mode change the values like Wrap would */
/**************************************************/

.darkModeWrapPlugin{
.wrap_info { background-color: #343e4a; }

.wrap_important { background-color: #6c3b00; }

.wrap_alert { background-color: #6b1100; }

.wrap_tip { background-color: #665e00; }

.wrap_help { background-color: #3c1757; }

.wrap_todo { background-color: #17573e; }

.wrap_download { background-color: #345717; }

.wrap_hi {
background-color: #4e4e0d;
}
}

/* dark theme and automatic is switched off*/
&:root[theme="dark"] {
.darkModeWrapPlugin();
}

/* User prefers dark theme and automatic is switched on*/
@media (prefers-color-scheme: dark){
&:root[theme="auto"] {
.darkModeWrapPlugin();
}
}
}

3 changes: 2 additions & 1 deletion lang/de-informal/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
$lang['theme'] = 'Farbschema wenn die automatische Erkennung (autoDark) deaktiviert ist.';
$lang['autoDark'] = 'Automatische Erkennung des Farbschema vom Betriebssystem.';
$lang['userChoice'] = 'Aktiviert eine Button damit der Benutzer selber das Farbschema umschalten kann.';
$lang['pluginNote'] = 'Unterstützung für das Note Plugin aktivieren.';
$lang['pluginNote'] = 'Unterstützung für das Note Plugin aktivieren.';
$lang['pluginWrap'] = 'Unterstützung für das Wrap-Plugin aktivieren.';
3 changes: 2 additions & 1 deletion lang/de/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
$lang['theme'] = 'Farbschema wenn die automatische Erkennung (autoDark) deaktiviert ist.';
$lang['autoDark'] = 'Automatische Erkennung des Farbschema vom Betriebssystem.';
$lang['userChoice'] = 'Aktiviert eine Button damit der Benutzer selber das Farbschema umschalten kann.';
$lang['pluginNote'] = 'Unterstützung für das Note Plugin aktivieren.';
$lang['pluginNote'] = 'Unterstützung für das Note Plugin aktivieren.';
$lang['pluginWrap'] = 'Unterstützung für das Wrap-Plugin aktivieren.';
1 change: 1 addition & 0 deletions lang/en/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
$lang['autoDark'] = 'Automatic detection of the color scheme by the operating system';
$lang['userChoice'] = 'Activates a button so that the user can switch the color scheme himself.';
$lang['pluginNote'] = 'Activate support for the Note plugin.';
$lang['pluginWrap'] = 'Activate support for the Wrap plugin.';
5 changes: 5 additions & 0 deletions main.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
if (tpl_getConf('pluginNote')) {
$pluginNote = "1";
}
$pluginWrap = "0";
if (tpl_getConf('pluginWrap')) {
$pluginWrap = "1";
}

/**
* *********************************************************************************
Expand All @@ -58,6 +62,7 @@
class="no-js"
theme="<?php echo $theme ?>"
pluginnote="<?php echo $pluginNote ?>"
pluginwrap="<?php echo $pluginWrap ?>"
>

<head>
Expand Down
1 change: 1 addition & 0 deletions style.ini
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ css/_admin.less = screen
css/_autocolor.less = screen
css/_geshi_dark.less = screen
css/_plugin_note.less = screen
css/_plugin_wrap.less = screen
css/structure.less = screen
css/design.less = screen
css/usertools.less = screen
Expand Down

0 comments on commit c0e3cda

Please sign in to comment.